opencode-matrixx 2.4.0 → 2.6.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 (186) hide show
  1. package/README.md +181 -8
  2. package/dist/agents/builtin-agents/available-skills.d.ts +2 -2
  3. package/dist/agents/builtin-agents.d.ts +2 -2
  4. package/dist/agents/construct.d.ts +3 -3
  5. package/dist/agents/dynamic-agent-prompt-builder.d.ts +3 -0
  6. package/dist/agents/index.d.ts +3 -3
  7. package/dist/agents/operator.d.ts +3 -3
  8. package/dist/agents/oracle/identity-constraints.d.ts +1 -1
  9. package/dist/agents/oracle/system-prompt.d.ts +2 -2
  10. package/dist/agents/trinity.d.ts +3 -3
  11. package/dist/cli/doctor/checks/auth.d.ts +2 -0
  12. package/dist/cli/doctor/checks/config.d.ts +2 -0
  13. package/dist/cli/doctor/checks/index.d.ts +10 -0
  14. package/dist/cli/doctor/checks/mcp.d.ts +2 -0
  15. package/dist/cli/doctor/checks/optional.d.ts +2 -0
  16. package/dist/cli/doctor/checks/plugin.d.ts +2 -0
  17. package/dist/cli/doctor/checks/runtime.d.ts +2 -0
  18. package/dist/cli/doctor/format.d.ts +3 -0
  19. package/dist/cli/doctor/index.d.ts +9 -0
  20. package/dist/cli/doctor/types.d.ts +24 -0
  21. package/dist/cli/index.d.ts +13 -0
  22. package/dist/cli/install/index.d.ts +12 -0
  23. package/dist/cli.js +927 -0
  24. package/dist/config/index.d.ts +1 -1
  25. package/dist/config/schema/dcp.d.ts +231 -2
  26. package/dist/config/schema/evolution.d.ts +89 -0
  27. package/dist/config/schema/headroom.d.ts +23 -0
  28. package/dist/config/schema/hooks.d.ts +7 -1
  29. package/dist/config/schema/matrixx-config.d.ts +134 -9
  30. package/dist/config/schema.d.ts +3 -3
  31. package/dist/create-hooks.d.ts +8 -3
  32. package/dist/create-managers.d.ts +0 -2
  33. package/dist/create-tools.d.ts +3 -3
  34. package/dist/features/background-agent/error-helpers.d.ts +0 -2
  35. package/dist/features/builtin-commands/templates/dcp-profile.d.ts +1 -1
  36. package/dist/features/builtin-commands/templates/evolution.d.ts +1 -0
  37. package/dist/features/builtin-commands/types.d.ts +1 -1
  38. package/dist/features/builtin-skills/types.d.ts +10 -1
  39. package/dist/features/command-loader/index.d.ts +1 -1
  40. package/dist/features/evolution/compressor/index.d.ts +5 -0
  41. package/dist/features/evolution/compressor/interface.d.ts +5 -0
  42. package/dist/features/evolution/compressor/llm.d.ts +12 -0
  43. package/dist/features/evolution/evaluator.d.ts +11 -0
  44. package/dist/features/evolution/index.d.ts +7 -0
  45. package/dist/features/evolution/pipeline.d.ts +7 -0
  46. package/dist/features/evolution/store.d.ts +22 -0
  47. package/dist/features/evolution/types.d.ts +51 -0
  48. package/dist/features/evolution/writer.d.ts +20 -0
  49. package/dist/features/task-storage/types.d.ts +2 -2
  50. package/dist/features/task-toast-manager/types.d.ts +2 -2
  51. package/dist/hooks/anthropic-context-window-limit-recovery/message-builder.d.ts +0 -1
  52. package/dist/hooks/anthropic-context-window-limit-recovery/tool-part-types.d.ts +2 -1
  53. package/dist/hooks/auto-slash-command/executor.d.ts +5 -2
  54. package/dist/hooks/auto-slash-command/hook.d.ts +4 -2
  55. package/dist/hooks/evolution-compressor/index.d.ts +15 -0
  56. package/dist/hooks/evolution-hitl/index.d.ts +12 -0
  57. package/dist/hooks/evolution-quality-gate/index.d.ts +6 -0
  58. package/dist/hooks/evolution-watcher/index.d.ts +21 -0
  59. package/dist/hooks/evolution-watcher/utils.d.ts +5 -0
  60. package/dist/hooks/index.d.ts +7 -1
  61. package/dist/hooks/keyword-detector/analyze/default.d.ts +1 -1
  62. package/dist/hooks/keyword-detector/constants.d.ts +1 -1
  63. package/dist/hooks/keyword-detector/search/default.d.ts +1 -1
  64. package/dist/hooks/keyword-detector/ultrawork/deepseek.d.ts +16 -0
  65. package/dist/hooks/keyword-detector/ultrawork/default.d.ts +5 -2
  66. package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +12 -0
  67. package/dist/hooks/keyword-detector/ultrawork/glm.d.ts +11 -0
  68. package/dist/hooks/keyword-detector/ultrawork/gpt5.2.d.ts +4 -7
  69. package/dist/hooks/keyword-detector/ultrawork/index.d.ts +12 -4
  70. package/dist/hooks/keyword-detector/ultrawork/mimo.d.ts +16 -0
  71. package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +18 -6
  72. package/dist/hooks/matrix-loop/with-timeout.d.ts +1 -1
  73. package/dist/hooks/mcp-startup-notification/index.d.ts +9 -0
  74. package/dist/hooks/{prometheus-md-only → oracle-md-only}/constants.d.ts +2 -2
  75. package/dist/hooks/session-recovery/types.d.ts +2 -1
  76. package/dist/hooks/task-todo-mirror/constants.d.ts +3 -0
  77. package/dist/hooks/task-todo-mirror/hook.d.ts +43 -0
  78. package/dist/hooks/task-todo-mirror/index.d.ts +2 -0
  79. package/dist/hooks/think-mode/types.d.ts +3 -0
  80. package/dist/index.js +85417 -96112
  81. package/dist/matrixx.schema.json +5412 -0
  82. package/dist/mcp/index.d.ts +10 -1
  83. package/dist/mcp/mcp-startup-state.d.ts +4 -0
  84. package/dist/mcp/mcp-validator.d.ts +13 -0
  85. package/dist/plugin/hooks/create-continuation-hooks.d.ts +3 -1
  86. package/dist/plugin/hooks/create-core-hooks.d.ts +4 -1
  87. package/dist/plugin/hooks/create-session-hooks.d.ts +3 -2
  88. package/dist/plugin/hooks/create-skill-hooks.d.ts +2 -2
  89. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +3 -1
  90. package/dist/plugin/skill-context.d.ts +2 -2
  91. package/dist/plugin/tool-registry.d.ts +1 -1
  92. package/dist/plugin-handlers/agent-config-handler.d.ts +1 -0
  93. package/dist/plugin-handlers/index.d.ts +1 -1
  94. package/dist/plugin-handlers/plan-model-inheritance.d.ts +1 -1
  95. package/dist/shared/delay.d.ts +1 -0
  96. package/dist/shared/error-formatting.d.ts +1 -0
  97. package/dist/shared/format-bytes.d.ts +1 -0
  98. package/dist/shared/format-bytes.test.d.ts +1 -0
  99. package/dist/shared/index.d.ts +7 -9
  100. package/dist/shared/is-abort-error.test.d.ts +1 -0
  101. package/dist/shared/model-resolution-pipeline.d.ts +26 -1
  102. package/dist/shared/opencode-config-dir.d.ts +13 -2
  103. package/dist/shared/sentinels.d.ts +2 -0
  104. package/dist/shared/session-state.d.ts +15 -0
  105. package/dist/shared/status-types.d.ts +1 -0
  106. package/dist/shared/system-directive.d.ts +1 -1
  107. package/dist/shared/with-timeout.d.ts +1 -0
  108. package/dist/shared/with-timeout.test.d.ts +1 -0
  109. package/dist/tools/background-task/delay.d.ts +1 -1
  110. package/dist/tools/dcp-switch-profile/index.d.ts +1 -0
  111. package/dist/tools/dcp-switch-profile/tools.d.ts +8 -0
  112. package/dist/tools/delegate-agent/constants.d.ts +1 -1
  113. package/dist/tools/delegate-task/constants.d.ts +1 -1
  114. package/dist/tools/delegate-task/skill-resolver.d.ts +2 -2
  115. package/dist/tools/index.d.ts +2 -1
  116. package/dist/tools/pdf-extract-figures/index.d.ts +1 -0
  117. package/dist/tools/pdf-extract-figures/tools.d.ts +11 -0
  118. package/dist/tools/skill/types.d.ts +3 -7
  119. package/dist/tools/slashcommand/skill-command-converter.d.ts +2 -2
  120. package/dist/tools/slashcommand/types.d.ts +10 -3
  121. package/dist/tools/task/todo-sync.d.ts +1 -1
  122. package/dist/tools/task/types.d.ts +5 -5
  123. package/package.json +15 -4
  124. package/dist/config/schema/model-capabilities.d.ts +0 -8
  125. package/dist/features/agent-loader/index.d.ts +0 -2
  126. package/dist/features/agent-loader/loader.d.ts +0 -3
  127. package/dist/features/agent-loader/types.d.ts +0 -14
  128. package/dist/features/command-loader/loader.d.ts +0 -3
  129. package/dist/features/mcp-oauth/callback-server.d.ts +0 -11
  130. package/dist/features/mcp-oauth/dcr.d.ts +0 -28
  131. package/dist/features/mcp-oauth/discovery.d.ts +0 -8
  132. package/dist/features/mcp-oauth/oauth-authorization-flow.d.ts +0 -26
  133. package/dist/features/mcp-oauth/provider.d.ts +0 -29
  134. package/dist/features/mcp-oauth/step-up.d.ts +0 -9
  135. package/dist/features/mcp-oauth/storage.d.ts +0 -17
  136. package/dist/features/opencode-skill-loader/allowed-tools-parser.d.ts +0 -1
  137. package/dist/features/opencode-skill-loader/config-source-discovery.d.ts +0 -7
  138. package/dist/features/opencode-skill-loader/index.d.ts +0 -14
  139. package/dist/features/opencode-skill-loader/loaded-skill-from-path.d.ts +0 -9
  140. package/dist/features/opencode-skill-loader/loaded-skill-template-extractor.d.ts +0 -2
  141. package/dist/features/opencode-skill-loader/loader.d.ts +0 -17
  142. package/dist/features/opencode-skill-loader/merger/builtin-skill-converter.d.ts +0 -3
  143. package/dist/features/opencode-skill-loader/merger/config-skill-entry-loader.d.ts +0 -3
  144. package/dist/features/opencode-skill-loader/merger/scope-priority.d.ts +0 -2
  145. package/dist/features/opencode-skill-loader/merger/skill-definition-merger.d.ts +0 -3
  146. package/dist/features/opencode-skill-loader/merger/skills-config-normalizer.d.ts +0 -11
  147. package/dist/features/opencode-skill-loader/merger.d.ts +0 -8
  148. package/dist/features/opencode-skill-loader/skill-content.d.ts +0 -4
  149. package/dist/features/opencode-skill-loader/skill-deduplication.d.ts +0 -2
  150. package/dist/features/opencode-skill-loader/skill-definition-record.d.ts +0 -3
  151. package/dist/features/opencode-skill-loader/skill-directory-loader.d.ts +0 -8
  152. package/dist/features/opencode-skill-loader/skill-discovery.d.ts +0 -4
  153. package/dist/features/opencode-skill-loader/skill-mcp-config.d.ts +0 -3
  154. package/dist/features/opencode-skill-loader/skill-resolution-options.d.ts +0 -7
  155. package/dist/features/opencode-skill-loader/skill-template-resolver.d.ts +0 -11
  156. package/dist/features/opencode-skill-loader/types.d.ts +0 -34
  157. package/dist/features/skill-mcp-manager/cleanup.d.ts +0 -7
  158. package/dist/features/skill-mcp-manager/connection-type.d.ts +0 -6
  159. package/dist/features/skill-mcp-manager/connection.d.ts +0 -14
  160. package/dist/features/skill-mcp-manager/env-cleaner.d.ts +0 -2
  161. package/dist/features/skill-mcp-manager/env-expander.d.ts +0 -1
  162. package/dist/features/skill-mcp-manager/http-client.d.ts +0 -3
  163. package/dist/features/skill-mcp-manager/index.d.ts +0 -2
  164. package/dist/features/skill-mcp-manager/manager.d.ts +0 -20
  165. package/dist/features/skill-mcp-manager/oauth-handler.d.ts +0 -8
  166. package/dist/features/skill-mcp-manager/stdio-client.d.ts +0 -3
  167. package/dist/features/skill-mcp-manager/types.d.ts +0 -68
  168. package/dist/hooks/runtime-fallback/is-abort-error.d.ts +0 -1
  169. package/dist/shared/is-object.d.ts +0 -1
  170. package/dist/shared/model-resolution-types.d.ts +0 -27
  171. package/dist/shared/model-resolver.d.ts +0 -24
  172. package/dist/shared/opencode-config-dir-types.d.ts +0 -13
  173. package/dist/shared/session-model-state.d.ts +0 -6
  174. package/dist/shared/session-temperature-store.d.ts +0 -3
  175. package/dist/shared/session-tools-store.d.ts +0 -3
  176. package/dist/tools/skill-mcp/constants.d.ts +0 -1
  177. package/dist/tools/skill-mcp/index.d.ts +0 -3
  178. package/dist/tools/skill-mcp/tools.d.ts +0 -11
  179. package/dist/tools/skill-mcp/types.d.ts +0 -8
  180. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/agent-matcher.d.ts +0 -0
  181. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/agent-resolution.d.ts +0 -0
  182. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/hook.d.ts +0 -0
  183. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/index.d.ts +0 -0
  184. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/path-policy.d.ts +0 -0
  185. /package/dist/plugin-handlers/{prometheus-agent-config-builder.d.ts → oracle-agent-config-builder.d.ts} +0 -0
  186. /package/dist/{hooks/architect → shared}/is-abort-error.d.ts +0 -0
