opencode-matrixx 2.4.0 → 2.5.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 (95) hide show
  1. package/dist/agents/builtin-agents/available-skills.d.ts +2 -2
  2. package/dist/agents/builtin-agents.d.ts +2 -2
  3. package/dist/agents/construct.d.ts +3 -3
  4. package/dist/agents/index.d.ts +3 -3
  5. package/dist/agents/operator.d.ts +3 -3
  6. package/dist/agents/oracle/identity-constraints.d.ts +1 -1
  7. package/dist/agents/oracle/system-prompt.d.ts +2 -2
  8. package/dist/agents/trinity.d.ts +3 -3
  9. package/dist/config/schema/dcp.d.ts +231 -2
  10. package/dist/config/schema/hooks.d.ts +1 -1
  11. package/dist/config/schema/matrixx-config.d.ts +80 -3
  12. package/dist/create-hooks.d.ts +3 -3
  13. package/dist/create-managers.d.ts +0 -2
  14. package/dist/create-tools.d.ts +3 -3
  15. package/dist/features/builtin-commands/templates/dcp-profile.d.ts +1 -1
  16. package/dist/features/builtin-skills/types.d.ts +10 -1
  17. package/dist/features/command-loader/index.d.ts +1 -1
  18. package/dist/hooks/auto-slash-command/executor.d.ts +5 -2
  19. package/dist/hooks/auto-slash-command/hook.d.ts +4 -2
  20. package/dist/hooks/index.d.ts +1 -1
  21. package/dist/hooks/keyword-detector/ultrawork/index.d.ts +1 -1
  22. package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +1 -1
  23. package/dist/hooks/{prometheus-md-only → oracle-md-only}/constants.d.ts +2 -2
  24. package/dist/index.js +82825 -95789
  25. package/dist/plugin/hooks/create-core-hooks.d.ts +1 -1
  26. package/dist/plugin/hooks/create-session-hooks.d.ts +1 -1
  27. package/dist/plugin/hooks/create-skill-hooks.d.ts +2 -2
  28. package/dist/plugin/skill-context.d.ts +2 -2
  29. package/dist/plugin/tool-registry.d.ts +1 -1
  30. package/dist/plugin-handlers/index.d.ts +1 -1
  31. package/dist/plugin-handlers/plan-model-inheritance.d.ts +1 -1
  32. package/dist/shared/system-directive.d.ts +1 -1
  33. package/dist/tools/dcp-switch-profile/index.d.ts +1 -0
  34. package/dist/tools/dcp-switch-profile/tools.d.ts +8 -0
  35. package/dist/tools/delegate-agent/constants.d.ts +1 -1
  36. package/dist/tools/delegate-task/constants.d.ts +1 -1
  37. package/dist/tools/delegate-task/skill-resolver.d.ts +2 -2
  38. package/dist/tools/index.d.ts +1 -1
  39. package/dist/tools/skill/types.d.ts +3 -7
  40. package/dist/tools/slashcommand/skill-command-converter.d.ts +2 -2
  41. package/dist/tools/slashcommand/types.d.ts +10 -3
  42. package/package.json +2 -2
  43. package/dist/features/agent-loader/index.d.ts +0 -2
  44. package/dist/features/agent-loader/loader.d.ts +0 -3
  45. package/dist/features/agent-loader/types.d.ts +0 -14
  46. package/dist/features/command-loader/loader.d.ts +0 -3
  47. package/dist/features/mcp-oauth/callback-server.d.ts +0 -11
  48. package/dist/features/mcp-oauth/dcr.d.ts +0 -28
  49. package/dist/features/mcp-oauth/discovery.d.ts +0 -8
  50. package/dist/features/mcp-oauth/oauth-authorization-flow.d.ts +0 -26
  51. package/dist/features/mcp-oauth/provider.d.ts +0 -29
  52. package/dist/features/mcp-oauth/step-up.d.ts +0 -9
  53. package/dist/features/mcp-oauth/storage.d.ts +0 -17
  54. package/dist/features/opencode-skill-loader/allowed-tools-parser.d.ts +0 -1
  55. package/dist/features/opencode-skill-loader/config-source-discovery.d.ts +0 -7
  56. package/dist/features/opencode-skill-loader/index.d.ts +0 -14
  57. package/dist/features/opencode-skill-loader/loaded-skill-from-path.d.ts +0 -9
  58. package/dist/features/opencode-skill-loader/loaded-skill-template-extractor.d.ts +0 -2
  59. package/dist/features/opencode-skill-loader/loader.d.ts +0 -17
  60. package/dist/features/opencode-skill-loader/merger/builtin-skill-converter.d.ts +0 -3
  61. package/dist/features/opencode-skill-loader/merger/config-skill-entry-loader.d.ts +0 -3
  62. package/dist/features/opencode-skill-loader/merger/scope-priority.d.ts +0 -2
  63. package/dist/features/opencode-skill-loader/merger/skill-definition-merger.d.ts +0 -3
  64. package/dist/features/opencode-skill-loader/merger/skills-config-normalizer.d.ts +0 -11
  65. package/dist/features/opencode-skill-loader/merger.d.ts +0 -8
  66. package/dist/features/opencode-skill-loader/skill-content.d.ts +0 -4
  67. package/dist/features/opencode-skill-loader/skill-deduplication.d.ts +0 -2
  68. package/dist/features/opencode-skill-loader/skill-definition-record.d.ts +0 -3
  69. package/dist/features/opencode-skill-loader/skill-directory-loader.d.ts +0 -8
  70. package/dist/features/opencode-skill-loader/skill-discovery.d.ts +0 -4
  71. package/dist/features/opencode-skill-loader/skill-mcp-config.d.ts +0 -3
  72. package/dist/features/opencode-skill-loader/skill-resolution-options.d.ts +0 -7
  73. package/dist/features/opencode-skill-loader/skill-template-resolver.d.ts +0 -11
  74. package/dist/features/opencode-skill-loader/types.d.ts +0 -34
  75. package/dist/features/skill-mcp-manager/cleanup.d.ts +0 -7
  76. package/dist/features/skill-mcp-manager/connection-type.d.ts +0 -6
  77. package/dist/features/skill-mcp-manager/connection.d.ts +0 -14
  78. package/dist/features/skill-mcp-manager/env-cleaner.d.ts +0 -2
  79. package/dist/features/skill-mcp-manager/env-expander.d.ts +0 -1
  80. package/dist/features/skill-mcp-manager/http-client.d.ts +0 -3
  81. package/dist/features/skill-mcp-manager/index.d.ts +0 -2
  82. package/dist/features/skill-mcp-manager/manager.d.ts +0 -20
  83. package/dist/features/skill-mcp-manager/oauth-handler.d.ts +0 -8
  84. package/dist/features/skill-mcp-manager/stdio-client.d.ts +0 -3
  85. package/dist/features/skill-mcp-manager/types.d.ts +0 -68
  86. package/dist/tools/skill-mcp/constants.d.ts +0 -1
  87. package/dist/tools/skill-mcp/index.d.ts +0 -3
  88. package/dist/tools/skill-mcp/tools.d.ts +0 -11
  89. package/dist/tools/skill-mcp/types.d.ts +0 -8
  90. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/agent-matcher.d.ts +0 -0
  91. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/agent-resolution.d.ts +0 -0
  92. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/hook.d.ts +0 -0
  93. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/index.d.ts +0 -0
  94. /package/dist/hooks/{prometheus-md-only → oracle-md-only}/path-policy.d.ts +0 -0
  95. /package/dist/plugin-handlers/{prometheus-agent-config-builder.d.ts → oracle-agent-config-builder.d.ts} +0 -0
