@skj1724/oh-my-opencode 3.23.0 → 3.23.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.
Files changed (44) hide show
  1. package/dist/agents/btw-advisor.d.ts +5 -0
  2. package/dist/agents/btw-advisor.test.d.ts +1 -0
  3. package/dist/agents/index.d.ts +1 -0
  4. package/dist/agents/momus.d.ts +1 -1
  5. package/dist/agents/types.d.ts +1 -1
  6. package/dist/agents/utils.d.ts +5 -1
  7. package/dist/cli/index.js +20 -8
  8. package/dist/config/schema.d.ts +137 -3
  9. package/dist/features/boulder-state/event-bus.d.ts +9 -1
  10. package/dist/features/boulder-state/storage.d.ts +1 -0
  11. package/dist/features/boulder-state/types.d.ts +5 -0
  12. package/dist/features/boulder-state/types.test.d.ts +1 -0
  13. package/dist/features/builtin-commands/templates/btw.d.ts +1 -0
  14. package/dist/features/builtin-commands/types.d.ts +1 -1
  15. package/dist/features/claude-code-agent-loader/loader.d.ts +10 -2
  16. package/dist/hooks/atlas/plan-completion.test.d.ts +1 -0
  17. package/dist/hooks/compaction-context-injector/index.d.ts +10 -1
  18. package/dist/hooks/index.d.ts +2 -1
  19. package/dist/hooks/plan-completion/archive.test.d.ts +1 -0
  20. package/dist/hooks/plan-completion/extract-learnings.test.d.ts +1 -0
  21. package/dist/hooks/plan-completion/generate-report.test.d.ts +1 -0
  22. package/dist/hooks/plan-completion/index.d.ts +13 -0
  23. package/dist/hooks/plan-completion/index.test.d.ts +1 -0
  24. package/dist/hooks/plan-completion/integration.test.d.ts +1 -0
  25. package/dist/hooks/plan-completion/update-summary.test.d.ts +1 -0
  26. package/dist/hooks/thinking-language-validator/detector.d.ts +2 -1
  27. package/dist/index.js +1004 -385
  28. package/dist/shared/frontmatter.d.ts +7 -0
  29. package/dist/shared/index.d.ts +2 -0
  30. package/dist/shared/language-detector.d.ts +24 -0
  31. package/dist/shared/language-enforcer.d.ts +13 -0
  32. package/dist/tools/btw/constants.d.ts +1 -0
  33. package/dist/tools/btw/index.d.ts +3 -0
  34. package/dist/tools/btw/post-processor.d.ts +1 -0
  35. package/dist/tools/btw/post-processor.test.d.ts +1 -0
  36. package/dist/tools/btw/tools.d.ts +3 -0
  37. package/dist/tools/btw/tools.test.d.ts +1 -0
  38. package/dist/tools/btw/types.d.ts +3 -0
  39. package/dist/tools/delegate-task/language-validation.test.d.ts +1 -0
  40. package/dist/tools/delegate-task/tools.d.ts +10 -0
  41. package/dist/tools/index.d.ts +1 -0
  42. package/dist/tools/slashcommand/tools.d.ts +3 -1
  43. package/dist/tools/slashcommand/tools.test.d.ts +1 -0
  44. package/package.json +1 -1
@@ -4,4 +4,11 @@ export interface FrontmatterResult<T = Record<string, unknown>> {
4
4
  hadFrontmatter: boolean;
5
5
  parseError: boolean;
6
6
  }
7
+ export interface CompletionAction {
8
+ type: string;
9
+ enabled: boolean;
10
+ message?: string;
11
+ command?: string;
12
+ }
7
13
  export declare function parseFrontmatter<T = Record<string, unknown>>(content: string): FrontmatterResult<T>;
14
+ export declare function parseCompletionActions(planPath: string): CompletionAction[];
@@ -36,3 +36,5 @@ export * from "./case-insensitive";
36
36
  export * from "./fileio-monitor";
37
37
  export * from "./windows-reserved-names";
38
38
  export * from "./usage-tracker";
