@wolfx/oh-my-openagent 4.0.0 → 4.1.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/README.ja.md +28 -3
- package/README.ko.md +28 -3
- package/README.md +28 -3
- package/README.ru.md +28 -3
- package/README.zh-cn.md +28 -3
- package/dist/agents/atlas/agent.d.ts +7 -12
- package/dist/agents/atlas/default-prompt-sections.d.ts +5 -5
- package/dist/agents/atlas/gemini-prompt-sections.d.ts +4 -4
- package/dist/agents/atlas/gpt-prompt-sections.d.ts +5 -5
- package/dist/agents/atlas/kimi-prompt-sections.d.ts +6 -0
- package/dist/agents/atlas/kimi.d.ts +2 -0
- package/dist/agents/atlas/opus-4-7-prompt-sections.d.ts +6 -0
- package/dist/agents/atlas/opus-4-7.d.ts +2 -0
- package/dist/agents/atlas/shared-prompt.d.ts +1 -1
- package/dist/agents/prometheus/plan-generation.d.ts +1 -1
- package/dist/config/schema/hooks.d.ts +1 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +1 -0
- package/dist/create-hooks.d.ts +1 -0
- package/dist/create-managers.d.ts +2 -0
- package/dist/features/background-agent/manager.d.ts +10 -0
- package/dist/features/background-agent/spawner.d.ts +4 -2
- package/dist/features/background-agent/task-poller.d.ts +1 -0
- package/dist/features/background-agent/types.d.ts +1 -0
- package/dist/features/boulder-state/format-duration.d.ts +1 -0
- package/dist/features/boulder-state/index.d.ts +1 -0
- package/dist/features/boulder-state/storage.d.ts +39 -1
- package/dist/features/boulder-state/types.d.ts +43 -0
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/features/team-mode/team-runtime/session-cleanup.d.ts +21 -0
- package/dist/features/team-mode/team-runtime/session-team-run-registry.d.ts +4 -0
- package/dist/features/tmux-subagent/cleanup.d.ts +10 -0
- package/dist/features/tmux-subagent/session-created-handler.d.ts +23 -0
- package/dist/features/tmux-subagent/session-deleted-handler.d.ts +16 -0
- package/dist/hooks/atlas/boulder-continuation-injector.d.ts +1 -1
- package/dist/hooks/atlas/system-reminder-templates.d.ts +1 -0
- 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 +2 -0
- package/dist/hooks/compaction-context-injector/recovery.d.ts +1 -1
- package/dist/hooks/compaction-context-injector/types.d.ts +1 -0
- package/dist/hooks/compaction-todo-preserver/hook.d.ts +11 -0
- package/dist/hooks/fsync-skip-warning/index.d.ts +18 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/ralph-loop/continuation-prompt-injector.d.ts +7 -1
- package/dist/hooks/ralph-loop/iteration-continuation.d.ts +9 -1
- package/dist/hooks/ralph-loop/loop-state-controller.d.ts +1 -0
- package/dist/hooks/ralph-loop/pending-verification-handler.d.ts +3 -0
- package/dist/hooks/ralph-loop/ralph-loop-event-handler.d.ts +2 -0
- package/dist/hooks/ralph-loop/types.d.ts +1 -0
- package/dist/hooks/ralph-loop/verification-failure-handler.d.ts +3 -1
- package/dist/hooks/shared/session-idle-settle.d.ts +11 -0
- package/dist/hooks/team-session-events/team-idle-wake-hint.d.ts +5 -1
- package/dist/hooks/todo-description-override/description.d.ts +1 -1
- package/dist/hooks/unstable-agent-babysitter/unstable-agent-babysitter-hook.d.ts +2 -0
- package/dist/index.js +5478 -2309
- package/dist/oh-my-opencode.schema.json +8 -0
- package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
- package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -1
- package/dist/plugin/session-compacting.d.ts +31 -0
- package/dist/plugin-dispose.d.ts +13 -0
- package/dist/plugin-handlers/agent-priority-order.d.ts +6 -6
- package/dist/shared/agent-ordering.d.ts +8 -0
- package/dist/shared/agent-sort-shim.d.ts +8 -8
- package/dist/shared/agent-tool-restrictions.d.ts +5 -1
- package/dist/shared/bun-file-shim.d.ts +8 -0
- package/dist/shared/bun-hash-shim.d.ts +1 -0
- package/dist/shared/bun-which-shim.d.ts +1 -0
- package/dist/shared/classify-path-environment.d.ts +3 -0
- package/dist/shared/event-session-id.d.ts +2 -0
- package/dist/shared/extract-semver.d.ts +1 -0
- package/dist/shared/fsync-skip-tracker.d.ts +12 -0
- package/dist/shared/fsync-skip-warning-formatter.d.ts +2 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/internal-initiator-marker.d.ts +8 -0
- package/dist/shared/model-capability-heuristics.d.ts +1 -0
- package/dist/shared/opencode-version.d.ts +14 -1
- package/dist/shared/session-route.d.ts +18 -0
- package/dist/shared/tmux/cmux-detect.d.ts +8 -0
- package/dist/shared/tmux/index.d.ts +1 -0
- package/dist/shared/tolerant-fsync.d.ts +5 -0
- package/dist/shared/write-file-atomically.d.ts +4 -1
- package/dist/tools/call-omo-agent/agent-resolver.d.ts +5 -12
- package/dist/tools/call-omo-agent/constants.d.ts +2 -2
- package/dist/tools/delegate-task/model-string-parser.d.ts +9 -0
- package/dist/tools/delegate-task/resolve-call-id.d.ts +2 -0
- package/dist/tools/delegate-task/sync-prompt-sender.d.ts +1 -0
- package/dist/tools/delegate-task/sync-result-fetcher.d.ts +3 -1
- package/dist/tools/interactive-bash/constants.d.ts +1 -0
- package/dist/tools/interactive-bash/tmux-path-resolver.d.ts +1 -0
- package/package.json +3 -5
- package/dist/hooks/ralph-loop/completion-promise-detector-test-input.d.ts +0 -11
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type ToolExecuteInput = {
|
|
2
|
+
tool: string;
|
|
3
|
+
sessionID: string;
|
|
4
|
+
callID: string;
|
|
5
|
+
};
|
|
6
|
+
type ToolBeforeOutput = {
|
|
7
|
+
args: Record<string, unknown>;
|
|
8
|
+
};
|
|
9
|
+
type ToolAfterOutput = {
|
|
10
|
+
title: string;
|
|
11
|
+
output: string;
|
|
12
|
+
metadata: unknown;
|
|
13
|
+
};
|
|
14
|
+
export declare function createFsyncSkipWarningHook(): {
|
|
15
|
+
"tool.execute.before": (input: ToolExecuteInput, _output: ToolBeforeOutput) => Promise<void>;
|
|
16
|
+
"tool.execute.after": (input: ToolExecuteInput, output: ToolAfterOutput) => Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -55,3 +55,4 @@ export { createReadImageResizerHook } from "./read-image-resizer";
|
|
|
55
55
|
export { createTodoDescriptionOverrideHook } from "./todo-description-override";
|
|
56
56
|
export { createWebFetchRedirectGuardHook } from "./webfetch-redirect-guard";
|
|
57
57
|
export { createLegacyPluginToastHook } from "./legacy-plugin-toast";
|
|
58
|
+
export { createFsyncSkipWarningHook } from "./fsync-skip-warning";
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
export type ContinuationPromptResult = {
|
|
3
|
+
status: "dispatched";
|
|
4
|
+
} | {
|
|
5
|
+
status: "rejected";
|
|
6
|
+
error: Error;
|
|
7
|
+
};
|
|
2
8
|
export declare function injectContinuationPrompt(ctx: PluginInput, options: {
|
|
3
9
|
sessionID: string;
|
|
4
10
|
prompt: string;
|
|
5
11
|
directory: string;
|
|
6
12
|
apiTimeoutMs: number;
|
|
7
13
|
inheritFromSessionID?: string;
|
|
8
|
-
}): Promise<
|
|
14
|
+
}): Promise<ContinuationPromptResult>;
|
|
@@ -8,5 +8,13 @@ type ContinuationOptions = {
|
|
|
8
8
|
setSessionID: (sessionID: string) => RalphLoopState | null;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type ContinuationResult = {
|
|
12
|
+
status: "dispatched";
|
|
13
|
+
} | {
|
|
14
|
+
status: "session_creation_rejected";
|
|
15
|
+
} | {
|
|
16
|
+
status: "dispatch_rejected";
|
|
17
|
+
error: unknown;
|
|
18
|
+
};
|
|
19
|
+
export declare function continueIteration(ctx: PluginInput, state: RalphLoopState, options: ContinuationOptions): Promise<ContinuationResult>;
|
|
12
20
|
export {};
|
|
@@ -20,4 +20,5 @@ export declare function createLoopStateController(options: {
|
|
|
20
20
|
markVerificationPending(sessionID: string): RalphLoopState | null;
|
|
21
21
|
setVerificationSessionID(sessionID: string, verificationSessionID: string): RalphLoopState | null;
|
|
22
22
|
restartAfterFailedVerification(sessionID: string, messageCountAtStart?: number): RalphLoopState | null;
|
|
23
|
+
clearVerificationState(sessionID: string, messageCountAtStart?: number): RalphLoopState | null;
|
|
23
24
|
};
|
|
@@ -2,6 +2,9 @@ import type { PluginInput } from "@opencode-ai/plugin";
|
|
|
2
2
|
import type { RalphLoopState } from "./types";
|
|
3
3
|
type LoopStateController = {
|
|
4
4
|
restartAfterFailedVerification: (sessionID: string, messageCountAtStart?: number) => RalphLoopState | null;
|
|
5
|
+
clearVerificationState: (sessionID: string, messageCountAtStart?: number) => RalphLoopState | null;
|
|
6
|
+
incrementIteration: () => RalphLoopState | null;
|
|
7
|
+
clear: () => boolean;
|
|
5
8
|
setVerificationSessionID: (sessionID: string, verificationSessionID: string) => RalphLoopState | null;
|
|
6
9
|
};
|
|
7
10
|
export declare function handlePendingVerification(ctx: PluginInput, input: {
|
|
@@ -8,10 +8,12 @@ type LoopStateController = {
|
|
|
8
8
|
markVerificationPending: (sessionID: string) => RalphLoopState | null;
|
|
9
9
|
setVerificationSessionID: (sessionID: string, verificationSessionID: string) => RalphLoopState | null;
|
|
10
10
|
restartAfterFailedVerification: (sessionID: string, messageCountAtStart?: number) => RalphLoopState | null;
|
|
11
|
+
clearVerificationState: (sessionID: string, messageCountAtStart?: number) => RalphLoopState | null;
|
|
11
12
|
};
|
|
12
13
|
type RalphLoopEventHandlerOptions = {
|
|
13
14
|
directory: string;
|
|
14
15
|
apiTimeoutMs: number;
|
|
16
|
+
idleSettleMs: number;
|
|
15
17
|
getTranscriptPath: (sessionID: string) => string | undefined;
|
|
16
18
|
checkSessionExists?: RalphLoopOptions["checkSessionExists"];
|
|
17
19
|
backgroundManager?: RalphLoopOptions["backgroundManager"];
|
|
@@ -19,6 +19,7 @@ export interface RalphLoopOptions {
|
|
|
19
19
|
config?: RalphLoopConfig;
|
|
20
20
|
getTranscriptPath?: (sessionId: string) => string;
|
|
21
21
|
apiTimeout?: number;
|
|
22
|
+
idleSettleMs?: number;
|
|
22
23
|
checkSessionExists?: (sessionId: string) => Promise<boolean>;
|
|
23
24
|
backgroundManager?: {
|
|
24
25
|
getTasksByParentSession: (sessionId: string) => Array<{
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
import type { RalphLoopState } from "./types";
|
|
3
3
|
type LoopStateController = {
|
|
4
|
-
|
|
4
|
+
clearVerificationState: (sessionID: string, messageCountAtStart?: number) => RalphLoopState | null;
|
|
5
|
+
incrementIteration: () => RalphLoopState | null;
|
|
6
|
+
clear: () => boolean;
|
|
5
7
|
};
|
|
6
8
|
export declare function handleFailedVerification(ctx: PluginInput, input: {
|
|
7
9
|
state: RalphLoopState;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DEFAULT_SESSION_IDLE_SETTLE_MS = 150;
|
|
2
|
+
export declare function settleAfterSessionIdle(ms?: number): Promise<void>;
|
|
3
|
+
type SessionStatusClient = {
|
|
4
|
+
session?: {
|
|
5
|
+
status?: () => Promise<unknown>;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export declare function isActiveSessionStatusType(statusType: string): boolean;
|
|
9
|
+
export declare function isSessionActive(client: SessionStatusClient, sessionID: string): Promise<boolean>;
|
|
10
|
+
export declare function shouldPromptAfterSessionIdle(client: SessionStatusClient, sessionID: string, settleMs?: number): Promise<boolean>;
|
|
11
|
+
export {};
|
|
@@ -24,6 +24,7 @@ type TeamIdleWakeHintContext = {
|
|
|
24
24
|
client: {
|
|
25
25
|
session: {
|
|
26
26
|
promptAsync?: (input: PromptAsyncInput) => Promise<unknown>;
|
|
27
|
+
status?: () => Promise<unknown>;
|
|
27
28
|
};
|
|
28
29
|
};
|
|
29
30
|
};
|
|
@@ -34,5 +35,8 @@ type HookInput = {
|
|
|
34
35
|
};
|
|
35
36
|
};
|
|
36
37
|
export type HookImpl = (input: HookInput) => Promise<void>;
|
|
37
|
-
|
|
38
|
+
type TeamIdleWakeHintOptions = {
|
|
39
|
+
idleSettleMs?: number;
|
|
40
|
+
};
|
|
41
|
+
export declare function createTeamIdleWakeHint(ctx: TeamIdleWakeHintContext, config: TeamModeConfig, options?: TeamIdleWakeHintOptions): HookImpl;
|
|
38
42
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const TODOWRITE_DESCRIPTION = "Use this tool to create and manage a structured task list for tracking progress on multi-step work.\n\n## Todo Format (MANDATORY)\n\nEach todo title MUST encode four elements: WHERE, WHY, HOW, and EXPECTED RESULT.\n\nFormat: \"[WHERE] [HOW] to [WHY] - expect [RESULT]\"\n\nGOOD:\n- \"src/utils/validation.ts: Add validateEmail() for input sanitization - returns boolean\"\n- \"UserService.create(): Call validateEmail() before DB insert - rejects invalid emails with 400\"\n- \"validation.test.ts: Add test for missing @ sign - expect validateEmail('foo') to return false\"\n\nBAD:\n- \"Implement email validation\" (where? how? what result?)\n- \"Add dark mode\" (feature, not a todo)\n- \"Fix auth\" (what file? what changes? what's expected?)\n\n## Granularity Rules\n\nEach todo MUST be a single atomic action completable in 1-3 tool calls. If it needs more, split it.\n\n**Size test**: Can you complete this todo by editing one file or running one command? If not, it's too big.\n\n## Task Management\n- One in_progress at a time. Complete it before starting the next.\n- Mark completed immediately after finishing each item.\n- Skip this tool for single trivial tasks (one-step, obvious action).";
|
|
1
|
+
export declare const TODOWRITE_DESCRIPTION = "Use this tool to create and manage a structured task list for tracking progress on multi-step work.\n\n## OpenCode Schema Contract\n\nThe upstream OpenCode `todowrite` schema expects each todo item to include:\n\n- `content`: string\n- `status`: string, one of `pending`, `in_progress`, `completed`, `cancelled`\n- `priority`: string, one of `high`, `medium`, `low`\n\n`priority` is a string field. Never send numeric priorities such as `0`, `1`, `2`, or labels such as `P0`, `P1`, `P2`.\n\n## Todo Format (MANDATORY)\n\nEach todo title MUST encode four elements: WHERE, WHY, HOW, and EXPECTED RESULT.\n\nFormat: \"[WHERE] [HOW] to [WHY] - expect [RESULT]\"\n\nGOOD:\n- \"src/utils/validation.ts: Add validateEmail() for input sanitization - returns boolean\"\n- \"UserService.create(): Call validateEmail() before DB insert - rejects invalid emails with 400\"\n- \"validation.test.ts: Add test for missing @ sign - expect validateEmail('foo') to return false\"\n\nBAD:\n- \"Implement email validation\" (where? how? what result?)\n- \"Add dark mode\" (feature, not a todo)\n- \"Fix auth\" (what file? what changes? what's expected?)\n\n## Granularity Rules\n\nEach todo MUST be a single atomic action completable in 1-3 tool calls. If it needs more, split it.\n\n**Size test**: Can you complete this todo by editing one file or running one command? If not, it's too big.\n\n## Task Management\n- One in_progress at a time. Complete it before starting the next.\n- Mark completed immediately after finishing each item.\n- Skip this tool for single trivial tasks (one-step, obvious action).";
|
|
@@ -55,12 +55,14 @@ type BabysitterContext = {
|
|
|
55
55
|
directory?: string;
|
|
56
56
|
};
|
|
57
57
|
}) => Promise<unknown>;
|
|
58
|
+
status?: () => Promise<unknown>;
|
|
58
59
|
};
|
|
59
60
|
};
|
|
60
61
|
};
|
|
61
62
|
type BabysitterOptions = {
|
|
62
63
|
backgroundManager: Pick<BackgroundManager, "getTasksByParentSession">;
|
|
63
64
|
config?: BabysittingConfig;
|
|
65
|
+
idleSettleMs?: number;
|
|
64
66
|
};
|
|
65
67
|
export declare function createUnstableAgentBabysitterHook(ctx: BabysitterContext, options: BabysitterOptions): {
|
|
66
68
|
event: ({ event }: {
|