oh-my-opencode 3.12.3 → 3.13.0
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 +11 -0
- package/README.ko.md +11 -0
- package/README.md +12 -2
- package/README.ru.md +11 -0
- package/README.zh-cn.md +11 -0
- package/dist/agents/prometheus/system-prompt.d.ts +1 -1
- package/dist/cli/index.js +168 -115
- package/dist/config/schema/hooks.d.ts +1 -1
- package/dist/config/schema/oh-my-opencode-config.d.ts +31 -0
- package/dist/config/schema/openclaw.d.ts +64 -0
- package/dist/create-hooks.d.ts +1 -1
- package/dist/features/background-agent/constants.d.ts +3 -3
- package/dist/features/boulder-state/index.d.ts +1 -0
- package/dist/features/boulder-state/storage.d.ts +10 -1
- package/dist/features/boulder-state/top-level-task.d.ts +2 -0
- package/dist/features/boulder-state/types.d.ts +28 -0
- package/dist/hooks/atlas/boulder-continuation-injector.d.ts +2 -0
- package/dist/hooks/atlas/subagent-session-id.d.ts +7 -1
- package/dist/hooks/atlas/tool-execute-after.d.ts +2 -1
- package/dist/hooks/atlas/tool-execute-before.d.ts +2 -0
- package/dist/hooks/atlas/types.d.ts +13 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/keyword-detector/constants.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/index.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +5 -0
- package/dist/hooks/openclaw.d.ts +11 -0
- package/dist/hooks/preemptive-compaction-degradation-monitor.d.ts +55 -0
- package/dist/hooks/preemptive-compaction-no-text-tail.d.ts +18 -0
- package/dist/hooks/session-recovery/storage/thinking-prepend.d.ts +27 -2
- package/dist/hooks/todo-continuation-enforcer/compaction-guard.d.ts +2 -0
- package/dist/hooks/todo-continuation-enforcer/handler.d.ts +0 -1
- package/dist/hooks/todo-continuation-enforcer/idle-event.d.ts +0 -1
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +2 -1
- package/dist/hooks/webfetch-redirect-guard/constants.d.ts +6 -0
- package/dist/hooks/webfetch-redirect-guard/hook.d.ts +19 -0
- package/dist/hooks/webfetch-redirect-guard/index.d.ts +1 -0
- package/dist/hooks/webfetch-redirect-guard/redirect-resolution.d.ts +16 -0
- package/dist/index.js +1802 -1055
- package/dist/oh-my-opencode.schema.json +141 -0
- package/dist/openclaw/config.d.ts +8 -0
- package/dist/openclaw/daemon.d.ts +1 -0
- package/dist/openclaw/dispatcher.d.ts +16 -0
- package/dist/openclaw/index.d.ts +5 -0
- package/dist/openclaw/reply-listener.d.ts +31 -0
- package/dist/openclaw/session-registry.d.ts +17 -0
- package/dist/openclaw/tmux.d.ts +8 -0
- package/dist/openclaw/types.d.ts +38 -0
- package/dist/plugin/hooks/create-continuation-hooks.d.ts +1 -2
- 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/normalize-tool-arg-schemas.d.ts +1 -0
- package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +1 -0
- package/dist/shared/jsonc-parser.d.ts +4 -0
- package/dist/shared/shell-env.d.ts +1 -1
- package/dist/tools/delegate-task/categories.d.ts +1 -0
- package/dist/tools/delegate-task/constants.d.ts +2 -2
- package/dist/tools/delegate-task/model-selection.d.ts +1 -0
- package/dist/tools/delegate-task/subagent-resolver.d.ts +1 -1
- package/dist/tools/hashline-edit/formatter-trigger.d.ts +38 -0
- package/dist/tools/hashline-edit/hashline-edit-executor.d.ts +2 -1
- package/dist/tools/hashline-edit/tools.d.ts +2 -1
- package/package.json +12 -12
- package/dist/hooks/gpt-permission-continuation/assistant-message.d.ts +0 -23
- package/dist/hooks/gpt-permission-continuation/constants.d.ts +0 -4
- package/dist/hooks/gpt-permission-continuation/detector.d.ts +0 -1
- package/dist/hooks/gpt-permission-continuation/handler.d.ts +0 -12
- package/dist/hooks/gpt-permission-continuation/index.d.ts +0 -13
- package/dist/hooks/gpt-permission-continuation/session-state.d.ts +0 -15
|
@@ -3736,6 +3736,147 @@
|
|
|
3736
3736
|
},
|
|
3737
3737
|
"additionalProperties": false
|
|
3738
3738
|
},
|
|
3739
|
+
"openclaw": {
|
|
3740
|
+
"type": "object",
|
|
3741
|
+
"properties": {
|
|
3742
|
+
"enabled": {
|
|
3743
|
+
"default": false,
|
|
3744
|
+
"type": "boolean"
|
|
3745
|
+
},
|
|
3746
|
+
"gateways": {
|
|
3747
|
+
"default": {},
|
|
3748
|
+
"type": "object",
|
|
3749
|
+
"propertyNames": {
|
|
3750
|
+
"type": "string"
|
|
3751
|
+
},
|
|
3752
|
+
"additionalProperties": {
|
|
3753
|
+
"type": "object",
|
|
3754
|
+
"properties": {
|
|
3755
|
+
"type": {
|
|
3756
|
+
"default": "http",
|
|
3757
|
+
"type": "string",
|
|
3758
|
+
"enum": [
|
|
3759
|
+
"http",
|
|
3760
|
+
"command"
|
|
3761
|
+
]
|
|
3762
|
+
},
|
|
3763
|
+
"url": {
|
|
3764
|
+
"type": "string"
|
|
3765
|
+
},
|
|
3766
|
+
"method": {
|
|
3767
|
+
"default": "POST",
|
|
3768
|
+
"type": "string"
|
|
3769
|
+
},
|
|
3770
|
+
"headers": {
|
|
3771
|
+
"type": "object",
|
|
3772
|
+
"propertyNames": {
|
|
3773
|
+
"type": "string"
|
|
3774
|
+
},
|
|
3775
|
+
"additionalProperties": {
|
|
3776
|
+
"type": "string"
|
|
3777
|
+
}
|
|
3778
|
+
},
|
|
3779
|
+
"command": {
|
|
3780
|
+
"type": "string"
|
|
3781
|
+
},
|
|
3782
|
+
"timeout": {
|
|
3783
|
+
"type": "number"
|
|
3784
|
+
}
|
|
3785
|
+
},
|
|
3786
|
+
"required": [
|
|
3787
|
+
"type",
|
|
3788
|
+
"method"
|
|
3789
|
+
],
|
|
3790
|
+
"additionalProperties": false
|
|
3791
|
+
}
|
|
3792
|
+
},
|
|
3793
|
+
"hooks": {
|
|
3794
|
+
"default": {},
|
|
3795
|
+
"type": "object",
|
|
3796
|
+
"propertyNames": {
|
|
3797
|
+
"type": "string"
|
|
3798
|
+
},
|
|
3799
|
+
"additionalProperties": {
|
|
3800
|
+
"type": "object",
|
|
3801
|
+
"properties": {
|
|
3802
|
+
"enabled": {
|
|
3803
|
+
"default": true,
|
|
3804
|
+
"type": "boolean"
|
|
3805
|
+
},
|
|
3806
|
+
"gateway": {
|
|
3807
|
+
"type": "string"
|
|
3808
|
+
},
|
|
3809
|
+
"instruction": {
|
|
3810
|
+
"type": "string"
|
|
3811
|
+
}
|
|
3812
|
+
},
|
|
3813
|
+
"required": [
|
|
3814
|
+
"enabled",
|
|
3815
|
+
"gateway",
|
|
3816
|
+
"instruction"
|
|
3817
|
+
],
|
|
3818
|
+
"additionalProperties": false
|
|
3819
|
+
}
|
|
3820
|
+
},
|
|
3821
|
+
"replyListener": {
|
|
3822
|
+
"type": "object",
|
|
3823
|
+
"properties": {
|
|
3824
|
+
"discordBotToken": {
|
|
3825
|
+
"type": "string"
|
|
3826
|
+
},
|
|
3827
|
+
"discordChannelId": {
|
|
3828
|
+
"type": "string"
|
|
3829
|
+
},
|
|
3830
|
+
"discordMention": {
|
|
3831
|
+
"type": "string"
|
|
3832
|
+
},
|
|
3833
|
+
"authorizedDiscordUserIds": {
|
|
3834
|
+
"default": [],
|
|
3835
|
+
"type": "array",
|
|
3836
|
+
"items": {
|
|
3837
|
+
"type": "string"
|
|
3838
|
+
}
|
|
3839
|
+
},
|
|
3840
|
+
"telegramBotToken": {
|
|
3841
|
+
"type": "string"
|
|
3842
|
+
},
|
|
3843
|
+
"telegramChatId": {
|
|
3844
|
+
"type": "string"
|
|
3845
|
+
},
|
|
3846
|
+
"pollIntervalMs": {
|
|
3847
|
+
"default": 3000,
|
|
3848
|
+
"type": "number"
|
|
3849
|
+
},
|
|
3850
|
+
"rateLimitPerMinute": {
|
|
3851
|
+
"default": 10,
|
|
3852
|
+
"type": "number"
|
|
3853
|
+
},
|
|
3854
|
+
"maxMessageLength": {
|
|
3855
|
+
"default": 500,
|
|
3856
|
+
"type": "number"
|
|
3857
|
+
},
|
|
3858
|
+
"includePrefix": {
|
|
3859
|
+
"default": true,
|
|
3860
|
+
"type": "boolean"
|
|
3861
|
+
}
|
|
3862
|
+
},
|
|
3863
|
+
"required": [
|
|
3864
|
+
"authorizedDiscordUserIds",
|
|
3865
|
+
"pollIntervalMs",
|
|
3866
|
+
"rateLimitPerMinute",
|
|
3867
|
+
"maxMessageLength",
|
|
3868
|
+
"includePrefix"
|
|
3869
|
+
],
|
|
3870
|
+
"additionalProperties": false
|
|
3871
|
+
}
|
|
3872
|
+
},
|
|
3873
|
+
"required": [
|
|
3874
|
+
"enabled",
|
|
3875
|
+
"gateways",
|
|
3876
|
+
"hooks"
|
|
3877
|
+
],
|
|
3878
|
+
"additionalProperties": false
|
|
3879
|
+
},
|
|
3739
3880
|
"babysitting": {
|
|
3740
3881
|
"type": "object",
|
|
3741
3882
|
"properties": {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { OpenClawConfig, OpenClawGateway } from "./types";
|
|
2
|
+
export declare function normalizeReplyListenerConfig(config: OpenClawConfig): OpenClawConfig;
|
|
3
|
+
export declare function resolveGateway(config: OpenClawConfig, event: string): {
|
|
4
|
+
gatewayName: string;
|
|
5
|
+
gateway: OpenClawGateway;
|
|
6
|
+
instruction: string;
|
|
7
|
+
} | null;
|
|
8
|
+
export declare function validateGatewayUrl(url: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { OpenClawGateway } from "./types";
|
|
2
|
+
export declare function validateGatewayUrl(url: string): boolean;
|
|
3
|
+
export declare function interpolateInstruction(template: string, variables: Record<string, string | undefined>): string;
|
|
4
|
+
export declare function shellEscapeArg(value: string): string;
|
|
5
|
+
export declare function resolveCommandTimeoutMs(gatewayTimeout?: number, envTimeoutRaw?: string | undefined): number;
|
|
6
|
+
export declare function wakeGateway(gatewayName: string, gatewayConfig: OpenClawGateway, payload: unknown): Promise<{
|
|
7
|
+
gateway: string;
|
|
8
|
+
success: boolean;
|
|
9
|
+
error?: string;
|
|
10
|
+
statusCode?: number;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function wakeCommandGateway(gatewayName: string, gatewayConfig: OpenClawGateway, variables: Record<string, string | undefined>): Promise<{
|
|
13
|
+
gateway: string;
|
|
14
|
+
success: boolean;
|
|
15
|
+
error?: string;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { startReplyListener, stopReplyListener } from "./reply-listener";
|
|
2
|
+
import type { OpenClawConfig, OpenClawContext, WakeResult } from "./types";
|
|
3
|
+
export declare function wakeOpenClaw(config: OpenClawConfig, event: string, context: OpenClawContext): Promise<WakeResult | null>;
|
|
4
|
+
export declare function initializeOpenClaw(config: OpenClawConfig): Promise<void>;
|
|
5
|
+
export { startReplyListener, stopReplyListener };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { OpenClawConfig } from "./types";
|
|
2
|
+
export declare const DAEMON_IDENTITY_MARKER = "--openclaw-reply-listener-daemon";
|
|
3
|
+
export declare function logReplyListenerMessage(message: string): void;
|
|
4
|
+
interface DaemonState {
|
|
5
|
+
isRunning: boolean;
|
|
6
|
+
pid: number | null;
|
|
7
|
+
startedAt: string;
|
|
8
|
+
lastPollAt: string | null;
|
|
9
|
+
telegramLastUpdateId: number | null;
|
|
10
|
+
discordLastMessageId: string | null;
|
|
11
|
+
messagesInjected: number;
|
|
12
|
+
errors: number;
|
|
13
|
+
lastError?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function isReplyListenerProcess(pid: number): Promise<boolean>;
|
|
16
|
+
export declare function isDaemonRunning(): Promise<boolean>;
|
|
17
|
+
export declare function sanitizeReplyInput(text: string): string;
|
|
18
|
+
export declare function pollLoop(): Promise<void>;
|
|
19
|
+
export declare function startReplyListener(config: OpenClawConfig): Promise<{
|
|
20
|
+
success: boolean;
|
|
21
|
+
message: string;
|
|
22
|
+
state?: DaemonState;
|
|
23
|
+
error?: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare function stopReplyListener(): Promise<{
|
|
26
|
+
success: boolean;
|
|
27
|
+
message: string;
|
|
28
|
+
state?: DaemonState;
|
|
29
|
+
error?: string;
|
|
30
|
+
}>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface SessionMapping {
|
|
2
|
+
sessionId: string;
|
|
3
|
+
tmuxSession: string;
|
|
4
|
+
tmuxPaneId: string;
|
|
5
|
+
projectPath: string;
|
|
6
|
+
platform: string;
|
|
7
|
+
messageId: string;
|
|
8
|
+
channelId?: string;
|
|
9
|
+
threadId?: string;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function registerMessage(mapping: SessionMapping): boolean;
|
|
13
|
+
export declare function loadAllMappings(): SessionMapping[];
|
|
14
|
+
export declare function lookupByMessageId(platform: string, messageId: string): SessionMapping | null;
|
|
15
|
+
export declare function removeSession(sessionId: string): void;
|
|
16
|
+
export declare function removeMessagesByPane(paneId: string): void;
|
|
17
|
+
export declare function pruneStale(): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function getCurrentTmuxSession(): string | null;
|
|
2
|
+
export declare function getTmuxSessionName(): Promise<string | null>;
|
|
3
|
+
export declare function captureTmuxPane(paneId: string, lines?: number): Promise<string | null>;
|
|
4
|
+
export declare function sendToPane(paneId: string, text: string, confirm?: boolean): Promise<boolean>;
|
|
5
|
+
export declare function isTmuxAvailable(): Promise<boolean>;
|
|
6
|
+
export declare function analyzePaneContent(content: string | null): {
|
|
7
|
+
confidence: number;
|
|
8
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { OpenClawConfig, OpenClawGateway, OpenClawHook, OpenClawReplyListenerConfig } from "../config/schema/openclaw";
|
|
2
|
+
export type { OpenClawConfig, OpenClawGateway, OpenClawHook, OpenClawReplyListenerConfig, };
|
|
3
|
+
export interface OpenClawContext {
|
|
4
|
+
sessionId?: string;
|
|
5
|
+
projectPath?: string;
|
|
6
|
+
projectName?: string;
|
|
7
|
+
tmuxSession?: string;
|
|
8
|
+
prompt?: string;
|
|
9
|
+
contextSummary?: string;
|
|
10
|
+
reasoning?: string;
|
|
11
|
+
question?: string;
|
|
12
|
+
tmuxTail?: string;
|
|
13
|
+
replyChannel?: string;
|
|
14
|
+
replyTarget?: string;
|
|
15
|
+
replyThread?: string;
|
|
16
|
+
[key: string]: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface OpenClawPayload {
|
|
19
|
+
event: string;
|
|
20
|
+
instruction: string;
|
|
21
|
+
text: string;
|
|
22
|
+
timestamp: string;
|
|
23
|
+
sessionId?: string;
|
|
24
|
+
projectPath?: string;
|
|
25
|
+
projectName?: string;
|
|
26
|
+
tmuxSession?: string;
|
|
27
|
+
tmuxTail?: string;
|
|
28
|
+
channel?: string;
|
|
29
|
+
to?: string;
|
|
30
|
+
threadId?: string;
|
|
31
|
+
context: OpenClawContext;
|
|
32
|
+
}
|
|
33
|
+
export interface WakeResult {
|
|
34
|
+
gateway: string;
|
|
35
|
+
success: boolean;
|
|
36
|
+
error?: string;
|
|
37
|
+
statusCode?: number;
|
|
38
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { HookName, OhMyOpenCodeConfig } from "../../config";
|
|
2
2
|
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
3
|
import type { PluginContext } from "../types";
|
|
4
|
-
import {
|
|
4
|
+
import { createTodoContinuationEnforcer, createBackgroundNotificationHook, createStopContinuationGuardHook, createCompactionContextInjector, createCompactionTodoPreserverHook, createAtlasHook } from "../../hooks";
|
|
5
5
|
import { createUnstableAgentBabysitter } from "../unstable-agent-babysitter";
|
|
6
6
|
export type ContinuationHooks = {
|
|
7
|
-
gptPermissionContinuation: ReturnType<typeof createGptPermissionContinuationHook> | null;
|
|
8
7
|
stopContinuationGuard: ReturnType<typeof createStopContinuationGuardHook> | null;
|
|
9
8
|
compactionContextInjector: ReturnType<typeof createCompactionContextInjector> | null;
|
|
10
9
|
compactionTodoPreserver: ReturnType<typeof createCompactionTodoPreserverHook> | null;
|
|
@@ -24,6 +24,7 @@ export declare function createCoreHooks(args: {
|
|
|
24
24
|
jsonErrorRecovery: ReturnType<typeof import("../../hooks").createJsonErrorRecoveryHook> | null;
|
|
25
25
|
readImageResizer: ReturnType<typeof import("../../hooks").createReadImageResizerHook> | null;
|
|
26
26
|
todoDescriptionOverride: ReturnType<typeof import("../../hooks").createTodoDescriptionOverrideHook> | null;
|
|
27
|
+
webfetchRedirectGuard: ReturnType<typeof import("../../hooks").createWebFetchRedirectGuardHook> | null;
|
|
27
28
|
contextWindowMonitor: ReturnType<typeof import("../../hooks").createContextWindowMonitorHook> | null;
|
|
28
29
|
preemptiveCompaction: ReturnType<typeof import("../../hooks").createPreemptiveCompactionHook> | null;
|
|
29
30
|
sessionRecovery: ReturnType<typeof import("../../hooks").createSessionRecoveryHook> | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HookName, OhMyOpenCodeConfig } from "../../config";
|
|
2
2
|
import type { ModelCacheState } from "../../plugin-state";
|
|
3
3
|
import type { PluginContext } from "../types";
|
|
4
|
-
import { createCommentCheckerHooks, createToolOutputTruncatorHook, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createRulesInjectorHook, createTasksTodowriteDisablerHook, createWriteExistingFileGuardHook, createHashlineReadEnhancerHook, createReadImageResizerHook, createJsonErrorRecoveryHook, createTodoDescriptionOverrideHook } from "../../hooks";
|
|
4
|
+
import { createCommentCheckerHooks, createToolOutputTruncatorHook, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createRulesInjectorHook, createTasksTodowriteDisablerHook, createWriteExistingFileGuardHook, createHashlineReadEnhancerHook, createReadImageResizerHook, createJsonErrorRecoveryHook, createTodoDescriptionOverrideHook, createWebFetchRedirectGuardHook } from "../../hooks";
|
|
5
5
|
export type ToolGuardHooks = {
|
|
6
6
|
commentChecker: ReturnType<typeof createCommentCheckerHooks> | null;
|
|
7
7
|
toolOutputTruncator: ReturnType<typeof createToolOutputTruncatorHook> | null;
|
|
@@ -15,6 +15,7 @@ export type ToolGuardHooks = {
|
|
|
15
15
|
jsonErrorRecovery: ReturnType<typeof createJsonErrorRecoveryHook> | null;
|
|
16
16
|
readImageResizer: ReturnType<typeof createReadImageResizerHook> | null;
|
|
17
17
|
todoDescriptionOverride: ReturnType<typeof createTodoDescriptionOverrideHook> | null;
|
|
18
|
+
webfetchRedirectGuard: ReturnType<typeof createWebFetchRedirectGuardHook> | null;
|
|
18
19
|
};
|
|
19
20
|
export declare function createToolGuardHooks(args: {
|
|
20
21
|
ctx: PluginContext;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { ToolDefinition } from "@opencode-ai/plugin";
|
|
2
2
|
export declare function normalizeToolArgSchemas<TDefinition extends Pick<ToolDefinition, "args">>(toolDefinition: TDefinition): TDefinition;
|
|
3
|
+
export declare function sanitizeJsonSchema(value: unknown, depth?: number, isPropertyName?: boolean): unknown;
|
|
@@ -19,5 +19,6 @@ export declare function buildPrometheusAgentConfig(params: {
|
|
|
19
19
|
pluginPrometheusOverride: PrometheusOverride | undefined;
|
|
20
20
|
userCategories: Record<string, CategoryConfig> | undefined;
|
|
21
21
|
currentModel: string | undefined;
|
|
22
|
+
disabledTools?: readonly string[];
|
|
22
23
|
}): Promise<Record<string, unknown>>;
|
|
23
24
|
export {};
|
|
@@ -3,11 +3,11 @@ import type { AvailableCategory, AvailableSkill } from "../../agents/dynamic-age
|
|
|
3
3
|
export declare const VISUAL_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on VISUAL/UI tasks.\n\n<DESIGN_SYSTEM_WORKFLOW_MANDATE>\n## YOU ARE A VISUAL ENGINEER. FOLLOW THIS WORKFLOW OR YOUR OUTPUT IS REJECTED.\n\n**YOUR FAILURE MODE**: You skip design system analysis and jump straight to writing components with hardcoded colors, arbitrary spacing, and ad-hoc font sizes. The result is INCONSISTENT GARBAGE that looks like 5 different people built it. THIS STOPS NOW.\n\n**EVERY visual task follows this EXACT workflow. VIOLATION = BROKEN OUTPUT.**\n\n### PHASE 1: ANALYZE THE DESIGN SYSTEM (MANDATORY FIRST ACTION)\n\n**BEFORE writing a SINGLE line of CSS, HTML, JSX, Svelte, or component code \u2014 you MUST:**\n\n1. **SEARCH for the design system.** Use Grep, Glob, Read \u2014 actually LOOK:\n - Design tokens: colors, spacing, typography, shadows, border-radii\n - Theme files: CSS variables, Tailwind config, `theme.ts`, styled-components theme, design tokens file\n - Shared/base components: Button, Card, Input, Layout primitives\n - Existing UI patterns: How are pages structured? What spacing grid? What color usage?\n\n2. **READ at minimum 5-10 existing UI components.** Understand:\n - Naming conventions (BEM? Atomic? Utility-first? Component-scoped?)\n - Spacing system (4px grid? 8px? Tailwind scale? CSS variables?)\n - Color usage (semantic tokens? Direct hex? Theme references?)\n - Typography scale (heading levels, body, caption \u2014 how many? What font stack?)\n - Component composition patterns (slots? children? compound components?)\n\n**DO NOT proceed to Phase 2 until you can answer ALL of these. If you cannot, you have not explored enough. EXPLORE MORE.**\n\n### PHASE 2: NO DESIGN SYSTEM? BUILD ONE. NOW.\n\nIf Phase 1 reveals NO coherent design system (or scattered, inconsistent patterns):\n\n1. **STOP. Do NOT build the requested UI yet.**\n2. **Extract what exists** \u2014 even inconsistent patterns have salvageable decisions.\n3. **Create a minimal design system FIRST:**\n - Color palette: primary, secondary, neutral, semantic (success/warning/error/info)\n - Typography scale: heading levels (h1-h4 minimum), body, small, caption\n - Spacing scale: consistent increments (4px or 8px base)\n - Border radii, shadows, transitions \u2014 systematic, not random\n - Component primitives: the reusable building blocks\n4. **Commit/save the design system, THEN proceed to Phase 3.**\n\nA design system is NOT optional overhead. It is the FOUNDATION. Building UI without one is like building a house on sand. It WILL collapse into inconsistency.\n\n### PHASE 3: BUILD WITH THE SYSTEM. NEVER AROUND IT.\n\n**NOW and ONLY NOW** \u2014 implement the requested visual work:\n\n| Element | CORRECT | WRONG (WILL BE REJECTED) |\n|---------|---------|--------------------------|\n| Color | Design token / CSS variable | Hardcoded `#3b82f6`, `rgb(59,130,246)` |\n| Spacing | System value (`space-4`, `gap-md`, `var(--spacing-4)`) | Arbitrary `margin: 13px`, `padding: 7px` |\n| Typography | Scale value (`text-lg`, `heading-2`, token) | Ad-hoc `font-size: 17px` |\n| Component | Extend/compose from existing primitives | One-off div soup with inline styles |\n| Border radius | System token | Random `border-radius: 6px` |\n\n**IF the design requires something OUTSIDE the current system:**\n- **Extend the system FIRST** \u2014 add the new token/primitive\n- **THEN use the new token** in your component\n- **NEVER one-off override.** That is how design systems die.\n\n### PHASE 4: VERIFY BEFORE CLAIMING DONE\n\nBEFORE reporting visual work as complete, answer these:\n\n- [ ] Does EVERY color reference a design token or CSS variable?\n- [ ] Does EVERY spacing use the system scale?\n- [ ] Does EVERY component follow the existing composition pattern?\n- [ ] Would a designer see CONSISTENCY across old and new components?\n- [ ] Are there ZERO hardcoded magic numbers for visual properties?\n\n**If ANY answer is NO \u2014 FIX IT. You are NOT done.**\n\n</DESIGN_SYSTEM_WORKFLOW_MANDATE>\n\n<DESIGN_QUALITY>\nDesign-first mindset (AFTER design system is established):\n- Bold aesthetic choices over safe defaults\n- Unexpected layouts, asymmetry, grid-breaking elements\n- Distinctive typography (avoid: Arial, Inter, Roboto, Space Grotesk)\n- Cohesive color palettes with sharp accents\n- High-impact animations with staggered reveals\n- Atmosphere: gradient meshes, noise textures, layered transparencies\n\nAVOID: Generic fonts, purple gradients on white, predictable layouts, cookie-cutter patterns.\n</DESIGN_QUALITY>\n</Category_Context>";
|
|
4
4
|
export declare const ULTRABRAIN_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on DEEP LOGICAL REASONING / COMPLEX ARCHITECTURE tasks.\n\n**CRITICAL - CODE STYLE REQUIREMENTS (NON-NEGOTIABLE)**:\n1. BEFORE writing ANY code, SEARCH the existing codebase to find similar patterns/styles\n2. Your code MUST match the project's existing conventions - blend in seamlessly\n3. Write READABLE code that humans can easily understand - no clever tricks\n4. If unsure about style, explore more files until you find the pattern\n\nStrategic advisor mindset:\n- Bias toward simplicity: least complex solution that fulfills requirements\n- Leverage existing code/patterns over new components\n- Prioritize developer experience and maintainability\n- One clear recommendation with effort estimate (Quick/Short/Medium/Large)\n- Signal when advanced approach warranted\n\nResponse format:\n- Bottom line (2-3 sentences)\n- Action plan (numbered steps)\n- Risks and mitigations (if relevant)\n</Category_Context>";
|
|
5
5
|
export declare const ARTISTRY_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on HIGHLY CREATIVE / ARTISTIC tasks.\n\nArtistic genius mindset:\n- Push far beyond conventional boundaries\n- Explore radical, unconventional directions\n- Surprise and delight: unexpected twists, novel combinations\n- Rich detail and vivid expression\n- Break patterns deliberately when it serves the creative vision\n\nApproach:\n- Generate diverse, bold options first\n- Embrace ambiguity and wild experimentation\n- Balance novelty with coherence\n- This is for tasks requiring exceptional creativity\n</Category_Context>";
|
|
6
|
-
export declare const QUICK_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on SMALL / QUICK tasks.\n\nEfficient execution mindset:\n- Fast, focused, minimal overhead\n- Get to the point immediately\n- No over-engineering\n- Simple solutions for simple problems\n\nApproach:\n- Minimal viable implementation\n- Skip unnecessary abstractions\n- Direct and concise\n</Category_Context>\n\n<Caller_Warning>\nTHIS CATEGORY USES A
|
|
6
|
+
export declare const QUICK_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on SMALL / QUICK tasks.\n\nEfficient execution mindset:\n- Fast, focused, minimal overhead\n- Get to the point immediately\n- No over-engineering\n- Simple solutions for simple problems\n\nApproach:\n- Minimal viable implementation\n- Skip unnecessary abstractions\n- Direct and concise\n</Category_Context>\n\n<Caller_Warning>\nTHIS CATEGORY USES A SMALLER/FASTER MODEL (gpt-5.4-mini).\n\nThe model executing this task is optimized for speed over depth. Your prompt MUST be:\n\n**EXHAUSTIVELY EXPLICIT** - Leave NOTHING to interpretation:\n1. MUST DO: List every required action as atomic, numbered steps\n2. MUST NOT DO: Explicitly forbid likely mistakes and deviations\n3. EXPECTED OUTPUT: Describe exact success criteria with concrete examples\n\n**WHY THIS MATTERS:**\n- Smaller models benefit from explicit guardrails\n- Vague instructions may lead to unpredictable results\n- Implicit expectations may be missed\n**PROMPT STRUCTURE (MANDATORY):**\n```\nTASK: [One-sentence goal]\n\nMUST DO:\n1. [Specific action with exact details]\n2. [Another specific action]\n...\n\nMUST NOT DO:\n- [Forbidden action + why]\n- [Another forbidden action]\n...\n\nEXPECTED OUTPUT:\n- [Exact deliverable description]\n- [Success criteria / verification method]\n```\n\nIf your prompt lacks this structure, REWRITE IT before delegating.\n</Caller_Warning>";
|
|
7
7
|
export declare const UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on tasks that don't fit specific categories but require moderate effort.\n\n<Selection_Gate>\nBEFORE selecting this category, VERIFY ALL conditions:\n1. Task does NOT fit: quick (trivial), visual-engineering (UI), ultrabrain (deep logic), artistry (creative), writing (docs)\n2. Task requires more than trivial effort but is NOT system-wide\n3. Scope is contained within a few files/modules\n\nIf task fits ANY other category, DO NOT select unspecified-low.\nThis is NOT a default choice - it's for genuinely unclassifiable moderate-effort work.\n</Selection_Gate>\n</Category_Context>\n\n<Caller_Warning>\nTHIS CATEGORY USES A MID-TIER MODEL (claude-sonnet-4-6).\n\n**PROVIDE CLEAR STRUCTURE:**\n1. MUST DO: Enumerate required actions explicitly\n2. MUST NOT DO: State forbidden actions to prevent scope creep\n3. EXPECTED OUTPUT: Define concrete success criteria\n</Caller_Warning>";
|
|
8
8
|
export declare const UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on tasks that don't fit specific categories but require substantial effort.\n\n<Selection_Gate>\nBEFORE selecting this category, VERIFY ALL conditions:\n1. Task does NOT fit: quick (trivial), visual-engineering (UI), ultrabrain (deep logic), artistry (creative), writing (docs)\n2. Task requires substantial effort across multiple systems/modules\n3. Changes have broad impact or require careful coordination\n4. NOT just \"complex\" - must be genuinely unclassifiable AND high-effort\n\nIf task fits ANY other category, DO NOT select unspecified-high.\nIf task is unclassifiable but moderate-effort, use unspecified-low instead.\n</Selection_Gate>\n</Category_Context>";
|
|
9
9
|
export declare const WRITING_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on WRITING / PROSE tasks.\n\nWordsmith mindset:\n- Clear, flowing prose\n- Appropriate tone and voice\n- Engaging and readable\n- Proper structure and organization\n\nApproach:\n- Understand the audience\n- Draft with care\n- Polish for clarity and impact\n- Documentation, READMEs, articles, technical writing\n\nANTI-AI-SLOP RULES (NON-NEGOTIABLE):\n- NEVER use em dashes (\u2014) or en dashes (\u2013). Use commas, periods, ellipses, or line breaks instead. Zero tolerance.\n- Remove AI-sounding phrases: \"delve\", \"it's important to note\", \"I'd be happy to\", \"certainly\", \"please don't hesitate\", \"leverage\", \"utilize\", \"in order to\", \"moving forward\", \"circle back\", \"at the end of the day\", \"robust\", \"streamline\", \"facilitate\"\n- Pick plain words. \"Use\" not \"utilize\". \"Start\" not \"commence\". \"Help\" not \"facilitate\".\n- Use contractions naturally: \"don't\" not \"do not\", \"it's\" not \"it is\".\n- Vary sentence length. Don't make every sentence the same length.\n- NEVER start consecutive sentences with the same word.\n- No filler openings: skip \"In today's world...\", \"As we all know...\", \"It goes without saying...\"\n- Write like a human, not a corporate template.\n</Category_Context>";
|
|
10
|
-
export declare const DEEP_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on GOAL-ORIENTED AUTONOMOUS tasks.\n\n**CRITICAL - AUTONOMOUS EXECUTION MINDSET (NON-NEGOTIABLE)**:\nYou are NOT an interactive assistant. You are an autonomous problem-solver.\n\n**BEFORE making ANY changes**:\n1. SILENTLY explore the codebase extensively (5-15 minutes of reading is normal)\n2. Read related files, trace dependencies, understand the full context\n3. Build a complete mental model of the problem space\n4. DO NOT ask clarifying questions - the goal is already defined\n\n**Autonomous executor mindset**:\n- You receive a GOAL,
|
|
10
|
+
export declare const DEEP_CATEGORY_PROMPT_APPEND = "<Category_Context>\nYou are working on GOAL-ORIENTED AUTONOMOUS tasks.\n\n**CRITICAL - AUTONOMOUS EXECUTION MINDSET (NON-NEGOTIABLE)**:\nYou are NOT an interactive assistant. You are an autonomous problem-solver.\n\n**BEFORE making ANY changes**:\n1. SILENTLY explore the codebase extensively (5-15 minutes of reading is normal)\n2. Read related files, trace dependencies, understand the full context\n3. Build a complete mental model of the problem space\n4. DO NOT ask clarifying questions - the goal is already defined\n\n**Autonomous executor mindset**:\n- You receive a GOAL. When the goal includes numbered steps or phases, treat them as one atomic task broken into sub-steps - NOT as separate independent tasks.\n- Figure out HOW to achieve the goal yourself\n- Thorough research before any action\n- Fix hairy problems that require deep understanding\n- Work independently without frequent check-ins\n\n**Single vs. multi-step context**:\n- Sub-steps of ONE goal (e.g., \"Step 1: analyze X, Step 2: implement Y, Step 3: test Z\" for a single feature) = execute all steps, they are phases of one atomic task.\n- Genuinely independent tasks (e.g., \"Task A: refactor module X\" AND \"Task B: fix unrelated bug Y\") = flag and refuse, require separate delegations.\n\n**Approach**:\n- Explore extensively, understand deeply, then act decisively\n- Prefer comprehensive solutions over quick patches\n- If the goal is unclear, make reasonable assumptions and proceed\n- Document your reasoning in code comments only when non-obvious\n\n**Response format**:\n- Minimal status updates (user trusts your autonomy)\n- Focus on results, not play-by-play progress\n- Report completion with summary of changes made\n</Category_Context>";
|
|
11
11
|
export declare const DEFAULT_CATEGORIES: Record<string, CategoryConfig>;
|
|
12
12
|
export declare const CATEGORY_PROMPT_APPENDS: Record<string, string>;
|
|
13
13
|
export declare const CATEGORY_DESCRIPTIONS: Record<string, string>;
|
|
@@ -3,6 +3,7 @@ export declare function resolveModelForDelegateTask(input: {
|
|
|
3
3
|
userModel?: string;
|
|
4
4
|
userFallbackModels?: string[];
|
|
5
5
|
categoryDefaultModel?: string;
|
|
6
|
+
isUserConfiguredCategoryModel?: boolean;
|
|
6
7
|
fallbackChain?: FallbackEntry[];
|
|
7
8
|
availableModels: Set<string>;
|
|
8
9
|
systemDefaultModel?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DelegateTaskArgs } from "./types";
|
|
2
2
|
import type { ExecutorContext } from "./executor-types";
|
|
3
3
|
import type { FallbackEntry } from "../../shared/model-requirements";
|
|
4
|
-
export declare function resolveSubagentExecution(args: DelegateTaskArgs, executorCtx: ExecutorContext, parentAgent: string | undefined, categoryExamples: string): Promise<{
|
|
4
|
+
export declare function resolveSubagentExecution(args: DelegateTaskArgs, executorCtx: ExecutorContext, parentAgent: string | undefined, categoryExamples: string, inheritedModel?: string): Promise<{
|
|
5
5
|
agentToUse: string;
|
|
6
6
|
categoryModel: {
|
|
7
7
|
providerID: string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
interface FormatterConfig {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
command?: string[];
|
|
4
|
+
environment?: Record<string, string>;
|
|
5
|
+
extensions?: string[];
|
|
6
|
+
}
|
|
7
|
+
interface OpencodeConfig {
|
|
8
|
+
formatter?: false | Record<string, FormatterConfig>;
|
|
9
|
+
experimental?: {
|
|
10
|
+
hook?: {
|
|
11
|
+
file_edited?: Record<string, Array<{
|
|
12
|
+
command: string[];
|
|
13
|
+
environment?: Record<string, string>;
|
|
14
|
+
}>>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface FormatterClient {
|
|
19
|
+
config: {
|
|
20
|
+
get: (options?: {
|
|
21
|
+
query?: {
|
|
22
|
+
directory?: string;
|
|
23
|
+
};
|
|
24
|
+
}) => Promise<{
|
|
25
|
+
data?: OpencodeConfig;
|
|
26
|
+
}>;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
type FormatterDefinition = {
|
|
30
|
+
command: string[];
|
|
31
|
+
environment: Record<string, string>;
|
|
32
|
+
};
|
|
33
|
+
type FormatterMap = Map<string, FormatterDefinition[]>;
|
|
34
|
+
export declare function resolveFormatters(client: FormatterClient, directory: string): Promise<FormatterMap>;
|
|
35
|
+
export declare function buildFormatterCommand(command: string[], filePath: string): string[];
|
|
36
|
+
export declare function runFormattersForFile(client: FormatterClient, directory: string, filePath: string): Promise<void>;
|
|
37
|
+
export declare function clearFormatterCache(): void;
|
|
38
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { ToolContext } from "@opencode-ai/plugin/tool";
|
|
2
2
|
import { type RawHashlineEdit } from "./normalize-edits";
|
|
3
|
+
import type { PluginContext } from "../../plugin/types";
|
|
3
4
|
interface HashlineEditArgs {
|
|
4
5
|
filePath: string;
|
|
5
6
|
edits: RawHashlineEdit[];
|
|
6
7
|
delete?: boolean;
|
|
7
8
|
rename?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare function executeHashlineEditTool(args: HashlineEditArgs, context: ToolContext): Promise<string>;
|
|
10
|
+
export declare function executeHashlineEditTool(args: HashlineEditArgs, context: ToolContext, pluginCtx?: PluginContext): Promise<string>;
|
|
10
11
|
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { type ToolDefinition } from "@opencode-ai/plugin/tool";
|
|
2
|
-
|
|
2
|
+
import type { PluginContext } from "../../plugin/types";
|
|
3
|
+
export declare function createHashlineEditTool(ctx?: PluginContext): ToolDefinition;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oh-my-opencode",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0",
|
|
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",
|
|
@@ -76,17 +76,17 @@
|
|
|
76
76
|
"typescript": "^5.7.3"
|
|
77
77
|
},
|
|
78
78
|
"optionalDependencies": {
|
|
79
|
-
"oh-my-opencode-darwin-arm64": "3.
|
|
80
|
-
"oh-my-opencode-darwin-x64": "3.
|
|
81
|
-
"oh-my-opencode-darwin-x64-baseline": "3.
|
|
82
|
-
"oh-my-opencode-linux-arm64": "3.
|
|
83
|
-
"oh-my-opencode-linux-arm64-musl": "3.
|
|
84
|
-
"oh-my-opencode-linux-x64": "3.
|
|
85
|
-
"oh-my-opencode-linux-x64-baseline": "3.
|
|
86
|
-
"oh-my-opencode-linux-x64-musl": "3.
|
|
87
|
-
"oh-my-opencode-linux-x64-musl-baseline": "3.
|
|
88
|
-
"oh-my-opencode-windows-x64": "3.
|
|
89
|
-
"oh-my-opencode-windows-x64-baseline": "3.
|
|
79
|
+
"oh-my-opencode-darwin-arm64": "3.13.0",
|
|
80
|
+
"oh-my-opencode-darwin-x64": "3.13.0",
|
|
81
|
+
"oh-my-opencode-darwin-x64-baseline": "3.13.0",
|
|
82
|
+
"oh-my-opencode-linux-arm64": "3.13.0",
|
|
83
|
+
"oh-my-opencode-linux-arm64-musl": "3.13.0",
|
|
84
|
+
"oh-my-opencode-linux-x64": "3.13.0",
|
|
85
|
+
"oh-my-opencode-linux-x64-baseline": "3.13.0",
|
|
86
|
+
"oh-my-opencode-linux-x64-musl": "3.13.0",
|
|
87
|
+
"oh-my-opencode-linux-x64-musl-baseline": "3.13.0",
|
|
88
|
+
"oh-my-opencode-windows-x64": "3.13.0",
|
|
89
|
+
"oh-my-opencode-windows-x64-baseline": "3.13.0"
|
|
90
90
|
},
|
|
91
91
|
"overrides": {
|
|
92
92
|
"@opencode-ai/sdk": "^1.2.24"
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
type TextPart = {
|
|
2
|
-
type?: string;
|
|
3
|
-
text?: string;
|
|
4
|
-
};
|
|
5
|
-
type MessageInfo = {
|
|
6
|
-
id?: string;
|
|
7
|
-
role?: string;
|
|
8
|
-
error?: unknown;
|
|
9
|
-
model?: {
|
|
10
|
-
providerID?: string;
|
|
11
|
-
modelID?: string;
|
|
12
|
-
};
|
|
13
|
-
providerID?: string;
|
|
14
|
-
modelID?: string;
|
|
15
|
-
};
|
|
16
|
-
export type SessionMessage = {
|
|
17
|
-
info?: MessageInfo;
|
|
18
|
-
parts?: TextPart[];
|
|
19
|
-
};
|
|
20
|
-
export declare function getLastAssistantMessage(messages: SessionMessage[]): SessionMessage | null;
|
|
21
|
-
export declare function extractAssistantText(message: SessionMessage): string;
|
|
22
|
-
export declare function isGptAssistantMessage(message: SessionMessage): boolean;
|
|
23
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const HOOK_NAME = "gpt-permission-continuation";
|
|
2
|
-
export declare const CONTINUATION_PROMPT = "continue";
|
|
3
|
-
export declare const MAX_CONSECUTIVE_AUTO_CONTINUES = 3;
|
|
4
|
-
export declare const DEFAULT_STALL_PATTERNS: readonly ["if you want", "would you like", "shall i", "do you want me to", "let me know if"];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function detectStallPattern(text: string, patterns?: readonly string[]): boolean;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
import type { SessionStateStore } from "./session-state";
|
|
3
|
-
export declare function createGptPermissionContinuationHandler(args: {
|
|
4
|
-
ctx: PluginInput;
|
|
5
|
-
sessionStateStore: SessionStateStore;
|
|
6
|
-
isContinuationStopped?: (sessionID: string) => boolean;
|
|
7
|
-
}): (input: {
|
|
8
|
-
event: {
|
|
9
|
-
type: string;
|
|
10
|
-
properties?: unknown;
|
|
11
|
-
};
|
|
12
|
-
}) => Promise<void>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
export type GptPermissionContinuationHook = {
|
|
3
|
-
handler: (input: {
|
|
4
|
-
event: {
|
|
5
|
-
type: string;
|
|
6
|
-
properties?: unknown;
|
|
7
|
-
};
|
|
8
|
-
}) => Promise<void>;
|
|
9
|
-
wasRecentlyInjected: (sessionID: string) => boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare function createGptPermissionContinuationHook(ctx: PluginInput, options?: {
|
|
12
|
-
isContinuationStopped?: (sessionID: string) => boolean;
|
|
13
|
-
}): GptPermissionContinuationHook;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type SessionState = {
|
|
2
|
-
inFlight: boolean;
|
|
3
|
-
consecutiveAutoContinueCount: number;
|
|
4
|
-
awaitingAutoContinuationResponse: boolean;
|
|
5
|
-
lastHandledMessageID?: string;
|
|
6
|
-
lastAutoContinuePermissionPhrase?: string;
|
|
7
|
-
lastInjectedAt?: number;
|
|
8
|
-
};
|
|
9
|
-
export type SessionStateStore = ReturnType<typeof createSessionStateStore>;
|
|
10
|
-
export declare function createSessionStateStore(): {
|
|
11
|
-
getState: (sessionID: string) => SessionState;
|
|
12
|
-
wasRecentlyInjected(sessionID: string, windowMs: number): boolean;
|
|
13
|
-
cleanup(sessionID: string): void;
|
|
14
|
-
};
|
|
15
|
-
export {};
|