evil-omo 3.16.1 → 3.17.4
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/LICENSE.md +82 -82
- package/README.ja.md +357 -353
- package/README.ko.md +351 -347
- package/README.md +51 -51
- package/README.ru.md +378 -374
- package/README.zh-cn.md +356 -352
- package/bin/evil-omo.js +201 -201
- package/bin/platform.d.ts +14 -14
- package/bin/platform.js +82 -82
- package/bin/platform.test.ts +218 -218
- package/dist/agents/gpt-apply-patch-guard.d.ts +2 -0
- package/dist/agents/hephaestus/gpt-5-3-codex.d.ts +0 -1
- package/dist/cli/doctor/checks/system.d.ts +15 -2
- package/dist/cli/doctor/spawn-with-timeout.d.ts +8 -0
- package/dist/cli/index.js +7193 -1032
- package/dist/cli/install-validators.d.ts +1 -0
- package/dist/cli/model-fallback-types.d.ts +1 -0
- package/dist/cli/provider-model-id-transform.d.ts +1 -1
- package/dist/cli/types.d.ts +3 -0
- package/dist/config/schema/agent-definitions.d.ts +3 -0
- package/dist/config/schema/evil-omo-config.d.ts +11 -2
- package/dist/create-tools.d.ts +2 -1
- package/dist/evil-omo.schema.json +24 -1
- package/dist/features/background-agent/index.d.ts +2 -0
- package/dist/features/background-agent/session-existence.d.ts +1 -1
- package/dist/features/background-agent/subagent-spawn-limits.d.ts +1 -1
- package/dist/features/background-agent/task-poller.d.ts +1 -0
- package/dist/features/background-agent/wait-for-task-session.d.ts +17 -0
- package/dist/features/builtin-commands/commands.d.ts +2 -1
- package/dist/features/claude-code-agent-loader/agent-definitions-loader.d.ts +3 -0
- package/dist/features/claude-code-agent-loader/index.d.ts +3 -0
- package/dist/features/claude-code-agent-loader/json-agent-loader.d.ts +2 -0
- package/dist/features/claude-code-agent-loader/loader.d.ts +2 -0
- package/dist/features/claude-code-agent-loader/opencode-config-agents-reader.d.ts +2 -0
- package/dist/features/claude-code-agent-loader/types.d.ts +9 -1
- package/dist/features/skill-mcp-manager/connection.d.ts +3 -4
- package/dist/features/skill-mcp-manager/http-client.d.ts +17 -3
- package/dist/features/skill-mcp-manager/manager.d.ts +2 -3
- package/dist/features/skill-mcp-manager/stdio-client.d.ts +16 -3
- package/dist/features/skill-mcp-manager/types.d.ts +16 -6
- package/dist/features/tmux-subagent/manager.d.ts +1 -0
- package/dist/features/tool-metadata-store/index.d.ts +7 -0
- package/dist/features/tool-metadata-store/publish-tool-metadata.d.ts +9 -0
- package/dist/features/tool-metadata-store/recover-tool-metadata.d.ts +3 -0
- package/dist/features/tool-metadata-store/resolve-tool-call-id.d.ts +6 -0
- package/dist/features/tool-metadata-store/task-metadata-contract.d.ts +10 -0
- package/dist/hooks/atlas/session-last-agent.d.ts +10 -1
- package/dist/hooks/atlas/system-reminder-templates.d.ts +2 -2
- package/dist/hooks/auto-update-checker/constants.d.ts +17 -2
- package/dist/hooks/auto-update-checker/hook.d.ts +22 -1
- package/dist/hooks/comment-checker/cli-runner.d.ts +4 -1
- package/dist/hooks/directory-agents-injector/hook.d.ts +7 -7
- package/dist/hooks/directory-readme-injector/hook.d.ts +7 -7
- package/dist/hooks/keyword-detector/hook.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +1 -1
- package/dist/hooks/model-fallback/next-fallback.d.ts +8 -0
- package/dist/hooks/read-image-resizer/image-resizer.d.ts +3 -1
- package/dist/hooks/rules-injector/injector.d.ts +12 -0
- package/dist/index.js +27641 -20106
- package/dist/openclaw/config.d.ts +1 -1
- package/dist/openclaw/dispatcher.d.ts +3 -13
- package/dist/openclaw/gateway-url-validation.d.ts +1 -0
- package/dist/openclaw/reply-listener-discord.d.ts +4 -0
- package/dist/openclaw/reply-listener-injection.d.ts +10 -0
- package/dist/openclaw/reply-listener-log.d.ts +2 -0
- package/dist/openclaw/reply-listener-paths.d.ts +7 -0
- package/dist/openclaw/reply-listener-process.d.ts +4 -0
- package/dist/openclaw/reply-listener-spawn.d.ts +5 -0
- package/dist/openclaw/reply-listener-startup.d.ts +12 -0
- package/dist/openclaw/reply-listener-state.d.ts +29 -0
- package/dist/openclaw/reply-listener-telegram.d.ts +4 -0
- package/dist/openclaw/reply-listener.d.ts +5 -18
- package/dist/openclaw/runtime-dispatch.d.ts +17 -0
- package/dist/openclaw/types.d.ts +4 -0
- package/dist/plugin/command-execute-before.d.ts +3 -1
- package/dist/plugin/tool-registry.d.ts +23 -0
- package/dist/plugin-handlers/agent-priority-order.d.ts +11 -0
- package/dist/shared/agent-display-names.d.ts +5 -0
- package/dist/shared/agent-tool-restrictions.d.ts +0 -5
- package/dist/shared/compaction-marker.d.ts +1 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/migration/migrations-sidecar.d.ts +41 -0
- package/dist/shared/opencode-provider-auth.d.ts +3 -0
- package/dist/shared/parse-tools-config.d.ts +6 -0
- package/dist/shared/plugin-identity.d.ts +4 -2
- package/dist/shared/posthog-activity-state.d.ts +8 -0
- package/dist/shared/posthog.d.ts +14 -0
- package/dist/shared/resolve-agent-definition-paths.d.ts +1 -0
- package/dist/shared/shell-env.d.ts +6 -2
- package/dist/testing/module-mock-lifecycle.d.ts +21 -0
- package/dist/tools/call-omo-agent/agent-resolver.d.ts +17 -0
- package/dist/tools/call-omo-agent/constants.d.ts +1 -1
- package/dist/tools/delegate-task/delegated-model-config.d.ts +3 -0
- package/dist/tools/delegate-task/fallback-entry-resolution.d.ts +12 -0
- package/dist/tools/delegate-task/fallback-entry-settings.d.ts +7 -0
- package/dist/tools/delegate-task/subagent-discovery.d.ts +15 -0
- package/dist/tools/delegate-task/sync-task-fallback.d.ts +12 -0
- package/dist/tools/session-manager/tools.d.ts +19 -1
- package/dist/tools/skill/constants.d.ts +1 -1
- package/package.json +13 -12
- package/postinstall.mjs +133 -133
- package/dist/tools/delegate-task/resolve-call-id.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function transformModelForProvider(provider: string, model: string): string;
|
package/dist/cli/types.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface InstallArgs {
|
|
|
10
10
|
zaiCodingPlan?: BooleanArg;
|
|
11
11
|
kimiForCoding?: BooleanArg;
|
|
12
12
|
opencodeGo?: BooleanArg;
|
|
13
|
+
vercelAiGateway?: BooleanArg;
|
|
13
14
|
skipAuth?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export interface InstallConfig {
|
|
@@ -22,6 +23,7 @@ export interface InstallConfig {
|
|
|
22
23
|
hasZaiCodingPlan: boolean;
|
|
23
24
|
hasKimiForCoding: boolean;
|
|
24
25
|
hasOpencodeGo: boolean;
|
|
26
|
+
hasVercelAiGateway: boolean;
|
|
25
27
|
}
|
|
26
28
|
export interface ConfigMergeResult {
|
|
27
29
|
success: boolean;
|
|
@@ -40,4 +42,5 @@ export interface DetectedConfig {
|
|
|
40
42
|
hasZaiCodingPlan: boolean;
|
|
41
43
|
hasKimiForCoding: boolean;
|
|
42
44
|
hasOpencodeGo: boolean;
|
|
45
|
+
hasVercelAiGateway: boolean;
|
|
43
46
|
}
|
|
@@ -3,9 +3,18 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
3
3
|
$schema: z.ZodOptional<z.ZodString>;
|
|
4
4
|
new_task_system_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
5
5
|
default_run_agent: z.ZodOptional<z.ZodString>;
|
|
6
|
+
agent_definitions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
7
|
disabled_mcps: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7
8
|
disabled_agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
|
-
disabled_skills: z.ZodOptional<z.ZodArray<z.
|
|
9
|
+
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
10
|
+
playwright: "playwright";
|
|
11
|
+
"agent-browser": "agent-browser";
|
|
12
|
+
"dev-browser": "dev-browser";
|
|
13
|
+
"frontend-ui-ux": "frontend-ui-ux";
|
|
14
|
+
"git-master": "git-master";
|
|
15
|
+
"review-work": "review-work";
|
|
16
|
+
"ai-slop-remover": "ai-slop-remover";
|
|
17
|
+
}>>>;
|
|
9
18
|
disabled_hooks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
19
|
disabled_commands: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
11
20
|
"init-deep": "init-deep";
|
|
@@ -2043,7 +2052,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
2043
2052
|
babysitting: z.ZodOptional<z.ZodObject<{
|
|
2044
2053
|
timeout_ms: z.ZodDefault<z.ZodNumber>;
|
|
2045
2054
|
}, z.core.$strip>>;
|
|
2046
|
-
git_master: z.
|
|
2055
|
+
git_master: z.ZodDefault<z.ZodObject<{
|
|
2047
2056
|
commit_footer: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
2048
2057
|
include_co_authored_by: z.ZodDefault<z.ZodBoolean>;
|
|
2049
2058
|
git_env_prefix: z.ZodDefault<z.ZodString>;
|
package/dist/create-tools.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { BrowserAutomationProvider } from "./config/schema/browser-automati
|
|
|
4
4
|
import type { LoadedSkill } from "./features/opencode-skill-loader/types";
|
|
5
5
|
import type { PluginContext, ToolsRecord } from "./plugin/types";
|
|
6
6
|
import type { Managers } from "./create-managers";
|
|
7
|
-
|
|
7
|
+
type CreateToolsResult = {
|
|
8
8
|
filteredTools: ToolsRecord;
|
|
9
9
|
mergedSkills: LoadedSkill[];
|
|
10
10
|
availableSkills: AvailableSkill[];
|
|
@@ -18,3 +18,4 @@ export declare function createTools(args: {
|
|
|
18
18
|
pluginConfig: OhMyOpenCodeConfig;
|
|
19
19
|
managers: Pick<Managers, "backgroundManager" | "tmuxSessionManager" | "skillMcpManager">;
|
|
20
20
|
}): Promise<CreateToolsResult>;
|
|
21
|
+
export {};
|
|
@@ -14,6 +14,13 @@
|
|
|
14
14
|
"default_run_agent": {
|
|
15
15
|
"type": "string"
|
|
16
16
|
},
|
|
17
|
+
"agent_definitions": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1
|
|
22
|
+
}
|
|
23
|
+
},
|
|
17
24
|
"disabled_mcps": {
|
|
18
25
|
"type": "array",
|
|
19
26
|
"items": {
|
|
@@ -32,7 +39,15 @@
|
|
|
32
39
|
"type": "array",
|
|
33
40
|
"items": {
|
|
34
41
|
"type": "string",
|
|
35
|
-
"
|
|
42
|
+
"enum": [
|
|
43
|
+
"playwright",
|
|
44
|
+
"agent-browser",
|
|
45
|
+
"dev-browser",
|
|
46
|
+
"frontend-ui-ux",
|
|
47
|
+
"git-master",
|
|
48
|
+
"review-work",
|
|
49
|
+
"ai-slop-remover"
|
|
50
|
+
]
|
|
36
51
|
}
|
|
37
52
|
},
|
|
38
53
|
"disabled_hooks": {
|
|
@@ -5860,6 +5875,11 @@
|
|
|
5860
5875
|
"additionalProperties": false
|
|
5861
5876
|
},
|
|
5862
5877
|
"git_master": {
|
|
5878
|
+
"default": {
|
|
5879
|
+
"commit_footer": true,
|
|
5880
|
+
"include_co_authored_by": true,
|
|
5881
|
+
"git_env_prefix": "GIT_MASTER=1"
|
|
5882
|
+
},
|
|
5863
5883
|
"type": "object",
|
|
5864
5884
|
"properties": {
|
|
5865
5885
|
"commit_footer": {
|
|
@@ -6058,5 +6078,8 @@
|
|
|
6058
6078
|
}
|
|
6059
6079
|
}
|
|
6060
6080
|
},
|
|
6081
|
+
"required": [
|
|
6082
|
+
"git_master"
|
|
6083
|
+
],
|
|
6061
6084
|
"additionalProperties": false
|
|
6062
6085
|
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export * from "./types";
|
|
2
2
|
export { BackgroundManager, type SubagentSessionCreatedEvent, type OnSubagentSessionCreated } from "./manager";
|
|
3
|
+
export { waitForTaskSessionID } from "./wait-for-task-session";
|
|
4
|
+
export type { WaitForTaskSessionIDOptions } from "./wait-for-task-session";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { OpencodeClient } from "./opencode-client";
|
|
2
2
|
export declare const MIN_SESSION_GONE_POLLS = 3;
|
|
3
|
-
export declare function verifySessionExists(client: OpencodeClient, sessionID: string): Promise<boolean>;
|
|
3
|
+
export declare function verifySessionExists(client: OpencodeClient, sessionID: string, directory?: string): Promise<boolean>;
|
|
@@ -9,7 +9,7 @@ export interface SubagentSpawnContext {
|
|
|
9
9
|
}
|
|
10
10
|
export declare function getMaxSubagentDepth(config?: BackgroundTaskConfig): number;
|
|
11
11
|
export declare function getMaxRootSessionSpawnBudget(config?: BackgroundTaskConfig): number;
|
|
12
|
-
export declare function resolveSubagentSpawnContext(client: OpencodeClient, parentSessionID: string): Promise<SubagentSpawnContext>;
|
|
12
|
+
export declare function resolveSubagentSpawnContext(client: OpencodeClient, parentSessionID: string, directory?: string): Promise<SubagentSpawnContext>;
|
|
13
13
|
export declare function createSubagentDepthLimitError(input: {
|
|
14
14
|
childDepth: number;
|
|
15
15
|
maxDepth: number;
|
|
@@ -14,6 +14,7 @@ export type SessionStatusMap = Record<string, {
|
|
|
14
14
|
export declare function checkAndInterruptStaleTasks(args: {
|
|
15
15
|
tasks: Iterable<BackgroundTask>;
|
|
16
16
|
client: OpencodeClient;
|
|
17
|
+
directory?: string;
|
|
17
18
|
config: BackgroundTaskConfig | undefined;
|
|
18
19
|
concurrencyManager: ConcurrencyManager;
|
|
19
20
|
notifyParentSession: (task: BackgroundTask) => Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { BackgroundTaskStatus } from "./types";
|
|
2
|
+
type AbortSignalLike = {
|
|
3
|
+
aborted: boolean;
|
|
4
|
+
};
|
|
5
|
+
interface TaskReader {
|
|
6
|
+
getTask(taskID: string): {
|
|
7
|
+
sessionID?: string;
|
|
8
|
+
status?: BackgroundTaskStatus;
|
|
9
|
+
} | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface WaitForTaskSessionIDOptions {
|
|
12
|
+
timeoutMs?: number;
|
|
13
|
+
intervalMs?: number;
|
|
14
|
+
signal?: AbortSignalLike;
|
|
15
|
+
}
|
|
16
|
+
export declare function waitForTaskSessionID(manager: TaskReader, taskID: string, options?: WaitForTaskSessionIDOptions): Promise<string | undefined>;
|
|
17
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BuiltinCommandName, BuiltinCommands } from "./types";
|
|
2
|
-
|
|
2
|
+
interface LoadBuiltinCommandsOptions {
|
|
3
3
|
useRegisteredAgents?: boolean;
|
|
4
4
|
}
|
|
5
5
|
export declare function loadBuiltinCommands(disabledCommands?: BuiltinCommandName[], options?: LoadBuiltinCommandsOptions): BuiltinCommands;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AgentScope, ClaudeCodeAgentConfig, LoadedAgent } from "./types";
|
|
2
|
+
export declare function parseMarkdownAgentFile(filePath: string, scope: AgentScope): LoadedAgent | null;
|
|
3
|
+
export declare function loadAgentDefinitions(paths: string[], scope: AgentScope): Record<string, ClaudeCodeAgentConfig>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { ClaudeCodeAgentConfig } from "./types";
|
|
2
2
|
export declare function loadUserAgents(): Record<string, ClaudeCodeAgentConfig>;
|
|
3
3
|
export declare function loadProjectAgents(directory?: string): Record<string, ClaudeCodeAgentConfig>;
|
|
4
|
+
export declare function loadOpencodeGlobalAgents(): Record<string, ClaudeCodeAgentConfig>;
|
|
5
|
+
export declare function loadOpencodeProjectAgents(directory?: string): Record<string, ClaudeCodeAgentConfig>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentConfig } from "@opencode-ai/sdk";
|
|
2
|
-
export type AgentScope = "user" | "project";
|
|
2
|
+
export type AgentScope = "user" | "project" | "opencode" | "opencode-project" | "definition-file" | "opencode-config";
|
|
3
3
|
export type ClaudeCodeAgentConfig = Omit<AgentConfig, "model"> & {
|
|
4
4
|
model?: string | {
|
|
5
5
|
providerID: string;
|
|
@@ -13,6 +13,14 @@ export interface AgentFrontmatter {
|
|
|
13
13
|
tools?: string;
|
|
14
14
|
mode?: "subagent" | "primary" | "all";
|
|
15
15
|
}
|
|
16
|
+
export interface AgentJsonDefinition {
|
|
17
|
+
name: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
model?: string;
|
|
20
|
+
tools?: string | string[];
|
|
21
|
+
mode?: "subagent" | "primary" | "all";
|
|
22
|
+
prompt: string;
|
|
23
|
+
}
|
|
16
24
|
export interface LoadedAgent {
|
|
17
25
|
name: string;
|
|
18
26
|
path: string;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
1
|
import type { ClaudeCodeMcpServer } from "../claude-code-mcp-loader/types";
|
|
3
|
-
import type { SkillMcpClientInfo, SkillMcpManagerState } from "./types";
|
|
2
|
+
import type { McpClient, SkillMcpClientInfo, SkillMcpManagerState } from "./types";
|
|
4
3
|
export declare function getOrCreateClient(params: {
|
|
5
4
|
state: SkillMcpManagerState;
|
|
6
5
|
clientKey: string;
|
|
7
6
|
info: SkillMcpClientInfo;
|
|
8
7
|
config: ClaudeCodeMcpServer;
|
|
9
|
-
}): Promise<
|
|
8
|
+
}): Promise<McpClient>;
|
|
10
9
|
export declare function getOrCreateClientWithRetryImpl(params: {
|
|
11
10
|
state: SkillMcpManagerState;
|
|
12
11
|
clientKey: string;
|
|
13
12
|
info: SkillMcpClientInfo;
|
|
14
13
|
config: ClaudeCodeMcpServer;
|
|
15
|
-
}): Promise<
|
|
14
|
+
}): Promise<McpClient>;
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { McpClient, McpTransport, SkillMcpClientConnectionParams } from "./types";
|
|
2
|
+
type HttpClientFactory = (clientInfo: {
|
|
3
|
+
name: string;
|
|
4
|
+
version: string;
|
|
5
|
+
}, options: {
|
|
6
|
+
capabilities: Record<string, never>;
|
|
7
|
+
}) => McpClient;
|
|
8
|
+
type HttpTransportFactory = (url: URL, options?: {
|
|
9
|
+
requestInit?: RequestInit;
|
|
10
|
+
}) => McpTransport;
|
|
11
|
+
interface HttpClientDependencies {
|
|
12
|
+
createClient: HttpClientFactory;
|
|
13
|
+
createTransport: HttpTransportFactory;
|
|
14
|
+
}
|
|
15
|
+
export declare function setHttpClientDependenciesForTesting(dependencies?: Partial<HttpClientDependencies>): void;
|
|
16
|
+
export declare function createHttpClient(params: SkillMcpClientConnectionParams): Promise<McpClient>;
|
|
17
|
+
export {};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
1
|
import type { Prompt, Resource, Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
3
2
|
import type { ClaudeCodeMcpServer } from "../claude-code-mcp-loader/types";
|
|
4
|
-
import type { OAuthProviderFactory, SkillMcpClientInfo, SkillMcpServerContext } from "./types";
|
|
3
|
+
import type { McpClient, OAuthProviderFactory, SkillMcpClientInfo, SkillMcpServerContext } from "./types";
|
|
5
4
|
export declare class SkillMcpManager {
|
|
6
5
|
private readonly state;
|
|
7
6
|
constructor(options?: {
|
|
8
7
|
createOAuthProvider?: OAuthProviderFactory;
|
|
9
8
|
});
|
|
10
9
|
private getClientKey;
|
|
11
|
-
getOrCreateClient(info: SkillMcpClientInfo, config: ClaudeCodeMcpServer): Promise<
|
|
10
|
+
getOrCreateClient(info: SkillMcpClientInfo, config: ClaudeCodeMcpServer): Promise<McpClient>;
|
|
12
11
|
disconnectSession(sessionID: string): Promise<void>;
|
|
13
12
|
disconnectAll(): Promise<void>;
|
|
14
13
|
listTools(info: SkillMcpClientInfo, context: SkillMcpServerContext): Promise<Tool[]>;
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { SkillMcpClientConnectionParams } from "./types";
|
|
3
|
-
|
|
1
|
+
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
2
|
+
import type { McpClient, McpTransport, SkillMcpClientConnectionParams } from "./types";
|
|
3
|
+
type StdioClientFactory = (clientInfo: {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
}, options: {
|
|
7
|
+
capabilities: Record<string, never>;
|
|
8
|
+
}) => McpClient;
|
|
9
|
+
type StdioTransportFactory = (options: ConstructorParameters<typeof StdioClientTransport>[0]) => McpTransport;
|
|
10
|
+
interface StdioClientDependencies {
|
|
11
|
+
createClient: StdioClientFactory;
|
|
12
|
+
createTransport: StdioTransportFactory;
|
|
13
|
+
}
|
|
14
|
+
export declare function setStdioClientDependenciesForTesting(dependencies?: Partial<StdioClientDependencies>): void;
|
|
15
|
+
export declare function createStdioClient(params: SkillMcpClientConnectionParams): Promise<McpClient>;
|
|
16
|
+
export {};
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
2
|
+
import type { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
|
|
4
3
|
import type { ClaudeCodeMcpServer } from "../claude-code-mcp-loader/types";
|
|
5
4
|
import type { McpOAuthProvider } from "../mcp-oauth/provider";
|
|
6
5
|
import type { SkillScope } from "../opencode-skill-loader/types";
|
|
7
6
|
export type SkillMcpConfig = Record<string, ClaudeCodeMcpServer>;
|
|
7
|
+
export type McpTransport = Transport;
|
|
8
|
+
export interface McpClient {
|
|
9
|
+
connect: Client["connect"];
|
|
10
|
+
close: Client["close"];
|
|
11
|
+
listTools: Client["listTools"];
|
|
12
|
+
listResources: Client["listResources"];
|
|
13
|
+
listPrompts: Client["listPrompts"];
|
|
14
|
+
callTool: Client["callTool"];
|
|
15
|
+
readResource: Client["readResource"];
|
|
16
|
+
getPrompt: Client["getPrompt"];
|
|
17
|
+
}
|
|
8
18
|
export interface SkillMcpClientInfo {
|
|
9
19
|
serverName: string;
|
|
10
20
|
skillName: string;
|
|
@@ -22,18 +32,18 @@ export interface SkillMcpServerContext {
|
|
|
22
32
|
*/
|
|
23
33
|
export type ConnectionType = "stdio" | "http";
|
|
24
34
|
export interface ManagedClientBase {
|
|
25
|
-
client:
|
|
35
|
+
client: McpClient;
|
|
26
36
|
skillName: string;
|
|
27
37
|
lastUsedAt: number;
|
|
28
38
|
connectionType: ConnectionType;
|
|
29
39
|
}
|
|
30
40
|
export interface ManagedStdioClient extends ManagedClientBase {
|
|
31
41
|
connectionType: "stdio";
|
|
32
|
-
transport:
|
|
42
|
+
transport: McpTransport;
|
|
33
43
|
}
|
|
34
44
|
export interface ManagedHttpClient extends ManagedClientBase {
|
|
35
45
|
connectionType: "http";
|
|
36
|
-
transport:
|
|
46
|
+
transport: McpTransport;
|
|
37
47
|
}
|
|
38
48
|
export type ManagedClient = ManagedStdioClient | ManagedHttpClient;
|
|
39
49
|
export interface ProcessCleanupHandler {
|
|
@@ -48,7 +58,7 @@ export type OAuthProviderFactory = (options: {
|
|
|
48
58
|
}) => OAuthProviderLike;
|
|
49
59
|
export interface SkillMcpManagerState {
|
|
50
60
|
clients: Map<string, ManagedClient>;
|
|
51
|
-
pendingConnections: Map<string, Promise<
|
|
61
|
+
pendingConnections: Map<string, Promise<McpClient>>;
|
|
52
62
|
disconnectedSessions: Map<string, number>;
|
|
53
63
|
authProviders: Map<string, McpOAuthProvider>;
|
|
54
64
|
cleanupRegistered: boolean;
|
|
@@ -39,6 +39,7 @@ export declare class TmuxSessionManager {
|
|
|
39
39
|
private spawnInIsolatedContainer;
|
|
40
40
|
private getCapacityConfig;
|
|
41
41
|
private getSessionMappings;
|
|
42
|
+
getTrackedPaneId(sessionId: string): string | undefined;
|
|
42
43
|
private removeTrackedSession;
|
|
43
44
|
private reassignIsolatedContainerAnchor;
|
|
44
45
|
private cleanupIsolatedContainerAfterSessionDeletion;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
export { clearPendingStore, consumeToolMetadata, getPendingStoreSize, storeToolMetadata, } from "./store";
|
|
2
2
|
export type { PendingToolMetadata } from "./store";
|
|
3
|
+
export { resolveToolCallID } from "./resolve-tool-call-id";
|
|
4
|
+
export type { ToolCallIDCarrier } from "./resolve-tool-call-id";
|
|
5
|
+
export { buildTaskMetadataBlock, extractTaskLink, parseTaskMetadataBlock } from "./task-metadata-contract";
|
|
6
|
+
export type { TaskLink } from "./task-metadata-contract";
|
|
7
|
+
export { publishToolMetadata } from "./publish-tool-metadata";
|
|
8
|
+
export { recoverToolMetadata } from "./recover-tool-metadata";
|
|
9
|
+
export type { ToolMetadataPublisherContext } from "./publish-tool-metadata";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ToolCallIDCarrier } from "./resolve-tool-call-id";
|
|
2
|
+
import { type PendingToolMetadata } from "./store";
|
|
3
|
+
export interface ToolMetadataPublisherContext extends ToolCallIDCarrier {
|
|
4
|
+
sessionID: string;
|
|
5
|
+
metadata?: (input: PendingToolMetadata) => void | Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare function publishToolMetadata(ctx: ToolMetadataPublisherContext, payload: PendingToolMetadata): Promise<{
|
|
8
|
+
stored: boolean;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface TaskLink {
|
|
2
|
+
sessionId?: string;
|
|
3
|
+
taskId?: string;
|
|
4
|
+
backgroundTaskId?: string;
|
|
5
|
+
agent?: string;
|
|
6
|
+
category?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function buildTaskMetadataBlock(link: TaskLink): string;
|
|
9
|
+
export declare function parseTaskMetadataBlock(text: string): TaskLink;
|
|
10
|
+
export declare function extractTaskLink(metadata: unknown, outputText: string): TaskLink;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import { getMessageDir, isSqliteBackend, normalizeSDKResponse } from "../../shared";
|
|
2
|
+
import { hasCompactionPartInStorage, isCompactionMessage } from "../../shared/compaction-marker";
|
|
3
|
+
type SessionLastAgentDeps = {
|
|
4
|
+
getMessageDir: typeof getMessageDir;
|
|
5
|
+
isSqliteBackend: typeof isSqliteBackend;
|
|
6
|
+
normalizeSDKResponse: typeof normalizeSDKResponse;
|
|
7
|
+
hasCompactionPartInStorage: typeof hasCompactionPartInStorage;
|
|
8
|
+
isCompactionMessage: typeof isCompactionMessage;
|
|
9
|
+
};
|
|
1
10
|
type SessionMessagesClient = {
|
|
2
11
|
session: {
|
|
3
12
|
messages: (input: {
|
|
@@ -7,5 +16,5 @@ type SessionMessagesClient = {
|
|
|
7
16
|
}) => Promise<unknown>;
|
|
8
17
|
};
|
|
9
18
|
};
|
|
10
|
-
export declare function getLastAgentFromSession(sessionID: string, client?: SessionMessagesClient): Promise<string | null>;
|
|
19
|
+
export declare function getLastAgentFromSession(sessionID: string, client?: SessionMessagesClient, deps?: Partial<SessionLastAgentDeps>): Promise<string | null>;
|
|
11
20
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const DIRECT_WORK_REMINDER: string;
|
|
2
2
|
export declare const BOULDER_CONTINUATION_PROMPT: string;
|
|
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\")` - 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
|
-
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\")` - 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.**";
|
|
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
|
+
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
5
|
export declare const ORCHESTRATOR_DELEGATION_REQUIRED: string;
|
|
6
6
|
export declare const SINGLE_TASK_DIRECTIVE: string;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
export declare const PACKAGE_NAME = "
|
|
2
|
-
|
|
1
|
+
export declare const PACKAGE_NAME = "evil-omo";
|
|
2
|
+
/**
|
|
3
|
+
* All package names the canonical plugin may be published under.
|
|
4
|
+
*
|
|
5
|
+
* The package is published to npm as both `oh-my-opencode` (legacy canonical)
|
|
6
|
+
* and `oh-my-openagent` (current canonical). Any code that *reads* an
|
|
7
|
+
* installed package.json or walks up from an import path must accept both,
|
|
8
|
+
* because the installed name depends on which package the user added to
|
|
9
|
+
* their config. Code that *writes* continues to use {@link PACKAGE_NAME}.
|
|
10
|
+
*/
|
|
11
|
+
export declare const ACCEPTED_PACKAGE_NAMES: readonly ["evil-omo", "oh-my-opencode"];
|
|
12
|
+
export declare const NPM_REGISTRY_URL = "https://registry.npmjs.org/-/package/evil-omo/dist-tags";
|
|
3
13
|
export declare const NPM_FETCH_TIMEOUT = 5000;
|
|
4
14
|
export declare const CACHE_ROOT_DIR: string;
|
|
5
15
|
export declare const CACHE_DIR: string;
|
|
@@ -9,3 +19,8 @@ export declare function getUserConfigDir(): string;
|
|
|
9
19
|
export declare function getUserOpencodeConfig(): string;
|
|
10
20
|
export declare function getUserOpencodeConfigJsonc(): string;
|
|
11
21
|
export declare const INSTALLED_PACKAGE_JSON: string;
|
|
22
|
+
/**
|
|
23
|
+
* Candidate paths where the installed package.json may live, in priority order.
|
|
24
|
+
* Readers should try each path in order and stop on the first success.
|
|
25
|
+
*/
|
|
26
|
+
export declare const INSTALLED_PACKAGE_JSON_CANDIDATES: string[];
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import { log } from "../../shared/logger";
|
|
2
3
|
import type { AutoUpdateCheckerOptions } from "./types";
|
|
3
|
-
|
|
4
|
+
import { getCachedVersion, getLocalDevVersion } from "./checker";
|
|
5
|
+
import { runBackgroundUpdateCheck } from "./hook/background-update-check";
|
|
6
|
+
import { showConfigErrorsIfAny } from "./hook/config-errors-toast";
|
|
7
|
+
import { updateAndShowConnectedProvidersCacheStatus } from "./hook/connected-providers-status";
|
|
8
|
+
import { refreshModelCapabilitiesOnStartup } from "./hook/model-capabilities-status";
|
|
9
|
+
import { showModelCacheWarningIfNeeded } from "./hook/model-cache-warning";
|
|
10
|
+
import { showLocalDevToast, showVersionToast } from "./hook/startup-toasts";
|
|
11
|
+
interface AutoUpdateCheckerDeps {
|
|
12
|
+
getCachedVersion: typeof getCachedVersion;
|
|
13
|
+
getLocalDevVersion: typeof getLocalDevVersion;
|
|
14
|
+
showConfigErrorsIfAny: typeof showConfigErrorsIfAny;
|
|
15
|
+
updateAndShowConnectedProvidersCacheStatus: typeof updateAndShowConnectedProvidersCacheStatus;
|
|
16
|
+
refreshModelCapabilitiesOnStartup: typeof refreshModelCapabilitiesOnStartup;
|
|
17
|
+
showModelCacheWarningIfNeeded: typeof showModelCacheWarningIfNeeded;
|
|
18
|
+
showLocalDevToast: typeof showLocalDevToast;
|
|
19
|
+
showVersionToast: typeof showVersionToast;
|
|
20
|
+
runBackgroundUpdateCheck: typeof runBackgroundUpdateCheck;
|
|
21
|
+
log: typeof log;
|
|
22
|
+
}
|
|
23
|
+
export declare function createAutoUpdateCheckerHook(ctx: PluginInput, options?: AutoUpdateCheckerOptions, deps?: AutoUpdateCheckerDeps): {
|
|
4
24
|
event: ({ event }: {
|
|
5
25
|
event: {
|
|
6
26
|
type: string;
|
|
@@ -8,3 +28,4 @@ export declare function createAutoUpdateCheckerHook(ctx: PluginInput, options?:
|
|
|
8
28
|
};
|
|
9
29
|
}) => void;
|
|
10
30
|
};
|
|
31
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PendingCall } from "./types";
|
|
2
|
+
import { runCommentChecker } from "./cli";
|
|
2
3
|
export declare function initializeCommentCheckerCli(debugLog: (...args: unknown[]) => void): void;
|
|
3
4
|
export declare function getCommentCheckerCliPathPromise(): Promise<string | null> | null;
|
|
4
5
|
export declare function processWithCli(input: {
|
|
@@ -7,7 +8,9 @@ export declare function processWithCli(input: {
|
|
|
7
8
|
callID: string;
|
|
8
9
|
}, pendingCall: PendingCall, output: {
|
|
9
10
|
output: string;
|
|
10
|
-
}, cliPath: string, customPrompt: string | undefined, debugLog: (...args: unknown[]) => void
|
|
11
|
+
}, cliPath: string, customPrompt: string | undefined, debugLog: (...args: unknown[]) => void, deps?: {
|
|
12
|
+
runCommentChecker?: typeof runCommentChecker;
|
|
13
|
+
}): Promise<void>;
|
|
11
14
|
export interface ApplyPatchEdit {
|
|
12
15
|
filePath: string;
|
|
13
16
|
before: string;
|
|
@@ -9,8 +9,12 @@ interface ToolExecuteOutput {
|
|
|
9
9
|
output: string;
|
|
10
10
|
metadata: unknown;
|
|
11
11
|
}
|
|
12
|
-
interface
|
|
13
|
-
|
|
12
|
+
interface DirectoryAgentsInjectorHook {
|
|
13
|
+
"tool.execute.before"?: (input: ToolExecuteInput, output: {
|
|
14
|
+
args: unknown;
|
|
15
|
+
}) => Promise<void>;
|
|
16
|
+
"tool.execute.after": (input: ToolExecuteInput, output: ToolExecuteOutput) => Promise<void>;
|
|
17
|
+
event: (input: EventInput) => Promise<void>;
|
|
14
18
|
}
|
|
15
19
|
interface EventInput {
|
|
16
20
|
event: {
|
|
@@ -20,9 +24,5 @@ interface EventInput {
|
|
|
20
24
|
}
|
|
21
25
|
export declare function createDirectoryAgentsInjectorHook(ctx: PluginInput, modelCacheState?: {
|
|
22
26
|
anthropicContext1MEnabled: boolean;
|
|
23
|
-
}):
|
|
24
|
-
"tool.execute.before": (input: ToolExecuteInput, output: ToolExecuteBeforeOutput) => Promise<void>;
|
|
25
|
-
"tool.execute.after": (input: ToolExecuteInput, output: ToolExecuteOutput) => Promise<void>;
|
|
26
|
-
event: ({ event }: EventInput) => Promise<void>;
|
|
27
|
-
};
|
|
27
|
+
}): DirectoryAgentsInjectorHook;
|
|
28
28
|
export {};
|
|
@@ -9,8 +9,12 @@ interface ToolExecuteOutput {
|
|
|
9
9
|
output: string;
|
|
10
10
|
metadata: unknown;
|
|
11
11
|
}
|
|
12
|
-
interface
|
|
13
|
-
|
|
12
|
+
interface DirectoryReadmeInjectorHook {
|
|
13
|
+
"tool.execute.before"?: (input: ToolExecuteInput, output: {
|
|
14
|
+
args: unknown;
|
|
15
|
+
}) => Promise<void>;
|
|
16
|
+
"tool.execute.after": (input: ToolExecuteInput, output: ToolExecuteOutput) => Promise<void>;
|
|
17
|
+
event: (input: EventInput) => Promise<void>;
|
|
14
18
|
}
|
|
15
19
|
interface EventInput {
|
|
16
20
|
event: {
|
|
@@ -20,9 +24,5 @@ interface EventInput {
|
|
|
20
24
|
}
|
|
21
25
|
export declare function createDirectoryReadmeInjectorHook(ctx: PluginInput, modelCacheState?: {
|
|
22
26
|
anthropicContext1MEnabled: boolean;
|
|
23
|
-
}):
|
|
24
|
-
"tool.execute.before": (input: ToolExecuteInput, output: ToolExecuteBeforeOutput) => Promise<void>;
|
|
25
|
-
"tool.execute.after": (input: ToolExecuteInput, output: ToolExecuteOutput) => Promise<void>;
|
|
26
|
-
event: ({ event }: EventInput) => Promise<void>;
|
|
27
|
-
};
|
|
27
|
+
}): DirectoryReadmeInjectorHook;
|
|
28
28
|
export {};
|