@@ -45,7 +45,7 @@ export declare function createCoreHooks(args: {
45
45
  editErrorRecovery: ReturnType<typeof import("../../hooks").createEditErrorRecoveryHook> | null;
46
46
  delegateTaskRetry: ReturnType<typeof import("../../hooks").createDelegateTaskRetryHook> | null;
47
47
  startWork: ReturnType<typeof import("../../hooks").createStartWorkHook> | null;
48
- prometheusMdOnly: ReturnType<typeof import("../../hooks").createOracleMdOnlyHook> | null;
48
+ oracleMdOnly: ReturnType<typeof import("../../hooks").createOracleMdOnlyHook> | null;
49
49
  mouseNotepad: ReturnType<typeof import("../../hooks").createMouseNotepadHook> | null;
50
50
  questionLabelTruncator: ReturnType<typeof import("../../hooks").createQuestionLabelTruncatorHook>;
51
51
  taskResumeInfo: ReturnType<typeof import("../../hooks").createTaskResumeInfoHook>;
@@ -17,7 +17,7 @@ export type SessionHooks = {
17
17
  editErrorRecovery: ReturnType<typeof createEditErrorRecoveryHook> | null;
18
18
  delegateTaskRetry: ReturnType<typeof createDelegateTaskRetryHook> | null;
19
19
  startWork: ReturnType<typeof createStartWorkHook> | null;
20
- prometheusMdOnly: ReturnType<typeof createOracleMdOnlyHook> | null;
20
+ oracleMdOnly: ReturnType<typeof createOracleMdOnlyHook> | null;
21
21
  mouseNotepad: ReturnType<typeof createMouseNotepadHook> | null;
22
22
  questionLabelTruncator: ReturnType<typeof createQuestionLabelTruncatorHook>;
23
23
  taskResumeInfo: ReturnType<typeof createTaskResumeInfoHook>;
@@ -1,6 +1,6 @@
1
1
  import type { AvailableSkill } from "../../agents/dynamic-agent-prompt-builder";
2
2
  import type { HookName } from "../../config";
3
- import type { LoadedSkill } from "../../features/opencode-skill-loader/types";
3
+ import type { BuiltinSkill } from "../../features/builtin-skills";
4
4
  import { createAutoSlashCommandHook, createCategorySkillReminderHook } from "../../hooks";
5
5
  import type { PluginContext } from "../types";
6
6
  export type SkillHooks = {
@@ -11,6 +11,6 @@ export declare function createSkillHooks(args: {
11
11
  ctx: PluginContext;
12
12
  isHookEnabled: (hookName: HookName) => boolean;
13
13
  safeHookEnabled: boolean;
14
- mergedSkills: LoadedSkill[];
14
+ builtinSkills: BuiltinSkill[];
15
15
  availableSkills: AvailableSkill[];
16
16
  }): SkillHooks;
@@ -1,9 +1,9 @@
1
1
  import type { AvailableSkill } from "../agents/dynamic-agent-prompt-builder";
2
2
  import type { MatrixxConfig } from "../config";
3
3
  import type { BrowserAutomationProvider } from "../config/schema/browser-automation";
4
- import type { LoadedSkill } from "../features/opencode-skill-loader/types";
4
+ import { type BuiltinSkill } from "../features/builtin-skills";
5
5
  export type SkillContext = {
6
- mergedSkills: LoadedSkill[];
6
+ builtinSkills: BuiltinSkill[];
7
7
  availableSkills: AvailableSkill[];
8
8
  browserProvider: BrowserAutomationProvider;
9
9
  disabledSkills: Set<string>;
@@ -10,7 +10,7 @@ export type ToolRegistryResult = {
10
10
  export declare function createToolRegistry(args: {
11
11
  ctx: PluginContext;
12
12
  pluginConfig: MatrixxConfig;
13
- managers: Pick<Managers, "backgroundManager" | "tmuxSessionManager" | "skillMcpManager">;
13
+ managers: Pick<Managers, "backgroundManager" | "tmuxSessionManager">;
14
14
  skillContext: SkillContext;
15
15
  availableCategories: AvailableCategory[];
16
16
  }): ToolRegistryResult;
@@ -4,7 +4,7 @@ export * from "./category-config-resolver";
4
4
  export * from "./command-config-handler";
5
5
  export { type ConfigHandlerDeps, createConfigHandler } from "./config-handler";
6
6
  export * from "./mcp-config-handler";
7
+ export * from "./oracle-agent-config-builder";
7
8
  export * from "./plugin-components-loader";
8
- export * from "./prometheus-agent-config-builder";
9
9
  export * from "./provider-config-handler";
10
10
  export * from "./tool-config-handler";
@@ -1 +1 @@
1
- export declare function buildPlanDemoteConfig(prometheusConfig: Record<string, unknown> | undefined, planOverride: Record<string, unknown> | undefined): Record<string, unknown>;
1
+ export declare function buildPlanDemoteConfig(oracleConfig: Record<string, unknown> | undefined, planOverride: Record<string, unknown> | undefined): Record<string, unknown>;
@@ -40,5 +40,5 @@ export declare const SystemDirectiveTypes: {
40
40
  readonly SINGLE_TASK_ONLY: "SINGLE TASK ONLY";
41
41
  readonly COMPACTION_CONTEXT: "COMPACTION CONTEXT";
42
42
  readonly CONTEXT_WINDOW_MONITOR: "CONTEXT WINDOW MONITOR";
43
- readonly PROMETHEUS_READ_ONLY: "PROMETHEUS READ-ONLY";
43
+ readonly ORACLE_READ_ONLY: "ORACLE READ-ONLY";
44
44
  };
@@ -0,0 +1 @@
1
+ export { createDcpSwitchProfileTool } from "./tools";
@@ -0,0 +1,8 @@
1
+ import { type ToolDefinition } from "@opencode-ai/plugin/tool";
2
+ import type { DcpConfig } from "../../config/schema/dcp";
3
+ export interface DcpSwitchProfileOptions {
4
+ pluginConfig?: {
5
+ dcp?: DcpConfig;
6
+ };
7
+ }
8
+ export declare function createDcpSwitchProfileTool(options?: DcpSwitchProfileOptions): Record<string, ToolDefinition>;
@@ -1,2 +1,2 @@
1
- export declare const ALLOWED_AGENTS: readonly ["trinity", "operator", "oracle", "hephaestus", "metis", "momus", "construct"];
1
+ export declare const ALLOWED_AGENTS: readonly ["trinity", "operator", "oracle", "construct"];
2
2
  export declare const CALL_DELEGATE_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.";
@@ -14,7 +14,7 @@ export declare const PLAN_AGENT_NAMES: string[];
14
14
  */
15
15
  export declare function isPlanAgent(agentName: string | undefined): boolean;
16
16
  /**
17
- * Plan family: plan + prometheus. Shares mutual delegation blocking and task tool permission.
17
+ * Plan family: plan + oracle. Shares mutual delegation blocking and task tool permission.
18
18
  * Does NOT share system prompt (only isPlanAgent controls that).
19
19
  */
20
20
  export declare const PLAN_FAMILY_NAMES: string[];
@@ -2,7 +2,7 @@ import type { BrowserAutomationProvider } from "../../config/schema";
2
2
  export declare function resolveSkillContent(skills: string[], options: {
3
3
  browserProvider?: BrowserAutomationProvider;
4
4
  disabledSkills?: Set<string>;
5
- }): Promise<{
5
+ }): {
6
6
  content: string | undefined;
7
7
  error: string | null;
8
- }>;
8
+ };
@@ -11,13 +11,13 @@ export { interactive_bash, startBackgroundCheck as startTmuxCheck } from "./inte
11
11
  export { createSessionManagerTools } from "./session-manager";
12
12
  export { sessionExists } from "./session-manager/storage";
13
13
  export { createSkillTool } from "./skill";
14
- export { createSkillMcpTool } from "./skill-mcp";
15
14
  export { createSlashcommandTool, discoverCommandsSync } from "./slashcommand";
16
15
  export { lspManager };
17
16
  import type { PluginInput, ToolDefinition } from "@opencode-ai/plugin";
18
17
  import type { BackgroundManager } from "../features/background-agent";
19
18
  type OpencodeClient = PluginInput["client"];
20
19
  export { createAssemblyTool } from "./assembly";
20
+ export { createDcpSwitchProfileTool } from "./dcp-switch-profile";
21
21
  export { createDelegateAgent } from "./delegate-agent";
22
22
  export { createDelegateTask } from "./delegate-task";
23
23
  export { createHashlineEditTool } from "./hashline-edit";
@@ -1,5 +1,4 @@
1
- import type { LoadedSkill, SkillScope } from "../../features/opencode-skill-loader/types";
2
- import type { SkillMcpManager } from "../../features/skill-mcp-manager";
1
+ import type { BuiltinSkill } from "../../features/builtin-skills";
3
2
  export interface SkillArgs {
4
3
  name: string;
5
4
  }
@@ -7,19 +6,16 @@ export interface SkillInfo {
7
6
  name: string;
8
7
  description: string;
9
8
  location?: string;
10
- scope: SkillScope;
11
9
  license?: string;
12
10
  compatibility?: string;
13
11
  metadata?: Record<string, string>;
14
12
  allowedTools?: string[];
15
13
  }
16
14
  export interface SkillLoadOptions {
17
- /** When true, only load from OpenCode paths (.opencode/skills/, ~/.config/opencode/skills/) */
18
- opencodeOnly?: boolean;
19
15
  /** Pre-merged skills to use instead of discovering */
20
- skills?: LoadedSkill[];
16
+ skills?: BuiltinSkill[];
21
17
  /** MCP manager for querying skill-embedded MCP servers */
22
- mcpManager?: SkillMcpManager;
18
+ mcpManager?: never;
23
19
  /** Session ID getter for MCP client identification */
24
20
  getSessionID?: () => string;
25
21
  disabledSkills?: Set<string>;
@@ -1,3 +1,3 @@
1
- import type { LoadedSkill } from "../../features/opencode-skill-loader";
1
+ import type { BuiltinSkill } from "../../features/builtin-skills";
2
2
  import type { CommandInfo } from "./types";
3
- export declare function skillToCommandInfo(skill: LoadedSkill): CommandInfo;
3
+ export declare function skillToCommandInfo(skill: BuiltinSkill): CommandInfo;
@@ -1,5 +1,10 @@
1
- import type { LazyContentLoader, LoadedSkill } from "../../features/opencode-skill-loader";
2
- export type CommandScope = "builtin" | "config" | "user" | "project" | "opencode" | "opencode-project";
1
+ import type { BuiltinSkill } from "../../features/builtin-skills";
2
+ export interface LazyContentLoader {
3
+ loaded: boolean;
4
+ content?: string;
5
+ load: () => Promise<string>;
6
+ }
7
+ export type CommandScope = "builtin" | "config" | "user" | "project" | "opencode" | "opencode-project" | "plugin";
3
8
  export interface CommandMetadata {
4
9
  name: string;
5
10
  description: string;
@@ -20,5 +25,7 @@ export interface SlashcommandToolOptions {
20
25
  /** Pre-loaded commands (skip discovery if provided) */
21
26
  commands?: CommandInfo[];
22
27
  /** Pre-loaded skills (skip discovery if provided) */
23
- skills?: LoadedSkill[];
28
+ skills?: BuiltinSkill[];
29
+ /** OpenCode SDK client for discovering plugin-registered commands */
30
+ client?: ReturnType<typeof import("@opencode-ai/sdk").createOpencodeClient>;
24
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-matrixx",
3
- "version": "2.4.0",
3
+ "version": "2.5.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",
@@ -24,7 +24,7 @@
24
24
  "lint": "biome check src/",
25
25
  "lint:fix": "biome check --write src/",
26
26
  "ci": "bash script/run-ci.sh",
27
- "test": "bun test"
27
+ "test": "bash script/run-ci.sh"
28
28
  },
29
29
  "keywords": [
30
30
  "opencode",
@@ -1,2 +0,0 @@
1
- export * from "./loader";
2
- export * from "./types";
@@ -1,3 +0,0 @@
1
- import type { AgentConfig } from "@opencode-ai/sdk";
2
- export declare function loadUserAgents(): Record<string, AgentConfig>;
3
- export declare function loadProjectAgents(directory?: string): Record<string, AgentConfig>;
@@ -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>;