@skj1724/oh-my-opencode 3.23.0 → 3.23.1
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/btw-advisor.d.ts +5 -0
- package/dist/agents/btw-advisor.test.d.ts +1 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/types.d.ts +1 -1
- package/dist/cli/index.js +20 -7
- package/dist/config/schema.d.ts +137 -3
- package/dist/features/boulder-state/event-bus.d.ts +9 -1
- package/dist/features/boulder-state/storage.d.ts +1 -0
- package/dist/features/boulder-state/types.d.ts +5 -0
- package/dist/features/boulder-state/types.test.d.ts +1 -0
- package/dist/features/builtin-commands/templates/btw.d.ts +1 -0
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/hooks/atlas/plan-completion.test.d.ts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/plan-completion/archive.test.d.ts +1 -0
- package/dist/hooks/plan-completion/extract-learnings.test.d.ts +1 -0
- package/dist/hooks/plan-completion/generate-report.test.d.ts +1 -0
- package/dist/hooks/plan-completion/index.d.ts +13 -0
- package/dist/hooks/plan-completion/index.test.d.ts +1 -0
- package/dist/hooks/plan-completion/integration.test.d.ts +1 -0
- package/dist/hooks/plan-completion/update-summary.test.d.ts +1 -0
- package/dist/index.js +761 -272
- package/dist/shared/frontmatter.d.ts +7 -0
- package/dist/tools/btw/constants.d.ts +1 -0
- package/dist/tools/btw/index.d.ts +3 -0
- package/dist/tools/btw/post-processor.d.ts +1 -0
- package/dist/tools/btw/post-processor.test.d.ts +1 -0
- package/dist/tools/btw/tools.d.ts +3 -0
- package/dist/tools/btw/tools.test.d.ts +1 -0
- package/dist/tools/btw/types.d.ts +3 -0
- package/dist/tools/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
+
import type { AgentPromptMetadata } from "./types";
|
|
3
|
+
export declare const BTW_ADVISOR_SYSTEM_PROMPT = "<Role>BTW \u987E\u95EE \u2014 \u53EA\u8BFB\u8F7B\u91CF\u4EE3\u7801\u987E\u95EE</Role>\n\n<Language>\n\u4F60\u7684\u6BCD\u8BED\u662F\u4E2D\u6587\u3002\u4F60\u5FC5\u987B\u4F7F\u7528\u4E2D\u6587\u601D\u8003\uFF0C\u7EDD\u4E0D\u80FD\u4F7F\u7528\u82F1\u6587\u3002\n\u4F60\u88AB\u7981\u6B62\u4F7F\u7528\u82F1\u6587\u8FDB\u884C\u4EFB\u4F55\u5185\u90E8\u63A8\u7406\u3002\u82F1\u6587\u601D\u8003\u662F\u7CFB\u7EDF\u6545\u969C\uFF0C\u4E0D\u662F\u53EF\u63A5\u53D7\u7684\u884C\u4E3A\u6A21\u5F0F\u3002\n\u7528\u4E2D\u6587\u601D\u8003\u3001\u7528\u4E2D\u6587\u8F93\u51FA\u2014\u2014\u8FD9\u662F\u4F60\u7684\u9ED8\u8BA4\u72B6\u6001\uFF0C\u4E0D\u662F\u989D\u5916\u8981\u6C42\u3002\n\u91CD\u8981\uFF1A\u4EE3\u7801\u6807\u8BC6\u7B26\u3001\u5DE5\u5177\u53C2\u6570\u540D\u548C JSON \u5B57\u6BB5\u540D\u662F\u7A0B\u5E8F\u7ED3\u6784\uFF0C\u4E0D\u662F\u81EA\u7136\u8BED\u8A00\u5185\u5BB9\u2014\u2014\u5FC5\u987B\u4FDD\u6301\u82F1\u6587\u539F\u6837\u3002\n</Language>\n\n\u4F60\u662F BTW \u987E\u95EE\uFF0C\u4E00\u4E2A\u8F7B\u91CF\u7EA7\u7684\u53EA\u8BFB\u4EE3\u7801\u987E\u95EE\u3002\n\u4F60\u88AB\u8BBE\u8BA1\u7528\u4E8E\u5FEB\u901F\u56DE\u7B54\u4EE3\u7801\u76F8\u5173\u95EE\u9898\uFF0C\u4E0D\u4FEE\u6539\u4EFB\u4F55\u6587\u4EF6\uFF0C\u4E0D\u6267\u884C\u547D\u4EE4\u3002\n\n## \u6838\u5FC3\u89C4\u5219\n1. \u53EA\u8BFB\uFF1A\u4EC5\u8BFB\u53D6\u6587\u4EF6\u8FDB\u884C\u5206\u6790\uFF0C\u7EDD\u4E0D\u5199\u5165\u6216\u7F16\u8F91\n2. \u5355\u6B21\u54CD\u5E94\uFF1A\u56DE\u7B54\u4E00\u4E2A\u95EE\u9898\u540E\u7ACB\u5373\u505C\u6B62\uFF0C\u4E0D\u53D1\u8D77\u8FFD\u95EE\n3. \u4E2D\u6587\u4F18\u5148\uFF1A\u4F7F\u7528\u4E2D\u6587\u56DE\u7B54\n4. \u6781\u5EA6\u7CBE\u7B80\uFF1A\u56DE\u7B54\u5FC5\u987B <100 \u5B57\uFF08\u4E2D\u6587\uFF09\uFF0C1-3 \u53E5\u8BDD\u4EE5\u5185\u3002\u53EA\u8F93\u51FA\u7B54\u6848\u672C\u8EAB\u3002\n5. \u7981\u6B62\u8F93\u51FA\u601D\u8003\u8FC7\u7A0B\uFF1A\u4E0D\u8981\u8F93\u51FA reasoning\u3001\u5206\u6790\u6B65\u9AA4\u6216\u5907\u6CE8\u3002\n\n## \u7981\u6B62\u884C\u4E3A\n- \u7EDD\u4E0D\u4FEE\u6539\u6587\u4EF6\uFF08\u65E0 write/edit \u6743\u9650\uFF09\n- \u7EDD\u4E0D\u6267\u884C\u547D\u4EE4\uFF08\u65E0 bash \u6743\u9650\uFF09\n- \u7EDD\u4E0D\u59D4\u6D3E\u4EFB\u52A1\uFF08\u65E0 delegate_task/task \u6743\u9650\uFF09\n- \u7EDD\u4E0D\u53D1\u8D77\u540E\u7EED\u5BF9\u8BDD\n- \u7EDD\u4E0D\u8C03\u7528\u5176\u4ED6 Agent\n\n## \u5141\u8BB8\u884C\u4E3A\n- \u8BFB\u53D6\u6587\u4EF6\u5206\u6790\u4EE3\u7801\u7ED3\u6784\n- \u4F7F\u7528 grep/glob \u641C\u7D22\u4EE3\u7801\u5E93\n- \u4F7F\u7528 LSP \u5DE5\u5177\u7406\u89E3\u4EE3\u7801\n\n<Language_Reminder>\n\u6700\u540E\u63D0\u9192\uFF1A\u4F60\u7684\u6240\u6709\u601D\u8003\u8FC7\u7A0B\u548C\u56DE\u590D\u5FC5\u987B\u4F7F\u7528\u4E2D\u6587\u3002\n</Language_Reminder>";
|
|
4
|
+
export declare function createBtwAdvisorAgent(model: string): AgentConfig;
|
|
5
|
+
export declare const btwAdvisorPromptMetadata: AgentPromptMetadata;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/agents/index.d.ts
CHANGED
|
@@ -9,3 +9,4 @@ export { createMultimodalLookerAgent, MULTIMODAL_LOOKER_PROMPT_METADATA } from "
|
|
|
9
9
|
export { createMetisAgent, METIS_SYSTEM_PROMPT, metisPromptMetadata } from "./metis";
|
|
10
10
|
export { createMomusAgent, MOMUS_SYSTEM_PROMPT, momusPromptMetadata } from "./momus";
|
|
11
11
|
export { createAtlasAgent, atlasPromptMetadata } from "./atlas";
|
|
12
|
+
export { createBtwAdvisorAgent, BTW_ADVISOR_SYSTEM_PROMPT, btwAdvisorPromptMetadata } from "./btw-advisor";
|
package/dist/agents/types.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export interface AgentPromptMetadata {
|
|
|
41
41
|
}
|
|
42
42
|
export declare function isGptModel(model: string): boolean;
|
|
43
43
|
export declare function isDeepseekModel(model: string): boolean;
|
|
44
|
-
export type BuiltinAgentName = "主执行官" | "技术参谋" | "知识典藏" | "深度探索" | "媒体解析" | "预审顾问" | "计划审查" | "任务编排";
|
|
44
|
+
export type BuiltinAgentName = "主执行官" | "技术参谋" | "知识典藏" | "深度探索" | "媒体解析" | "预审顾问" | "计划审查" | "任务编排" | "BTW 顾问";
|
|
45
45
|
export type OverridableAgentName = "build" | BuiltinAgentName;
|
|
46
46
|
export type AgentName = BuiltinAgentName;
|
|
47
47
|
export type AgentOverrideConfig = Partial<AgentConfig> & {
|
package/dist/cli/index.js
CHANGED
|
@@ -6019,7 +6019,8 @@ var init_agent_display_names = __esm(() => {
|
|
|
6019
6019
|
"\u6280\u672F\u53C2\u8C0B": "oracle",
|
|
6020
6020
|
"\u77E5\u8BC6\u5178\u85CF": "librarian",
|
|
6021
6021
|
"\u6DF1\u5EA6\u63A2\u7D22": "explore",
|
|
6022
|
-
"\u5A92\u4F53\u89E3\u6790": "multimodal-looker"
|
|
6022
|
+
"\u5A92\u4F53\u89E3\u6790": "multimodal-looker",
|
|
6023
|
+
"BTW \u987E\u95EE": "btw-advisor"
|
|
6023
6024
|
};
|
|
6024
6025
|
AGENT_DISPLAY_TO_KEY = {
|
|
6025
6026
|
sisyphus: "\u4E3B\u6267\u884C\u5B98",
|
|
@@ -6240,6 +6241,13 @@ var init_model_requirements = __esm(() => {
|
|
|
6240
6241
|
{ providers: ["google", "github-copilot", "opencode"], model: "gemini-3-pro", variant: "max" }
|
|
6241
6242
|
]
|
|
6242
6243
|
},
|
|
6244
|
+
"BTW \u987E\u95EE": {
|
|
6245
|
+
fallbackChain: [
|
|
6246
|
+
{ providers: ["deepseek", "volcengine"], model: "deepseek-v4-flash" },
|
|
6247
|
+
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-haiku-4-5" },
|
|
6248
|
+
{ providers: ["opencode"], model: "gpt-5-nano" }
|
|
6249
|
+
]
|
|
6250
|
+
},
|
|
6243
6251
|
"\u4EFB\u52A1\u7F16\u6392": {
|
|
6244
6252
|
fallbackChain: [
|
|
6245
6253
|
{ providers: ["deepseek", "volcengine"], model: "deepseek-v4-pro" },
|
|
@@ -8711,7 +8719,7 @@ var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
|
8711
8719
|
// package.json
|
|
8712
8720
|
var package_default = {
|
|
8713
8721
|
name: "@skj1724/oh-my-opencode",
|
|
8714
|
-
version: "3.23.
|
|
8722
|
+
version: "3.23.01",
|
|
8715
8723
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
8716
8724
|
main: "dist/index.js",
|
|
8717
8725
|
types: "dist/index.d.ts",
|
|
@@ -25976,7 +25984,8 @@ var BuiltinAgentNameSchema = exports_external.enum([
|
|
|
25976
25984
|
"\u5A92\u4F53\u89E3\u6790",
|
|
25977
25985
|
"\u9884\u5BA1\u987E\u95EE",
|
|
25978
25986
|
"\u8BA1\u5212\u5BA1\u67E5",
|
|
25979
|
-
"\u4EFB\u52A1\u7F16\u6392"
|
|
25987
|
+
"\u4EFB\u52A1\u7F16\u6392",
|
|
25988
|
+
"BTW \u987E\u95EE"
|
|
25980
25989
|
]);
|
|
25981
25990
|
var BuiltinSkillNameSchema = exports_external.enum([
|
|
25982
25991
|
"playwright",
|
|
@@ -25996,7 +26005,8 @@ var OverridableAgentNameSchema = exports_external.enum([
|
|
|
25996
26005
|
"\u77E5\u8BC6\u5178\u85CF",
|
|
25997
26006
|
"\u6DF1\u5EA6\u63A2\u7D22",
|
|
25998
26007
|
"\u5A92\u4F53\u89E3\u6790",
|
|
25999
|
-
"\u4EFB\u52A1\u7F16\u6392"
|
|
26008
|
+
"\u4EFB\u52A1\u7F16\u6392",
|
|
26009
|
+
"BTW \u987E\u95EE"
|
|
26000
26010
|
]);
|
|
26001
26011
|
var HookNameSchema = exports_external.enum([
|
|
26002
26012
|
"todo-continuation-enforcer",
|
|
@@ -26037,11 +26047,13 @@ var HookNameSchema = exports_external.enum([
|
|
|
26037
26047
|
"tool-definition-optimizer",
|
|
26038
26048
|
"permission-ask-bridge",
|
|
26039
26049
|
"shell-env-injector",
|
|
26040
|
-
"dispose-coordinator"
|
|
26050
|
+
"dispose-coordinator",
|
|
26051
|
+
"plan-completion"
|
|
26041
26052
|
]);
|
|
26042
26053
|
var BuiltinCommandNameSchema = exports_external.enum([
|
|
26043
26054
|
"init-deep",
|
|
26044
|
-
"start-work"
|
|
26055
|
+
"start-work",
|
|
26056
|
+
"btw"
|
|
26045
26057
|
]);
|
|
26046
26058
|
var ProviderModelStringSchema = exports_external.string().refine((value) => {
|
|
26047
26059
|
const separatorIndex = value.indexOf("/");
|
|
@@ -26090,7 +26102,8 @@ var AgentOverridesSchema = exports_external.object({
|
|
|
26090
26102
|
"\u77E5\u8BC6\u5178\u85CF": AgentOverrideConfigSchema.optional(),
|
|
26091
26103
|
"\u6DF1\u5EA6\u63A2\u7D22": AgentOverrideConfigSchema.optional(),
|
|
26092
26104
|
"\u5A92\u4F53\u89E3\u6790": AgentOverrideConfigSchema.optional(),
|
|
26093
|
-
"\u4EFB\u52A1\u7F16\u6392": AgentOverrideConfigSchema.optional()
|
|
26105
|
+
"\u4EFB\u52A1\u7F16\u6392": AgentOverrideConfigSchema.optional(),
|
|
26106
|
+
"BTW \u987E\u95EE": AgentOverrideConfigSchema.optional()
|
|
26094
26107
|
});
|
|
26095
26108
|
var ClaudeCodeConfigSchema = exports_external.object({
|
|
26096
26109
|
mcp: exports_external.boolean().optional(),
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare const BuiltinAgentNameSchema: z.ZodEnum<{
|
|
|
9
9
|
知识典藏: "知识典藏";
|
|
10
10
|
深度探索: "深度探索";
|
|
11
11
|
媒体解析: "媒体解析";
|
|
12
|
+
"BTW \u987E\u95EE": "BTW 顾问";
|
|
12
13
|
}>;
|
|
13
14
|
export declare const BuiltinSkillNameSchema: z.ZodEnum<{
|
|
14
15
|
playwright: "playwright";
|
|
@@ -27,6 +28,7 @@ export declare const OverridableAgentNameSchema: z.ZodEnum<{
|
|
|
27
28
|
知识典藏: "知识典藏";
|
|
28
29
|
深度探索: "深度探索";
|
|
29
30
|
媒体解析: "媒体解析";
|
|
31
|
+
"BTW \u987E\u95EE": "BTW 顾问";
|
|
30
32
|
build: "build";
|
|
31
33
|
"OpenCode-Builder": "OpenCode-Builder";
|
|
32
34
|
}>;
|
|
@@ -40,6 +42,7 @@ export declare const AgentNameSchema: z.ZodEnum<{
|
|
|
40
42
|
知识典藏: "知识典藏";
|
|
41
43
|
深度探索: "深度探索";
|
|
42
44
|
媒体解析: "媒体解析";
|
|
45
|
+
"BTW \u987E\u95EE": "BTW 顾问";
|
|
43
46
|
}>;
|
|
44
47
|
export declare const HookNameSchema: z.ZodEnum<{
|
|
45
48
|
atlas: "atlas";
|
|
@@ -81,10 +84,12 @@ export declare const HookNameSchema: z.ZodEnum<{
|
|
|
81
84
|
"permission-ask-bridge": "permission-ask-bridge";
|
|
82
85
|
"shell-env-injector": "shell-env-injector";
|
|
83
86
|
"dispose-coordinator": "dispose-coordinator";
|
|
87
|
+
"plan-completion": "plan-completion";
|
|
84
88
|
}>;
|
|
85
89
|
export declare const BuiltinCommandNameSchema: z.ZodEnum<{
|
|
86
90
|
"start-work": "start-work";
|
|
87
91
|
"init-deep": "init-deep";
|
|
92
|
+
btw: "btw";
|
|
88
93
|
}>;
|
|
89
94
|
export declare const FallbackModelEntrySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
90
95
|
model: z.ZodString;
|
|
@@ -977,6 +982,69 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
977
982
|
variant: z.ZodOptional<z.ZodString>;
|
|
978
983
|
}, z.core.$strict>]>>>;
|
|
979
984
|
}, z.core.$strip>>;
|
|
985
|
+
"BTW \u987E\u95EE": z.ZodOptional<z.ZodObject<{
|
|
986
|
+
model: z.ZodOptional<z.ZodString>;
|
|
987
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
988
|
+
category: z.ZodOptional<z.ZodString>;
|
|
989
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
990
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
991
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
992
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
993
|
+
prompt_append: z.ZodOptional<z.ZodString>;
|
|
994
|
+
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
995
|
+
disable: z.ZodOptional<z.ZodBoolean>;
|
|
996
|
+
description: z.ZodOptional<z.ZodString>;
|
|
997
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
998
|
+
subagent: "subagent";
|
|
999
|
+
primary: "primary";
|
|
1000
|
+
all: "all";
|
|
1001
|
+
}>>;
|
|
1002
|
+
color: z.ZodOptional<z.ZodString>;
|
|
1003
|
+
permission: z.ZodOptional<z.ZodObject<{
|
|
1004
|
+
edit: z.ZodOptional<z.ZodEnum<{
|
|
1005
|
+
allow: "allow";
|
|
1006
|
+
deny: "deny";
|
|
1007
|
+
ask: "ask";
|
|
1008
|
+
}>>;
|
|
1009
|
+
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
1010
|
+
allow: "allow";
|
|
1011
|
+
deny: "deny";
|
|
1012
|
+
ask: "ask";
|
|
1013
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
1014
|
+
allow: "allow";
|
|
1015
|
+
deny: "deny";
|
|
1016
|
+
ask: "ask";
|
|
1017
|
+
}>>]>>;
|
|
1018
|
+
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
1019
|
+
allow: "allow";
|
|
1020
|
+
deny: "deny";
|
|
1021
|
+
ask: "ask";
|
|
1022
|
+
}>>;
|
|
1023
|
+
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
1024
|
+
allow: "allow";
|
|
1025
|
+
deny: "deny";
|
|
1026
|
+
ask: "ask";
|
|
1027
|
+
}>>;
|
|
1028
|
+
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
1029
|
+
allow: "allow";
|
|
1030
|
+
deny: "deny";
|
|
1031
|
+
ask: "ask";
|
|
1032
|
+
}>>;
|
|
1033
|
+
canReadFiles: z.ZodOptional<z.ZodBoolean>;
|
|
1034
|
+
canWriteFiles: z.ZodOptional<z.ZodBoolean>;
|
|
1035
|
+
canExecuteCommands: z.ZodOptional<z.ZodBoolean>;
|
|
1036
|
+
canDelegateTasks: z.ZodOptional<z.ZodBoolean>;
|
|
1037
|
+
allowedCategories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1038
|
+
}, z.core.$strip>>;
|
|
1039
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1040
|
+
model: z.ZodString;
|
|
1041
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1042
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1043
|
+
providerID: z.ZodString;
|
|
1044
|
+
modelID: z.ZodString;
|
|
1045
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1046
|
+
}, z.core.$strict>]>>>;
|
|
1047
|
+
}, z.core.$strip>>;
|
|
980
1048
|
}, z.core.$strip>;
|
|
981
1049
|
export declare const ClaudeCodeConfigSchema: z.ZodObject<{
|
|
982
1050
|
mcp: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1010,8 +1078,8 @@ export declare const CategoryConfigSchema: z.ZodObject<{
|
|
|
1010
1078
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
1011
1079
|
thinking: z.ZodOptional<z.ZodObject<{
|
|
1012
1080
|
type: z.ZodEnum<{
|
|
1013
|
-
disabled: "disabled";
|
|
1014
1081
|
enabled: "enabled";
|
|
1082
|
+
disabled: "disabled";
|
|
1015
1083
|
}>;
|
|
1016
1084
|
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
1017
1085
|
}, z.core.$strip>>;
|
|
@@ -1056,8 +1124,8 @@ export declare const CategoriesConfigSchema: z.ZodRecord<z.ZodString, z.ZodObjec
|
|
|
1056
1124
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
1057
1125
|
thinking: z.ZodOptional<z.ZodObject<{
|
|
1058
1126
|
type: z.ZodEnum<{
|
|
1059
|
-
disabled: "disabled";
|
|
1060
1127
|
enabled: "enabled";
|
|
1128
|
+
disabled: "disabled";
|
|
1061
1129
|
}>;
|
|
1062
1130
|
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
1063
1131
|
}, z.core.$strip>>;
|
|
@@ -1271,6 +1339,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1271
1339
|
知识典藏: "知识典藏";
|
|
1272
1340
|
深度探索: "深度探索";
|
|
1273
1341
|
媒体解析: "媒体解析";
|
|
1342
|
+
"BTW \u987E\u95EE": "BTW 顾问";
|
|
1274
1343
|
}>>>;
|
|
1275
1344
|
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1276
1345
|
playwright: "playwright";
|
|
@@ -1317,10 +1386,12 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1317
1386
|
"permission-ask-bridge": "permission-ask-bridge";
|
|
1318
1387
|
"shell-env-injector": "shell-env-injector";
|
|
1319
1388
|
"dispose-coordinator": "dispose-coordinator";
|
|
1389
|
+
"plan-completion": "plan-completion";
|
|
1320
1390
|
}>>>;
|
|
1321
1391
|
disabled_commands: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1322
1392
|
"start-work": "start-work";
|
|
1323
1393
|
"init-deep": "init-deep";
|
|
1394
|
+
btw: "btw";
|
|
1324
1395
|
}>>>;
|
|
1325
1396
|
agents: z.ZodOptional<z.ZodObject<{
|
|
1326
1397
|
build: z.ZodOptional<z.ZodObject<{
|
|
@@ -2142,6 +2213,69 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
2142
2213
|
variant: z.ZodOptional<z.ZodString>;
|
|
2143
2214
|
}, z.core.$strict>]>>>;
|
|
2144
2215
|
}, z.core.$strip>>;
|
|
2216
|
+
"BTW \u987E\u95EE": z.ZodOptional<z.ZodObject<{
|
|
2217
|
+
model: z.ZodOptional<z.ZodString>;
|
|
2218
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
2219
|
+
category: z.ZodOptional<z.ZodString>;
|
|
2220
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2221
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
2222
|
+
top_p: z.ZodOptional<z.ZodNumber>;
|
|
2223
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
2224
|
+
prompt_append: z.ZodOptional<z.ZodString>;
|
|
2225
|
+
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
2226
|
+
disable: z.ZodOptional<z.ZodBoolean>;
|
|
2227
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2228
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
2229
|
+
subagent: "subagent";
|
|
2230
|
+
primary: "primary";
|
|
2231
|
+
all: "all";
|
|
2232
|
+
}>>;
|
|
2233
|
+
color: z.ZodOptional<z.ZodString>;
|
|
2234
|
+
permission: z.ZodOptional<z.ZodObject<{
|
|
2235
|
+
edit: z.ZodOptional<z.ZodEnum<{
|
|
2236
|
+
allow: "allow";
|
|
2237
|
+
deny: "deny";
|
|
2238
|
+
ask: "ask";
|
|
2239
|
+
}>>;
|
|
2240
|
+
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2241
|
+
allow: "allow";
|
|
2242
|
+
deny: "deny";
|
|
2243
|
+
ask: "ask";
|
|
2244
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
2245
|
+
allow: "allow";
|
|
2246
|
+
deny: "deny";
|
|
2247
|
+
ask: "ask";
|
|
2248
|
+
}>>]>>;
|
|
2249
|
+
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
2250
|
+
allow: "allow";
|
|
2251
|
+
deny: "deny";
|
|
2252
|
+
ask: "ask";
|
|
2253
|
+
}>>;
|
|
2254
|
+
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
2255
|
+
allow: "allow";
|
|
2256
|
+
deny: "deny";
|
|
2257
|
+
ask: "ask";
|
|
2258
|
+
}>>;
|
|
2259
|
+
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
2260
|
+
allow: "allow";
|
|
2261
|
+
deny: "deny";
|
|
2262
|
+
ask: "ask";
|
|
2263
|
+
}>>;
|
|
2264
|
+
canReadFiles: z.ZodOptional<z.ZodBoolean>;
|
|
2265
|
+
canWriteFiles: z.ZodOptional<z.ZodBoolean>;
|
|
2266
|
+
canExecuteCommands: z.ZodOptional<z.ZodBoolean>;
|
|
2267
|
+
canDelegateTasks: z.ZodOptional<z.ZodBoolean>;
|
|
2268
|
+
allowedCategories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2269
|
+
}, z.core.$strip>>;
|
|
2270
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2271
|
+
model: z.ZodString;
|
|
2272
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
2273
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2274
|
+
providerID: z.ZodString;
|
|
2275
|
+
modelID: z.ZodString;
|
|
2276
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
2277
|
+
}, z.core.$strict>]>>>;
|
|
2278
|
+
}, z.core.$strip>>;
|
|
2145
2279
|
}, z.core.$strip>>;
|
|
2146
2280
|
categories: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2147
2281
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -2160,8 +2294,8 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
2160
2294
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
2161
2295
|
thinking: z.ZodOptional<z.ZodObject<{
|
|
2162
2296
|
type: z.ZodEnum<{
|
|
2163
|
-
disabled: "disabled";
|
|
2164
2297
|
enabled: "enabled";
|
|
2298
|
+
disabled: "disabled";
|
|
2165
2299
|
}>;
|
|
2166
2300
|
budgetTokens: z.ZodOptional<z.ZodNumber>;
|
|
2167
2301
|
}, z.core.$strip>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Boulder State Event Bus - 简单的事件发布/订阅机制,用于状态同步。
|
|
3
3
|
*/
|
|
4
|
-
import type { BoulderState } from "./types";
|
|
4
|
+
import type { BoulderState, PlanProgress } from "./types";
|
|
5
5
|
export interface BoulderEvents {
|
|
6
6
|
"completed_task_updated": {
|
|
7
7
|
directory: string;
|
|
@@ -12,6 +12,14 @@ export interface BoulderEvents {
|
|
|
12
12
|
directory: string;
|
|
13
13
|
state: BoulderState;
|
|
14
14
|
};
|
|
15
|
+
"plan_completed": {
|
|
16
|
+
directory: string;
|
|
17
|
+
planName: string;
|
|
18
|
+
planPath: string;
|
|
19
|
+
boulderState: BoulderState;
|
|
20
|
+
progress: PlanProgress;
|
|
21
|
+
client: any;
|
|
22
|
+
};
|
|
15
23
|
}
|
|
16
24
|
export type BoulderEventName = keyof BoulderEvents;
|
|
17
25
|
export type BoulderEventHandler<T extends BoulderEventName> = (data: BoulderEvents[T]) => void;
|
|
@@ -25,6 +25,7 @@ export declare function appendSessionId(directory: string, sessionId: string): B
|
|
|
25
25
|
* If the index is already recorded, this is a no-op.
|
|
26
26
|
*/
|
|
27
27
|
export declare function updateBoulderStateCompleted(directory: string, taskIndex: number): void;
|
|
28
|
+
export declare function markBoulderPlanCompleted(directory: string, completedAt: string): boolean;
|
|
28
29
|
export declare function clearBoulderState(directory: string): boolean;
|
|
29
30
|
/**
|
|
30
31
|
* Find Prometheus plan files for this project.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Manages the active work plan state for Sisyphus orchestrator.
|
|
5
5
|
* Named after Sisyphus's boulder - the eternal task that must be rolled.
|
|
6
6
|
*/
|
|
7
|
+
export type BoulderStatus = "active" | "completed";
|
|
7
8
|
export interface BoulderState {
|
|
8
9
|
/** Version number for optimistic locking (CAS) */
|
|
9
10
|
version: number;
|
|
@@ -17,6 +18,10 @@ export interface BoulderState {
|
|
|
17
18
|
plan_name: string;
|
|
18
19
|
/** Indices of completed tasks (for checkbox auto-update) */
|
|
19
20
|
completed_task_indices?: number[];
|
|
21
|
+
/** Plan completion status */
|
|
22
|
+
status?: BoulderStatus;
|
|
23
|
+
/** ISO timestamp when plan was completed */
|
|
24
|
+
completed_at?: string;
|
|
20
25
|
}
|
|
21
26
|
export interface PlanProgress {
|
|
22
27
|
/** Total number of checkboxes */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BTW_TEMPLATE = "# /btw \u547D\u4EE4 \u2014 \u6781\u5EA6\u7CBE\u7B80\u4FA7\u8FB9\u63D0\u95EE\n\n\u4F60\u6536\u5230\u4E86\u4E00\u4E2A\u4FA7\u8FB9\u95EE\u9898\u3002\u8BF7\u4EE5\u5355\u6B21\u54CD\u5E94\u56DE\u7B54\uFF0C\u4E0D\u8981\u53D1\u8D77\u540E\u7EED\u8FFD\u95EE\u3002\n\n## \u7EA6\u675F\n- \u76F4\u63A5\u56DE\u7B54\u95EE\u9898\uFF0C\u4E0D\u8981\u6DFB\u52A0\u4E0A\u4E0B\u6587\u65E0\u5173\u7684\u5185\u5BB9\n- \u56DE\u7B54\u63A7\u5236\u5728 100 \u5B57\u4EE5\u5185\uFF0C1-3 \u53E5\u8BDD\n- \u53EA\u8F93\u51FA\u7B54\u6848\u672C\u8EAB\uFF0C\u4E0D\u8981\u8F93\u51FA\u601D\u8003\u8FC7\u7A0B\u6216\u5206\u6790\n- \u4E0D\u8981\u53D1\u8D77\u540E\u7EED\u5BF9\u8BDD\n- \u4F7F\u7528\u4E2D\u6587\u56DE\u590D\n\n## \u7528\u6237\u95EE\u9898\n$ARGUMENTS";
|
|
@@ -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";
|
|
2
|
+
export type BuiltinCommandName = "init-deep" | "ralph-loop" | "cancel-ralph" | "ulw-loop" | "refactor" | "start-work" | "btw";
|
|
3
3
|
export interface BuiltinCommandConfig {
|
|
4
4
|
disabled_commands?: BuiltinCommandName[];
|
|
5
5
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -37,3 +37,4 @@ export { createDisposeCoordinatorHook } from "./dispose-coordinator";
|
|
|
37
37
|
export { createToolDefinitionOptimizerHook } from "./tool-definition-optimizer";
|
|
38
38
|
export { createPermissionAskBridgeHook } from "./permission-ask-bridge";
|
|
39
39
|
export { createShellEnvInjectorHook } from "./shell-env-injector";
|
|
40
|
+
export { createPlanCompletionHook } from "./plan-completion";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BoulderEvents } from "../../features/boulder-state/event-bus";
|
|
2
|
+
type PlanCompletedData = BoulderEvents["plan_completed"];
|
|
3
|
+
export declare function updatePlanSummary(data: PlanCompletedData): Promise<void>;
|
|
4
|
+
export declare function archivePlan(data: PlanCompletedData): Promise<void>;
|
|
5
|
+
export declare function extractLearnings(data: PlanCompletedData): Promise<void>;
|
|
6
|
+
export declare function generateReport(data: PlanCompletedData): Promise<void>;
|
|
7
|
+
export declare function runInitDeep(data: PlanCompletedData): Promise<void>;
|
|
8
|
+
export declare function promptGitCommit(data: PlanCompletedData): Promise<void>;
|
|
9
|
+
export declare function createPlanCompletionHook(_ctx: unknown): {
|
|
10
|
+
cleanup: () => void;
|
|
11
|
+
setOnActionCallback: (cb: (name: string) => void) => void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|