39
+ export * from "./language-enforcer";
40
+ export * from "./language-detector";
@@ -0,0 +1,24 @@
1
+ /**
2
+ * 语言检测共享模块。
3
+ *
4
+ * 从 language-reminder 和 thinking-language-validator 两个钩子中
5
+ * 提取重复的语言检测逻辑,提供两个行为独立的检测函数。
6
+ */
7
+ /**
8
+ * 检测文本是否为英文(用于用户消息检测)。
9
+ *
10
+ * - 最小 meaningful 长度:20 字符(高置信度要求)
11
+ * - 无 trigger 词检测
12
+ * - 无 Markdown 链接剥离
13
+ * - 返回 boolean
14
+ */
15
+ export declare function isEnglishText(text: string, threshold: number): boolean;
16
+ /**
17
+ * 检测 agent thinking 块中的英文违规。
18
+ *
19
+ * - 最小 meaningful 长度:4 字符(thinking 块通常较短,需敏感检测)
20
+ * - 含 17 个英文 trigger 词检测
21
+ * - 含 Markdown 链接剥离:`[text](url)` → `text`
22
+ * - 返回 `false | 'trigger' | 'ascii'`
23
+ */
24
+ export declare function detectEnglishViolation(text: string, threshold?: number): false | "trigger" | "ascii";
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 统一的语言约束强制执行开关模块。
3
+ *
4
+ * 三套开关优先级:
5
+ * 1. `disabled_hooks`(最高优先级)— 控制钩子是否注册
6
+ * 2. `language_enforcement.enabled` — 控制是否注入/检测
7
+ * 3. 各钩子的 `reminder_interval` / `violation_threshold` — 行为细节
8
+ */
9
+ export declare function isLanguageEnforcementEnabled(config?: {
10
+ language_enforcement?: {
11
+ enabled?: boolean;
12
+ };
13
+ }): boolean;
@@ -0,0 +1 @@
1
+ export declare const BTW_TOOL_DESCRIPTION: string;
@@ -0,0 +1,3 @@
1
+ export { createBtwTool } from "./tools";
2
+ export { postProcessBtwResponse } from "./post-processor";
3
+ export type { BtwArgs } from "./types";
@@ -0,0 +1 @@
1
+ export declare function postProcessBtwResponse(response: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { type PluginInput, type ToolDefinition } from "@opencode-ai/plugin";
2
+ import type { BackgroundManager } from "../../features/background-agent";
3
+ export declare function createBtwTool(ctx: PluginInput, backgroundManager: BackgroundManager): ToolDefinition;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface BtwArgs {
2
+ question: string;
3
+ }
@@ -20,10 +20,20 @@ export interface DelegateTaskToolOptions {
20
20
  sisyphusJuniorModel?: string;
21
21
  runtimeFallbackConfig?: RuntimeFallbackConfig;
22
22
  agentFallbackModels?: Record<string, FallbackModelEntry[] | undefined>;
23
+ languageEnforcementConfig?: {
24
+ language_enforcement?: {
25
+ enabled?: boolean;
26
+ };
27
+ };
23
28
  }
24
29
  export interface BuildSystemContentInput {
25
30
  skillContent?: string;
26
31
  categoryPromptAppend?: string;
32
+ config?: {
33
+ language_enforcement?: {
34
+ enabled?: boolean;
35
+ };
36
+ };
27
37
  }
28
38
  export declare function buildSystemContent(input: BuildSystemContentInput): string;
29
39
  export interface DelegateTaskMessageInfo {
@@ -11,5 +11,6 @@ type OpencodeClient = PluginInput["client"];
11
11
  export { createCallOmoAgent } from "./call-omo-agent";
12
12
  export { createLookAt } from "./look-at";
13
13
  export { createDelegateTask } from "./delegate-task";
14
+ export { createBtwTool } from "./btw";
14
15
  export declare function createBackgroundTools(manager: BackgroundManager, client: OpencodeClient): Record<string, ToolDefinition>;
15
16
  export declare const builtinTools: Record<string, ToolDefinition>;
@@ -1,5 +1,7 @@
1
1
  import { type ToolDefinition } from "@opencode-ai/plugin";
2
+ import { type BuiltinCommandName } from "../../features/builtin-commands";
2
3
  import type { CommandInfo, SlashcommandToolOptions } from "./types";
3
- export declare function discoverCommandsSync(): CommandInfo[];
4
+ export declare function discoverCommandsSync(disabledCommands?: BuiltinCommandName[]): CommandInfo[];
5
+ export declare function sanitizeCommandContent(content: string, commandName: string): string;
4
6
  export declare function createSlashcommandTool(options?: SlashcommandToolOptions): ToolDefinition;
5
7
  export declare const slashcommand: ToolDefinition;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skj1724/oh-my-opencode",
3
- "version": "3.23.00",
3
+ "version": "3.23.02",
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",