oh-my-opencode 3.11.2 → 3.12.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 +18 -12
- package/README.ko.md +18 -12
- package/README.md +16 -16
- package/README.ru.md +12 -6
- package/README.zh-cn.md +18 -12
- package/dist/agents/atlas/default.d.ts +1 -1
- package/dist/agents/atlas/gemini.d.ts +1 -1
- package/dist/agents/atlas/gpt.d.ts +1 -1
- package/dist/agents/builtin-agents/general-agents.d.ts +1 -0
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +2 -0
- package/dist/agents/env-context.d.ts +1 -1
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/metis.d.ts +1 -1
- package/dist/agents/prometheus/gemini.d.ts +1 -1
- package/dist/agents/prometheus/gpt.d.ts +1 -1
- package/dist/agents/prometheus/interview-mode.d.ts +1 -1
- package/dist/agents/prometheus/plan-generation.d.ts +1 -1
- package/dist/agents/prometheus/plan-template.d.ts +1 -1
- package/dist/agents/prometheus/system-prompt.d.ts +1 -1
- package/dist/agents/types.d.ts +1 -1
- package/dist/cli/config-manager/bun-install.d.ts +8 -1
- package/dist/cli/config-manager/plugin-name-with-version.d.ts +1 -1
- package/dist/cli/doctor/checks/tools-lsp.d.ts +4 -6
- package/dist/cli/doctor/types.d.ts +4 -8
- package/dist/cli/index.js +1087 -802
- package/dist/cli/install-validators.d.ts +1 -0
- package/dist/cli/model-fallback-requirements.d.ts +1 -1
- package/dist/cli/model-fallback-types.d.ts +1 -0
- package/dist/cli/openai-only-model-catalog.d.ts +3 -0
- package/dist/cli/run/index.d.ts +1 -0
- package/dist/cli/run/model-resolver.d.ts +4 -0
- package/dist/cli/run/types.d.ts +1 -0
- package/dist/cli/types.d.ts +3 -0
- package/dist/config/schema/agent-names.d.ts +3 -1
- package/dist/config/schema/background-task.d.ts +9 -0
- package/dist/config/schema/git-env-prefix.d.ts +5 -0
- package/dist/config/schema/git-master.d.ts +1 -0
- package/dist/config/schema/hooks.d.ts +2 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +10 -0
- package/dist/config/schema.d.ts +1 -0
- package/dist/create-hooks.d.ts +13 -0
- package/dist/features/background-agent/compaction-aware-message-resolver.d.ts +16 -1
- package/dist/features/background-agent/constants.d.ts +7 -2
- package/dist/features/background-agent/loop-detector.d.ts +19 -0
- package/dist/features/background-agent/manager.d.ts +20 -4
- package/dist/features/background-agent/process-cleanup.d.ts +1 -1
- package/dist/features/background-agent/remove-task-toast-tracking.d.ts +1 -0
- package/dist/features/background-agent/subagent-spawn-limits.d.ts +23 -0
- package/dist/features/background-agent/task-history.d.ts +1 -0
- package/dist/features/background-agent/task-poller.d.ts +1 -0
- package/dist/features/background-agent/types.d.ts +11 -0
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/features/claude-code-agent-loader/claude-model-mapper.d.ts +4 -0
- package/dist/features/claude-code-agent-loader/loader.d.ts +3 -3
- package/dist/features/claude-code-agent-loader/types.d.ts +8 -1
- package/dist/features/claude-code-plugin-loader/agent-loader.d.ts +2 -2
- package/dist/features/claude-code-plugin-loader/loader.d.ts +2 -2
- package/dist/features/claude-code-plugin-loader/types.d.ts +22 -3
- package/dist/features/opencode-skill-loader/git-master-template-injection.d.ts +1 -1
- package/dist/features/skill-mcp-manager/types.d.ts +4 -0
- package/dist/features/tmux-subagent/index.d.ts +1 -0
- package/dist/features/tmux-subagent/manager.d.ts +5 -0
- package/dist/features/tmux-subagent/pane-state-parser.d.ts +8 -0
- package/dist/features/tmux-subagent/tracked-session-state.d.ts +8 -0
- package/dist/features/tmux-subagent/types.d.ts +2 -0
- package/dist/hooks/atlas/boulder-session-lineage.d.ts +6 -0
- package/dist/hooks/atlas/final-wave-approval-gate.d.ts +6 -0
- package/dist/hooks/atlas/final-wave-plan-state.d.ts +5 -0
- package/dist/hooks/atlas/idle-event.d.ts +8 -0
- package/dist/hooks/atlas/resolve-active-boulder-session.d.ts +11 -0
- package/dist/hooks/atlas/tool-execute-after.d.ts +2 -0
- package/dist/hooks/atlas/types.d.ts +4 -0
- package/dist/hooks/atlas/verification-reminders.d.ts +4 -0
- package/dist/hooks/auto-slash-command/executor.d.ts +1 -0
- package/dist/hooks/auto-slash-command/hook.d.ts +7 -0
- package/dist/hooks/auto-slash-command/processed-command-store.d.ts +7 -0
- package/dist/hooks/auto-slash-command/types.d.ts +9 -0
- package/dist/hooks/auto-update-checker/checker/sync-package-json.d.ts +7 -0
- package/dist/hooks/auto-update-checker/checker.d.ts +3 -1
- package/dist/hooks/compaction-context-injector/compaction-context-prompt.d.ts +1 -0
- package/dist/hooks/compaction-context-injector/constants.d.ts +5 -0
- package/dist/hooks/compaction-context-injector/hook.d.ts +5 -1
- package/dist/hooks/compaction-context-injector/recovery-prompt-config.d.ts +6 -0
- package/dist/hooks/compaction-context-injector/recovery.d.ts +6 -0
- package/dist/hooks/compaction-context-injector/session-id.d.ts +2 -0
- package/dist/hooks/compaction-context-injector/session-prompt-config-resolver.d.ts +16 -0
- package/dist/hooks/compaction-context-injector/tail-monitor.d.ts +13 -0
- package/dist/hooks/compaction-context-injector/types.d.ts +43 -0
- package/dist/hooks/compaction-context-injector/validated-model.d.ts +13 -0
- package/dist/hooks/context-window-monitor.d.ts +2 -5
- package/dist/hooks/gpt-permission-continuation/assistant-message.d.ts +23 -0
- package/dist/hooks/gpt-permission-continuation/constants.d.ts +4 -0
- package/dist/hooks/gpt-permission-continuation/detector.d.ts +1 -0
- package/dist/hooks/gpt-permission-continuation/handler.d.ts +12 -0
- package/dist/hooks/gpt-permission-continuation/index.d.ts +13 -0
- package/dist/hooks/gpt-permission-continuation/session-state.d.ts +15 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/keyword-detector/hook.d.ts +1 -0
- package/dist/hooks/preemptive-compaction.d.ts +2 -5
- package/dist/hooks/ralph-loop/pending-verification-handler.d.ts +17 -0
- package/dist/hooks/runtime-fallback/fallback-bootstrap-model.d.ts +10 -0
- package/dist/hooks/runtime-fallback/fallback-retry-dispatcher.d.ts +11 -0
- package/dist/hooks/runtime-fallback/hook.d.ts +2 -3
- package/dist/hooks/runtime-fallback/last-user-retry-parts.d.ts +4 -0
- package/dist/hooks/runtime-fallback/message-update-handler.d.ts +1 -2
- package/dist/hooks/runtime-fallback/retry-model-payload.d.ts +7 -0
- package/dist/hooks/runtime-fallback/session-messages.d.ts +9 -0
- package/dist/hooks/runtime-fallback/session-status-handler.d.ts +3 -0
- package/dist/hooks/runtime-fallback/types.d.ts +57 -3
- package/dist/hooks/runtime-fallback/visible-assistant-response.d.ts +3 -0
- package/dist/hooks/session-notification-content.d.ts +30 -0
- package/dist/hooks/session-notification-scheduler.d.ts +1 -3
- package/dist/hooks/start-work/index.d.ts +1 -1
- package/dist/hooks/start-work/worktree-detector.d.ts +7 -0
- package/dist/hooks/todo-continuation-enforcer/compaction-guard.d.ts +2 -0
- package/dist/hooks/todo-continuation-enforcer/constants.d.ts +2 -0
- package/dist/hooks/todo-continuation-enforcer/handler.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/idle-event.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer/resolve-message-info.d.ts +3 -0
- package/dist/hooks/todo-continuation-enforcer/session-state.d.ts +10 -1
- package/dist/hooks/todo-continuation-enforcer/stagnation-detection.d.ts +6 -0
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +10 -0
- package/dist/hooks/todo-description-override/description.d.ts +1 -0
- package/dist/hooks/todo-description-override/hook.d.ts +8 -0
- package/dist/hooks/todo-description-override/index.d.ts +1 -0
- package/dist/hooks/tool-output-truncator.d.ts +1 -0
- package/dist/index.js +10849 -6983
- package/dist/oh-my-opencode.schema.json +46 -2
- package/dist/plugin/hooks/create-continuation-hooks.d.ts +2 -1
- 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 +2 -0
- package/dist/plugin/ultrawork-model-override.d.ts +1 -15
- package/dist/plugin/ultrawork-variant-availability.d.ts +6 -0
- package/dist/plugin-dispose.d.ts +10 -0
- package/dist/plugin-handlers/agent-override-protection.d.ts +3 -0
- package/dist/plugin-state.d.ts +5 -0
- package/dist/shared/compaction-agent-config-checkpoint.d.ts +11 -0
- package/dist/shared/connected-providers-cache.d.ts +26 -29
- package/dist/shared/context-limit-resolver.d.ts +5 -0
- package/dist/shared/dynamic-truncator.d.ts +4 -7
- package/dist/shared/fallback-chain-from-models.d.ts +3 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/model-error-classifier.d.ts +2 -1
- package/dist/shared/opencode-command-dirs.d.ts +3 -0
- package/dist/shared/plugin-identity.d.ts +5 -0
- package/dist/shared/question-denied-session-permission.d.ts +6 -0
- package/dist/shared/retry-status-utils.d.ts +2 -0
- package/dist/shared/shell-env.d.ts +27 -0
- package/dist/shared/tmux/tmux-utils/environment.d.ts +1 -0
- package/dist/shared/vision-capable-models-cache.d.ts +4 -0
- package/dist/tools/call-omo-agent/background-executor.d.ts +2 -1
- package/dist/tools/call-omo-agent/constants.d.ts +1 -1
- package/dist/tools/call-omo-agent/sync-executor.d.ts +11 -3
- package/dist/tools/call-omo-agent/tools.d.ts +2 -1
- package/dist/tools/delegate-task/cancel-unstable-agent-task.d.ts +2 -0
- package/dist/tools/delegate-task/model-selection.d.ts +3 -0
- package/dist/tools/delegate-task/model-string-parser.d.ts +5 -3
- package/dist/tools/hashline-edit/hash-computation.d.ts +1 -0
- package/dist/tools/hashline-edit/tool-description.d.ts +1 -1
- package/dist/tools/look-at/constants.d.ts +1 -1
- package/dist/tools/look-at/multimodal-fallback-chain.d.ts +4 -0
- package/dist/tools/lsp/constants.d.ts +1 -0
- package/dist/tools/lsp/directory-diagnostics.d.ts +1 -0
- package/dist/tools/lsp/lsp-client-transport.d.ts +4 -2
- package/dist/tools/lsp/lsp-client-wrapper.d.ts +2 -1
- package/dist/tools/lsp/server-path-bases.d.ts +1 -0
- package/package.json +18 -18
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://raw.githubusercontent.com/code-yeongyu/oh-my-
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/dev/assets/oh-my-opencode.schema.json",
|
|
4
4
|
"title": "Oh My OpenCode Configuration",
|
|
5
5
|
"description": "Configuration schema for oh-my-opencode plugin",
|
|
6
6
|
"type": "object",
|
|
@@ -3678,6 +3678,16 @@
|
|
|
3678
3678
|
"minimum": 0
|
|
3679
3679
|
}
|
|
3680
3680
|
},
|
|
3681
|
+
"maxDepth": {
|
|
3682
|
+
"type": "integer",
|
|
3683
|
+
"minimum": 1,
|
|
3684
|
+
"maximum": 9007199254740991
|
|
3685
|
+
},
|
|
3686
|
+
"maxDescendants": {
|
|
3687
|
+
"type": "integer",
|
|
3688
|
+
"minimum": 1,
|
|
3689
|
+
"maximum": 9007199254740991
|
|
3690
|
+
},
|
|
3681
3691
|
"staleTimeoutMs": {
|
|
3682
3692
|
"type": "number",
|
|
3683
3693
|
"minimum": 60000
|
|
@@ -3689,6 +3699,35 @@
|
|
|
3689
3699
|
"syncPollTimeoutMs": {
|
|
3690
3700
|
"type": "number",
|
|
3691
3701
|
"minimum": 60000
|
|
3702
|
+
},
|
|
3703
|
+
"maxToolCalls": {
|
|
3704
|
+
"type": "integer",
|
|
3705
|
+
"minimum": 10,
|
|
3706
|
+
"maximum": 9007199254740991
|
|
3707
|
+
},
|
|
3708
|
+
"circuitBreaker": {
|
|
3709
|
+
"type": "object",
|
|
3710
|
+
"properties": {
|
|
3711
|
+
"enabled": {
|
|
3712
|
+
"type": "boolean"
|
|
3713
|
+
},
|
|
3714
|
+
"maxToolCalls": {
|
|
3715
|
+
"type": "integer",
|
|
3716
|
+
"minimum": 10,
|
|
3717
|
+
"maximum": 9007199254740991
|
|
3718
|
+
},
|
|
3719
|
+
"windowSize": {
|
|
3720
|
+
"type": "integer",
|
|
3721
|
+
"minimum": 5,
|
|
3722
|
+
"maximum": 9007199254740991
|
|
3723
|
+
},
|
|
3724
|
+
"repetitionThresholdPercent": {
|
|
3725
|
+
"type": "number",
|
|
3726
|
+
"exclusiveMinimum": 0,
|
|
3727
|
+
"maximum": 100
|
|
3728
|
+
}
|
|
3729
|
+
},
|
|
3730
|
+
"additionalProperties": false
|
|
3692
3731
|
}
|
|
3693
3732
|
},
|
|
3694
3733
|
"additionalProperties": false
|
|
@@ -3732,11 +3771,16 @@
|
|
|
3732
3771
|
"include_co_authored_by": {
|
|
3733
3772
|
"default": true,
|
|
3734
3773
|
"type": "boolean"
|
|
3774
|
+
},
|
|
3775
|
+
"git_env_prefix": {
|
|
3776
|
+
"default": "GIT_MASTER=1",
|
|
3777
|
+
"type": "string"
|
|
3735
3778
|
}
|
|
3736
3779
|
},
|
|
3737
3780
|
"required": [
|
|
3738
3781
|
"commit_footer",
|
|
3739
|
-
"include_co_authored_by"
|
|
3782
|
+
"include_co_authored_by",
|
|
3783
|
+
"git_env_prefix"
|
|
3740
3784
|
],
|
|
3741
3785
|
"additionalProperties": false
|
|
3742
3786
|
},
|
|
@@ -1,9 +1,10 @@
|
|
|
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 { createTodoContinuationEnforcer, createBackgroundNotificationHook, createStopContinuationGuardHook, createCompactionContextInjector, createCompactionTodoPreserverHook, createAtlasHook } from "../../hooks";
|
|
4
|
+
import { createGptPermissionContinuationHook, 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;
|
|
7
8
|
stopContinuationGuard: ReturnType<typeof createStopContinuationGuardHook> | null;
|
|
8
9
|
compactionContextInjector: ReturnType<typeof createCompactionContextInjector> | null;
|
|
9
10
|
compactionTodoPreserver: ReturnType<typeof createCompactionTodoPreserverHook> | null;
|
|
@@ -23,6 +23,7 @@ export declare function createCoreHooks(args: {
|
|
|
23
23
|
hashlineReadEnhancer: ReturnType<typeof import("../../hooks").createHashlineReadEnhancerHook> | null;
|
|
24
24
|
jsonErrorRecovery: ReturnType<typeof import("../../hooks").createJsonErrorRecoveryHook> | null;
|
|
25
25
|
readImageResizer: ReturnType<typeof import("../../hooks").createReadImageResizerHook> | null;
|
|
26
|
+
todoDescriptionOverride: ReturnType<typeof import("../../hooks").createTodoDescriptionOverrideHook> | null;
|
|
26
27
|
contextWindowMonitor: ReturnType<typeof import("../../hooks").createContextWindowMonitorHook> | null;
|
|
27
28
|
preemptiveCompaction: ReturnType<typeof import("../../hooks").createPreemptiveCompactionHook> | null;
|
|
28
29
|
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 } from "../../hooks";
|
|
4
|
+
import { createCommentCheckerHooks, createToolOutputTruncatorHook, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createRulesInjectorHook, createTasksTodowriteDisablerHook, createWriteExistingFileGuardHook, createHashlineReadEnhancerHook, createReadImageResizerHook, createJsonErrorRecoveryHook, createTodoDescriptionOverrideHook } from "../../hooks";
|
|
5
5
|
export type ToolGuardHooks = {
|
|
6
6
|
commentChecker: ReturnType<typeof createCommentCheckerHooks> | null;
|
|
7
7
|
toolOutputTruncator: ReturnType<typeof createToolOutputTruncatorHook> | null;
|
|
@@ -14,6 +14,7 @@ export type ToolGuardHooks = {
|
|
|
14
14
|
hashlineReadEnhancer: ReturnType<typeof createHashlineReadEnhancerHook> | null;
|
|
15
15
|
jsonErrorRecovery: ReturnType<typeof createJsonErrorRecoveryHook> | null;
|
|
16
16
|
readImageResizer: ReturnType<typeof createReadImageResizerHook> | null;
|
|
17
|
+
todoDescriptionOverride: ReturnType<typeof createTodoDescriptionOverrideHook> | null;
|
|
17
18
|
};
|
|
18
19
|
export declare function createToolGuardHooks(args: {
|
|
19
20
|
ctx: PluginContext;
|
|
@@ -5,10 +5,6 @@ export type UltraworkOverrideResult = {
|
|
|
5
5
|
modelID?: string;
|
|
6
6
|
variant?: string;
|
|
7
7
|
};
|
|
8
|
-
/**
|
|
9
|
-
* Resolves the ultrawork model override config for the given agent and prompt text.
|
|
10
|
-
* Returns null if no override should be applied.
|
|
11
|
-
*/
|
|
12
8
|
export declare function resolveUltraworkOverride(pluginConfig: OhMyOpenCodeConfig, inputAgentName: string | undefined, output: {
|
|
13
9
|
message: Record<string, unknown>;
|
|
14
10
|
parts: Array<{
|
|
@@ -17,16 +13,6 @@ export declare function resolveUltraworkOverride(pluginConfig: OhMyOpenCodeConfi
|
|
|
17
13
|
[key: string]: unknown;
|
|
18
14
|
}>;
|
|
19
15
|
}, sessionID?: string): UltraworkOverrideResult | null;
|
|
20
|
-
/**
|
|
21
|
-
* Applies ultrawork model override using a deferred DB update strategy.
|
|
22
|
-
*
|
|
23
|
-
* Instead of directly mutating output.message.model (which would cause the TUI
|
|
24
|
-
* bottom bar to show the override model), this schedules a queueMicrotask that
|
|
25
|
-
* updates the message model directly in SQLite AFTER Session.updateMessage()
|
|
26
|
-
* saves the original model, but BEFORE loop() reads it for the API call.
|
|
27
|
-
*
|
|
28
|
-
* Result: API call uses opus, TUI bottom bar stays on sonnet.
|
|
29
|
-
*/
|
|
30
16
|
export declare function applyUltraworkModelOverrideOnMessage(pluginConfig: OhMyOpenCodeConfig, inputAgentName: string | undefined, output: {
|
|
31
17
|
message: Record<string, unknown>;
|
|
32
18
|
parts: Array<{
|
|
@@ -34,4 +20,4 @@ export declare function applyUltraworkModelOverrideOnMessage(pluginConfig: OhMyO
|
|
|
34
20
|
text?: string;
|
|
35
21
|
[key: string]: unknown;
|
|
36
22
|
}>;
|
|
37
|
-
}, tui: unknown, sessionID?: string): void
|
|
23
|
+
}, tui: unknown, sessionID?: string, client?: unknown): void | Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type PluginDispose = () => Promise<void>;
|
|
2
|
+
export declare function createPluginDispose(args: {
|
|
3
|
+
backgroundManager: {
|
|
4
|
+
shutdown: () => void | Promise<void>;
|
|
5
|
+
};
|
|
6
|
+
skillMcpManager: {
|
|
7
|
+
disconnectAll: () => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
disposeHooks: () => void;
|
|
10
|
+
}): PluginDispose;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function normalizeProtectedAgentName(agentName: string): string;
|
|
2
|
+
export declare function createProtectedAgentNameSet(agentNames: Iterable<string>): Set<string>;
|
|
3
|
+
export declare function filterProtectedAgentOverrides<TAgent>(agents: Record<string, TAgent>, protectedAgentNames: ReadonlySet<string>): Record<string, TAgent>;
|
package/dist/plugin-state.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
export type VisionCapableModel = {
|
|
2
|
+
providerID: string;
|
|
3
|
+
modelID: string;
|
|
4
|
+
};
|
|
1
5
|
export interface ModelCacheState {
|
|
2
6
|
modelContextLimitsCache: Map<string, number>;
|
|
7
|
+
visionCapableModelsCache?: Map<string, VisionCapableModel>;
|
|
3
8
|
anthropicContext1MEnabled: boolean;
|
|
4
9
|
}
|
|
5
10
|
export declare function createModelCacheState(): ModelCacheState;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type CompactionAgentConfigCheckpoint = {
|
|
2
|
+
agent?: string;
|
|
3
|
+
model?: {
|
|
4
|
+
providerID: string;
|
|
5
|
+
modelID: string;
|
|
6
|
+
};
|
|
7
|
+
tools?: Record<string, boolean>;
|
|
8
|
+
};
|
|
9
|
+
export declare function setCompactionAgentConfigCheckpoint(sessionID: string, checkpoint: CompactionAgentConfigCheckpoint): void;
|
|
10
|
+
export declare function getCompactionAgentConfigCheckpoint(sessionID: string): CompactionAgentConfigCheckpoint | undefined;
|
|
11
|
+
export declare function clearCompactionAgentConfigCheckpoint(sessionID: string): void;
|
|
@@ -10,36 +10,33 @@ interface ProviderModelsCache {
|
|
|
10
10
|
connected: string[];
|
|
11
11
|
updatedAt: string;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
13
|
+
export declare function createConnectedProvidersCacheStore(getCacheDir?: () => string): {
|
|
14
|
+
readConnectedProvidersCache: () => string[] | null;
|
|
15
|
+
hasConnectedProvidersCache: () => boolean;
|
|
16
|
+
readProviderModelsCache: () => ProviderModelsCache | null;
|
|
17
|
+
hasProviderModelsCache: () => boolean;
|
|
18
|
+
writeProviderModelsCache: (data: {
|
|
19
|
+
models: Record<string, string[]>;
|
|
20
|
+
connected: string[];
|
|
21
|
+
}) => void;
|
|
22
|
+
updateConnectedProvidersCache: (client: {
|
|
23
|
+
provider?: {
|
|
24
|
+
list?: () => Promise<{
|
|
25
|
+
data?: {
|
|
26
|
+
connected?: string[];
|
|
27
|
+
all?: Array<{
|
|
28
|
+
id: string;
|
|
29
|
+
models?: Record<string, unknown>;
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
}>;
|
|
33
|
+
};
|
|
34
|
+
}) => Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
export declare const readConnectedProvidersCache: () => string[] | null, hasConnectedProvidersCache: () => boolean, readProviderModelsCache: () => ProviderModelsCache | null, hasProviderModelsCache: () => boolean, writeProviderModelsCache: (data: {
|
|
35
37
|
models: Record<string, string[]>;
|
|
36
38
|
connected: string[];
|
|
37
|
-
}):
|
|
38
|
-
/**
|
|
39
|
-
* Update the connected providers cache by fetching from the client.
|
|
40
|
-
* Also updates the provider-models cache with model lists per provider.
|
|
41
|
-
*/
|
|
42
|
-
export declare function updateConnectedProvidersCache(client: {
|
|
39
|
+
}) => void, updateConnectedProvidersCache: (client: {
|
|
43
40
|
provider?: {
|
|
44
41
|
list?: () => Promise<{
|
|
45
42
|
data?: {
|
|
@@ -51,5 +48,5 @@ export declare function updateConnectedProvidersCache(client: {
|
|
|
51
48
|
};
|
|
52
49
|
}>;
|
|
53
50
|
};
|
|
54
|
-
})
|
|
51
|
+
}) => Promise<void>;
|
|
55
52
|
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type ContextLimitModelCacheState = {
|
|
2
|
+
anthropicContext1MEnabled: boolean;
|
|
3
|
+
modelContextLimitsCache?: Map<string, number>;
|
|
4
|
+
};
|
|
5
|
+
export declare function resolveActualContextLimit(providerID: string, modelID: string, modelCacheState?: ContextLimitModelCacheState): number | null;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
type
|
|
3
|
-
anthropicContext1MEnabled: boolean;
|
|
4
|
-
};
|
|
2
|
+
import { type ContextLimitModelCacheState } from "./context-limit-resolver";
|
|
5
3
|
export interface TruncationResult {
|
|
6
4
|
result: string;
|
|
7
5
|
truncated: boolean;
|
|
@@ -13,13 +11,13 @@ export interface TruncationOptions {
|
|
|
13
11
|
contextWindowLimit?: number;
|
|
14
12
|
}
|
|
15
13
|
export declare function truncateToTokenLimit(output: string, maxTokens: number, preserveHeaderLines?: number): TruncationResult;
|
|
16
|
-
export declare function getContextWindowUsage(ctx: PluginInput, sessionID: string, modelCacheState?:
|
|
14
|
+
export declare function getContextWindowUsage(ctx: PluginInput, sessionID: string, modelCacheState?: ContextLimitModelCacheState): Promise<{
|
|
17
15
|
usedTokens: number;
|
|
18
16
|
remainingTokens: number;
|
|
19
17
|
usagePercentage: number;
|
|
20
18
|
} | null>;
|
|
21
|
-
export declare function dynamicTruncate(ctx: PluginInput, sessionID: string, output: string, options?: TruncationOptions, modelCacheState?:
|
|
22
|
-
export declare function createDynamicTruncator(ctx: PluginInput, modelCacheState?:
|
|
19
|
+
export declare function dynamicTruncate(ctx: PluginInput, sessionID: string, output: string, options?: TruncationOptions, modelCacheState?: ContextLimitModelCacheState): Promise<TruncationResult>;
|
|
20
|
+
export declare function createDynamicTruncator(ctx: PluginInput, modelCacheState?: ContextLimitModelCacheState): {
|
|
23
21
|
truncate: (sessionID: string, output: string, options?: TruncationOptions) => Promise<TruncationResult>;
|
|
24
22
|
getUsage: (sessionID: string) => Promise<{
|
|
25
23
|
usedTokens: number;
|
|
@@ -28,4 +26,3 @@ export declare function createDynamicTruncator(ctx: PluginInput, modelCacheState
|
|
|
28
26
|
} | null>;
|
|
29
27
|
truncateSync: (output: string, maxTokens: number, preserveHeaderLines?: number) => TruncationResult;
|
|
30
28
|
};
|
|
31
|
-
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { FallbackEntry } from "./model-requirements";
|
|
2
|
+
export declare function parseFallbackModelEntry(model: string, contextProviderID: string | undefined, defaultProviderID?: string): FallbackEntry | undefined;
|
|
3
|
+
export declare function buildFallbackChainFromModels(fallbackModels: string | string[] | undefined, contextProviderID: string | undefined, defaultProviderID?: string): FallbackEntry[] | undefined;
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export type { ModelResolutionRequest, ModelResolutionProvenance, ModelResolution
|
|
|
37
37
|
export * from "./model-availability";
|
|
38
38
|
export * from "./fallback-model-availability";
|
|
39
39
|
export * from "./connected-providers-cache";
|
|
40
|
+
export * from "./context-limit-resolver";
|
|
40
41
|
export * from "./session-utils";
|
|
41
42
|
export * from "./tmux";
|
|
42
43
|
export * from "./model-suggestion-retry";
|
|
@@ -48,9 +49,11 @@ export * from "./safe-create-hook";
|
|
|
48
49
|
export * from "./truncate-description";
|
|
49
50
|
export * from "./opencode-storage-paths";
|
|
50
51
|
export * from "./opencode-message-dir";
|
|
52
|
+
export * from "./opencode-command-dirs";
|
|
51
53
|
export * from "./normalize-sdk-response";
|
|
52
54
|
export * from "./session-directory-resolver";
|
|
53
55
|
export * from "./prompt-tools";
|
|
54
56
|
export * from "./internal-initiator-marker";
|
|
55
57
|
export * from "./plugin-command-discovery";
|
|
56
58
|
export { SessionCategoryRegistry } from "./session-category-registry";
|
|
59
|
+
export * from "./plugin-identity";
|
|
@@ -26,6 +26,7 @@ export declare function hasMoreFallbacks(fallbackChain: FallbackEntry[], attempt
|
|
|
26
26
|
* Selects the best provider for a fallback entry.
|
|
27
27
|
* Priority:
|
|
28
28
|
* 1) First connected provider in the entry's provider preference order
|
|
29
|
-
* 2)
|
|
29
|
+
* 2) Preferred provider when connected (and entry providers are unavailable)
|
|
30
|
+
* 3) First provider listed in the fallback entry
|
|
30
31
|
*/
|
|
31
32
|
export declare function selectFallbackProvider(providers: string[], preferredProviderID?: string): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const PLUGIN_NAME = "oh-my-opencode";
|
|
2
|
+
export declare const LEGACY_PLUGIN_NAME = "oh-my-openagent";
|
|
3
|
+
export declare const CONFIG_BASENAME = "oh-my-opencode";
|
|
4
|
+
export declare const LOG_FILENAME = "oh-my-opencode.log";
|
|
5
|
+
export declare const CACHE_DIR_NAME = "oh-my-opencode";
|
|
@@ -39,3 +39,30 @@ export declare function shellEscape(value: string, shellType: ShellType): string
|
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
41
|
export declare function buildEnvPrefix(env: Record<string, string>, shellType: ShellType): string;
|
|
42
|
+
/**
|
|
43
|
+
* Escape a value for use in a double-quoted shell -c command argument.
|
|
44
|
+
*
|
|
45
|
+
* In shell -c "..." strings, these characters have special meaning and must be escaped:
|
|
46
|
+
* - $ - variable expansion, command substitution $(...)
|
|
47
|
+
* - ` - command substitution `...`
|
|
48
|
+
* - \\ - escape character
|
|
49
|
+
* - " - end quote
|
|
50
|
+
* - ; | & - command separators
|
|
51
|
+
* - # - comment
|
|
52
|
+
* - () - grouping operators
|
|
53
|
+
*
|
|
54
|
+
* @param value - The value to escape
|
|
55
|
+
* @returns Escaped value safe for double-quoted shell -c argument
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* // For malicious input
|
|
60
|
+
* const url = "http://localhost:3000'; cat /etc/passwd; echo '"
|
|
61
|
+
* const escaped = shellEscapeForDoubleQuotedCommand(url)
|
|
62
|
+
* // => "http://localhost:3000'\''; cat /etc/passwd; echo '"
|
|
63
|
+
*
|
|
64
|
+
* // Usage in command:
|
|
65
|
+
* const cmd = `/bin/sh -c "opencode attach ${escaped} --session ${sessionId}"`
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare function shellEscapeForDoubleQuotedCommand(value: string): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { VisionCapableModel } from "../plugin-state";
|
|
2
|
+
export declare function setVisionCapableModelsCache(cache: Map<string, VisionCapableModel>): void;
|
|
3
|
+
export declare function readVisionCapableModelsCache(): VisionCapableModel[];
|
|
4
|
+
export declare function clearVisionCapableModelsCache(): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CallOmoAgentArgs } from "./types";
|
|
2
2
|
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
3
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
4
|
+
import type { FallbackEntry } from "../../shared/model-requirements";
|
|
4
5
|
export declare function executeBackground(args: CallOmoAgentArgs, toolContext: {
|
|
5
6
|
sessionID: string;
|
|
6
7
|
messageID: string;
|
|
@@ -10,4 +11,4 @@ export declare function executeBackground(args: CallOmoAgentArgs, toolContext: {
|
|
|
10
11
|
title?: string;
|
|
11
12
|
metadata?: Record<string, unknown>;
|
|
12
13
|
}) => void;
|
|
13
|
-
}, manager: BackgroundManager, client: PluginInput["client"]): Promise<string>;
|
|
14
|
+
}, manager: BackgroundManager, client: PluginInput["client"], fallbackChain?: FallbackEntry[]): Promise<string>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const ALLOWED_AGENTS: readonly ["explore", "librarian", "oracle", "hephaestus", "metis", "momus", "multimodal-looker"];
|
|
2
|
-
export declare const CALL_OMO_AGENT_DESCRIPTION = "Spawn explore/librarian agent. run_in_background REQUIRED (true=async with task_id, false=sync).\n\nAvailable: {agents}\n\nPass `session_id=<id>` to continue previous agent with full context. Prompts MUST be in English. Use `background_output` for async results.";
|
|
2
|
+
export declare const CALL_OMO_AGENT_DESCRIPTION = "Spawn explore/librarian agent. run_in_background REQUIRED (true=async with task_id, false=sync).\n\nAvailable: {agents}\n\nPass `session_id=<id>` to continue previous agent with full context. Nested subagent depth is tracked automatically and blocked past the configured limit. Prompts MUST be in English. Use `background_output` for async results.";
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import type { CallOmoAgentArgs } from "./types";
|
|
2
2
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
3
|
-
import {
|
|
3
|
+
import { clearSessionFallbackChain, setSessionFallbackChain } from "../../hooks/model-fallback/hook";
|
|
4
|
+
import type { FallbackEntry } from "../../shared/model-requirements";
|
|
4
5
|
import { waitForCompletion } from "./completion-poller";
|
|
5
6
|
import { processMessages } from "./message-processor";
|
|
7
|
+
import { createOrGetSession } from "./session-creator";
|
|
6
8
|
type ExecuteSyncDeps = {
|
|
7
9
|
createOrGetSession: typeof createOrGetSession;
|
|
8
10
|
waitForCompletion: typeof waitForCompletion;
|
|
9
11
|
processMessages: typeof processMessages;
|
|
12
|
+
setSessionFallbackChain: typeof setSessionFallbackChain;
|
|
13
|
+
clearSessionFallbackChain: typeof clearSessionFallbackChain;
|
|
14
|
+
};
|
|
15
|
+
type SpawnReservation = {
|
|
16
|
+
commit: () => number;
|
|
17
|
+
rollback: () => void;
|
|
10
18
|
};
|
|
11
19
|
export declare function executeSync(args: CallOmoAgentArgs, toolContext: {
|
|
12
20
|
sessionID: string;
|
|
@@ -16,6 +24,6 @@ export declare function executeSync(args: CallOmoAgentArgs, toolContext: {
|
|
|
16
24
|
metadata?: (input: {
|
|
17
25
|
title?: string;
|
|
18
26
|
metadata?: Record<string, unknown>;
|
|
19
|
-
}) => void
|
|
20
|
-
}, ctx: PluginInput, deps?: ExecuteSyncDeps): Promise<string>;
|
|
27
|
+
}) => void | Promise<void>;
|
|
28
|
+
}, ctx: PluginInput, deps?: ExecuteSyncDeps, fallbackChain?: FallbackEntry[], spawnReservation?: SpawnReservation): Promise<string>;
|
|
21
29
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { type PluginInput, type ToolDefinition } from "@opencode-ai/plugin";
|
|
2
2
|
import type { BackgroundManager } from "../../features/background-agent";
|
|
3
|
-
|
|
3
|
+
import type { CategoriesConfig, AgentOverrides } from "../../config/schema";
|
|
4
|
+
export declare function createCallOmoAgent(ctx: PluginInput, backgroundManager: BackgroundManager, disabledAgents?: string[], agentOverrides?: AgentOverrides, userCategories?: CategoriesConfig): ToolDefinition;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { FallbackEntry } from "../../shared/model-requirements";
|
|
2
2
|
export declare function resolveModelForDelegateTask(input: {
|
|
3
3
|
userModel?: string;
|
|
4
|
+
userFallbackModels?: string[];
|
|
4
5
|
categoryDefaultModel?: string;
|
|
5
6
|
fallbackChain?: FallbackEntry[];
|
|
6
7
|
availableModels: Set<string>;
|
|
@@ -8,4 +9,6 @@ export declare function resolveModelForDelegateTask(input: {
|
|
|
8
9
|
}): {
|
|
9
10
|
model: string;
|
|
10
11
|
variant?: string;
|
|
12
|
+
} | {
|
|
13
|
+
skipped: true;
|
|
11
14
|
} | undefined;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare function parseVariantFromModelID(rawModelID: string): {
|
|
2
|
+
modelID: string;
|
|
3
|
+
variant?: string;
|
|
4
|
+
};
|
|
4
5
|
export declare function parseModelString(model: string): {
|
|
5
6
|
providerID: string;
|
|
6
7
|
modelID: string;
|
|
8
|
+
variant?: string;
|
|
7
9
|
} | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare function computeLineHash(lineNumber: number, content: string): string;
|
|
2
|
+
export declare function computeLegacyLineHash(lineNumber: number, content: string): string;
|
|
2
3
|
export declare function formatHashLine(lineNumber: number, content: string): string;
|
|
3
4
|
export declare function formatHashLines(content: string): string;
|
|
4
5
|
export interface HashlineStreamOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HASHLINE_EDIT_DESCRIPTION = "Edit files using LINE#ID format for precise, safe modifications.\n\nWORKFLOW:\n1. Read target file/range and copy exact LINE#ID tags.\n2. Pick the smallest operation per logical mutation site.\n3. Submit one edit call per file with all related operations.\n4. If same file needs another call, re-read first.\n5. Use anchors as \"LINE#ID\" only (never include trailing \"|content\").\n\
|
|
1
|
+
export declare const HASHLINE_EDIT_DESCRIPTION = "Edit files using LINE#ID format for precise, safe modifications.\n\nWORKFLOW:\n1. Read target file/range and copy exact LINE#ID tags.\n2. Pick the smallest operation per logical mutation site.\n3. Submit one edit call per file with all related operations.\n4. If same file needs another call, re-read first.\n5. Use anchors as \"LINE#ID\" only (never include trailing \"|content\").\n\n<must>\n- SNAPSHOT: All edits in one call reference the ORIGINAL file state. Do NOT adjust line numbers for prior edits in the same call \u2014 the system applies them bottom-up automatically.\n- replace removes lines pos..end (inclusive) and inserts lines in their place. Lines BEFORE pos and AFTER end are UNTOUCHED \u2014 do NOT include them in lines. If you do, they will appear twice.\n- lines must contain ONLY the content that belongs inside the consumed range. Content after end survives unchanged.\n- Tags MUST be copied exactly from read output or >>> mismatch output. NEVER guess tags.\n- Batch = multiple operations in edits[], NOT one big replace covering everything. Each operation targets the smallest possible change.\n- lines must contain plain replacement text only (no LINE#ID prefixes, no diff + markers).\n</must>\n\n<operations>\nLINE#ID FORMAT:\n Each line reference must be in \"{line_number}#{hash_id}\" format where:\n {line_number}: 1-based line number\n {hash_id}: Two CID letters from the set ZPMQVRWSNKTXJBYH\n\nOPERATION CHOICE:\n replace with pos only -> replace one line at pos\n replace with pos+end -> replace range pos..end inclusive as a block (ranges MUST NOT overlap across edits)\n append with pos/end anchor -> insert after that anchor\n prepend with pos/end anchor -> insert before that anchor\n append/prepend without anchors -> EOF/BOF insertion (also creates missing files)\n\nCONTENT FORMAT:\n lines can be a string (single line) or string[] (multi-line, preferred).\n If you pass a multi-line string, it is split by real newline characters.\n lines: null or lines: [] with replace -> delete those lines.\n\nFILE MODES:\n delete=true deletes file and requires edits=[] with no rename\n rename moves final content to a new path and removes old path\n\nRULES:\n 1. Minimize scope: one logical mutation site per operation.\n 2. Preserve formatting: keep indentation, punctuation, line breaks, trailing commas, brace style.\n 3. Prefer insertion over neighbor rewrites: anchor to structural boundaries (}, ], },), not interior property lines.\n 4. No no-ops: replacement content must differ from current content.\n 5. Touch only requested code: avoid incidental edits.\n 6. Use exact current tokens: NEVER rewrite approximately.\n 7. For swaps/moves: prefer one range operation over multiple single-line operations.\n 8. Anchor to structural lines (function/class/brace), NEVER blank lines.\n 9. Re-read after each successful edit call before issuing another on the same file.\n</operations>\n\n<examples>\nGiven this file content after read:\n 10#VK|function hello() {\n 11#XJ| console.log(\"hi\");\n 12#MB| console.log(\"bye\");\n 13#QR|}\n 14#TN|\n 15#WS|function world() {\n\nSingle-line replace (change line 11):\n { op: \"replace\", pos: \"11#XJ\", lines: [\" console.log(\\\"hello\\\");\"] }\n Result: line 11 replaced. Lines 10, 12-15 unchanged.\n\nRange replace (rewrite function body, lines 11-12):\n { op: \"replace\", pos: \"11#XJ\", end: \"12#MB\", lines: [\" return \\\"hello world\\\";\"] }\n Result: lines 11-12 removed, replaced by 1 new line. Lines 10, 13-15 unchanged.\n\nDelete a line:\n { op: \"replace\", pos: \"12#MB\", lines: null }\n Result: line 12 removed. Lines 10-11, 13-15 unchanged.\n\nInsert after line 13 (between functions):\n { op: \"append\", pos: \"13#QR\", lines: [\"\", \"function added() {\", \" return true;\", \"}\"] }\n Result: 4 new lines inserted after line 13. All existing lines unchanged.\n\nBAD \u2014 lines extend past end (DUPLICATES line 13):\n { op: \"replace\", pos: \"11#XJ\", end: \"12#MB\", lines: [\" return \\\"hi\\\";\", \"}\"] }\n Line 13 is \"}\" which already exists after end. Including \"}\" in lines duplicates it.\n CORRECT: { op: \"replace\", pos: \"11#XJ\", end: \"12#MB\", lines: [\" return \\\"hi\\\";\"] }\n</examples>\n\n<auto>\nBuilt-in autocorrect (you do NOT need to handle these):\n Merged lines are auto-expanded back to original line count.\n Indentation is auto-restored from original lines.\n BOM and CRLF line endings are preserved automatically.\n Hashline prefixes and diff markers in text are auto-stripped.\n Boundary echo lines (duplicating adjacent surviving lines) are auto-stripped.\n</auto>\n\nRECOVERY (when >>> mismatch error appears):\n Copy the updated LINE#ID tags shown in the error output directly.\n Re-read only if the needed tags are missing from the error snippet.";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const MULTIMODAL_LOOKER_AGENT: "multimodal-looker";
|
|
2
|
-
export declare const LOOK_AT_DESCRIPTION = "
|
|
2
|
+
export declare const LOOK_AT_DESCRIPTION = "Extract basic information from media files (PDFs, images, diagrams) when a quick summary suffices over precise reading. Good for simple text-based content extraction without using the Read tool. NEVER use for visual precision, aesthetic evaluation, or exact accuracy \u2014 use Read tool instead for those cases.";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FallbackEntry } from "../../shared/model-requirements";
|
|
2
|
+
import type { VisionCapableModel } from "../../plugin-state";
|
|
3
|
+
export declare function isHardcodedMultimodalFallbackModel(model: VisionCapableModel): boolean;
|
|
4
|
+
export declare function buildMultimodalLookerFallbackChain(visionCapableModels: VisionCapableModel[]): FallbackEntry[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const DEFAULT_MAX_REFERENCES = 200;
|
|
2
2
|
export declare const DEFAULT_MAX_SYMBOLS = 200;
|
|
3
3
|
export declare const DEFAULT_MAX_DIAGNOSTICS = 200;
|
|
4
|
+
export declare const DEFAULT_MAX_DIRECTORY_FILES = 50;
|
|
4
5
|
export { SYMBOL_KIND_MAP, SEVERITY_MAP, EXT_TO_LANG } from "./language-mappings";
|
|
5
6
|
export { BUILTIN_SERVERS, LSP_INSTALL_HINTS } from "./server-definitions";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function aggregateDiagnosticsForDirectory(directory: string, extension: string, severity?: "error" | "warning" | "information" | "hint" | "all", maxFiles?: number): Promise<string>;
|
|
@@ -13,8 +13,10 @@ export declare class LSPClientTransport {
|
|
|
13
13
|
constructor(root: string, server: ResolvedServer);
|
|
14
14
|
start(): Promise<void>;
|
|
15
15
|
protected startStderrReading(): void;
|
|
16
|
-
protected sendRequest<T>(method: string
|
|
17
|
-
protected
|
|
16
|
+
protected sendRequest<T>(method: string): Promise<T>;
|
|
17
|
+
protected sendRequest<T>(method: string, params: unknown): Promise<T>;
|
|
18
|
+
protected sendNotification(method: string): void;
|
|
19
|
+
protected sendNotification(method: string, params: unknown): void;
|
|
18
20
|
isAlive(): boolean;
|
|
19
21
|
stop(): Promise<void>;
|
|
20
22
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { LSPClient } from "./client";
|
|
2
2
|
import type { ServerLookupResult } from "./types";
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function isDirectoryPath(filePath: string): boolean;
|
|
4
4
|
export declare function uriToPath(uri: string): string;
|
|
5
|
+
export declare function findWorkspaceRoot(filePath: string): string;
|
|
5
6
|
export declare function formatServerLookupError(result: Exclude<ServerLookupResult, {
|
|
6
7
|
status: "found";
|
|
7
8
|
}>): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getLspServerAdditionalPathBases(workingDirectory: string): string[];
|