oh-my-opencode 3.13.1 → 3.14.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.
Files changed (62) hide show
  1. package/README.ja.md +2 -2
  2. package/README.ko.md +2 -2
  3. package/README.md +2 -2
  4. package/README.ru.md +2 -2
  5. package/README.zh-cn.md +2 -2
  6. package/dist/agents/types.d.ts +2 -1
  7. package/dist/cli/doctor/checks/model-resolution-types.d.ts +3 -0
  8. package/dist/cli/doctor/checks/model-resolution.d.ts +2 -1
  9. package/dist/cli/doctor/constants.d.ts +1 -1
  10. package/dist/cli/index.js +41911 -346
  11. package/dist/cli/refresh-model-capabilities.d.ts +15 -0
  12. package/dist/config/index.d.ts +1 -1
  13. package/dist/config/schema/agent-overrides.d.ts +360 -15
  14. package/dist/config/schema/categories.d.ts +48 -2
  15. package/dist/config/schema/dynamic-context-pruning.d.ts +1 -1
  16. package/dist/config/schema/experimental.d.ts +1 -1
  17. package/dist/config/schema/fallback-models.d.ts +45 -1
  18. package/dist/config/schema/model-capabilities.d.ts +8 -0
  19. package/dist/config/schema/oh-my-opencode-config.d.ts +367 -16
  20. package/dist/config/schema.d.ts +1 -0
  21. package/dist/features/background-agent/types.d.ts +3 -10
  22. package/dist/features/opencode-skill-loader/loader.d.ts +2 -0
  23. package/dist/hooks/auto-update-checker/hook/model-capabilities-status.d.ts +2 -0
  24. package/dist/hooks/auto-update-checker/types.d.ts +2 -0
  25. package/dist/hooks/keyword-detector/ultrawork/default.d.ts +1 -1
  26. package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +1 -1
  27. package/dist/hooks/keyword-detector/ultrawork/gpt.d.ts +1 -1
  28. package/dist/hooks/model-fallback/hook.d.ts +5 -0
  29. package/dist/hooks/runtime-fallback/fallback-models.d.ts +12 -0
  30. package/dist/hooks/start-work/start-work-hook.d.ts +1 -0
  31. package/dist/index.js +43251 -1161
  32. package/dist/oh-my-opencode.schema.json +996 -15
  33. package/dist/plugin/chat-params.d.ts +1 -0
  34. package/dist/shared/connected-providers-cache.d.ts +20 -5
  35. package/dist/shared/fallback-chain-from-models.d.ts +10 -1
  36. package/dist/shared/index.d.ts +7 -1
  37. package/dist/shared/known-variants.d.ts +6 -0
  38. package/dist/shared/legacy-plugin-warning.d.ts +6 -0
  39. package/dist/shared/log-legacy-plugin-startup-warning.d.ts +1 -0
  40. package/dist/shared/model-capabilities-cache.d.ts +20 -0
  41. package/dist/shared/model-capabilities.d.ts +91 -0
  42. package/dist/shared/model-capability-aliases.d.ts +21 -0
  43. package/dist/shared/model-capability-guardrails.d.ts +38 -0
  44. package/dist/shared/model-capability-heuristics.d.ts +10 -0
  45. package/dist/shared/model-requirements.d.ts +8 -0
  46. package/dist/shared/model-resolution-types.d.ts +13 -0
  47. package/dist/shared/model-resolver.d.ts +10 -3
  48. package/dist/shared/model-settings-compatibility.d.ts +40 -0
  49. package/dist/shared/plugin-identity.d.ts +4 -3
  50. package/dist/shared/project-discovery-dirs.d.ts +4 -0
  51. package/dist/shared/session-prompt-params-helpers.d.ts +12 -0
  52. package/dist/shared/session-prompt-params-state.d.ts +9 -0
  53. package/dist/tools/delegate-task/background-task.d.ts +2 -6
  54. package/dist/tools/delegate-task/category-resolver.d.ts +2 -5
  55. package/dist/tools/delegate-task/model-selection.d.ts +2 -0
  56. package/dist/tools/delegate-task/subagent-resolver.d.ts +3 -6
  57. package/dist/tools/delegate-task/sync-prompt-sender.d.ts +2 -6
  58. package/dist/tools/delegate-task/sync-session-poller.d.ts +1 -0
  59. package/dist/tools/delegate-task/sync-task.d.ts +2 -6
  60. package/dist/tools/delegate-task/types.d.ts +3 -5
  61. package/dist/tools/delegate-task/unstable-agent-task.d.ts +2 -6
  62. package/package.json +14 -12
