@skj1724/oh-my-opencode 3.18.3 → 3.18.5
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 +2 -3
- package/dist/config/schema/commands.d.ts +0 -1
- package/dist/config/schema/oh-my-opencode-config.d.ts +0 -1
- package/dist/hooks/atlas/boulder-continuation-injector.d.ts +1 -0
- package/dist/hooks/atlas/system-reminder-templates.d.ts +4 -4
- package/dist/hooks/atlas/tool-execute-after.d.ts +1 -0
- package/dist/hooks/atlas/tool-execute-before.d.ts +1 -0
- package/dist/hooks/atlas/types.d.ts +1 -1
- package/dist/hooks/compaction-context-injector/compaction-context-prompt.d.ts +1 -1
- package/dist/hooks/compaction-context-injector/hook.d.ts +1 -0
- package/dist/hooks/context-window-monitor.d.ts +1 -1
- package/dist/hooks/prometheus-md-only/constants.d.ts +2 -2
- package/dist/hooks/prometheus-md-only/hook.d.ts +1 -1
- package/dist/hooks/todo-continuation-enforcer/constants.d.ts +1 -1
- package/dist/hooks/todo-continuation-enforcer/continuation-injection.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/countdown.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/handler.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/idle-event.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +1 -0
- package/dist/index.js +336 -70
- package/dist/oh-my-opencode.schema.json +1 -2
- package/dist/shared/locales/zh-CN/system-directive.d.ts +5 -0
- package/dist/shared/system-directive.d.ts +2 -1
- package/package.json +1 -1
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.5",
|
|
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,8 +74094,7 @@ var BuiltinCommandNameSchema = exports_external.enum([
|
|
|
74094
74094
|
"refactor",
|
|
74095
74095
|
"start-work",
|
|
74096
74096
|
"stop-continuation",
|
|
74097
|
-
"remove-ai-slops"
|
|
74098
|
-
"open-plan"
|
|
74097
|
+
"remove-ai-slops"
|
|
74099
74098
|
]);
|
|
74100
74099
|
// src/config/schema/dynamic-context-pruning.ts
|
|
74101
74100
|
var DynamicContextPruningConfigSchema = exports_external.object({
|
|
@@ -8,6 +8,5 @@ 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";
|
|
12
11
|
}>;
|
|
13
12
|
export type BuiltinCommandName = z.infer<typeof BuiltinCommandNameSchema>;
|
|
@@ -25,7 +25,6 @@ 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";
|
|
29
28
|
}>>>;
|
|
30
29
|
disabled_tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
31
30
|
mcp_env_allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
export declare
|
|
1
|
+
export declare function getDirectWorkReminder(locale?: string): string;
|
|
2
|
+
export declare function getBoulderContinuationPrompt(locale?: string): string;
|
|
3
3
|
export declare const VERIFICATION_REMINDER = "**THE SUBAGENT JUST CLAIMED THIS TASK IS DONE. THEY ARE PROBABLY LYING.**\n\nSubagents say \"done\" when code has errors, tests pass trivially, logic is wrong,\nor they quietly added features nobody asked for. This happens EVERY TIME.\nAssume the work is broken until YOU prove otherwise.\n\n---\n\n**PHASE 1: READ THE CODE FIRST (before running anything)**\n\nDo NOT run tests yet. Read the code FIRST so you know what you're testing.\n\n1. `Bash(\"git diff --stat -- ':!node_modules'\")` - see exactly which files changed. Any file outside expected scope = scope creep.\n2. `Read` EVERY changed file - no exceptions, no skimming.\n3. For EACH file, critically ask:\n - Does this code ACTUALLY do what the task required? (Re-read the task, compare line by line)\n - Any stubs, TODOs, placeholders, hardcoded values? (`Grep` for TODO, FIXME, HACK, xxx)\n - Logic errors? Trace the happy path AND the error path in your head.\n - Anti-patterns? (`Grep` for `as any`, `@ts-ignore`, empty catch, console.log in changed files)\n - Scope creep? Did the subagent touch things or add features NOT in the task spec?\n4. Cross-check every claim:\n - Said \"Updated X\" - READ X. Actually updated, or just superficially touched?\n - Said \"Added tests\" - READ the tests. Do they test REAL behavior or just `expect(true).toBe(true)`?\n - Said \"Follows patterns\" - OPEN a reference file. Does it ACTUALLY match?\n\n**If you cannot explain what every changed line does, you have NOT reviewed it.**\n\n**PHASE 2: RUN AUTOMATED CHECKS (targeted, then broad)**\n\nNow that you understand the code, verify mechanically:\n1. `lsp_diagnostics` on EACH changed file - ZERO new errors\n2. Run tests for changed modules FIRST, then full suite\n3. Build/typecheck - exit 0\n\nIf Phase 1 found issues but Phase 2 passes: Phase 2 is WRONG. The code has bugs that tests don't cover. Fix the code.\n\n**PHASE 3: HANDS-ON QA - ACTUALLY RUN IT (MANDATORY for user-facing changes)**\n\nTests and linters CANNOT catch: visual bugs, wrong CLI output, broken user flows, API response shape issues.\n\n**If this task produced anything a user would SEE or INTERACT with, you MUST launch it and verify yourself.**\n\n- **Frontend/UI**: `/playwright` skill - load the page, click through the flow, check console. Verify: page loads, interactions work, console clean, responsive.\n- **TUI/CLI**: `interactive_bash` - run the command, try good input, try bad input, try --help. Verify: command runs, output correct, error messages helpful, edge inputs handled.\n- **API/Backend**: `Bash` with curl - hit the endpoint, check response body, send malformed input. Verify: returns 200, body correct, error cases return proper errors.\n- **Config/Build**: Actually start the service or import the config. Verify: loads without error, backward compatible.\n\nThis is NOT optional \"if applicable\". If the deliverable is user-facing and you did not run it, you are shipping untested work.\n\n**PHASE 4: GATE DECISION - Should you proceed to the next task?**\n\nAnswer honestly:\n1. Can I explain what EVERY changed line does? (If no - back to Phase 1)\n2. Did I SEE it work with my own eyes? (If user-facing and no - back to Phase 3)\n3. Am I confident nothing existing is broken? (If no - run broader tests)\n\nALL three must be YES. \"Probably\" = NO. \"I think so\" = NO. Investigate until CERTAIN.\n\n- **All 3 YES** - Proceed: mark task complete, move to next.\n- **Any NO** - Reject: resume session with `session_id`, fix the specific issue.\n- **Unsure** - Reject: \"unsure\" = \"no\". Investigate until you have a definitive answer.\n\n**DO NOT proceed to the next task until all 4 phases are complete and the gate passes.**";
|
|
4
4
|
export declare const VERIFICATION_REMINDER_GEMINI = "**THE SUBAGENT HAS FINISHED. THEIR WORK IS EXTREMELY SUSPICIOUS.**\n\nThe subagent CLAIMS this task is done. Based on thousands of executions, subagent claims are FALSE more often than true.\nThey ROUTINELY:\n- Ship code with syntax errors they didn't bother to check\n- Create stub implementations with TODOs and call it \"done\"\n- Write tests that pass trivially (testing nothing meaningful)\n- Implement logic that does NOT match what was requested\n- Add features nobody asked for and call it \"improvement\"\n- Report \"all tests pass\" when they didn't run any tests\n\n**This is NOT a theoretical warning. This WILL happen on this task. Assume the work is BROKEN.**\n\n**YOU MUST VERIFY WITH ACTUAL TOOL CALLS. NOT REASONING. TOOL CALLS.**\nThinking \"it looks correct\" is NOT verification. Running `lsp_diagnostics` IS.\n\n---\n\n**PHASE 1: READ THE CODE FIRST (DO NOT SKIP - DO NOT RUN TESTS YET)**\n\nRead the code FIRST so you know what you're testing.\n\n1. `Bash(\"git diff --stat -- ':!node_modules'\")` - see exactly which files changed.\n2. `Read` EVERY changed file - no exceptions, no skimming.\n3. For EACH file:\n - Does this code ACTUALLY do what the task required? RE-READ the task spec.\n - Any stubs, TODOs, placeholders? `Grep` for TODO, FIXME, HACK, xxx\n - Anti-patterns? `Grep` for `as any`, `@ts-ignore`, empty catch\n - Scope creep? Did the subagent add things NOT in the task spec?\n4. Cross-check EVERY claim against actual code.\n\n**If you cannot explain what every changed line does, GO BACK AND READ AGAIN.**\n\n**PHASE 2: RUN AUTOMATED CHECKS**\n\n1. `lsp_diagnostics` on EACH changed file - ZERO new errors. ACTUALLY RUN THIS.\n2. Run tests for changed modules, then full suite. ACTUALLY RUN THESE.\n3. Build/typecheck - exit 0.\n\nIf Phase 1 found issues but Phase 2 passes: Phase 2 is WRONG. Fix the code.\n\n**PHASE 3: HANDS-ON QA (MANDATORY for user-facing changes)**\n\n- **Frontend/UI**: `/playwright`\n- **TUI/CLI**: `interactive_bash`\n- **API/Backend**: `Bash` with curl\n\n**If user-facing and you did not run it, you are shipping UNTESTED BROKEN work.**\n\n**PHASE 4: GATE DECISION**\n\n1. Can I explain what EVERY changed line does? (If no \u2192 Phase 1)\n2. Did I SEE it work via tool calls? (If user-facing and no \u2192 Phase 3)\n3. Am I confident nothing is broken? (If no \u2192 broader tests)\n\nALL three must be YES. \"Probably\" = NO. \"I think so\" = NO.\n\n**DO NOT proceed to the next task until all 4 phases are complete.**";
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
5
|
+
export declare function getOrchestratorDelegationRequired(locale?: string): string;
|
|
6
|
+
export declare function getSingleTaskDirective(locale?: string): string;
|
|
@@ -7,4 +7,5 @@ export declare function createToolExecuteAfterHandler(input: {
|
|
|
7
7
|
pendingTaskRefs: Map<string, PendingTaskRef>;
|
|
8
8
|
autoCommit: boolean;
|
|
9
9
|
getState: (sessionID: string) => SessionState;
|
|
10
|
+
language?: string;
|
|
10
11
|
}): (toolInput: ToolExecuteAfterInput, toolOutput: ToolExecuteAfterOutput) => Promise<void>;
|
|
@@ -11,8 +11,8 @@ export interface AtlasHookOptions {
|
|
|
11
11
|
backgroundManager?: BackgroundManager;
|
|
12
12
|
isContinuationStopped?: (sessionID: string) => boolean;
|
|
13
13
|
agentOverrides?: AgentOverrides;
|
|
14
|
-
/** Enable auto-commit after each atomic task completion (default: true) */
|
|
15
14
|
autoCommit?: boolean;
|
|
15
|
+
language?: string;
|
|
16
16
|
}
|
|
17
17
|
export interface ToolExecuteAfterInput {
|
|
18
18
|
tool: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function getCompactionContextPrompt(locale?: string): string;
|
|
@@ -3,4 +3,5 @@ import type { CompactionContextClient, CompactionContextInjector } from "./types
|
|
|
3
3
|
export declare function createCompactionContextInjector(options?: {
|
|
4
4
|
ctx?: CompactionContextClient;
|
|
5
5
|
backgroundManager?: BackgroundManager;
|
|
6
|
+
language?: string;
|
|
6
7
|
}): CompactionContextInjector;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
import { type ContextLimitModelCacheState } from "../shared/context-limit-resolver";
|
|
3
|
-
export declare function createContextWindowMonitorHook(_ctx: PluginInput, modelCacheState?: ContextLimitModelCacheState): {
|
|
3
|
+
export declare function createContextWindowMonitorHook(_ctx: PluginInput, modelCacheState?: ContextLimitModelCacheState, language?: string): {
|
|
4
4
|
"tool.execute.after": (input: {
|
|
5
5
|
tool: string;
|
|
6
6
|
sessionID: string;
|
|
@@ -3,5 +3,5 @@ export declare const PROMETHEUS_AGENT = "prometheus";
|
|
|
3
3
|
export declare const ALLOWED_EXTENSIONS: string[];
|
|
4
4
|
export declare const ALLOWED_PATH_PREFIX = ".sisyphus";
|
|
5
5
|
export declare const BLOCKED_TOOLS: string[];
|
|
6
|
-
export declare
|
|
7
|
-
export declare
|
|
6
|
+
export declare function getPlanningConsultWarning(locale?: string): string;
|
|
7
|
+
export declare function getPrometheusWorkflowReminder(locale?: string): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
export declare function createPrometheusMdOnlyHook(ctx: PluginInput): {
|
|
2
|
+
export declare function createPrometheusMdOnlyHook(ctx: PluginInput, language?: string): {
|
|
3
3
|
"tool.execute.before": (input: {
|
|
4
4
|
tool: string;
|
|
5
5
|
sessionID: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const HOOK_NAME = "todo-continuation-enforcer";
|
|
2
2
|
export declare const DEFAULT_SKIP_AGENTS: string[];
|
|
3
|
-
export declare
|
|
3
|
+
export declare function getContinuationPrompt(locale?: string): string;
|
|
4
4
|
export declare const COUNTDOWN_SECONDS = 2;
|
|
5
5
|
export declare const TOAST_DURATION_MS = 900;
|
|
6
6
|
export declare const COUNTDOWN_GRACE_PERIOD_MS = 500;
|
package/dist/index.js
CHANGED
|
@@ -19170,7 +19170,22 @@ function shellEscapeForDoubleQuotedCommand(value) {
|
|
|
19170
19170
|
// src/shared/system-directive.ts
|
|
19171
19171
|
var SYSTEM_DIRECTIVE_PREFIX = "[SYSTEM DIRECTIVE: OH-MY-OPENCODE";
|
|
19172
19172
|
var SYSTEM_DIRECTIVE_LEADING_KEYWORD_PATTERN = /^\s*(?:ultrawork|ulw)\s+/i;
|
|
19173
|
-
|
|
19173
|
+
var localeMap = {
|
|
19174
|
+
"zh-CN": {
|
|
19175
|
+
"TODO CONTINUATION": "[\u7CFB\u7EDF\u6307\u4EE4: \u5F85\u529E\u5EF6\u7EED]",
|
|
19176
|
+
"RALPH LOOP": "[\u7CFB\u7EDF\u6307\u4EE4: Ralph \u5FAA\u73AF]",
|
|
19177
|
+
"BOULDER CONTINUATION": "[\u7CFB\u7EDF\u6307\u4EE4: \u5DE8\u77F3\u5EF6\u7EED]",
|
|
19178
|
+
DELEGATION_REQUIRED: "[\u7CFB\u7EDF\u6307\u4EE4: \u9700\u8981\u59D4\u6258]",
|
|
19179
|
+
SINGLE_TASK_ONLY: "[\u7CFB\u7EDF\u6307\u4EE4: \u5355\u4EFB\u52A1\u6A21\u5F0F]",
|
|
19180
|
+
COMPACTION_CONTEXT: "[\u7CFB\u7EDF\u6307\u4EE4: \u538B\u7F29\u4E0A\u4E0B\u6587]",
|
|
19181
|
+
"CONTEXT WINDOW MONITOR": "[\u7CFB\u7EDF\u6307\u4EE4: \u4E0A\u4E0B\u6587\u7A97\u53E3\u76D1\u63A7]",
|
|
19182
|
+
"PROMETHEUS READ-ONLY": "[\u7CFB\u7EDF\u6307\u4EE4: Prometheus \u53EA\u8BFB]"
|
|
19183
|
+
}
|
|
19184
|
+
};
|
|
19185
|
+
function createSystemDirective(type2, locale) {
|
|
19186
|
+
if (locale && localeMap[locale]?.[type2]) {
|
|
19187
|
+
return localeMap[locale][type2];
|
|
19188
|
+
}
|
|
19174
19189
|
return `${SYSTEM_DIRECTIVE_PREFIX} - ${type2}]`;
|
|
19175
19190
|
}
|
|
19176
19191
|
function isSystemDirective(text) {
|
|
@@ -65761,14 +65776,26 @@ init_logger();
|
|
|
65761
65776
|
// src/hooks/todo-continuation-enforcer/constants.ts
|
|
65762
65777
|
var HOOK_NAME = "todo-continuation-enforcer";
|
|
65763
65778
|
var DEFAULT_SKIP_AGENTS = ["prometheus", "compaction", "plan"];
|
|
65764
|
-
var
|
|
65779
|
+
var continuationPromptLocaleMap = {
|
|
65780
|
+
"zh-CN": `\u672A\u5B8C\u6210\u7684\u4EFB\u52A1\u4ECD\u4FDD\u7559\u5728\u60A8\u7684\u5F85\u529E\u5217\u8868\u4E2D\u3002\u7EE7\u7EED\u5904\u7406\u4E0B\u4E00\u4E2A\u5F85\u529E\u4EFB\u52A1\u3002
|
|
65765
65781
|
|
|
65766
|
-
|
|
65782
|
+
- \u65E0\u9700\u8BF7\u6C42\u8BB8\u53EF\u5373\u53EF\u7EE7\u7EED
|
|
65783
|
+
- \u5B8C\u6210\u4EFB\u52A1\u540E\u6807\u8BB0\u4E3A\u5B8C\u6210
|
|
65784
|
+
- \u4E0D\u8981\u505C\u6B62\uFF0C\u76F4\u5230\u6240\u6709\u4EFB\u52A1\u5B8C\u6210
|
|
65785
|
+
- \u5982\u679C\u60A8\u8BA4\u4E3A\u6240\u6709\u5DE5\u4F5C\u5DF2\u7ECF\u5B8C\u6210\uFF0C\u7CFB\u7EDF\u4F1A\u5BF9\u60A8\u7684\u5B8C\u6210\u58F0\u660E\u63D0\u51FA\u8D28\u7591\u3002\u4ECE\u6000\u7591\u7684\u89D2\u5EA6\u91CD\u65B0\u5BA1\u89C6\u6BCF\u4E2A\u5F85\u529E\u4E8B\u9879\uFF0C\u9A8C\u8BC1\u5DE5\u4F5C\u662F\u5426\u786E\u5B9E\u6B63\u786E\u5B8C\u6210\uFF0C\u5E76\u76F8\u5E94\u66F4\u65B0\u5F85\u529E\u5217\u8868\u3002`
|
|
65786
|
+
};
|
|
65787
|
+
var continuationPromptFallback = `Incomplete tasks remain in your todo list. Continue working on the next pending task.
|
|
65767
65788
|
|
|
65768
65789
|
- Proceed without asking for permission
|
|
65769
65790
|
- Mark each task complete when finished
|
|
65770
65791
|
- Do not stop until all tasks are done
|
|
65771
65792
|
- If you believe all work is already complete, the system is questioning your completion claim. Critically re-examine each todo item from a skeptical perspective, verify the work was actually done correctly, and update the todo list accordingly.`;
|
|
65793
|
+
function getContinuationPrompt(locale) {
|
|
65794
|
+
const localizedPrompt = locale && continuationPromptLocaleMap[locale];
|
|
65795
|
+
return `${createSystemDirective(SystemDirectiveTypes.TODO_CONTINUATION, locale)}
|
|
65796
|
+
|
|
65797
|
+
${localizedPrompt ?? continuationPromptFallback}`;
|
|
65798
|
+
}
|
|
65772
65799
|
var COUNTDOWN_SECONDS = 2;
|
|
65773
65800
|
var TOAST_DURATION_MS = 900;
|
|
65774
65801
|
var COUNTDOWN_GRACE_PERIOD_MS = 500;
|
|
@@ -66294,7 +66321,7 @@ async function injectContinuation(args) {
|
|
|
66294
66321
|
const incompleteTodos = todos.filter((todo) => todo.status !== "completed" && todo.status !== "cancelled");
|
|
66295
66322
|
const todoList = incompleteTodos.map((todo) => `- [${todo.status}] ${todo.content}`).join(`
|
|
66296
66323
|
`);
|
|
66297
|
-
const prompt = `${
|
|
66324
|
+
const prompt = `${getContinuationPrompt(args.language)}
|
|
66298
66325
|
|
|
66299
66326
|
[Status: ${todos.length - freshIncompleteCount}/${todos.length} completed, ${freshIncompleteCount} remaining]
|
|
66300
66327
|
|
|
@@ -66393,7 +66420,8 @@ function startCountdown(args) {
|
|
|
66393
66420
|
skipAgents,
|
|
66394
66421
|
resolvedInfo,
|
|
66395
66422
|
sessionStateStore,
|
|
66396
|
-
isContinuationStopped
|
|
66423
|
+
isContinuationStopped,
|
|
66424
|
+
language: args.language
|
|
66397
66425
|
});
|
|
66398
66426
|
}, COUNTDOWN_SECONDS * 1000);
|
|
66399
66427
|
log(`[${HOOK_NAME}] Countdown started`, {
|
|
@@ -66417,7 +66445,8 @@ async function handleSessionIdle(args) {
|
|
|
66417
66445
|
sessionStateStore,
|
|
66418
66446
|
backgroundManager,
|
|
66419
66447
|
skipAgents = DEFAULT_SKIP_AGENTS,
|
|
66420
|
-
isContinuationStopped
|
|
66448
|
+
isContinuationStopped,
|
|
66449
|
+
language
|
|
66421
66450
|
} = args;
|
|
66422
66451
|
log(`[${HOOK_NAME}] session.idle`, { sessionID });
|
|
66423
66452
|
const state2 = sessionStateStore.getState(sessionID);
|
|
@@ -66564,7 +66593,8 @@ async function handleSessionIdle(args) {
|
|
|
66564
66593
|
backgroundManager,
|
|
66565
66594
|
skipAgents,
|
|
66566
66595
|
sessionStateStore,
|
|
66567
|
-
isContinuationStopped
|
|
66596
|
+
isContinuationStopped,
|
|
66597
|
+
language
|
|
66568
66598
|
});
|
|
66569
66599
|
}
|
|
66570
66600
|
|
|
@@ -66705,7 +66735,8 @@ function createTodoContinuationHandler(args) {
|
|
|
66705
66735
|
sessionStateStore,
|
|
66706
66736
|
backgroundManager,
|
|
66707
66737
|
skipAgents,
|
|
66708
|
-
isContinuationStopped
|
|
66738
|
+
isContinuationStopped,
|
|
66739
|
+
language: args.language
|
|
66709
66740
|
});
|
|
66710
66741
|
return;
|
|
66711
66742
|
}
|
|
@@ -66939,7 +66970,8 @@ function createTodoContinuationEnforcer(ctx, options = {}) {
|
|
|
66939
66970
|
const {
|
|
66940
66971
|
backgroundManager,
|
|
66941
66972
|
skipAgents = DEFAULT_SKIP_AGENTS,
|
|
66942
|
-
isContinuationStopped
|
|
66973
|
+
isContinuationStopped,
|
|
66974
|
+
language
|
|
66943
66975
|
} = options;
|
|
66944
66976
|
const sessionStateStore = createSessionStateStore();
|
|
66945
66977
|
const markRecovering = (sessionID) => {
|
|
@@ -66960,7 +66992,8 @@ function createTodoContinuationEnforcer(ctx, options = {}) {
|
|
|
66960
66992
|
sessionStateStore,
|
|
66961
66993
|
backgroundManager,
|
|
66962
66994
|
skipAgents,
|
|
66963
|
-
isContinuationStopped
|
|
66995
|
+
isContinuationStopped,
|
|
66996
|
+
language
|
|
66964
66997
|
});
|
|
66965
66998
|
const cancelAllCountdowns = () => {
|
|
66966
66999
|
sessionStateStore.cancelAllCountdowns();
|
|
@@ -66976,15 +67009,22 @@ function createTodoContinuationEnforcer(ctx, options = {}) {
|
|
|
66976
67009
|
}
|
|
66977
67010
|
// src/hooks/context-window-monitor.ts
|
|
66978
67011
|
var CONTEXT_WARNING_THRESHOLD = 0.7;
|
|
66979
|
-
|
|
67012
|
+
var contextReminderLocaleMap = {
|
|
67013
|
+
"zh-CN": (limitTokens) => `\u60A8\u6B63\u5728\u4F7F\u7528 ${limitTokens}-token \u7684\u4E0A\u4E0B\u6587\u7A97\u53E3\u3002
|
|
67014
|
+
\u60A8\u4ECD\u6709\u5269\u4F59\u4E0A\u4E0B\u6587 - \u4E0D\u8981\u6025\u4E8E\u6216\u8DF3\u8FC7\u4EFB\u52A1\u3002
|
|
67015
|
+
\u5F7B\u5E95\u4E14\u6709\u6761\u4E0D\u7D0A\u5730\u5B8C\u6210\u60A8\u7684\u5DE5\u4F5C\u3002`
|
|
67016
|
+
};
|
|
67017
|
+
function createContextReminder(actualLimit, locale) {
|
|
66980
67018
|
const limitTokens = actualLimit.toLocaleString();
|
|
66981
|
-
|
|
66982
|
-
|
|
66983
|
-
You are using a ${limitTokens}-token context window.
|
|
67019
|
+
const localizedReminder = locale && contextReminderLocaleMap[locale];
|
|
67020
|
+
const reminderText = localizedReminder ? localizedReminder(limitTokens) : `You are using a ${limitTokens}-token context window.
|
|
66984
67021
|
You still have context remaining - do NOT rush or skip tasks.
|
|
66985
67022
|
Complete your work thoroughly and methodically.`;
|
|
67023
|
+
return `${createSystemDirective(SystemDirectiveTypes.CONTEXT_WINDOW_MONITOR, locale)}
|
|
67024
|
+
|
|
67025
|
+
${reminderText}`;
|
|
66986
67026
|
}
|
|
66987
|
-
function createContextWindowMonitorHook(_ctx, modelCacheState) {
|
|
67027
|
+
function createContextWindowMonitorHook(_ctx, modelCacheState, language) {
|
|
66988
67028
|
const remindedSessions = new Set;
|
|
66989
67029
|
const tokenCache = new Map;
|
|
66990
67030
|
const toolExecuteAfter = async (input, output) => {
|
|
@@ -67009,7 +67049,7 @@ function createContextWindowMonitorHook(_ctx, modelCacheState) {
|
|
|
67009
67049
|
const limitTokens = actualLimit.toLocaleString();
|
|
67010
67050
|
output.output += `
|
|
67011
67051
|
|
|
67012
|
-
${createContextReminder(actualLimit)}
|
|
67052
|
+
${createContextReminder(actualLimit, language)}
|
|
67013
67053
|
[Context Status: ${usedPct}% used (${usedTokens}/${limitTokens} tokens), ${remainingPct}% remaining]`;
|
|
67014
67054
|
};
|
|
67015
67055
|
const eventHandler = async ({ event }) => {
|
|
@@ -76927,7 +76967,7 @@ init_logger();
|
|
|
76927
76967
|
function getMaxIterationsLabel(state3) {
|
|
76928
76968
|
return typeof state3.max_iterations === "number" ? String(state3.max_iterations) : "unbounded";
|
|
76929
76969
|
}
|
|
76930
|
-
var
|
|
76970
|
+
var CONTINUATION_PROMPT = `${SYSTEM_DIRECTIVE_PREFIX} - RALPH LOOP {{ITERATION}}/{{MAX}}]
|
|
76931
76971
|
|
|
76932
76972
|
Your previous attempt did not output the completion promise. Continue working on the task.
|
|
76933
76973
|
|
|
@@ -76968,7 +77008,7 @@ REQUIRED NOW:
|
|
|
76968
77008
|
Original task:
|
|
76969
77009
|
{{PROMPT}}`;
|
|
76970
77010
|
function buildContinuationPrompt(state3) {
|
|
76971
|
-
const template = state3.verification_pending ? ULTRAWORK_VERIFICATION_PROMPT :
|
|
77011
|
+
const template = state3.verification_pending ? ULTRAWORK_VERIFICATION_PROMPT : CONTINUATION_PROMPT;
|
|
76972
77012
|
const continuationPrompt = template.replace("{{ITERATION}}", String(state3.iteration)).replace("{{MAX}}", getMaxIterationsLabel(state3)).replace("{{INITIAL_PROMISE}}", state3.initial_completion_promise ?? state3.completion_promise).replace("{{PROMISE}}", state3.completion_promise).replace("{{PROMPT}}", state3.prompt);
|
|
76973
77013
|
return state3.ultrawork ? `ultrawork ${continuationPrompt}` : continuationPrompt;
|
|
76974
77014
|
}
|
|
@@ -81749,8 +81789,7 @@ var BuiltinCommandNameSchema = z12.enum([
|
|
|
81749
81789
|
"refactor",
|
|
81750
81790
|
"start-work",
|
|
81751
81791
|
"stop-continuation",
|
|
81752
|
-
"remove-ai-slops"
|
|
81753
|
-
"open-plan"
|
|
81792
|
+
"remove-ai-slops"
|
|
81754
81793
|
]);
|
|
81755
81794
|
// src/config/schema/dynamic-context-pruning.ts
|
|
81756
81795
|
import { z as z13 } from "zod";
|
|
@@ -84450,13 +84489,63 @@ var HOOK_NAME4 = "prometheus-md-only";
|
|
|
84450
84489
|
var PROMETHEUS_AGENT = "prometheus";
|
|
84451
84490
|
var ALLOWED_EXTENSIONS = [".md"];
|
|
84452
84491
|
var BLOCKED_TOOLS = ["Write", "Edit", "write", "edit"];
|
|
84453
|
-
var
|
|
84492
|
+
var planningConsultWarningLocaleMap = {
|
|
84493
|
+
"zh-CN": `\u60A8\u6B63\u5728\u88AB ${getAgentDisplayName("prometheus")} \u8C03\u7528\uFF0C\u8FD9\u662F\u4E00\u4E2A\u4EC5\u9650\u4E8E .sisyphus/*.md \u8BA1\u5212\u6587\u4EF6\u7684\u89C4\u5212\u4EE3\u7406\u3002
|
|
84494
|
+
|
|
84495
|
+
**\u5173\u952E\u7EA6\u675F\uFF1A**
|
|
84496
|
+
- \u4E0D\u8981\u4FEE\u6539\u4EFB\u4F55\u6587\u4EF6\uFF08\u4E0D\u8981 Write\u3001Edit \u6216\u4EFB\u4F55\u6587\u4EF6\u53D8\u66F4\uFF09
|
|
84497
|
+
- \u4E0D\u8981\u6267\u884C\u6539\u53D8\u7CFB\u7EDF\u72B6\u6001\u7684\u547D\u4EE4
|
|
84498
|
+
- \u4E0D\u8981\u521B\u5EFA\u3001\u5220\u9664\u6216\u91CD\u547D\u540D\u6587\u4EF6
|
|
84499
|
+
- \u4EC5\u63D0\u4F9B\u5206\u6790\u3001\u5EFA\u8BAE\u548C\u4FE1\u606F
|
|
84500
|
+
|
|
84501
|
+
**\u60A8\u7684\u89D2\u8272**\uFF1A\u63D0\u4F9B\u54A8\u8BE2\u3001\u7814\u7A76\u548C\u5206\u6790\u4EE5\u534F\u52A9\u89C4\u5212\u3002
|
|
84502
|
+
\u8FD4\u56DE\u60A8\u7684\u53D1\u73B0\u548C\u5EFA\u8BAE\u3002\u5B9E\u9645\u5B9E\u65BD\u5C06\u5728\u89C4\u5212\u5B8C\u6210\u540E\u5355\u72EC\u5904\u7406\u3002`
|
|
84503
|
+
};
|
|
84504
|
+
var prometheusWorkflowReminderLocaleMap = {
|
|
84505
|
+
"zh-CN": `## PROMETHEUS \u5F3A\u5236\u5DE5\u4F5C\u6D41\u7A0B\u63D0\u9192
|
|
84506
|
+
|
|
84507
|
+
**\u60A8\u6B63\u5728\u7F16\u5199\u5DE5\u4F5C\u8BA1\u5212\u3002\u505C\u6B62\u5E76\u9A8C\u8BC1\u60A8\u5B8C\u6210\u4E86\u6240\u6709\u6B65\u9AA4\uFF1A**
|
|
84508
|
+
|
|
84509
|
+
\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510
|
|
84510
|
+
\u2502 PROMETHEUS \u5DE5\u4F5C\u6D41\u7A0B \u2502
|
|
84511
|
+
\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
|
|
84512
|
+
\u2502 1 \u2502 \u8BBF\u8C08\uFF1A\u4E0E\u7528\u6237\u5168\u9762\u534F\u5546 \u2502
|
|
84513
|
+
\u2502 \u2502 - \u6536\u96C6\u6240\u6709\u9700\u6C42 \u2502
|
|
84514
|
+
\u2502 \u2502 - \u6F84\u6E05\u6A21\u7CCA\u4E4B\u5904 \u2502
|
|
84515
|
+
\u2502 \u2502 - \u5C06\u51B3\u7B56\u8BB0\u5F55\u5230 .sisyphus/drafts/ \u2502
|
|
84516
|
+
\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
|
|
84517
|
+
\u2502 2 \u2502 METIS \u54A8\u8BE2\uFF1A\u9884\u751F\u6210\u5DEE\u8DDD\u5206\u6790 \u2502
|
|
84518
|
+
\u2502 \u2502 - task(agent="Metis - \u8BA1\u5212\u987E\u95EE", ...) \u2502
|
|
84519
|
+
\u2502 \u2502 - \u8BC6\u522B\u9057\u6F0F\u7684\u95EE\u9898\u3001\u62A4\u680F\u3001\u5047\u8BBE \u2502
|
|
84520
|
+
\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
|
|
84521
|
+
\u2502 3 \u2502 \u8BA1\u5212\u751F\u6210\uFF1A\u5199\u5165 .sisyphus/plans/*.md \u2502
|
|
84522
|
+
\u2502 \u2502 <- \u60A8\u5728\u8FD9\u91CC \u2502
|
|
84523
|
+
\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
|
|
84524
|
+
\u2502 4 \u2502 MOMUS \u8BC4\u5BA1\uFF08\u5982\u8BF7\u6C42\u9AD8\u7CBE\u5EA6\uFF09 \u2502
|
|
84525
|
+
\u2502 \u2502 - task(agent="Momus - \u8BA1\u5212\u8BC4\u8BBA\u5458", ...) \u2502
|
|
84526
|
+
\u2502 \u2502 - \u5FAA\u73AF\u76F4\u5230\u83B7\u5F97 OKAY \u88C1\u51B3 \u2502
|
|
84527
|
+
\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
|
|
84528
|
+
\u2502 5 \u2502 \u603B\u7ED3\uFF1A\u5448\u73B0\u7ED9\u7528\u6237 \u2502
|
|
84529
|
+
\u2502 \u2502 - \u505A\u51FA\u7684\u5173\u952E\u51B3\u7B56 \u2502
|
|
84530
|
+
\u2502 \u2502 - \u8303\u56F4 \u5185/\u5916 \u2502
|
|
84531
|
+
\u2502 \u2502 - \u63D0\u4F9B\uFF1A"\u5F00\u59CB\u5DE5\u4F5C" vs "\u9AD8\u7CBE\u5EA6\u8BC4\u5BA1" \u2502
|
|
84532
|
+
\u2502 \u2502 - \u5F15\u5BFC\u81F3 /start-work \u2502
|
|
84533
|
+
\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
|
|
84534
|
+
|
|
84535
|
+
**\u60A8\u5728\u7F16\u5199\u6B64\u8BA1\u5212\u4E4B\u524D\u662F\u5426\u5B8C\u6210\u4E86\u6B65\u9AA4 1-2\uFF1F**
|
|
84536
|
+
**\u7F16\u5199\u4E4B\u540E\uFF0C\u60A8\u4F1A\u6267\u884C\u6B65\u9AA4 4-5 \u5417\uFF1F**
|
|
84537
|
+
|
|
84538
|
+
\u5982\u679C\u60A8\u8DF3\u8FC7\u4E86\u6B65\u9AA4\uFF0C\u73B0\u5728\u505C\u6B62\u3002\u56DE\u53BB\u5B8C\u6210\u5B83\u4EEC\u3002`
|
|
84539
|
+
};
|
|
84540
|
+
function getPlanningConsultWarning(locale) {
|
|
84541
|
+
const localizedWarning = locale && planningConsultWarningLocaleMap[locale];
|
|
84542
|
+
return `
|
|
84454
84543
|
|
|
84455
84544
|
---
|
|
84456
84545
|
|
|
84457
|
-
${createSystemDirective(SystemDirectiveTypes.PROMETHEUS_READ_ONLY)}
|
|
84546
|
+
${createSystemDirective(SystemDirectiveTypes.PROMETHEUS_READ_ONLY, locale)}
|
|
84458
84547
|
|
|
84459
|
-
You are being invoked by ${getAgentDisplayName("prometheus")}, a planning agent restricted to .sisyphus/*.md plan files only.
|
|
84548
|
+
${localizedWarning ?? `You are being invoked by ${getAgentDisplayName("prometheus")}, a planning agent restricted to .sisyphus/*.md plan files only.
|
|
84460
84549
|
|
|
84461
84550
|
**CRITICAL CONSTRAINTS:**
|
|
84462
84551
|
- DO NOT modify any files (no Write, Edit, or any file mutations)
|
|
@@ -84465,28 +84554,31 @@ You are being invoked by ${getAgentDisplayName("prometheus")}, a planning agent
|
|
|
84465
84554
|
- ONLY provide analysis, recommendations, and information
|
|
84466
84555
|
|
|
84467
84556
|
**YOUR ROLE**: Provide consultation, research, and analysis to assist with planning.
|
|
84468
|
-
Return your findings and recommendations. The actual implementation will be handled separately after planning is complete
|
|
84557
|
+
Return your findings and recommendations. The actual implementation will be handled separately after planning is complete.`}
|
|
84469
84558
|
|
|
84470
84559
|
---
|
|
84471
84560
|
|
|
84472
84561
|
`;
|
|
84473
|
-
|
|
84562
|
+
}
|
|
84563
|
+
function getPrometheusWorkflowReminder(locale) {
|
|
84564
|
+
const localizedReminder = locale && prometheusWorkflowReminderLocaleMap[locale];
|
|
84565
|
+
return `
|
|
84474
84566
|
|
|
84475
84567
|
---
|
|
84476
84568
|
|
|
84477
|
-
${createSystemDirective(SystemDirectiveTypes.PROMETHEUS_READ_ONLY)}
|
|
84569
|
+
${createSystemDirective(SystemDirectiveTypes.PROMETHEUS_READ_ONLY, locale)}
|
|
84478
84570
|
|
|
84479
|
-
|
|
84571
|
+
${localizedReminder ?? `## PROMETHEUS MANDATORY WORKFLOW REMINDER
|
|
84480
84572
|
|
|
84481
84573
|
**You are writing a work plan. STOP AND VERIFY you completed ALL steps:**
|
|
84482
84574
|
|
|
84483
84575
|
\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510
|
|
84484
84576
|
\u2502 PROMETHEUS WORKFLOW \u2502
|
|
84485
84577
|
\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
|
|
84486
|
-
\u2502 1 \u2502 INTERVIEW: Full consultation with user
|
|
84578
|
+
\u2502 1 \u2502 INTERVIEW: Full consultation with user \u2502
|
|
84487
84579
|
\u2502 \u2502 - Gather ALL requirements \u2502
|
|
84488
84580
|
\u2502 \u2502 - Clarify ambiguities \u2502
|
|
84489
|
-
\u2502 \u2502 - Record decisions to .sisyphus/drafts/
|
|
84581
|
+
\u2502 \u2502 - Record decisions to .sisyphus/drafts/ \u2502
|
|
84490
84582
|
\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
|
|
84491
84583
|
\u2502 2 \u2502 METIS CONSULTATION: Pre-generation gap analysis \u2502
|
|
84492
84584
|
\u2502 \u2502 - task(agent="Metis - Plan Consultant", ...) \u2502
|
|
@@ -84501,7 +84593,7 @@ ${createSystemDirective(SystemDirectiveTypes.PROMETHEUS_READ_ONLY)}
|
|
|
84501
84593
|
\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
|
|
84502
84594
|
\u2502 5 \u2502 SUMMARY: Present to user \u2502
|
|
84503
84595
|
\u2502 \u2502 - Key decisions made \u2502
|
|
84504
|
-
\u2502 \u2502 - Scope IN/OUT
|
|
84596
|
+
\u2502 \u2502 - Scope IN/OUT \u2502
|
|
84505
84597
|
\u2502 \u2502 - Offer: "Start Work" vs "High Accuracy Review" \u2502
|
|
84506
84598
|
\u2502 \u2502 - Guide to /start-work \u2502
|
|
84507
84599
|
\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
|
|
@@ -84509,11 +84601,12 @@ ${createSystemDirective(SystemDirectiveTypes.PROMETHEUS_READ_ONLY)}
|
|
|
84509
84601
|
**DID YOU COMPLETE STEPS 1-2 BEFORE WRITING THIS PLAN?**
|
|
84510
84602
|
**AFTER WRITING, WILL YOU DO STEPS 4-5?**
|
|
84511
84603
|
|
|
84512
|
-
If you skipped steps, STOP NOW. Go back and complete them
|
|
84604
|
+
If you skipped steps, STOP NOW. Go back and complete them.`}
|
|
84513
84605
|
|
|
84514
84606
|
---
|
|
84515
84607
|
|
|
84516
84608
|
`;
|
|
84609
|
+
}
|
|
84517
84610
|
// src/hooks/prometheus-md-only/hook.ts
|
|
84518
84611
|
init_logger();
|
|
84519
84612
|
// src/features/boulder-state/constants.ts
|
|
@@ -84866,7 +84959,7 @@ function isAllowedFile(filePath, workspaceRoot) {
|
|
|
84866
84959
|
|
|
84867
84960
|
// src/hooks/prometheus-md-only/hook.ts
|
|
84868
84961
|
var TASK_TOOLS = ["task", "call_omo_agent"];
|
|
84869
|
-
function createPrometheusMdOnlyHook(ctx) {
|
|
84962
|
+
function createPrometheusMdOnlyHook(ctx, language) {
|
|
84870
84963
|
return {
|
|
84871
84964
|
"tool.execute.before": async (input, output) => {
|
|
84872
84965
|
const agentName = await getAgentFromSession(input.sessionID, ctx.directory, ctx.client);
|
|
@@ -84877,7 +84970,7 @@ function createPrometheusMdOnlyHook(ctx) {
|
|
|
84877
84970
|
if (TASK_TOOLS.includes(toolName)) {
|
|
84878
84971
|
const prompt = output.args.prompt;
|
|
84879
84972
|
if (prompt && !prompt.includes(SYSTEM_DIRECTIVE_PREFIX)) {
|
|
84880
|
-
output.args.prompt =
|
|
84973
|
+
output.args.prompt = getPlanningConsultWarning(language) + prompt;
|
|
84881
84974
|
log(`[${HOOK_NAME4}] Injected planning warning to ${toolName}`, {
|
|
84882
84975
|
sessionID: input.sessionID,
|
|
84883
84976
|
tool: toolName,
|
|
@@ -84910,7 +85003,7 @@ function createPrometheusMdOnlyHook(ctx) {
|
|
|
84910
85003
|
filePath,
|
|
84911
85004
|
agent: agentName
|
|
84912
85005
|
});
|
|
84913
|
-
output.message = (output.message || "") +
|
|
85006
|
+
output.message = (output.message || "") + getPrometheusWorkflowReminder(language);
|
|
84914
85007
|
}
|
|
84915
85008
|
log(`[${HOOK_NAME4}] Allowed: .sisyphus/*.md write permitted`, {
|
|
84916
85009
|
sessionID: input.sessionID,
|
|
@@ -85489,13 +85582,45 @@ init_logger();
|
|
|
85489
85582
|
init_logger();
|
|
85490
85583
|
|
|
85491
85584
|
// src/hooks/atlas/system-reminder-templates.ts
|
|
85492
|
-
var
|
|
85585
|
+
var directWorkReminderLocaleMap = {
|
|
85586
|
+
"zh-CN": `\u60A8\u521A\u521A\u5728 \`.sisyphus/\` \u5916\u90E8\u6267\u884C\u4E86\u76F4\u63A5\u6587\u4EF6\u4FEE\u6539\u3002
|
|
85587
|
+
|
|
85588
|
+
**\u60A8\u662F\u534F\u8C03\u8005\uFF0C\u4E0D\u662F\u5B9E\u73B0\u8005\u3002**
|
|
85589
|
+
|
|
85590
|
+
\u4F5C\u4E3A\u534F\u8C03\u8005\uFF0C\u60A8\u5E94\u8BE5\uFF1A
|
|
85591
|
+
- \u901A\u8FC7 \`task\` \u5C06\u5B9E\u65BD\u5DE5\u4F5C\u59D4\u6258\u7ED9\u5B50\u4EE3\u7406
|
|
85592
|
+
- \u9A8C\u8BC1\u5B50\u4EE3\u7406\u5B8C\u6210\u7684\u5DE5\u4F5C
|
|
85593
|
+
- \u534F\u8C03\u591A\u4E2A\u4EFB\u52A1\u5E76\u786E\u4FDD\u5B8C\u6210
|
|
85594
|
+
|
|
85595
|
+
\u60A8\u4E0D\u5E94\u8BE5\uFF1A
|
|
85596
|
+
- \u76F4\u63A5\u7F16\u5199\u4EE3\u7801\uFF08\`.sisyphus/\` \u6587\u4EF6\u5982\u8BA1\u5212\u548C\u5927\u7EB2\u9664\u5916\uFF09
|
|
85597
|
+
- \u5728 \`.sisyphus/\` \u5916\u90E8\u8FDB\u884C\u76F4\u63A5\u6587\u4EF6\u7F16\u8F91
|
|
85598
|
+
- \u81EA\u5DF1\u5B9E\u73B0\u529F\u80FD
|
|
85599
|
+
|
|
85600
|
+
**\u5982\u679C\u60A8\u9700\u8981\u8FDB\u884C\u66F4\u6539\uFF1A**
|
|
85601
|
+
1. \u4F7F\u7528 \`task\` \u59D4\u6258\u7ED9\u9002\u5F53\u7684\u5B50\u4EE3\u7406
|
|
85602
|
+
2. \u5728\u63D0\u793A\u4E2D\u63D0\u4F9B\u6E05\u6670\u7684\u8BF4\u660E
|
|
85603
|
+
3. \u5B8C\u6210\u540E\u9A8C\u8BC1\u5B50\u4EE3\u7406\u7684\u5DE5\u4F5C`
|
|
85604
|
+
};
|
|
85605
|
+
var boulderContinuationPromptLocaleMap = {
|
|
85606
|
+
"zh-CN": `\u60A8\u6709\u4E00\u4E2A\u5305\u542B\u672A\u5B8C\u6210\u4EFB\u52A1\u7684 active \u5DE5\u4F5C\u8BA1\u5212\u3002\u7EE7\u7EED\u5DE5\u4F5C\u3002
|
|
85607
|
+
|
|
85608
|
+
\u89C4\u5219\uFF1A
|
|
85609
|
+
- **\u9996\u5148**\uFF1A\u7ACB\u5373\u9605\u8BFB\u8BA1\u5212\u6587\u4EF6\u3002\u5982\u679C\u6700\u540E\u4E00\u4E2A\u5DF2\u5B8C\u6210\u7684\u4EFB\u52A1\u4ECD\u672A\u52FE\u9009\uFF0C\u5728\u6267\u884C\u4EFB\u4F55\u5176\u4ED6\u64CD\u4F5C\u4E4B\u524D\u7ACB\u5373\u5C06\u5176\u6807\u8BB0\u4E3A \`- [x]\`
|
|
85610
|
+
- \u65E0\u9700\u8BF7\u6C42\u8BB8\u53EF\u5373\u53EF\u7EE7\u7EED
|
|
85611
|
+
- \u4F7F\u7528 .sisyphus/notepads/{PLAN_NAME}/ \u4E2D\u7684\u5927\u7EB2\u8BB0\u5F55\u5B66\u4E60\u5185\u5BB9
|
|
85612
|
+
- \u4E0D\u8981\u505C\u6B62\uFF0C\u76F4\u5230\u6240\u6709\u4EFB\u52A1\u5B8C\u6210
|
|
85613
|
+
- \u5982\u679C\u88AB\u963B\u6B62\uFF0C\u8BB0\u5F55\u963B\u788D\u56E0\u7D20\u5E76\u8F6C\u5230\u4E0B\u4E00\u4E2A\u4EFB\u52A1`
|
|
85614
|
+
};
|
|
85615
|
+
function getDirectWorkReminder(locale) {
|
|
85616
|
+
const localizedReminder = locale && directWorkReminderLocaleMap[locale];
|
|
85617
|
+
return `
|
|
85493
85618
|
|
|
85494
85619
|
---
|
|
85495
85620
|
|
|
85496
|
-
${createSystemDirective(SystemDirectiveTypes.DELEGATION_REQUIRED)}
|
|
85621
|
+
${createSystemDirective(SystemDirectiveTypes.DELEGATION_REQUIRED, locale)}
|
|
85497
85622
|
|
|
85498
|
-
You just performed direct file modifications outside \`.sisyphus/\`.
|
|
85623
|
+
${localizedReminder ?? `You just performed direct file modifications outside \`.sisyphus/\`.
|
|
85499
85624
|
|
|
85500
85625
|
**You are an ORCHESTRATOR, not an IMPLEMENTER.**
|
|
85501
85626
|
|
|
@@ -85512,20 +85637,24 @@ You should NOT:
|
|
|
85512
85637
|
**If you need to make changes:**
|
|
85513
85638
|
1. Use \`task\` to delegate to an appropriate subagent
|
|
85514
85639
|
2. Provide clear instructions in the prompt
|
|
85515
|
-
3. Verify the subagent's work after completion
|
|
85640
|
+
3. Verify the subagent's work after completion`}
|
|
85516
85641
|
|
|
85517
85642
|
---
|
|
85518
85643
|
`;
|
|
85519
|
-
|
|
85644
|
+
}
|
|
85645
|
+
function getBoulderContinuationPrompt(locale) {
|
|
85646
|
+
const localizedPrompt = locale && boulderContinuationPromptLocaleMap[locale];
|
|
85647
|
+
return `${createSystemDirective(SystemDirectiveTypes.BOULDER_CONTINUATION, locale)}
|
|
85520
85648
|
|
|
85521
|
-
You have an active work plan with incomplete tasks. Continue working.
|
|
85649
|
+
${localizedPrompt ?? `You have an active work plan with incomplete tasks. Continue working.
|
|
85522
85650
|
|
|
85523
85651
|
RULES:
|
|
85524
85652
|
- **FIRST**: Read the plan file NOW. If the last completed task is still unchecked, mark it \`- [x]\` IMMEDIATELY before anything else
|
|
85525
85653
|
- Proceed without asking for permission
|
|
85526
85654
|
- Use the notepad at .sisyphus/notepads/{PLAN_NAME}/ to record learnings
|
|
85527
85655
|
- Do not stop until all tasks are complete
|
|
85528
|
-
- If blocked, document the blocker and move to the next task`;
|
|
85656
|
+
- If blocked, document the blocker and move to the next task`}`;
|
|
85657
|
+
}
|
|
85529
85658
|
var VERIFICATION_REMINDER = `**THE SUBAGENT JUST CLAIMED THIS TASK IS DONE. THEY ARE PROBABLY LYING.**
|
|
85530
85659
|
|
|
85531
85660
|
Subagents say "done" when code has errors, tests pass trivially, logic is wrong,
|
|
@@ -85589,19 +85718,95 @@ ALL three must be YES. "Probably" = NO. "I think so" = NO. Investigate until CER
|
|
|
85589
85718
|
- **Unsure** - Reject: "unsure" = "no". Investigate until you have a definitive answer.
|
|
85590
85719
|
|
|
85591
85720
|
**DO NOT proceed to the next task until all 4 phases are complete and the gate passes.**`;
|
|
85592
|
-
var
|
|
85721
|
+
var orchestratorDelegationRequiredLocaleMap = {
|
|
85722
|
+
"zh-CN": `**\u505C\u6B62\u3002\u60A8\u8FDD\u53CD\u4E86\u534F\u8C03\u8005\u534F\u8BAE\u3002**
|
|
85723
|
+
|
|
85724
|
+
\u60A8\uFF08Atlas\uFF09\u8BD5\u56FE\u76F4\u63A5\u4FEE\u6539 \`.sisyphus/\` \u5916\u90E8\u7684\u6587\u4EF6\u3002
|
|
85725
|
+
|
|
85726
|
+
**\u5C1D\u8BD5\u7684\u8DEF\u5F84\uFF1A** $FILE_PATH
|
|
85727
|
+
|
|
85728
|
+
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
85729
|
+
|
|
85730
|
+
**\u8FD9\u662F\u7981\u6B62\u7684**\uFF08\u9A8C\u8BC1\u76EE\u7684\u9664\u5916\uFF09
|
|
85731
|
+
|
|
85732
|
+
\u4F5C\u4E3A\u534F\u8C03\u8005\uFF0C\u60A8\u5FC5\u987B\uFF1A
|
|
85733
|
+
1. \u901A\u8FC7 \`task\` \u59D4\u6258\u6240\u6709\u5B9E\u65BD\u5DE5\u4F5C
|
|
85734
|
+
2. \u9A8C\u8BC1\u5B50\u4EE3\u7406\u5B8C\u6210\u7684\u5DE5\u4F5C\uFF08\u9605\u8BFB\u6587\u4EF6\u662F\u53EF\u4EE5\u7684\uFF09
|
|
85735
|
+
3. \u534F\u8C03 - \u60A8\u534F\u8C03\uFF0C\u800C\u4E0D\u662F\u5B9E\u73B0
|
|
85736
|
+
|
|
85737
|
+
**\u5141\u8BB8\u7684\u76F4\u63A5\u6587\u4EF6\u64CD\u4F5C\uFF1A**
|
|
85738
|
+
- \`.sisyphus/\` \u5185\u7684\u6587\u4EF6\uFF08\u8BA1\u5212\u3001\u5927\u7EB2\u3001\u8349\u7A3F\uFF09
|
|
85739
|
+
- \u4E3A\u9A8C\u8BC1\u800C\u9605\u8BFB\u6587\u4EF6
|
|
85740
|
+
- \u8FD0\u884C\u8BCA\u65AD/\u6D4B\u8BD5
|
|
85741
|
+
|
|
85742
|
+
**\u7981\u6B62\u7684\u76F4\u63A5\u6587\u4EF6\u64CD\u4F5C\uFF1A**
|
|
85743
|
+
- \u7F16\u5199/\u7F16\u8F91\u6E90\u4EE3\u7801
|
|
85744
|
+
- \u5728 \`.sisyphus/\` \u5916\u90E8\u521B\u5EFA\u65B0\u6587\u4EF6
|
|
85745
|
+
- \u4EFB\u4F55\u5B9E\u65BD\u5DE5\u4F5C
|
|
85746
|
+
|
|
85747
|
+
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
85748
|
+
|
|
85749
|
+
**\u5982\u679C\u8FD9\u662F\u4E3A\u4E86\u9A8C\u8BC1\uFF1A**
|
|
85750
|
+
\u5982\u679C\u4F60\u662F\u901A\u8FC7\u8FDB\u884C\u5C0F\u7684\u4FEE\u590D\u6765\u9A8C\u8BC1\u5B50\u4EE3\u7406\u7684\u5DE5\u4F5C\uFF0C\u53EF\u4EE5\u7EE7\u7EED\u3002
|
|
85751
|
+
\u4F46\u5BF9\u4E8E\u4EFB\u4F55\u91CD\u5927\u66F4\u6539\uFF0C\u8BF7\u4F7F\u7528 \`task\`\u3002
|
|
85752
|
+
|
|
85753
|
+
**\u6B63\u786E\u7684\u65B9\u6CD5\uFF1A**
|
|
85754
|
+
\`\`\`
|
|
85755
|
+
task(
|
|
85756
|
+
category="...",
|
|
85757
|
+
load_skills=[],
|
|
85758
|
+
prompt="[\u5177\u6709\u660E\u786E\u9A8C\u6536\u6807\u51C6\u7684\u7279\u5B9A\u5355\u4E00\u4EFB\u52A1]"
|
|
85759
|
+
)
|
|
85760
|
+
\`\`\`
|
|
85761
|
+
|
|
85762
|
+
\u59D4\u6258\u3002\u4E0D\u8981\u5B9E\u73B0\u3002`
|
|
85763
|
+
};
|
|
85764
|
+
var singleTaskDirectiveLocaleMap = {
|
|
85765
|
+
"zh-CN": `**\u505C\u6B62\u3002\u5728\u7EE7\u7EED\u4E4B\u524D\u9605\u8BFB\u672C\u6587\u3002**
|
|
85766
|
+
|
|
85767
|
+
\u5982\u679C\u60A8\u88AB\u7ED9\u4E88\u4E86**\u591A\u4E2A\u771F\u6B63\u72EC\u7ACB\u7684\u76EE\u6807**\uFF08\u4E0D\u76F8\u5173\u7684\u4EFB\u52A1\u3001\u5E76\u884C\u5DE5\u4F5C\u6D41\u3001\u72EC\u7ACB\u7684\u529F\u80FD\uFF09\uFF0C\u60A8\u5FC5\u987B\uFF1A
|
|
85768
|
+
1. **\u7ACB\u5373\u62D2\u7EDD**\u6B64\u8BF7\u6C42
|
|
85769
|
+
2. **\u8981\u6C42**\u534F\u8C03\u8005\u63D0\u4F9B\u5355\u4E00\u76EE\u6807
|
|
85770
|
+
|
|
85771
|
+
**\u4EC0\u4E48\u7B97\u4F5C\u591A\u4E2A\u72EC\u7ACB\u4EFB\u52A1\uFF08\u62D2\u7EDD\uFF09\uFF1A**
|
|
85772
|
+
- "\u5B9E\u73B0\u529F\u80FD A\u3002\u540C\u65F6\uFF0C\u6DFB\u52A0\u529F\u80FD B\u3002"
|
|
85773
|
+
- "\u4FEE\u590D bug X\u3002\u7136\u540E\u91CD\u6784\u6A21\u5757 Y\u3002\u540C\u65F6\u66F4\u65B0\u6587\u6863\u3002"
|
|
85774
|
+
- \u6346\u7ED1\u5728\u4E00\u4E2A\u8BF7\u6C42\u4E2D\u7684\u591A\u4E2A\u4E0D\u76F8\u5173\u66F4\u6539
|
|
85775
|
+
|
|
85776
|
+
**\u4EC0\u4E48\u662F\u5177\u6709\u987A\u5E8F\u6B65\u9AA4\u7684\u5355\u4E00\u4EFB\u52A1\uFF08\u7EE7\u7EED\uFF09\uFF1A**
|
|
85777
|
+
- \u5206\u89E3\u4E3A\u7F16\u53F7\u6B65\u9AA4\u7684\u5355\u4E00\u76EE\u6807\uFF08\u4F8B\u5982\uFF0C"\u5B9E\u73B0 X\uFF1A1. \u67E5\u627E\u6587\u4EF6\uFF0C2. \u6DFB\u52A0\u903B\u8F91\uFF0C3. \u7F16\u5199\u6D4B\u8BD5"\uFF09
|
|
85778
|
+
- \u591A\u6B65\u9AA4\u4E0A\u4E0B\u6587\uFF0C\u5176\u4E2D\u6240\u6709\u6B65\u9AA4\u670D\u52A1\u4E8E\u4E00\u4E2A\u76EE\u6807
|
|
85779
|
+
- \u534F\u8C03\u8005\u63D0\u4F9B\u7684\u5355\u4E00\u4EA4\u4ED8\u7269\u65B9\u6CD5\u8BF4\u660E
|
|
85780
|
+
|
|
85781
|
+
**\u5982\u679C\u68C0\u6D4B\u5230\u771F\u6B63\u72EC\u7ACB\u7684\u4EFB\u52A1\uFF0C\u60A8\u7684\u56DE\u5E94\uFF1A**
|
|
85782
|
+
> "\u6211\u62D2\u7EDD\u7EE7\u7EED\u3002\u60A8\u63D0\u4F9B\u4E86\u591A\u4E2A\u72EC\u7ACB\u7684\u4EFB\u52A1\u3002\u6BCF\u4E2A\u4EFB\u52A1\u90FD\u9700\u8981\u5168\u795E\u8D2F\u6CE8\u3002
|
|
85783
|
+
>
|
|
85784
|
+
> \u4EC5\u63D0\u4F9B\u4E00\u4E2A\u76EE\u6807\u3002\u4E00\u4E2A\u53EF\u4EA4\u4ED8\u6210\u679C\u3002\u4E00\u4E2A\u660E\u786E\u7684\u7ED3\u679C\u3002
|
|
85785
|
+
>
|
|
85786
|
+
> \u6346\u7ED1\u4E0D\u76F8\u5173\u7684\u4EFB\u52A1\u4F1A\u5BFC\u81F4\uFF1A\u5DE5\u4F5C\u4E0D\u5B8C\u6574\u3001\u9057\u6F0F\u8FB9\u7F18\u60C5\u51B5\u3001\u6D4B\u8BD5\u4E2D\u65AD\u3001\u6D6A\u8D39\u4E0A\u4E0B\u6587\u3002"
|
|
85787
|
+
|
|
85788
|
+
**\u7ED9\u534F\u8C03\u8005\u7684\u8B66\u544A\uFF1A**
|
|
85789
|
+
- \u6346\u7ED1\u4E0D\u76F8\u5173\u7684\u4EFB\u52A1\u4F1A\u6BC1\u6389\u53EF\u4EA4\u4ED8\u6210\u679C
|
|
85790
|
+
- \u6BCF\u4E2A\u72EC\u7ACB\u76EE\u6807\u90FD\u9700\u8981\u5168\u795E\u8D2F\u6CE8\u548C\u9002\u5F53\u7684\u9A8C\u8BC1
|
|
85791
|
+
- \u5355\u72EC\u59D4\u6258\u4E0D\u540C\u5173\u6CE8\u70B9 = \u5DE5\u4F5C\u8349\u7387 = \u8FD4\u5DE5 = \u6D6A\u8D39 tokens
|
|
85792
|
+
|
|
85793
|
+
**\u62D2\u7EDD\u771F\u6B63\u591A\u4EFB\u52A1\u7684\u8BF7\u6C42\u3002\u5141\u8BB8\u5355\u4E00\u76EE\u6807\u591A\u6B65\u9AA4\u5DE5\u4F5C\u6D41\u3002**`
|
|
85794
|
+
};
|
|
85795
|
+
function getOrchestratorDelegationRequired(locale) {
|
|
85796
|
+
const localizedPrompt = locale && orchestratorDelegationRequiredLocaleMap[locale];
|
|
85797
|
+
return `
|
|
85593
85798
|
|
|
85594
85799
|
---
|
|
85595
85800
|
|
|
85596
|
-
${createSystemDirective(SystemDirectiveTypes.DELEGATION_REQUIRED)}
|
|
85801
|
+
${createSystemDirective(SystemDirectiveTypes.DELEGATION_REQUIRED, locale)}
|
|
85597
85802
|
|
|
85598
|
-
|
|
85803
|
+
${localizedPrompt ?? `**STOP. YOU ARE VIOLATING ORCHESTRATOR PROTOCOL.**
|
|
85599
85804
|
|
|
85600
85805
|
You (Atlas) are attempting to directly modify a file outside \`.sisyphus/\`.
|
|
85601
85806
|
|
|
85602
85807
|
**Path attempted:** $FILE_PATH
|
|
85603
85808
|
|
|
85604
|
-
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
85809
|
+
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
85605
85810
|
|
|
85606
85811
|
**THIS IS FORBIDDEN** (except for VERIFICATION purposes)
|
|
85607
85812
|
|
|
@@ -85620,7 +85825,7 @@ As an ORCHESTRATOR, you MUST:
|
|
|
85620
85825
|
- Creating new files outside \`.sisyphus/\`
|
|
85621
85826
|
- Any implementation work
|
|
85622
85827
|
|
|
85623
|
-
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
85828
|
+
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
85624
85829
|
|
|
85625
85830
|
**IF THIS IS FOR VERIFICATION:**
|
|
85626
85831
|
Proceed if you are verifying subagent work by making a small fix.
|
|
@@ -85635,15 +85840,18 @@ task(
|
|
|
85635
85840
|
)
|
|
85636
85841
|
\`\`\`
|
|
85637
85842
|
|
|
85638
|
-
DELEGATE. DON'T IMPLEMENT
|
|
85843
|
+
DELEGATE. DON'T IMPLEMENT.`}
|
|
85639
85844
|
|
|
85640
85845
|
---
|
|
85641
85846
|
`;
|
|
85642
|
-
|
|
85847
|
+
}
|
|
85848
|
+
function getSingleTaskDirective(locale) {
|
|
85849
|
+
const localizedPrompt = locale && singleTaskDirectiveLocaleMap[locale];
|
|
85850
|
+
return `
|
|
85643
85851
|
|
|
85644
|
-
${createSystemDirective(SystemDirectiveTypes.SINGLE_TASK_ONLY)}
|
|
85852
|
+
${createSystemDirective(SystemDirectiveTypes.SINGLE_TASK_ONLY, locale)}
|
|
85645
85853
|
|
|
85646
|
-
|
|
85854
|
+
${localizedPrompt ?? `**STOP. READ THIS BEFORE PROCEEDING.**
|
|
85647
85855
|
|
|
85648
85856
|
If you were given **multiple genuinely independent goals** (unrelated tasks, parallel workstreams, separate features), you MUST:
|
|
85649
85857
|
1. **IMMEDIATELY REFUSE** this request
|
|
@@ -85661,9 +85869,9 @@ If you were given **multiple genuinely independent goals** (unrelated tasks, par
|
|
|
85661
85869
|
|
|
85662
85870
|
**Your response if genuinely independent tasks are detected:**
|
|
85663
85871
|
> "I refuse to proceed. You provided multiple independent tasks. Each task needs full attention.
|
|
85664
|
-
>
|
|
85872
|
+
>
|
|
85665
85873
|
> PROVIDE EXACTLY ONE GOAL. One deliverable. One clear outcome.
|
|
85666
|
-
>
|
|
85874
|
+
>
|
|
85667
85875
|
> Batching unrelated tasks causes: incomplete work, missed edge cases, broken tests, wasted context."
|
|
85668
85876
|
|
|
85669
85877
|
**WARNING TO ORCHESTRATOR:**
|
|
@@ -85671,8 +85879,9 @@ If you were given **multiple genuinely independent goals** (unrelated tasks, par
|
|
|
85671
85879
|
- Each independent goal needs FULL attention and PROPER verification
|
|
85672
85880
|
- Batch delegation of separate concerns = sloppy work = rework = wasted tokens
|
|
85673
85881
|
|
|
85674
|
-
**REFUSE genuinely multi-task requests. ALLOW single-goal multi-step workflows
|
|
85882
|
+
**REFUSE genuinely multi-task requests. ALLOW single-goal multi-step workflows.`}
|
|
85675
85883
|
`;
|
|
85884
|
+
}
|
|
85676
85885
|
|
|
85677
85886
|
// src/hooks/atlas/recent-model-resolver.ts
|
|
85678
85887
|
async function resolveRecentPromptContextForSession(ctx, sessionID) {
|
|
@@ -85754,7 +85963,7 @@ async function injectBoulderContinuation(input) {
|
|
|
85754
85963
|
const preferredSessionContext = preferredTaskSessionId ? `
|
|
85755
85964
|
|
|
85756
85965
|
[Preferred reuse session for current top-level plan task${preferredTaskTitle ? `: ${preferredTaskTitle}` : ""}: ${preferredTaskSessionId}]` : "";
|
|
85757
|
-
const prompt =
|
|
85966
|
+
const prompt = getBoulderContinuationPrompt(input.language).replace(/{PLAN_NAME}/g, planName) + `
|
|
85758
85967
|
|
|
85759
85968
|
[Status: ${total - remaining}/${total} completed, ${remaining} remaining]` + preferredSessionContext + worktreeContext;
|
|
85760
85969
|
const continuationAgent = resolveRegisteredAgentName(agent ?? (isAgentRegistered("atlas") ? "atlas" : undefined));
|
|
@@ -85866,7 +86075,8 @@ async function injectContinuation2(input) {
|
|
|
85866
86075
|
preferredTaskSessionId: preferredTaskSession?.session_id,
|
|
85867
86076
|
preferredTaskTitle: preferredTaskSession?.task_title,
|
|
85868
86077
|
backgroundManager: input.options?.backgroundManager,
|
|
85869
|
-
sessionState: input.sessionState
|
|
86078
|
+
sessionState: input.sessionState,
|
|
86079
|
+
language: input.options?.language
|
|
85870
86080
|
});
|
|
85871
86081
|
if (result === "injected") {
|
|
85872
86082
|
if (input.sessionState.pendingRetryTimer) {
|
|
@@ -86562,7 +86772,7 @@ function createToolExecuteAfterHandler2(input) {
|
|
|
86562
86772
|
filePath = toolOutput.metadata?.filePath;
|
|
86563
86773
|
}
|
|
86564
86774
|
if (filePath && !isSisyphusPath(filePath)) {
|
|
86565
|
-
toolOutput.output = (toolOutput.output || "") +
|
|
86775
|
+
toolOutput.output = (toolOutput.output || "") + getDirectWorkReminder(input.language);
|
|
86566
86776
|
log(`[${HOOK_NAME7}] Direct work reminder appended`, {
|
|
86567
86777
|
sessionID: toolInput.sessionID,
|
|
86568
86778
|
tool: toolInput.tool,
|
|
@@ -86704,7 +86914,7 @@ function createToolExecuteBeforeHandler2(input) {
|
|
|
86704
86914
|
if (toolInput.callID) {
|
|
86705
86915
|
pendingFilePaths.set(toolInput.callID, filePath);
|
|
86706
86916
|
}
|
|
86707
|
-
const warning =
|
|
86917
|
+
const warning = getOrchestratorDelegationRequired(input.language).replace("$FILE_PATH", filePath);
|
|
86708
86918
|
toolOutput.message = (toolOutput.message || "") + warning;
|
|
86709
86919
|
log(`[${HOOK_NAME7}] Injected delegation warning for direct file modification`, {
|
|
86710
86920
|
sessionID: toolInput.sessionID,
|
|
@@ -86751,7 +86961,7 @@ function createToolExecuteBeforeHandler2(input) {
|
|
|
86751
86961
|
}
|
|
86752
86962
|
const prompt = toolOutput.args.prompt;
|
|
86753
86963
|
if (prompt && !prompt.includes(SYSTEM_DIRECTIVE_PREFIX)) {
|
|
86754
|
-
toolOutput.args.prompt = `<system-reminder>${
|
|
86964
|
+
toolOutput.args.prompt = `<system-reminder>${getSingleTaskDirective(input.language)}</system-reminder>
|
|
86755
86965
|
` + prompt;
|
|
86756
86966
|
log(`[${HOOK_NAME7}] Injected single-task directive to task`, {
|
|
86757
86967
|
sessionID: toolInput.sessionID
|
|
@@ -86777,8 +86987,8 @@ function createAtlasHook(ctx, options) {
|
|
|
86777
86987
|
}
|
|
86778
86988
|
return {
|
|
86779
86989
|
handler: createAtlasEventHandler({ ctx, options, sessions, getState }),
|
|
86780
|
-
"tool.execute.before": createToolExecuteBeforeHandler2({ ctx, pendingFilePaths, pendingTaskRefs }),
|
|
86781
|
-
"tool.execute.after": createToolExecuteAfterHandler2({ ctx, pendingFilePaths, pendingTaskRefs, autoCommit, getState })
|
|
86990
|
+
"tool.execute.before": createToolExecuteBeforeHandler2({ ctx, pendingFilePaths, pendingTaskRefs, language: options?.language }),
|
|
86991
|
+
"tool.execute.after": createToolExecuteAfterHandler2({ ctx, pendingFilePaths, pendingTaskRefs, autoCommit, getState, language: options?.language })
|
|
86782
86992
|
};
|
|
86783
86993
|
}
|
|
86784
86994
|
// src/hooks/delegate-task-retry/patterns.ts
|
|
@@ -87029,9 +87239,61 @@ function clearCompactionAgentConfigCheckpoint(sessionID) {
|
|
|
87029
87239
|
init_logger();
|
|
87030
87240
|
|
|
87031
87241
|
// src/hooks/compaction-context-injector/compaction-context-prompt.ts
|
|
87032
|
-
var
|
|
87242
|
+
var compactionContextPromptLocaleMap = {
|
|
87243
|
+
"zh-CN": `\u603B\u7ED3\u6B64\u4F1A\u8BDD\u65F6\uFF0C\u60A8\u5FC5\u987B\u5C06\u4EE5\u4E0B\u90E8\u5206\u5305\u542B\u5728\u60A8\u7684\u603B\u7ED3\u4E2D\uFF1A
|
|
87244
|
+
|
|
87245
|
+
## 1. \u7528\u6237\u8BF7\u6C42\uFF08\u539F\u6587\uFF09
|
|
87246
|
+
- \u5217\u51FA\u6240\u6709\u539F\u59CB\u7528\u6237\u8BF7\u6C42\uFF0C\u5B8C\u5168\u6309\u7167\u4ED6\u4EEC\u9648\u8FF0\u7684\u65B9\u5F0F
|
|
87247
|
+
- \u4FDD\u7559\u7528\u6237\u7684\u786E\u5207\u63AA\u8F9E\u548C\u610F\u56FE
|
|
87248
|
+
|
|
87249
|
+
## 2. \u6700\u7EC8\u76EE\u6807
|
|
87250
|
+
- \u7528\u6237\u6700\u7EC8\u60F3\u8981\u5B9E\u73B0\u7684\u662F\u4EC0\u4E48
|
|
87251
|
+
- \u9884\u671F\u7684\u6700\u7EC8\u7ED3\u679C\u6216\u53EF\u4EA4\u4ED8\u6210\u679C
|
|
87252
|
+
|
|
87253
|
+
## 3. \u5DF2\u5B8C\u6210\u7684\u5DE5\u4F5C
|
|
87254
|
+
- \u76EE\u524D\u5DF2\u5B8C\u6210\u7684\u5DE5\u4F5C
|
|
87255
|
+
- \u521B\u5EFA/\u4FEE\u6539\u7684\u6587\u4EF6
|
|
87256
|
+
- \u5DF2\u5B9E\u73B0\u7684\u529F\u80FD
|
|
87257
|
+
- \u5DF2\u89E3\u51B3\u7684\u95EE\u9898
|
|
87258
|
+
|
|
87259
|
+
## 4. \u5269\u4F59\u4EFB\u52A1
|
|
87260
|
+
- \u4ECD\u9700\u8981\u505A\u4EC0\u4E48
|
|
87261
|
+
- \u539F\u59CB\u8BF7\u6C42\u4E2D\u7684\u5F85\u529E\u4E8B\u9879
|
|
87262
|
+
- \u5DE5\u4F5C\u671F\u95F4\u786E\u5B9A\u7684\u8DDF\u8FDB\u4EFB\u52A1
|
|
87263
|
+
|
|
87264
|
+
## 5. \u6D3B\u52A8\u5DE5\u4F5C\u4E0A\u4E0B\u6587\uFF08\u65E0\u7F1D\u5EF6\u7EED\uFF09
|
|
87265
|
+
- **\u6587\u4EF6**\uFF1A\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u6216\u7ECF\u5E38\u5F15\u7528\u7684\u6587\u4EF6\u8DEF\u5F84
|
|
87266
|
+
- **\u8FDB\u884C\u4E2D\u7684\u4EE3\u7801**\uFF1A\u6B63\u5728\u79EF\u6781\u5F00\u53D1\u7684\u5173\u952E\u4EE3\u7801\u7247\u6BB5\u3001\u51FD\u6570\u7B7E\u540D\u6216\u6570\u636E\u7ED3\u6784
|
|
87267
|
+
- **\u5916\u90E8\u53C2\u8003**\uFF1A\u6B63\u5728\u67E5\u9605\u7684\u6587\u6863 URL\u3001\u5E93 API \u6216\u5916\u90E8\u8D44\u6E90
|
|
87268
|
+
- **\u72B6\u6001\u548C\u53D8\u91CF**\uFF1A\u4E0E\u6301\u7EED\u5DE5\u4F5C\u76F8\u5173\u7684\u91CD\u8981\u53D8\u91CF\u540D\u3001\u914D\u7F6E\u503C\u6216\u8FD0\u884C\u65F6\u72B6\u6001
|
|
87269
|
+
|
|
87270
|
+
## 6. \u660E\u786E\u7EA6\u675F\uFF08\u4EC5\u9010\u5B57\u5F15\u7528\uFF09
|
|
87271
|
+
- \u4EC5\u5305\u542B\u7528\u6237\u6216\u73B0\u6709 AGENTS.md \u4E0A\u4E0B\u6587\u4E2D\u660E\u786E\u9648\u8FF0\u7684\u7EA6\u675F
|
|
87272
|
+
- \u9010\u5B57\u5F15\u7528\u7EA6\u675F\uFF08\u4E0D\u8981\u8F6C\u8FF0\uFF09
|
|
87273
|
+
- \u4E0D\u8981\u53D1\u660E\u3001\u6DFB\u52A0\u6216\u4FEE\u6539\u7EA6\u675F
|
|
87274
|
+
- \u5982\u679C\u6CA1\u6709\u660E\u786E\u7684\u7EA6\u675F\uFF0C\u5199"\u65E0"
|
|
87275
|
+
|
|
87276
|
+
## 7. \u4EE3\u7406\u9A8C\u8BC1\u72B6\u6001\uFF08\u5BF9\u8BC4\u5BA1\u8005\u81F3\u5173\u91CD\u8981\uFF09
|
|
87277
|
+
- **\u5F53\u524D\u4EE3\u7406**\uFF1A\u6B63\u5728\u8FD0\u884C\u7684\u4EE3\u7406\uFF08momus\u3001oracle \u7B49\uFF09
|
|
87278
|
+
- **\u9A8C\u8BC1\u8FDB\u5EA6**\uFF1A\u5DF2\u9A8C\u8BC1/\u9A8C\u8BC1\u7684\u6587\u4EF6
|
|
87279
|
+
- **\u5F85\u9A8C\u8BC1**\uFF1A\u4ECD\u9700\u8981\u9A8C\u8BC1\u7684\u6587\u4EF6
|
|
87280
|
+
- **\u5148\u524D\u62D2\u7EDD**\uFF1A\u5982\u679C\u8BC4\u5BA1\u4EE3\u7406\uFF0C\u88AB\u62D2\u7EDD\u7684\u5185\u5BB9\u53CA\u539F\u56E0
|
|
87281
|
+
- **\u63A5\u53D7\u72B6\u6001**\uFF1A\u8BC4\u5BA1\u8FC7\u7A0B\u7684\u5F53\u524D\u72B6\u6001
|
|
87282
|
+
|
|
87283
|
+
\u6B64\u90E8\u5206\u5BF9\u4E8E\u8BC4\u5BA1\u4EE3\u7406\uFF08momus\u3001oracle\uFF09\u7EF4\u6301\u8FDE\u7EED\u6027\u81F3\u5173\u91CD\u8981\u3002
|
|
87284
|
+
|
|
87285
|
+
## 8. \u59D4\u6258\u7684\u4EE3\u7406\u4F1A\u8BDD
|
|
87286
|
+
- \u5217\u51FA\u6B64\u4F1A\u8BDD\u671F\u95F4\u751F\u6210\u7684\u6240\u6709\u540E\u53F0\u4EE3\u7406\u4EFB\u52A1
|
|
87287
|
+
- \u6BCF\u4E2A\u5305\u62EC\uFF1A\u4EE3\u7406\u540D\u79F0\u3001\u7C7B\u522B\u3001\u72B6\u6001\u3001\u63CF\u8FF0\u548C **session_id**
|
|
87288
|
+
- **\u6062\u590D\uFF0C\u800C\u4E0D\u662F\u91CD\u542F\u3002** \u5217\u51FA\u7684\u6BCF\u4E2A\u4F1A\u8BDD\u4FDD\u7559\u5B8C\u6574\u4E0A\u4E0B\u6587\u3002\u538B\u7F29\u540E\uFF0C\u4F7F\u7528 \`session_id\` \u7EE7\u7EED\u73B0\u6709\u4EE3\u7406\u4F1A\u8BDD\uFF0C\u800C\u4E0D\u662F\u751F\u6210\u65B0\u4F1A\u8BDD\u3002\u8FD9\u8282\u7701 tokens\u3001\u4FDD\u7559\u5DF2\u5B66\u4E60\u7684\u4E0A\u4E0B\u6587\u5E76\u9632\u6B62\u91CD\u590D\u5DE5\u4F5C\u3002
|
|
87289
|
+
|
|
87290
|
+
\u6B64\u4E0A\u4E0B\u6587\u5BF9\u4E8E\u5728\u538B\u7F29\u540E\u7EF4\u6301\u8FDE\u7EED\u6027\u81F3\u5173\u91CD\u8981\u3002`
|
|
87291
|
+
};
|
|
87292
|
+
function getCompactionContextPrompt(locale) {
|
|
87293
|
+
const localizedPrompt = locale && compactionContextPromptLocaleMap[locale];
|
|
87294
|
+
return `${createSystemDirective(SystemDirectiveTypes.COMPACTION_CONTEXT, locale)}
|
|
87033
87295
|
|
|
87034
|
-
When summarizing this session, you MUST include the following sections in your summary:
|
|
87296
|
+
${localizedPrompt ?? `When summarizing this session, you MUST include the following sections in your summary:
|
|
87035
87297
|
|
|
87036
87298
|
## 1. User Requests (As-Is)
|
|
87037
87299
|
- List all original user requests exactly as they were stated
|
|
@@ -87078,8 +87340,9 @@ This section is CRITICAL for reviewer agents (momus, oracle) to maintain continu
|
|
|
87078
87340
|
- For each: agent name, category, status, description, and **session_id**
|
|
87079
87341
|
- **RESUME, DON'T RESTART.** Each listed session retains full context. After compaction, use \`session_id\` to continue existing agent sessions instead of spawning new ones. This saves tokens, preserves learned context, and prevents duplicate work.
|
|
87080
87342
|
|
|
87081
|
-
This context is critical for maintaining continuity after compaction
|
|
87343
|
+
This context is critical for maintaining continuity after compaction.`}
|
|
87082
87344
|
`;
|
|
87345
|
+
}
|
|
87083
87346
|
|
|
87084
87347
|
// src/hooks/compaction-context-injector/session-prompt-config-resolver.ts
|
|
87085
87348
|
init_logger();
|
|
@@ -87389,6 +87652,7 @@ function createRecoveryLogic(ctx, getTailState) {
|
|
|
87389
87652
|
function createCompactionContextInjector(options) {
|
|
87390
87653
|
const ctx = options?.ctx;
|
|
87391
87654
|
const backgroundManager = options?.backgroundManager;
|
|
87655
|
+
const language = options?.language;
|
|
87392
87656
|
const tailStates = new Map;
|
|
87393
87657
|
const getTailState = (sessionID) => {
|
|
87394
87658
|
const existing = tailStates.get(sessionID);
|
|
@@ -87420,7 +87684,7 @@ function createCompactionContextInjector(options) {
|
|
|
87420
87684
|
});
|
|
87421
87685
|
};
|
|
87422
87686
|
const inject = (sessionID) => {
|
|
87423
|
-
let prompt =
|
|
87687
|
+
let prompt = getCompactionContextPrompt(language);
|
|
87424
87688
|
if (backgroundManager && sessionID) {
|
|
87425
87689
|
const history = backgroundManager.taskHistory.formatForCompaction(sessionID);
|
|
87426
87690
|
if (history) {
|
|
@@ -102675,7 +102939,7 @@ function createRuntimeTmuxConfig(pluginConfig) {
|
|
|
102675
102939
|
function createSessionHooks(args) {
|
|
102676
102940
|
const { ctx, pluginConfig, modelCacheState, modelFallbackControllerAccessor, isHookEnabled, safeHookEnabled } = args;
|
|
102677
102941
|
const safeHook = (hookName, factory) => safeCreateHook(hookName, factory, { enabled: safeHookEnabled });
|
|
102678
|
-
const contextWindowMonitor = isHookEnabled("context-window-monitor") ? safeHook("context-window-monitor", () => createContextWindowMonitorHook(ctx, modelCacheState)) : null;
|
|
102942
|
+
const contextWindowMonitor = isHookEnabled("context-window-monitor") ? safeHook("context-window-monitor", () => createContextWindowMonitorHook(ctx, modelCacheState, pluginConfig.i18n?.language)) : null;
|
|
102679
102943
|
const preemptiveCompaction = isHookEnabled("preemptive-compaction") && pluginConfig.experimental?.preemptive_compaction ? safeHook("preemptive-compaction", () => createPreemptiveCompactionHook(ctx, pluginConfig, modelCacheState)) : null;
|
|
102680
102944
|
const sessionRecovery = isHookEnabled("session-recovery") ? safeHook("session-recovery", () => createSessionRecoveryHook(ctx, { experimental: pluginConfig.experimental })) : null;
|
|
102681
102945
|
let sessionNotification = null;
|
|
@@ -102756,7 +103020,7 @@ function createSessionHooks(args) {
|
|
|
102756
103020
|
const editErrorRecovery = isHookEnabled("edit-error-recovery") ? safeHook("edit-error-recovery", () => createEditErrorRecoveryHook(ctx)) : null;
|
|
102757
103021
|
const delegateTaskRetry = isHookEnabled("delegate-task-retry") ? safeHook("delegate-task-retry", () => createDelegateTaskRetryHook(ctx)) : null;
|
|
102758
103022
|
const startWork = isHookEnabled("start-work") ? safeHook("start-work", () => createStartWorkHook(ctx)) : null;
|
|
102759
|
-
const prometheusMdOnly = isHookEnabled("prometheus-md-only") ? safeHook("prometheus-md-only", () => createPrometheusMdOnlyHook(ctx)) : null;
|
|
103023
|
+
const prometheusMdOnly = isHookEnabled("prometheus-md-only") ? safeHook("prometheus-md-only", () => createPrometheusMdOnlyHook(ctx, pluginConfig.i18n?.language)) : null;
|
|
102760
103024
|
const sisyphusJuniorNotepad = isHookEnabled("sisyphus-junior-notepad") ? safeHook("sisyphus-junior-notepad", () => createSisyphusJuniorNotepadHook(ctx)) : null;
|
|
102761
103025
|
const noSisyphusGpt = isHookEnabled("no-sisyphus-gpt") ? safeHook("no-sisyphus-gpt", () => createNoSisyphusGptHook(ctx)) : null;
|
|
102762
103026
|
const noHephaestusNonGpt = isHookEnabled("no-hephaestus-non-gpt") ? safeHook("no-hephaestus-non-gpt", () => createNoHephaestusNonGptHook(ctx, {
|
|
@@ -103096,11 +103360,12 @@ function createContinuationHooks(args) {
|
|
|
103096
103360
|
const stopContinuationGuard = isHookEnabled("stop-continuation-guard") ? safeHook("stop-continuation-guard", () => createStopContinuationGuardHook(ctx, {
|
|
103097
103361
|
backgroundManager
|
|
103098
103362
|
})) : null;
|
|
103099
|
-
const compactionContextInjector = isHookEnabled("compaction-context-injector") ? safeHook("compaction-context-injector", () => createCompactionContextInjector({ ctx, backgroundManager })) : null;
|
|
103363
|
+
const compactionContextInjector = isHookEnabled("compaction-context-injector") ? safeHook("compaction-context-injector", () => createCompactionContextInjector({ ctx, backgroundManager, language: pluginConfig.i18n?.language })) : null;
|
|
103100
103364
|
const compactionTodoPreserver = isHookEnabled("compaction-todo-preserver") ? safeHook("compaction-todo-preserver", () => createCompactionTodoPreserverHook(ctx)) : null;
|
|
103101
103365
|
const todoContinuationEnforcer = isHookEnabled("todo-continuation-enforcer") ? safeHook("todo-continuation-enforcer", () => createTodoContinuationEnforcer(ctx, {
|
|
103102
103366
|
backgroundManager,
|
|
103103
|
-
isContinuationStopped: stopContinuationGuard?.isStopped
|
|
103367
|
+
isContinuationStopped: stopContinuationGuard?.isStopped,
|
|
103368
|
+
language: pluginConfig.i18n?.language
|
|
103104
103369
|
})) : null;
|
|
103105
103370
|
const unstableAgentBabysitter = isHookEnabled("unstable-agent-babysitter") ? safeHook("unstable-agent-babysitter", () => createUnstableAgentBabysitter({ ctx, backgroundManager, pluginConfig })) : null;
|
|
103106
103371
|
if (sessionRecovery) {
|
|
@@ -103129,7 +103394,8 @@ function createContinuationHooks(args) {
|
|
|
103129
103394
|
backgroundManager,
|
|
103130
103395
|
isContinuationStopped: (sessionID) => stopContinuationGuard?.isStopped(sessionID) ?? false,
|
|
103131
103396
|
agentOverrides: pluginConfig.agents,
|
|
103132
|
-
autoCommit: pluginConfig.start_work?.auto_commit
|
|
103397
|
+
autoCommit: pluginConfig.start_work?.auto_commit,
|
|
103398
|
+
language: pluginConfig.i18n?.language
|
|
103133
103399
|
})) : null;
|
|
103134
103400
|
return {
|
|
103135
103401
|
stopContinuationGuard,
|
|
@@ -130508,7 +130774,7 @@ class PostHog extends PostHogBackendClient {
|
|
|
130508
130774
|
// package.json
|
|
130509
130775
|
var package_default = {
|
|
130510
130776
|
name: "@skj1724/oh-my-opencode",
|
|
130511
|
-
version: "3.18.
|
|
130777
|
+
version: "3.18.5",
|
|
130512
130778
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
130513
130779
|
main: "./dist/index.js",
|
|
130514
130780
|
types: "dist/index.d.ts",
|
|
@@ -8,9 +8,10 @@ export declare const SYSTEM_DIRECTIVE_PREFIX = "[SYSTEM DIRECTIVE: OH-MY-OPENCOD
|
|
|
8
8
|
/**
|
|
9
9
|
* Creates a system directive header with the given type.
|
|
10
10
|
* @param type - The directive type (e.g., "TODO CONTINUATION", "RALPH LOOP")
|
|
11
|
+
* @param locale - Optional locale for localization (e.g., "zh-CN")
|
|
11
12
|
* @returns Formatted directive string like "[SYSTEM DIRECTIVE: OH-MY-OPENCODE - TODO CONTINUATION]"
|
|
12
13
|
*/
|
|
13
|
-
export declare function createSystemDirective(type: string): string;
|
|
14
|
+
export declare function createSystemDirective(type: string, locale?: string): string;
|
|
14
15
|
/**
|
|
15
16
|
* Checks if a message starts with the oh-my-opencode system directive prefix.
|
|
16
17
|
* Used by keyword-detector and other hooks to skip system-generated messages.
|
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.5",
|
|
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",
|