@@ -1,14 +0,0 @@
1
- import type { AgentConfig } from "@opencode-ai/sdk";
2
- export type AgentScope = "user" | "project";
3
- export interface AgentFrontmatter {
4
- name?: string;
5
- description?: string;
6
- model?: string;
7
- tools?: string;
8
- }
9
- export interface LoadedAgent {
10
- name: string;
11
- path: string;
12
- config: AgentConfig;
13
- scope: AgentScope;
14
- }
@@ -1,3 +0,0 @@
1
- import type { CommandDefinition } from "./types";
2
- export declare function loadOpencodeGlobalCommands(): Promise<Record<string, CommandDefinition>>;
3
- export declare function loadOpencodeProjectCommands(directory?: string): Promise<Record<string, CommandDefinition>>;
@@ -1,11 +0,0 @@
1
- export type OAuthCallbackResult = {
2
- code: string;
3
- state: string;
4
- };
5
- export type CallbackServer = {
6
- port: number;
7
- waitForCallback: () => Promise<OAuthCallbackResult>;
8
- close: () => void;
9
- };
10
- export declare function findAvailablePort(startPort?: number): Promise<number>;
11
- export declare function startCallbackServer(startPort?: number): Promise<CallbackServer>;
@@ -1,28 +0,0 @@
1
- export type ClientCredentials = {
2
- clientId: string;
3
- clientSecret?: string;
4
- };
5
- export type ClientRegistrationStorage = {
6
- getClientRegistration: (serverIdentifier: string) => ClientCredentials | null;
7
- setClientRegistration: (serverIdentifier: string, credentials: ClientCredentials) => void;
8
- };
9
- type DynamicClientRegistrationOptions = {
10
- registrationEndpoint?: string | null;
11
- serverIdentifier?: string;
12
- clientName: string;
13
- redirectUris: string[];
14
- tokenEndpointAuthMethod: "none" | "client_secret_post";
15
- clientId?: string | null;
16
- storage: ClientRegistrationStorage;
17
- fetch?: DcrFetch;
18
- };
19
- type DcrFetch = (input: string, init?: {
20
- method?: string;
21
- headers?: Record<string, string>;
22
- body?: string;
23
- }) => Promise<{
24
- ok: boolean;
25
- json: () => Promise<unknown>;
26
- }>;
27
- export declare function getOrRegisterClient(options: DynamicClientRegistrationOptions): Promise<ClientCredentials | null>;
28
- export {};
@@ -1,8 +0,0 @@
1
- export interface OAuthServerMetadata {
2
- authorizationEndpoint: string;
3
- tokenEndpoint: string;
4
- registrationEndpoint?: string;
5
- resource: string;
6
- }
7
- export declare function discoverOAuthServerMetadata(resource: string): Promise<OAuthServerMetadata>;
8
- export declare function resetDiscoveryCache(): void;
@@ -1,26 +0,0 @@
1
- export type OAuthCallbackResult = {
2
- code: string;
3
- state: string;
4
- };
5
- export declare function generateCodeVerifier(): string;
6
- export declare function generateCodeChallenge(verifier: string): string;
7
- export declare function buildAuthorizationUrl(authorizationEndpoint: string, options: {
8
- clientId: string;
9
- redirectUri: string;
10
- codeChallenge: string;
11
- state: string;
12
- scopes?: string[];
13
- resource?: string;
14
- }): string;
15
- export declare function startCallbackServer(port: number): Promise<OAuthCallbackResult>;
16
- export declare function runAuthorizationCodeRedirect(options: {
17
- authorizationEndpoint: string;
18
- callbackPort: number;
19
- clientId: string;
20
- redirectUri: string;
21
- scopes?: string[];
22
- resource?: string;
23
- }): Promise<{
24
- code: string;
25
- verifier: string;
26
- }>;
@@ -1,29 +0,0 @@
1
- import type { ClientCredentials } from "./dcr";
2
- import type { OAuthServerMetadata } from "./discovery";
3
- import { buildAuthorizationUrl, generateCodeChallenge, generateCodeVerifier, startCallbackServer } from "./oauth-authorization-flow";
4
- import type { OAuthTokenData } from "./storage";
5
- type McpOAuthProviderOptions = {
6
- serverUrl: string;
7
- clientId?: string;
8
- scopes?: string[];
9
- };
10
- export declare class McpOAuthProvider {
11
- private readonly serverUrl;
12
- private readonly configClientId;
13
- private readonly scopes;
14
- private storedCodeVerifier;
15
- private storedClientInfo;
16
- private callbackPort;
17
- constructor(options: McpOAuthProviderOptions);
18
- tokens(): OAuthTokenData | null;
19
- saveTokens(tokenData: OAuthTokenData): boolean;
20
- clientInformation(): ClientCredentials | null;
21
- redirectUrl(): string;
22
- saveCodeVerifier(verifier: string): void;
23
- codeVerifier(): string | null;
24
- redirectToAuthorization(metadata: OAuthServerMetadata): Promise<{
25
- code: string;
26
- }>;
27
- login(): Promise<OAuthTokenData>;
28
- }
29
- export { buildAuthorizationUrl, generateCodeChallenge, generateCodeVerifier, startCallbackServer };
@@ -1,9 +0,0 @@
1
- interface StepUpInfo {
2
- requiredScopes: string[];
3
- error?: string;
4
- errorDescription?: string;
5
- }
6
- export declare function parseWwwAuthenticate(header: string): StepUpInfo | null;
7
- export declare function mergeScopes(existing: string[], required: string[]): string[];
8
- export declare function isStepUpRequired(statusCode: number, headers: Record<string, string>): StepUpInfo | null;
9
- export {};
@@ -1,17 +0,0 @@
1
- export interface OAuthTokenData {
2
- accessToken: string;
3
- refreshToken?: string;
4
- expiresAt?: number;
5
- clientInfo?: {
6
- clientId: string;
7
- clientSecret?: string;
8
- };
9
- }
10
- type TokenStore = Record<string, OAuthTokenData>;
11
- export declare function getMcpOauthStoragePath(): string;
12
- export declare function loadToken(serverHost: string, resource: string): OAuthTokenData | null;
13
- export declare function saveToken(serverHost: string, resource: string, token: OAuthTokenData): boolean;
14
- export declare function deleteToken(serverHost: string, resource: string): boolean;
15
- export declare function listTokensByHost(serverHost: string): TokenStore;
16
- export declare function listAllTokens(): TokenStore;
17
- export {};
@@ -1 +0,0 @@
1
- export declare function parseAllowedTools(allowedTools: string | string[] | undefined): string[] | undefined;
@@ -1,7 +0,0 @@
1
- import type { SkillsConfig } from "../../config/schema";
2
- import type { LoadedSkill } from "./types";
3
- export declare function normalizePathForGlob(path: string): string;
4
- export declare function discoverConfigSourceSkills(options: {
5
- config: SkillsConfig | undefined;
6
- configDir: string;
7
- }): Promise<LoadedSkill[]>;
@@ -1,14 +0,0 @@
1
- export * from "./config-source-discovery";
2
- export * from "./loaded-skill-from-path";
3
- export * from "./loaded-skill-template-extractor";
4
- export * from "./loader";
5
- export * from "./merger";
6
- export * from "./skill-content";
7
- export * from "./skill-deduplication";
8
- export * from "./skill-definition-record";
9
- export * from "./skill-directory-loader";
10
- export * from "./skill-discovery";
11
- export * from "./skill-mcp-config";
12
- export * from "./skill-resolution-options";
13
- export * from "./skill-template-resolver";
14
- export * from "./types";
@@ -1,9 +0,0 @@
1
- import type { LoadedSkill, SkillScope } from "./types";
2
- export declare function loadSkillFromPath(options: {
3
- skillPath: string;
4
- resolvedPath: string;
5
- defaultName: string;
6
- scope: SkillScope;
7
- namePrefix?: string;
8
- }): Promise<LoadedSkill | null>;
9
- export declare function inferSkillNameFromFileName(filePath: string): string;
@@ -1,2 +0,0 @@
1
- import type { LoadedSkill } from "./types";
2
- export declare function extractSkillTemplate(skill: LoadedSkill): string;
@@ -1,17 +0,0 @@
1
- import type { CommandDefinition } from "../command-loader/types";
2
- import type { LoadedSkill } from "./types";
3
- export declare function loadOpencodeGlobalSkills(): Promise<Record<string, CommandDefinition>>;
4
- export declare function loadOpencodeProjectSkills(directory?: string): Promise<Record<string, CommandDefinition>>;
5
- interface DiscoverSkillsOptions {
6
- includeClaudeCodePaths?: boolean;
7
- directory?: string;
8
- }
9
- export declare function discoverAllSkills(directory?: string): Promise<LoadedSkill[]>;
10
- export declare function discoverSkills(options?: DiscoverSkillsOptions): Promise<LoadedSkill[]>;
11
- export declare function discoverUserClaudeSkills(): Promise<LoadedSkill[]>;
12
- export declare function discoverProjectClaudeSkills(directory?: string): Promise<LoadedSkill[]>;
13
- export declare function discoverOpencodeGlobalSkills(): Promise<LoadedSkill[]>;
14
- export declare function discoverOpencodeProjectSkills(directory?: string): Promise<LoadedSkill[]>;
15
- export declare function discoverProjectAgentsSkills(directory?: string): Promise<LoadedSkill[]>;
16
- export declare function discoverGlobalAgentsSkills(): Promise<LoadedSkill[]>;
17
- export {};
@@ -1,3 +0,0 @@
1
- import type { BuiltinSkill } from "../../builtin-skills/types";
2
- import type { LoadedSkill } from "../types";
3
- export declare function builtinToLoadedSkill(builtin: BuiltinSkill): LoadedSkill;
@@ -1,3 +0,0 @@
1
- import type { SkillDefinition } from "../../../config/schema";
2
- import type { LoadedSkill } from "../types";
3
- export declare function configEntryToLoadedSkill(name: string, entry: SkillDefinition, configDir?: string): LoadedSkill | null;
@@ -1,2 +0,0 @@
1
- import type { SkillScope } from "../types";
2
- export declare const SCOPE_PRIORITY: Record<SkillScope, number>;
@@ -1,3 +0,0 @@
1
- import type { SkillDefinition } from "../../../config/schema";
2
- import type { LoadedSkill } from "../types";
3
- export declare function mergeSkillDefinitions(base: LoadedSkill, patch: SkillDefinition): LoadedSkill;
@@ -1,11 +0,0 @@
1
- import type { SkillDefinition, SkillsConfig } from "../../../config/schema";
2
- export declare function normalizeSkillsConfig(config: SkillsConfig | undefined): {
3
- sources: Array<string | {
4
- path: string;
5
- recursive?: boolean;
6
- glob?: string;
7
- }>;
8
- enable: string[];
9
- disable: string[];
10
- entries: Record<string, boolean | SkillDefinition>;
11
- };
@@ -1,8 +0,0 @@
1
- import type { SkillsConfig } from "../../config/schema";
2
- import type { BuiltinSkill } from "../builtin-skills/types";
3
- import type { LoadedSkill } from "./types";
4
- interface MergeSkillsOptions {
5
- configDir?: string;
6
- }
7
- export declare function mergeSkills(builtinSkills: BuiltinSkill[], config: SkillsConfig | undefined, configSourceSkills: LoadedSkill[], userClaudeSkills: LoadedSkill[], userOpencodeSkills: LoadedSkill[], projectClaudeSkills: LoadedSkill[], projectOpencodeSkills: LoadedSkill[], options?: MergeSkillsOptions): LoadedSkill[];
8
- export {};
@@ -1,4 +0,0 @@
1
- export { extractSkillTemplate } from "./loaded-skill-template-extractor";
2
- export { clearSkillCache, getAllSkills } from "./skill-discovery";
3
- export type { SkillResolutionOptions } from "./skill-resolution-options";
4
- export { resolveMultipleSkills, resolveMultipleSkillsAsync, resolveSkillContent, resolveSkillContentAsync, } from "./skill-template-resolver";
@@ -1,2 +0,0 @@
1
- import type { LoadedSkill } from "./types";
2
- export declare function deduplicateSkillsByName(skills: LoadedSkill[]): LoadedSkill[];
@@ -1,3 +0,0 @@
1
- import type { CommandDefinition } from "../command-loader/types";
2
- import type { LoadedSkill } from "./types";
3
- export declare function skillsToCommandDefinitionRecord(skills: LoadedSkill[]): Record<string, CommandDefinition>;
@@ -1,8 +0,0 @@
1
- import type { LoadedSkill, SkillScope } from "./types";
2
- export declare function loadSkillsFromDir(options: {
3
- skillsDir: string;
4
- scope: SkillScope;
5
- namePrefix?: string;
6
- depth?: number;
7
- maxDepth?: number;
8
- }): Promise<LoadedSkill[]>;
@@ -1,4 +0,0 @@
1
- import type { SkillResolutionOptions } from "./skill-resolution-options";
2
- import type { LoadedSkill } from "./types";
3
- export declare function clearSkillCache(): void;
4
- export declare function getAllSkills(options?: SkillResolutionOptions): Promise<LoadedSkill[]>;
@@ -1,3 +0,0 @@
1
- import type { SkillMcpConfig } from "../skill-mcp-manager/types";
2
- export declare function parseSkillMcpConfigFromFrontmatter(content: string): SkillMcpConfig | undefined;
3
- export declare function loadMcpJsonFromDir(skillDir: string): Promise<SkillMcpConfig | undefined>;
@@ -1,7 +0,0 @@
1
- import type { BrowserAutomationProvider } from "../../config/schema";
2
- export interface SkillResolutionOptions {
3
- browserProvider?: BrowserAutomationProvider;
4
- disabledSkills?: Set<string>;
5
- /** Project directory to discover project-level skills from. Falls back to process.cwd() if not provided. */
6
- directory?: string;
7
- }
@@ -1,11 +0,0 @@
1
- import type { SkillResolutionOptions } from "./skill-resolution-options";
2
- export declare function resolveSkillContent(skillName: string, options?: SkillResolutionOptions): string | null;
3
- export declare function resolveMultipleSkills(skillNames: string[], options?: SkillResolutionOptions): {
4
- resolved: Map<string, string>;
5
- notFound: string[];
6
- };
7
- export declare function resolveSkillContentAsync(skillName: string, options?: SkillResolutionOptions): Promise<string | null>;
8
- export declare function resolveMultipleSkillsAsync(skillNames: string[], options?: SkillResolutionOptions): Promise<{
9
- resolved: Map<string, string>;
10
- notFound: string[];
11
- }>;
@@ -1,34 +0,0 @@
1
- import type { CommandDefinition } from "../command-loader/types";
2
- import type { SkillMcpConfig } from "../skill-mcp-manager/types";
3
- export type SkillScope = "builtin" | "config" | "user" | "project" | "opencode" | "opencode-project";
4
- export interface SkillMetadata {
5
- name?: string;
6
- description?: string;
7
- model?: string;
8
- "argument-hint"?: string;
9
- agent?: string;
10
- subtask?: boolean;
11
- license?: string;
12
- compatibility?: string;
13
- metadata?: Record<string, string>;
14
- "allowed-tools"?: string | string[];
15
- mcp?: SkillMcpConfig;
16
- }
17
- export interface LazyContentLoader {
18
- loaded: boolean;
19
- content?: string;
20
- load: () => Promise<string>;
21
- }
22
- export interface LoadedSkill {
23
- name: string;
24
- path?: string;
25
- resolvedPath?: string;
26
- definition: CommandDefinition;
27
- scope: SkillScope;
28
- license?: string;
29
- compatibility?: string;
30
- metadata?: Record<string, string>;
31
- allowedTools?: string[];
32
- mcpConfig?: SkillMcpConfig;
33
- lazyContent?: LazyContentLoader;
34
- }
@@ -1,7 +0,0 @@
1
- import type { SkillMcpManagerState } from "./types";
2
- export declare function registerProcessCleanup(state: SkillMcpManagerState): void;
3
- export declare function unregisterProcessCleanup(state: SkillMcpManagerState): void;
4
- export declare function startCleanupTimer(state: SkillMcpManagerState): void;
5
- export declare function disconnectSession(state: SkillMcpManagerState, sessionID: string): Promise<void>;
6
- export declare function disconnectAll(state: SkillMcpManagerState): Promise<void>;
7
- export declare function forceReconnect(state: SkillMcpManagerState, clientKey: string): Promise<boolean>;
@@ -1,6 +0,0 @@
1
- import type { ConnectionType, McpServerDefinition } from "./types";
2
- /**
3
- * Determines connection type from MCP server configuration.
4
- * Priority: explicit type field > url presence > command presence
5
- */
6
- export declare function getConnectionType(config: McpServerDefinition): ConnectionType | null;
@@ -1,14 +0,0 @@
1
- import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
- import type { McpServerDefinition, SkillMcpClientInfo, SkillMcpManagerState } from "./types";
3
- export declare function getOrCreateClient(params: {
4
- state: SkillMcpManagerState;
5
- clientKey: string;
6
- info: SkillMcpClientInfo;
7
- config: McpServerDefinition;
8
- }): Promise<Client>;
9
- export declare function getOrCreateClientWithRetryImpl(params: {
10
- state: SkillMcpManagerState;
11
- clientKey: string;
12
- info: SkillMcpClientInfo;
13
- config: McpServerDefinition;
14
- }): Promise<Client>;
@@ -1,2 +0,0 @@
1
- export declare const EXCLUDED_ENV_PATTERNS: RegExp[];
2
- export declare function createCleanMcpEnvironment(customEnv?: Record<string, string>): Record<string, string>;
@@ -1 +0,0 @@
1
- export declare function expandEnvVarsInObject<T>(obj: T): T;
@@ -1,3 +0,0 @@
1
- import { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
- import type { SkillMcpClientConnectionParams } from "./types";
3
- export declare function createHttpClient(params: SkillMcpClientConnectionParams): Promise<Client>;
@@ -1,2 +0,0 @@
1
- export { SkillMcpManager } from "./manager";
2
- export * from "./types";
@@ -1,20 +0,0 @@
1
- import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
- import type { Prompt, Resource, Tool } from "@modelcontextprotocol/sdk/types.js";
3
- import type { McpServerDefinition, SkillMcpClientInfo, SkillMcpServerContext } from "./types";
4
- export declare class SkillMcpManager {
5
- private readonly state;
6
- private getClientKey;
7
- getOrCreateClient(info: SkillMcpClientInfo, config: McpServerDefinition): Promise<Client>;
8
- disconnectSession(sessionID: string): Promise<void>;
9
- disconnectAll(): Promise<void>;
10
- listTools(info: SkillMcpClientInfo, context: SkillMcpServerContext): Promise<Tool[]>;
11
- listResources(info: SkillMcpClientInfo, context: SkillMcpServerContext): Promise<Resource[]>;
12
- listPrompts(info: SkillMcpClientInfo, context: SkillMcpServerContext): Promise<Prompt[]>;
13
- callTool(info: SkillMcpClientInfo, context: SkillMcpServerContext, name: string, args: Record<string, unknown>): Promise<unknown>;
14
- readResource(info: SkillMcpClientInfo, context: SkillMcpServerContext, uri: string): Promise<unknown>;
15
- getPrompt(info: SkillMcpClientInfo, context: SkillMcpServerContext, name: string, args: Record<string, string>): Promise<unknown>;
16
- private withOperationRetry;
17
- private getOrCreateClientWithRetry;
18
- getConnectedServers(): string[];
19
- isConnected(info: SkillMcpClientInfo): boolean;
20
- }
@@ -1,8 +0,0 @@
1
- import { McpOAuthProvider } from "../mcp-oauth/provider";
2
- import type { McpServerDefinition } from "./types";
3
- export declare function buildHttpRequestInit(config: McpServerDefinition, authProviders: Map<string, McpOAuthProvider>): Promise<RequestInit | undefined>;
4
- export declare function handleStepUpIfNeeded(params: {
5
- error: Error;
6
- config: McpServerDefinition;
7
- authProviders: Map<string, McpOAuthProvider>;
8
- }): Promise<boolean>;
@@ -1,3 +0,0 @@
1
- import { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
- import type { SkillMcpClientConnectionParams } from "./types";
3
- export declare function createStdioClient(params: SkillMcpClientConnectionParams): Promise<Client>;
@@ -1,68 +0,0 @@
1
- import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
- import type { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
3
- import type { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
4
- import type { McpOAuthProvider } from "../mcp-oauth/provider";
5
- export interface McpServerDefinition {
6
- type?: "http" | "sse" | "stdio";
7
- url?: string;
8
- command?: string;
9
- args?: string[];
10
- env?: Record<string, string>;
11
- headers?: Record<string, string>;
12
- oauth?: {
13
- clientId?: string;
14
- scopes?: string[];
15
- };
16
- disabled?: boolean;
17
- }
18
- export type SkillMcpConfig = Record<string, McpServerDefinition>;
19
- export interface SkillMcpClientInfo {
20
- serverName: string;
21
- skillName: string;
22
- sessionID: string;
23
- }
24
- export interface SkillMcpServerContext {
25
- config: McpServerDefinition;
26
- skillName: string;
27
- }
28
- /**
29
- * Connection type for a managed MCP client.
30
- * - "stdio": Local process via stdin/stdout
31
- * - "http": Remote server via HTTP (Streamable HTTP transport)
32
- */
33
- export type ConnectionType = "stdio" | "http";
34
- interface ManagedClientBase {
35
- client: Client;
36
- skillName: string;
37
- lastUsedAt: number;
38
- connectionType: ConnectionType;
39
- }
40
- interface ManagedStdioClient extends ManagedClientBase {
41
- connectionType: "stdio";
42
- transport: StdioClientTransport;
43
- }
44
- interface ManagedHttpClient extends ManagedClientBase {
45
- connectionType: "http";
46
- transport: StreamableHTTPClientTransport;
47
- }
48
- export type ManagedClient = ManagedStdioClient | ManagedHttpClient;
49
- interface ProcessCleanupHandler {
50
- signal: NodeJS.Signals;
51
- listener: () => void;
52
- }
53
- export interface SkillMcpManagerState {
54
- clients: Map<string, ManagedClient>;
55
- pendingConnections: Map<string, Promise<Client>>;
56
- authProviders: Map<string, McpOAuthProvider>;
57
- cleanupRegistered: boolean;
58
- cleanupInterval: ReturnType<typeof setInterval> | null;
59
- cleanupHandlers: ProcessCleanupHandler[];
60
- idleTimeoutMs: number;
61
- }
62
- export interface SkillMcpClientConnectionParams {
63
- state: SkillMcpManagerState;
64
- clientKey: string;
65
- info: SkillMcpClientInfo;
66
- config: McpServerDefinition;
67
- }
68
- export {};
@@ -1 +0,0 @@
1
- export declare function isAbortError(error: unknown): boolean;
@@ -1 +0,0 @@
1
- export declare function isObject(value: unknown): value is Record<string, unknown>;
@@ -1,27 +0,0 @@
1
- import type { FallbackEntry } from "./model-requirements";
2
- export type ModelResolutionRequest = {
3
- intent?: {
4
- /** Global override for all agents and categories — set via the global_model config.
5
- * Highest priority; checked before everything else. */
6
- globalOverrideModel?: string;
7
- uiSelectedModel?: string;
8
- userModel?: string;
9
- categoryDefaultModel?: string;
10
- };
11
- constraints: {
12
- availableModels: Set<string>;
13
- connectedProviders?: string[];
14
- };
15
- policy?: {
16
- fallbackChain?: FallbackEntry[];
17
- systemDefaultModel?: string;
18
- };
19
- };
20
- export type ModelResolutionProvenance = "override" | "category-default" | "provider-fallback" | "system-default";
21
- export type ModelResolutionResult = {
22
- model: string;
23
- provenance: ModelResolutionProvenance;
24
- variant?: string;
25
- attempted?: string[];
26
- reason?: string;
27
- };
@@ -1,24 +0,0 @@
1
- import type { FallbackEntry } from "./model-requirements";
2
- import type { ModelResolutionProvenance } from "./model-resolution-types";
3
- export type ModelResolutionInput = {
4
- userModel?: string;
5
- inheritedModel?: string;
6
- systemDefault?: string;
7
- };
8
- /** @deprecated Use ModelResolutionProvenance from model-resolution-types.ts */
9
- export type ModelSource = ModelResolutionProvenance;
10
- export type ModelResolutionResult = {
11
- model: string;
12
- source: ModelResolutionProvenance;
13
- variant?: string;
14
- };
15
- export type ExtendedModelResolutionInput = {
16
- uiSelectedModel?: string;
17
- userModel?: string;
18
- categoryDefaultModel?: string;
19
- fallbackChain?: FallbackEntry[];
20
- availableModels: Set<string>;
21
- systemDefaultModel?: string;
22
- };
23
- export declare function resolveModel(input: ModelResolutionInput): string | undefined;
24
- export declare function resolveModelWithFallback(input: ExtendedModelResolutionInput): ModelResolutionResult | undefined;
@@ -1,13 +0,0 @@
1
- export type OpenCodeBinaryType = "opencode" | "opencode-desktop";
2
- export type OpenCodeConfigDirOptions = {
3
- binary: OpenCodeBinaryType;
4
- version?: string | null;
5
- checkExisting?: boolean;
6
- };
7
- export type OpenCodeConfigPaths = {
8
- configDir: string;
9
- configJson: string;
10
- configJsonc: string;
11
- packageJson: string;
12
- matrixxConfig: string;
13
- };
@@ -1,6 +0,0 @@
1
- type SessionModel = {
2
- providerID: string;
3
- modelID: string;
4
- };
5
- export declare function getSessionModel(sessionID: string): SessionModel | undefined;
6
- export {};
@@ -1,3 +0,0 @@
1
- export declare function setSessionTemperature(sessionID: string, temperature: number): void;
2
- export declare function getSessionTemperature(sessionID: string): number | undefined;
3
- export declare function clearSessionTemperature(sessionID: string): void;
@@ -1,3 +0,0 @@
1
- export declare function setSessionTools(sessionID: string, tools: Record<string, boolean>): void;
2
- export declare function getSessionTools(sessionID: string): Record<string, boolean> | undefined;
3
- export declare function clearSessionTools(): void;
@@ -1 +0,0 @@
1
- export declare const SKILL_MCP_DESCRIPTION = "Invoke MCP server operations from skill-embedded MCPs. Requires mcp_name plus exactly one of: tool_name, resource_name, or prompt_name.";
@@ -1,3 +0,0 @@
1
- export * from "./constants";
2
- export { createSkillMcpTool } from "./tools";
3
- export * from "./types";
@@ -1,11 +0,0 @@
1
- import { type ToolDefinition } from "@opencode-ai/plugin";
2
- import type { LoadedSkill } from "../../features/opencode-skill-loader/types";
3
- import type { SkillMcpManager } from "../../features/skill-mcp-manager";
4
- interface SkillMcpToolOptions {
5
- manager: SkillMcpManager;
6
- getLoadedSkills: () => LoadedSkill[];
7
- getSessionID: () => string;
8
- }
9
- export declare function applyGrepFilter(output: string, pattern: string | undefined): string;
10
- export declare function createSkillMcpTool(options: SkillMcpToolOptions): ToolDefinition;
11
- export {};