@@ -27,5 +27,6 @@ export declare function createChatParamsHandler(args: {
27
27
  anthropicEffort: {
28
28
  "chat.params"?: (input: ChatParamsHookInput, output: ChatParamsOutput) => Promise<void>;
29
29
  } | null;
30
+ client?: unknown;
30
31
  }): (input: unknown, output: unknown) => Promise<void>;
31
32
  export {};
@@ -1,11 +1,26 @@
1
- interface ModelMetadata {
1
+ export interface ModelMetadata {
2
2
  id: string;
3
3
  provider?: string;
4
4
  context?: number;
5
5
  output?: number;
6
6
  name?: string;
7
+ variants?: Record<string, unknown>;
8
+ limit?: {
9
+ context?: number;
10
+ input?: number;
11
+ output?: number;
12
+ };
13
+ modalities?: {
14
+ input?: string[];
15
+ output?: string[];
16
+ };
17
+ capabilities?: Record<string, unknown>;
18
+ reasoning?: boolean;
19
+ temperature?: boolean;
20
+ tool_call?: boolean;
21
+ [key: string]: unknown;
7
22
  }
8
- interface ProviderModelsCache {
23
+ export interface ProviderModelsCache {
9
24
  models: Record<string, string[] | ModelMetadata[]>;
10
25
  connected: string[];
11
26
  updatedAt: string;
@@ -16,7 +31,7 @@ export declare function createConnectedProvidersCacheStore(getCacheDir?: () => s
16
31
  readProviderModelsCache: () => ProviderModelsCache | null;
17
32
  hasProviderModelsCache: () => boolean;
18
33
  writeProviderModelsCache: (data: {
19
- models: Record<string, string[]>;
34
+ models: Record<string, string[] | ModelMetadata[]>;
20
35
  connected: string[];
21
36
  }) => void;
22
37
  updateConnectedProvidersCache: (client: {
@@ -33,8 +48,9 @@ export declare function createConnectedProvidersCacheStore(getCacheDir?: () => s
33
48
  };
34
49
  }) => Promise<void>;
35
50
  };
51
+ export declare function findProviderModelMetadata(providerID: string, modelID: string, cache?: ProviderModelsCache | null): ModelMetadata | undefined;
36
52
  export declare const readConnectedProvidersCache: () => string[] | null, hasConnectedProvidersCache: () => boolean, readProviderModelsCache: () => ProviderModelsCache | null, hasProviderModelsCache: () => boolean, writeProviderModelsCache: (data: {
37
- models: Record<string, string[]>;
53
+ models: Record<string, string[] | ModelMetadata[]>;
38
54
  connected: string[];
39
55
  }) => void, updateConnectedProvidersCache: (client: {
40
56
  provider?: {
@@ -49,4 +65,3 @@ export declare const readConnectedProvidersCache: () => string[] | null, hasConn
49
65
  }>;
50
66
  };
51
67
  }) => Promise<void>;
52
- export {};
@@ -1,3 +1,12 @@
1
1
  import type { FallbackEntry } from "./model-requirements";
2
+ import type { FallbackModelObject } from "../config/schema/fallback-models";
2
3
  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;
4
+ export declare function parseFallbackModelObjectEntry(obj: FallbackModelObject, contextProviderID: string | undefined, defaultProviderID?: string): FallbackEntry | undefined;
5
+ /**
6
+ * Find the most specific FallbackEntry whose `provider/model` is a prefix of
7
+ * the resolved `provider/modelID`. Longest match wins so that e.g.
8
+ * `openai/gpt-5.4-preview` picks the entry for `openai/gpt-5.4-preview` over
9
+ * the shorter `openai/gpt-5.4`.
10
+ */
11
+ export declare function findMostSpecificFallbackEntry(providerID: string, modelID: string, chain: FallbackEntry[]): FallbackEntry | undefined;
12
+ export declare function buildFallbackChainFromModels(fallbackModels: string | (string | FallbackModelObject)[] | undefined, contextProviderID: string | undefined, defaultProviderID?: string): FallbackEntry[] | undefined;
@@ -31,10 +31,14 @@ export * from "./agent-tool-restrictions";
31
31
  export * from "./model-requirements";
32
32
  export * from "./model-resolver";
33
33
  export { normalizeModel, normalizeModelID } from "./model-normalization";
34
- export { normalizeFallbackModels } from "./model-resolver";
34
+ export { normalizeFallbackModels, flattenToFallbackModelStrings } from "./model-resolver";
35
35
  export { resolveModelPipeline } from "./model-resolution-pipeline";
36
36
  export type { ModelResolutionRequest, ModelResolutionProvenance, ModelResolutionResult, } from "./model-resolution-types";
37
37
  export * from "./model-availability";
38
+ export * from "./model-capabilities";
39
+ export * from "./model-capabilities-cache";
40
+ export * from "./model-capability-heuristics";
41
+ export * from "./model-settings-compatibility";
38
42
  export * from "./fallback-model-availability";
39
43
  export * from "./connected-providers-cache";
40
44
  export * from "./context-limit-resolver";
@@ -50,6 +54,7 @@ export * from "./truncate-description";
50
54
  export * from "./opencode-storage-paths";
51
55
  export * from "./opencode-message-dir";
52
56
  export * from "./opencode-command-dirs";
57
+ export * from "./project-discovery-dirs";
53
58
  export * from "./normalize-sdk-response";
54
59
  export * from "./session-directory-resolver";
55
60
  export * from "./prompt-tools";
@@ -57,3 +62,4 @@ export * from "./internal-initiator-marker";
57
62
  export * from "./plugin-command-discovery";
58
63
  export { SessionCategoryRegistry } from "./session-category-registry";
59
64
  export * from "./plugin-identity";
65
+ export * from "./log-legacy-plugin-startup-warning";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Canonical set of recognised variant / effort tokens.
3
+ * Used by parseFallbackModelEntry (space-suffix detection) and
4
+ * flattenToFallbackModelStrings (inline-variant stripping).
5
+ */
6
+ export declare const KNOWN_VARIANTS: Set<string>;
@@ -0,0 +1,6 @@
1
+ export interface LegacyPluginCheckResult {
2
+ hasLegacyEntry: boolean;
3
+ hasCanonicalEntry: boolean;
4
+ legacyEntries: string[];
5
+ }
6
+ export declare function checkForLegacyPluginEntry(overrideConfigDir?: string): LegacyPluginCheckResult;
@@ -0,0 +1 @@
1
+ export declare function logLegacyPluginStartupWarning(): void;
@@ -0,0 +1,20 @@
1
+ import type { ModelCapabilitiesSnapshot } from "./model-capabilities";
2
+ export declare const MODELS_DEV_SOURCE_URL = "https://models.dev/api.json";
3
+ export declare function buildModelCapabilitiesSnapshotFromModelsDev(raw: unknown): ModelCapabilitiesSnapshot;
4
+ export declare function fetchModelCapabilitiesSnapshot(args?: {
5
+ sourceUrl?: string;
6
+ fetchImpl?: typeof fetch;
7
+ }): Promise<ModelCapabilitiesSnapshot>;
8
+ export declare function createModelCapabilitiesCacheStore(getCacheDir?: () => string): {
9
+ readModelCapabilitiesCache: () => ModelCapabilitiesSnapshot | null;
10
+ hasModelCapabilitiesCache: () => boolean;
11
+ writeModelCapabilitiesCache: (snapshot: ModelCapabilitiesSnapshot) => void;
12
+ refreshModelCapabilitiesCache: (args?: {
13
+ sourceUrl?: string;
14
+ fetchImpl?: typeof fetch;
15
+ }) => Promise<ModelCapabilitiesSnapshot>;
16
+ };
17
+ export declare const readModelCapabilitiesCache: () => ModelCapabilitiesSnapshot | null, hasModelCapabilitiesCache: () => boolean, writeModelCapabilitiesCache: (snapshot: ModelCapabilitiesSnapshot) => void, refreshModelCapabilitiesCache: (args?: {
18
+ sourceUrl?: string;
19
+ fetchImpl?: typeof fetch;
20
+ }) => Promise<ModelCapabilitiesSnapshot>;
@@ -0,0 +1,91 @@
1
+ import { type ModelMetadata } from "./connected-providers-cache";
2
+ export type ModelCapabilitiesSnapshotEntry = {
3
+ id: string;
4
+ family?: string;
5
+ reasoning?: boolean;
6
+ temperature?: boolean;
7
+ toolCall?: boolean;
8
+ modalities?: {
9
+ input?: string[];
10
+ output?: string[];
11
+ };
12
+ limit?: {
13
+ context?: number;
14
+ input?: number;
15
+ output?: number;
16
+ };
17
+ };
18
+ export type ModelCapabilitiesSnapshot = {
19
+ generatedAt: string;
20
+ sourceUrl: string;
21
+ models: Record<string, ModelCapabilitiesSnapshotEntry>;
22
+ };
23
+ export type ModelCapabilities = {
24
+ requestedModelID: string;
25
+ canonicalModelID: string;
26
+ family?: string;
27
+ variants?: string[];
28
+ reasoningEfforts?: string[];
29
+ reasoning?: boolean;
30
+ supportsThinking?: boolean;
31
+ supportsTemperature?: boolean;
32
+ supportsTopP?: boolean;
33
+ maxOutputTokens?: number;
34
+ toolCall?: boolean;
35
+ modalities?: {
36
+ input?: string[];
37
+ output?: string[];
38
+ };
39
+ diagnostics: ModelCapabilitiesDiagnostics;
40
+ };
41
+ type GetModelCapabilitiesInput = {
42
+ providerID: string;
43
+ modelID: string;
44
+ runtimeModel?: ModelMetadata | Record<string, unknown>;
45
+ runtimeSnapshot?: ModelCapabilitiesSnapshot;
46
+ bundledSnapshot?: ModelCapabilitiesSnapshot;
47
+ };
48
+ type DiagnosticSource = "none" | "runtime" | "runtime-snapshot" | "bundled-snapshot" | "override" | "heuristic" | "canonical" | "exact-alias" | "pattern-alias";
49
+ export type ModelCapabilitiesDiagnostics = {
50
+ resolutionMode: "snapshot-backed" | "alias-backed" | "heuristic-backed" | "unknown";
51
+ canonicalization: {
52
+ source: "canonical" | "exact-alias" | "pattern-alias";
53
+ ruleID?: string;
54
+ };
55
+ snapshot: {
56
+ source: "runtime-snapshot" | "bundled-snapshot" | "none";
57
+ };
58
+ family: {
59
+ source: "snapshot" | "heuristic" | "none";
60
+ };
61
+ variants: {
62
+ source: Exclude<DiagnosticSource, "runtime-snapshot" | "bundled-snapshot" | "exact-alias" | "pattern-alias">;
63
+ };
64
+ reasoningEfforts: {
65
+ source: Exclude<DiagnosticSource, "runtime-snapshot" | "bundled-snapshot" | "canonical" | "exact-alias" | "pattern-alias" | "runtime">;
66
+ };
67
+ reasoning: {
68
+ source: "runtime" | "runtime-snapshot" | "bundled-snapshot" | "none";
69
+ };
70
+ supportsThinking: {
71
+ source: "runtime" | "override" | "heuristic" | "runtime-snapshot" | "bundled-snapshot" | "none";
72
+ };
73
+ supportsTemperature: {
74
+ source: "runtime" | "override" | "runtime-snapshot" | "bundled-snapshot" | "none";
75
+ };
76
+ supportsTopP: {
77
+ source: "runtime" | "override" | "none";
78
+ };
79
+ maxOutputTokens: {
80
+ source: "runtime" | "runtime-snapshot" | "bundled-snapshot" | "none";
81
+ };
82
+ toolCall: {
83
+ source: "runtime" | "runtime-snapshot" | "bundled-snapshot" | "none";
84
+ };
85
+ modalities: {
86
+ source: "runtime" | "runtime-snapshot" | "bundled-snapshot" | "none";
87
+ };
88
+ };
89
+ export declare function getBundledModelCapabilitiesSnapshot(): ModelCapabilitiesSnapshot;
90
+ export declare function getModelCapabilities(input: GetModelCapabilitiesInput): ModelCapabilities;
91
+ export {};
@@ -0,0 +1,21 @@
1
+ export type ExactAliasRule = {
2
+ aliasModelID: string;
3
+ ruleID: string;
4
+ canonicalModelID: string;
5
+ rationale: string;
6
+ };
7
+ export type PatternAliasRule = {
8
+ ruleID: string;
9
+ description: string;
10
+ match: (normalizedModelID: string) => boolean;
11
+ canonicalize: (normalizedModelID: string) => string;
12
+ };
13
+ export type ModelIDAliasResolution = {
14
+ requestedModelID: string;
15
+ canonicalModelID: string;
16
+ source: "canonical" | "exact-alias" | "pattern-alias";
17
+ ruleID?: string;
18
+ };
19
+ export declare function resolveModelIDAlias(modelID: string): ModelIDAliasResolution;
20
+ export declare function getExactModelIDAliasRules(): ReadonlyArray<ExactAliasRule>;
21
+ export declare function getPatternModelIDAliasRules(): ReadonlyArray<PatternAliasRule>;
@@ -0,0 +1,38 @@
1
+ import type { ModelCapabilitiesSnapshot } from "./model-capabilities";
2
+ export type ModelCapabilityGuardrailIssue = {
3
+ kind: "alias-target-missing-from-snapshot";
4
+ ruleID: string;
5
+ aliasModelID: string;
6
+ canonicalModelID: string;
7
+ message: string;
8
+ } | {
9
+ kind: "exact-alias-collides-with-snapshot";
10
+ ruleID: string;
11
+ aliasModelID: string;
12
+ canonicalModelID: string;
13
+ message: string;
14
+ } | {
15
+ kind: "pattern-alias-collides-with-snapshot";
16
+ ruleID: string;
17
+ modelID: string;
18
+ canonicalModelID: string;
19
+ message: string;
20
+ } | {
21
+ kind: "built-in-model-relies-on-alias";
22
+ modelID: string;
23
+ canonicalModelID: string;
24
+ ruleID: string;
25
+ message: string;
26
+ } | {
27
+ kind: "built-in-model-missing-from-snapshot";
28
+ modelID: string;
29
+ canonicalModelID: string;
30
+ message: string;
31
+ };
32
+ type CollectModelCapabilityGuardrailIssuesInput = {
33
+ snapshot?: ModelCapabilitiesSnapshot;
34
+ requirementModelIDs?: Iterable<string>;
35
+ };
36
+ export declare function getBuiltInRequirementModelIDs(): string[];
37
+ export declare function collectModelCapabilityGuardrailIssues(input?: CollectModelCapabilityGuardrailIssuesInput): ModelCapabilityGuardrailIssue[];
38
+ export {};
@@ -0,0 +1,10 @@
1
+ export type HeuristicModelFamilyDefinition = {
2
+ family: string;
3
+ includes?: string[];
4
+ pattern?: RegExp;
5
+ variants?: string[];
6
+ reasoningEfforts?: string[];
7
+ supportsThinking?: boolean;
8
+ };
9
+ export declare const HEURISTIC_MODEL_FAMILY_REGISTRY: ReadonlyArray<HeuristicModelFamilyDefinition>;
10
+ export declare function detectHeuristicModelFamily(modelID: string): HeuristicModelFamilyDefinition | undefined;
@@ -2,6 +2,14 @@ export type FallbackEntry = {
2
2
  providers: string[];
3
3
  model: string;
4
4
  variant?: string;
5
+ reasoningEffort?: string;
6
+ temperature?: number;
7
+ top_p?: number;
8
+ maxTokens?: number;
9
+ thinking?: {
10
+ type: "enabled" | "disabled";
11
+ budgetTokens?: number;
12
+ };
5
13
  };
6
14
  export type ModelRequirement = {
7
15
  fallbackChain: FallbackEntry[];
@@ -1,4 +1,17 @@
1
1
  import type { FallbackEntry } from "./model-requirements";
2
+ export interface DelegatedModelConfig {
3
+ providerID: string;
4
+ modelID: string;
5
+ variant?: string;
6
+ reasoningEffort?: string;
7
+ temperature?: number;
8
+ top_p?: number;
9
+ maxTokens?: number;
10
+ thinking?: {
11
+ type: "enabled" | "disabled";
12
+ budgetTokens?: number;
13
+ };
14
+ }
2
15
  export type ModelResolutionRequest = {
3
16
  intent?: {
4
17
  uiSelectedModel?: string;
@@ -1,4 +1,5 @@
1
1
  import type { FallbackEntry } from "./model-requirements";
2
+ import type { FallbackModelObject } from "../config/schema/fallback-models";
2
3
  export type ModelResolutionInput = {
3
4
  userModel?: string;
4
5
  inheritedModel?: string;
@@ -22,7 +23,13 @@ export type ExtendedModelResolutionInput = {
22
23
  export declare function resolveModel(input: ModelResolutionInput): string | undefined;
23
24
  export declare function resolveModelWithFallback(input: ExtendedModelResolutionInput): ModelResolutionResult | undefined;
24
25
  /**
25
- * Normalizes fallback_models config (which can be string or string[]) to string[]
26
- * Centralized helper to avoid duplicated normalization logic
26
+ * Normalizes fallback_models config to a mixed array.
27
+ * Accepts string, string[], or mixed arrays of strings and FallbackModelObject entries.
27
28
  */
28
- export declare function normalizeFallbackModels(models: string | string[] | undefined): string[] | undefined;
29
+ export declare function normalizeFallbackModels(models: string | (string | FallbackModelObject)[] | undefined): (string | FallbackModelObject)[] | undefined;
30
+ /**
31
+ * Extracts plain model strings from a mixed fallback models array.
32
+ * Object entries are flattened to "model" or "model(variant)" strings.
33
+ * Use this when consumers need string[] (e.g., resolveModelForDelegateTask).
34
+ */
35
+ export declare function flattenToFallbackModelStrings(models: (string | FallbackModelObject)[] | undefined): string[] | undefined;
@@ -0,0 +1,40 @@
1
+ type CompatibilityField = "variant" | "reasoningEffort" | "temperature" | "topP" | "maxTokens" | "thinking";
2
+ type DesiredModelSettings = {
3
+ variant?: string;
4
+ reasoningEffort?: string;
5
+ temperature?: number;
6
+ topP?: number;
7
+ maxTokens?: number;
8
+ thinking?: Record<string, unknown>;
9
+ };
10
+ type CompatibilityCapabilities = {
11
+ variants?: string[];
12
+ reasoningEfforts?: string[];
13
+ supportsTemperature?: boolean;
14
+ supportsTopP?: boolean;
15
+ maxOutputTokens?: number;
16
+ supportsThinking?: boolean;
17
+ };
18
+ export type ModelSettingsCompatibilityInput = {
19
+ providerID: string;
20
+ modelID: string;
21
+ desired: DesiredModelSettings;
22
+ capabilities?: CompatibilityCapabilities;
23
+ };
24
+ export type ModelSettingsCompatibilityChange = {
25
+ field: CompatibilityField;
26
+ from: string;
27
+ to?: string;
28
+ reason: "unsupported-by-model-family" | "unknown-model-family" | "unsupported-by-model-metadata" | "max-output-limit";
29
+ };
30
+ export type ModelSettingsCompatibilityResult = {
31
+ variant?: string;
32
+ reasoningEffort?: string;
33
+ temperature?: number;
34
+ topP?: number;
35
+ maxTokens?: number;
36
+ thinking?: Record<string, unknown>;
37
+ changes: ModelSettingsCompatibilityChange[];
38
+ };
39
+ export declare function resolveCompatibleModelSettings(input: ModelSettingsCompatibilityInput): ModelSettingsCompatibilityResult;
40
+ export {};
@@ -1,5 +1,6 @@
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";
1
+ export declare const PLUGIN_NAME = "oh-my-openagent";
2
+ export declare const LEGACY_PLUGIN_NAME = "oh-my-opencode";
3
+ export declare const CONFIG_BASENAME = "oh-my-openagent";
4
+ export declare const LEGACY_CONFIG_BASENAME = "oh-my-opencode";
4
5
  export declare const LOG_FILENAME = "oh-my-opencode.log";
5
6
  export declare const CACHE_DIR_NAME = "oh-my-opencode";
@@ -0,0 +1,4 @@
1
+ export declare function findProjectClaudeSkillDirs(startDirectory: string, stopDirectory?: string): string[];
2
+ export declare function findProjectAgentsSkillDirs(startDirectory: string, stopDirectory?: string): string[];
3
+ export declare function findProjectOpencodeSkillDirs(startDirectory: string, stopDirectory?: string): string[];
4
+ export declare function findProjectOpencodeCommandDirs(startDirectory: string, stopDirectory?: string): string[];
@@ -0,0 +1,12 @@
1
+ type PromptParamModel = {
2
+ temperature?: number;
3
+ top_p?: number;
4
+ reasoningEffort?: string;
5
+ maxTokens?: number;
6
+ thinking?: {
7
+ type: "enabled" | "disabled";
8
+ budgetTokens?: number;
9
+ };
10
+ };
11
+ export declare function applySessionPromptParams(sessionID: string, model: PromptParamModel | undefined): void;
12
+ export {};
@@ -0,0 +1,9 @@
1
+ export type SessionPromptParams = {
2
+ temperature?: number;
3
+ topP?: number;
4
+ options?: Record<string, unknown>;
5
+ };
6
+ export declare function setSessionPromptParams(sessionID: string, params: SessionPromptParams): void;
7
+ export declare function getSessionPromptParams(sessionID: string): SessionPromptParams | undefined;
8
+ export declare function clearSessionPromptParams(sessionID: string): void;
9
+ export declare function clearAllSessionPromptParams(): void;
@@ -1,8 +1,4 @@
1
- import type { DelegateTaskArgs, ToolContextWithMetadata } from "./types";
1
+ import type { DelegateTaskArgs, ToolContextWithMetadata, DelegatedModelConfig } from "./types";
2
2
  import type { ExecutorContext, ParentContext } from "./executor-types";
3
3
  import type { FallbackEntry } from "../../shared/model-requirements";
4
- export declare function executeBackgroundTask(args: DelegateTaskArgs, ctx: ToolContextWithMetadata, executorCtx: ExecutorContext, parentContext: ParentContext, agentToUse: string, categoryModel: {
5
- providerID: string;
6
- modelID: string;
7
- variant?: string;
8
- } | undefined, systemContent: string | undefined, fallbackChain?: FallbackEntry[]): Promise<string>;
4
+ export declare function executeBackgroundTask(args: DelegateTaskArgs, ctx: ToolContextWithMetadata, executorCtx: ExecutorContext, parentContext: ParentContext, agentToUse: string, categoryModel: DelegatedModelConfig | undefined, systemContent: string | undefined, fallbackChain?: FallbackEntry[]): Promise<string>;
@@ -2,13 +2,10 @@ import type { ModelFallbackInfo } from "../../features/task-toast-manager/types"
2
2
  import type { DelegateTaskArgs } from "./types";
3
3
  import type { ExecutorContext } from "./executor-types";
4
4
  import type { FallbackEntry } from "../../shared/model-requirements";
5
+ import type { DelegatedModelConfig } from "./types";
5
6
  export interface CategoryResolutionResult {
6
7
  agentToUse: string;
7
- categoryModel: {
8
- providerID: string;
9
- modelID: string;
10
- variant?: string;
11
- } | undefined;
8
+ categoryModel: DelegatedModelConfig | undefined;
12
9
  categoryPromptAppend: string | undefined;
13
10
  maxPromptTokens?: number;
14
11
  modelInfo: ModelFallbackInfo | undefined;
@@ -10,6 +10,8 @@ export declare function resolveModelForDelegateTask(input: {
10
10
  }): {
11
11
  model: string;
12
12
  variant?: string;
13
+ fallbackEntry?: FallbackEntry;
14
+ matchedFallback?: boolean;
13
15
  } | {
14
16
  skipped: true;
15
17
  } | undefined;
@@ -1,13 +1,10 @@
1
1
  import type { DelegateTaskArgs } from "./types";
2
2
  import type { ExecutorContext } from "./executor-types";
3
+ import type { DelegatedModelConfig } from "./types";
3
4
  import type { FallbackEntry } from "../../shared/model-requirements";
4
- export declare function resolveSubagentExecution(args: DelegateTaskArgs, executorCtx: ExecutorContext, parentAgent: string | undefined, categoryExamples: string, inheritedModel?: string): Promise<{
5
+ export declare function resolveSubagentExecution(args: DelegateTaskArgs, executorCtx: ExecutorContext, parentAgent: string | undefined, categoryExamples: string): Promise<{
5
6
  agentToUse: string;
6
- categoryModel: {
7
- providerID: string;
8
- modelID: string;
9
- variant?: string;
10
- } | undefined;
7
+ categoryModel: DelegatedModelConfig | undefined;
11
8
  fallbackChain?: FallbackEntry[];
12
9
  error?: string;
13
10
  }>;
@@ -1,4 +1,4 @@
1
- import type { DelegateTaskArgs, OpencodeClient } from "./types";
1
+ import type { DelegateTaskArgs, OpencodeClient, DelegatedModelConfig } from "./types";
2
2
  import { promptSyncWithModelSuggestionRetry, promptWithModelSuggestionRetry } from "../../shared/model-suggestion-retry";
3
3
  type SendSyncPromptDeps = {
4
4
  promptWithModelSuggestionRetry: typeof promptWithModelSuggestionRetry;
@@ -9,11 +9,7 @@ export declare function sendSyncPrompt(client: OpencodeClient, input: {
9
9
  agentToUse: string;
10
10
  args: DelegateTaskArgs;
11
11
  systemContent: string | undefined;
12
- categoryModel: {
13
- providerID: string;
14
- modelID: string;
15
- variant?: string;
16
- } | undefined;
12
+ categoryModel: DelegatedModelConfig | undefined;
17
13
  toastManager: {
18
14
  removeTask: (id: string) => void;
19
15
  } | null | undefined;
@@ -9,4 +9,5 @@ export declare function pollSyncSession(ctx: ToolContextWithMetadata, client: Op
9
9
  } | null | undefined;
10
10
  taskId: string | undefined;
11
11
  anchorMessageCount?: number;
12
+ maxAssistantTurns?: number;
12
13
  }, timeoutMs?: number): Promise<string | null>;
@@ -1,9 +1,5 @@
1
1
  import type { ModelFallbackInfo } from "../../features/task-toast-manager/types";
2
- import type { DelegateTaskArgs, ToolContextWithMetadata } from "./types";
2
+ import type { DelegateTaskArgs, ToolContextWithMetadata, DelegatedModelConfig } from "./types";
3
3
  import type { ExecutorContext, ParentContext } from "./executor-types";
4
4
  import { type SyncTaskDeps } from "./sync-task-deps";
5
- export declare function executeSyncTask(args: DelegateTaskArgs, ctx: ToolContextWithMetadata, executorCtx: ExecutorContext, parentContext: ParentContext, agentToUse: string, categoryModel: {
6
- providerID: string;
7
- modelID: string;
8
- variant?: string;
9
- } | undefined, systemContent: string | undefined, modelInfo?: ModelFallbackInfo, fallbackChain?: import("../../shared/model-requirements").FallbackEntry[], deps?: SyncTaskDeps): Promise<string>;
5
+ export declare function executeSyncTask(args: DelegateTaskArgs, ctx: ToolContextWithMetadata, executorCtx: ExecutorContext, parentContext: ParentContext, agentToUse: string, categoryModel: DelegatedModelConfig | undefined, systemContent: string | undefined, modelInfo?: ModelFallbackInfo, fallbackChain?: import("../../shared/model-requirements").FallbackEntry[], deps?: SyncTaskDeps): Promise<string>;
@@ -65,6 +65,8 @@ export interface DelegateTaskToolOptions {
65
65
  onSyncSessionCreated?: (event: SyncSessionCreatedEvent) => Promise<void>;
66
66
  syncPollTimeoutMs?: number;
67
67
  }
68
+ import type { DelegatedModelConfig } from "../../shared/model-resolution-types";
69
+ export type { DelegatedModelConfig };
68
70
  export interface BuildSystemContentInput {
69
71
  skillContent?: string;
70
72
  skillContents?: string[];
@@ -72,11 +74,7 @@ export interface BuildSystemContentInput {
72
74
  agentsContext?: string;
73
75
  planAgentPrepend?: string;
74
76
  maxPromptTokens?: number;
75
- model?: {
76
- providerID: string;
77
- modelID: string;
78
- variant?: string;
79
- };
77
+ model?: DelegatedModelConfig;
80
78
  agentName?: string;
81
79
  availableCategories?: AvailableCategory[];
82
80
  availableSkills?: AvailableSkill[];
@@ -1,7 +1,3 @@
1
- import type { DelegateTaskArgs, ToolContextWithMetadata } from "./types";
1
+ import type { DelegateTaskArgs, ToolContextWithMetadata, DelegatedModelConfig } from "./types";
2
2
  import type { ExecutorContext, ParentContext } from "./executor-types";
3
- export declare function executeUnstableAgentTask(args: DelegateTaskArgs, ctx: ToolContextWithMetadata, executorCtx: ExecutorContext, parentContext: ParentContext, agentToUse: string, categoryModel: {
4
- providerID: string;
5
- modelID: string;
6
- variant?: string;
7
- } | undefined, systemContent: string | undefined, actualModel: string | undefined): Promise<string>;
3
+ export declare function executeUnstableAgentTask(args: DelegateTaskArgs, ctx: ToolContextWithMetadata, executorCtx: ExecutorContext, parentContext: ParentContext, agentToUse: string, categoryModel: DelegatedModelConfig | undefined, systemContent: string | undefined, actualModel: string | undefined): Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode",
3
- "version": "3.13.1",
3
+ "version": "3.14.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",
@@ -25,10 +25,12 @@
25
25
  "build:all": "bun run build && bun run build:binaries",
26
26
  "build:binaries": "bun run script/build-binaries.ts",
27
27
  "build:schema": "bun run script/build-schema.ts",
28
+ "build:model-capabilities": "bun run script/build-model-capabilities.ts",
28
29
  "clean": "rm -rf dist",
29
30
  "prepare": "bun run build",
30
31
  "postinstall": "node postinstall.mjs",
31
32
  "prepublishOnly": "bun run clean && bun run build",
33
+ "test:model-capabilities": "bun test src/shared/model-capability-aliases.test.ts src/shared/model-capability-guardrails.test.ts src/shared/model-capabilities.test.ts src/cli/doctor/checks/model-resolution.test.ts --bail",
32
34
  "typecheck": "tsc --noEmit",
33
35
  "test": "bun test"
34
36
  },
@@ -76,17 +78,17 @@
76
78
  "typescript": "^5.7.3"
77
79
  },
78
80
  "optionalDependencies": {
79
- "oh-my-opencode-darwin-arm64": "3.13.1",
80
- "oh-my-opencode-darwin-x64": "3.13.1",
81
- "oh-my-opencode-darwin-x64-baseline": "3.13.1",
82
- "oh-my-opencode-linux-arm64": "3.13.1",
83
- "oh-my-opencode-linux-arm64-musl": "3.13.1",
84
- "oh-my-opencode-linux-x64": "3.13.1",
85
- "oh-my-opencode-linux-x64-baseline": "3.13.1",
86
- "oh-my-opencode-linux-x64-musl": "3.13.1",
87
- "oh-my-opencode-linux-x64-musl-baseline": "3.13.1",
88
- "oh-my-opencode-windows-x64": "3.13.1",
89
- "oh-my-opencode-windows-x64-baseline": "3.13.1"
81
+ "oh-my-opencode-darwin-arm64": "3.14.0",
82
+ "oh-my-opencode-darwin-x64": "3.14.0",
83
+ "oh-my-opencode-darwin-x64-baseline": "3.14.0",
84
+ "oh-my-opencode-linux-arm64": "3.14.0",
85
+ "oh-my-opencode-linux-arm64-musl": "3.14.0",
86
+ "oh-my-opencode-linux-x64": "3.14.0",
87
+ "oh-my-opencode-linux-x64-baseline": "3.14.0",
88
+ "oh-my-opencode-linux-x64-musl": "3.14.0",
89
+ "oh-my-opencode-linux-x64-musl-baseline": "3.14.0",
90
+ "oh-my-opencode-windows-x64": "3.14.0",
91
+ "oh-my-opencode-windows-x64-baseline": "3.14.0"
90
92
  },
91
93
  "overrides": {
92
94
  "@opencode-ai/sdk": "^1.2.24"