oh-my-opencode 2.9.1 → 2.10.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 (37) hide show
  1. package/README.md +16 -0
  2. package/dist/agents/utils.d.ts +7 -1
  3. package/dist/cli/doctor/checks/gh.d.ts +13 -0
  4. package/dist/cli/doctor/checks/gh.test.d.ts +1 -0
  5. package/dist/cli/doctor/checks/index.d.ts +1 -0
  6. package/dist/cli/doctor/constants.d.ts +1 -0
  7. package/dist/cli/index.js +148 -4
  8. package/dist/config/schema.d.ts +9 -0
  9. package/dist/features/builtin-skills/types.d.ts +2 -0
  10. package/dist/features/opencode-skill-loader/loader.test.d.ts +1 -0
  11. package/dist/features/opencode-skill-loader/types.d.ts +3 -0
  12. package/dist/features/skill-mcp-manager/index.d.ts +2 -0
  13. package/dist/features/skill-mcp-manager/manager.d.ts +21 -0
  14. package/dist/features/skill-mcp-manager/manager.test.d.ts +1 -0
  15. package/dist/features/skill-mcp-manager/types.d.ts +11 -0
  16. package/dist/google-auth.js +3 -3
  17. package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +1 -1
  18. package/dist/hooks/auto-slash-command/constants.d.ts +5 -0
  19. package/dist/hooks/auto-slash-command/detector.d.ts +9 -0
  20. package/dist/hooks/auto-slash-command/detector.test.d.ts +1 -0
  21. package/dist/hooks/auto-slash-command/executor.d.ts +7 -0
  22. package/dist/hooks/auto-slash-command/index.d.ts +8 -0
  23. package/dist/hooks/auto-slash-command/index.test.d.ts +1 -0
  24. package/dist/hooks/auto-slash-command/types.d.ts +27 -0
  25. package/dist/hooks/index.d.ts +1 -0
  26. package/dist/hooks/keyword-detector/detector.d.ts +5 -0
  27. package/dist/hooks/keyword-detector/index.d.ts +2 -1
  28. package/dist/index.js +25737 -12972
  29. package/dist/tools/index.d.ts +1 -0
  30. package/dist/tools/skill/tools.test.d.ts +1 -0
  31. package/dist/tools/skill/types.d.ts +5 -0
  32. package/dist/tools/skill-mcp/constants.d.ts +2 -0
  33. package/dist/tools/skill-mcp/index.d.ts +3 -0
  34. package/dist/tools/skill-mcp/tools.d.ts +11 -0
  35. package/dist/tools/skill-mcp/tools.test.d.ts +1 -0
  36. package/dist/tools/skill-mcp/types.d.ts +8 -0
  37. package/package.json +4 -1
package/README.md CHANGED
@@ -846,6 +846,22 @@ Or disable via `disabled_agents` in `~/.config/opencode/oh-my-opencode.json` or
846
846
 
847
847
  Available agents: `oracle`, `librarian`, `explore`, `frontend-ui-ux-engineer`, `document-writer`, `multimodal-looker`
848
848
 
849
+ ### Built-in Skills
850
+
851
+ Oh My OpenCode includes built-in skills that provide additional capabilities:
852
+
853
+ - **playwright**: Browser automation with Playwright MCP. Use for web scraping, testing, screenshots, and browser interactions.
854
+
855
+ Disable built-in skills via `disabled_skills` in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`:
856
+
857
+ ```json
858
+ {
859
+ "disabled_skills": ["playwright"]
860
+ }
861
+ ```
862
+
863
+ Available built-in skills: `playwright`
864
+
849
865
  ### Sisyphus Agent
850
866
 
851
867
  When enabled (default), Sisyphus provides a powerful orchestrator with optional specialized agents:
@@ -1,4 +1,10 @@
1
1
  import type { AgentConfig } from "@opencode-ai/sdk";
2
2
  import type { BuiltinAgentName, AgentOverrides } from "./types";
3
- export declare function createEnvContext(directory: string): string;
3
+ /**
4
+ * Creates OmO-specific environment context (time, timezone, locale).
5
+ * Note: Working directory, platform, and date are already provided by OpenCode's system.ts,
6
+ * so we only include fields that OpenCode doesn't provide to avoid duplication.
7
+ * See: https://github.com/code-yeongyu/oh-my-opencode/issues/379
8
+ */
9
+ export declare function createEnvContext(): string;
4
10
  export declare function createBuiltinAgents(disabledAgents?: BuiltinAgentName[], agentOverrides?: AgentOverrides, directory?: string, systemDefaultModel?: string): Record<string, AgentConfig>;
@@ -0,0 +1,13 @@
1
+ import type { CheckResult, CheckDefinition } from "../types";
2
+ export interface GhCliInfo {
3
+ installed: boolean;
4
+ version: string | null;
5
+ path: string | null;
6
+ authenticated: boolean;
7
+ username: string | null;
8
+ scopes: string[];
9
+ error: string | null;
10
+ }
11
+ export declare function getGhCliInfo(): Promise<GhCliInfo>;
12
+ export declare function checkGhCli(): Promise<CheckResult>;
13
+ export declare function getGhCliCheckDefinition(): CheckDefinition;
@@ -0,0 +1 @@
1
+ export {};
@@ -4,6 +4,7 @@ export * from "./plugin";
4
4
  export * from "./config";
5
5
  export * from "./auth";
6
6
  export * from "./dependencies";
7
+ export * from "./gh";
7
8
  export * from "./lsp";
8
9
  export * from "./mcp";
9
10
  export * from "./version";
@@ -23,6 +23,7 @@ export declare const CHECK_IDS: {
23
23
  readonly DEP_AST_GREP_CLI: "dep-ast-grep-cli";
24
24
  readonly DEP_AST_GREP_NAPI: "dep-ast-grep-napi";
25
25
  readonly DEP_COMMENT_CHECKER: "dep-comment-checker";
26
+ readonly GH_CLI: "gh-cli";
26
27
  readonly LSP_SERVERS: "lsp-servers";
27
28
  readonly MCP_BUILTIN: "mcp-builtin";
28
29
  readonly MCP_USER: "mcp-user";
package/dist/cli/index.js CHANGED
@@ -2657,7 +2657,7 @@ var require_napi = __commonJS((exports, module) => {
2657
2657
  var require_package = __commonJS((exports, module) => {
2658
2658
  module.exports = {
2659
2659
  name: "oh-my-opencode",
2660
- version: "2.9.0",
2660
+ version: "2.9.1",
2661
2661
  description: "OpenCode plugin - custom agents (oracle, librarian) and enhanced features",
2662
2662
  main: "dist/index.js",
2663
2663
  types: "dist/index.d.ts",
@@ -2711,11 +2711,13 @@ var require_package = __commonJS((exports, module) => {
2711
2711
  "@ast-grep/napi": "^0.40.0",
2712
2712
  "@clack/prompts": "^0.11.0",
2713
2713
  "@code-yeongyu/comment-checker": "^0.6.1",
2714
+ "@modelcontextprotocol/sdk": "^1.25.1",
2714
2715
  "@openauthjs/openauth": "^0.4.3",
2715
2716
  "@opencode-ai/plugin": "^1.0.162",
2716
2717
  "@opencode-ai/sdk": "^1.0.162",
2717
2718
  commander: "^14.0.2",
2718
2719
  hono: "^4.10.4",
2720
+ "js-yaml": "^4.1.1",
2719
2721
  "jsonc-parser": "^3.3.1",
2720
2722
  picocolors: "^1.1.1",
2721
2723
  picomatch: "^4.0.2",
@@ -2723,6 +2725,7 @@ var require_package = __commonJS((exports, module) => {
2723
2725
  zod: "^4.1.8"
2724
2726
  },
2725
2727
  devDependencies: {
2728
+ "@types/js-yaml": "^4.0.9",
2726
2729
  "@types/picomatch": "^3.0.2",
2727
2730
  "bun-types": "latest",
2728
2731
  typescript: "^5.7.3"
@@ -7242,6 +7245,7 @@ var CHECK_IDS = {
7242
7245
  DEP_AST_GREP_CLI: "dep-ast-grep-cli",
7243
7246
  DEP_AST_GREP_NAPI: "dep-ast-grep-napi",
7244
7247
  DEP_COMMENT_CHECKER: "dep-comment-checker",
7248
+ GH_CLI: "gh-cli",
7245
7249
  LSP_SERVERS: "lsp-servers",
7246
7250
  MCP_BUILTIN: "mcp-builtin",
7247
7251
  MCP_USER: "mcp-user",
@@ -7257,6 +7261,7 @@ var CHECK_NAMES = {
7257
7261
  [CHECK_IDS.DEP_AST_GREP_CLI]: "AST-Grep CLI",
7258
7262
  [CHECK_IDS.DEP_AST_GREP_NAPI]: "AST-Grep NAPI",
7259
7263
  [CHECK_IDS.DEP_COMMENT_CHECKER]: "Comment Checker",
7264
+ [CHECK_IDS.GH_CLI]: "GitHub CLI",
7260
7265
  [CHECK_IDS.LSP_SERVERS]: "LSP Servers",
7261
7266
  [CHECK_IDS.MCP_BUILTIN]: "Built-in MCP Servers",
7262
7267
  [CHECK_IDS.MCP_USER]: "User MCP Configuration",
@@ -19839,6 +19844,9 @@ var BuiltinAgentNameSchema = exports_external.enum([
19839
19844
  "document-writer",
19840
19845
  "multimodal-looker"
19841
19846
  ]);
19847
+ var BuiltinSkillNameSchema = exports_external.enum([
19848
+ "playwright"
19849
+ ]);
19842
19850
  var OverridableAgentNameSchema = exports_external.enum([
19843
19851
  "build",
19844
19852
  "plan",
@@ -19878,7 +19886,8 @@ var HookNameSchema = exports_external.enum([
19878
19886
  "ralph-loop",
19879
19887
  "preemptive-compaction",
19880
19888
  "compaction-context-injector",
19881
- "claude-code-hooks"
19889
+ "claude-code-hooks",
19890
+ "auto-slash-command"
19882
19891
  ]);
19883
19892
  var BuiltinCommandNameSchema = exports_external.enum([
19884
19893
  "init-deep"
@@ -20010,6 +20019,7 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
20010
20019
  $schema: exports_external.string().optional(),
20011
20020
  disabled_mcps: exports_external.array(McpNameSchema).optional(),
20012
20021
  disabled_agents: exports_external.array(BuiltinAgentNameSchema).optional(),
20022
+ disabled_skills: exports_external.array(BuiltinSkillNameSchema).optional(),
20013
20023
  disabled_hooks: exports_external.array(HookNameSchema).optional(),
20014
20024
  disabled_commands: exports_external.array(BuiltinCommandNameSchema).optional(),
20015
20025
  agents: AgentOverridesSchema.optional(),
@@ -20363,6 +20373,139 @@ function getDependencyCheckDefinitions() {
20363
20373
  ];
20364
20374
  }
20365
20375
 
20376
+ // src/cli/doctor/checks/gh.ts
20377
+ async function checkBinaryExists2(binary) {
20378
+ try {
20379
+ const proc = Bun.spawn(["which", binary], { stdout: "pipe", stderr: "pipe" });
20380
+ const output = await new Response(proc.stdout).text();
20381
+ await proc.exited;
20382
+ if (proc.exitCode === 0) {
20383
+ return { exists: true, path: output.trim() };
20384
+ }
20385
+ } catch {}
20386
+ return { exists: false, path: null };
20387
+ }
20388
+ async function getGhVersion() {
20389
+ try {
20390
+ const proc = Bun.spawn(["gh", "--version"], { stdout: "pipe", stderr: "pipe" });
20391
+ const output = await new Response(proc.stdout).text();
20392
+ await proc.exited;
20393
+ if (proc.exitCode === 0) {
20394
+ const match = output.match(/gh version (\S+)/);
20395
+ return match?.[1] ?? output.trim().split(`
20396
+ `)[0];
20397
+ }
20398
+ } catch {}
20399
+ return null;
20400
+ }
20401
+ async function getGhAuthStatus() {
20402
+ try {
20403
+ const proc = Bun.spawn(["gh", "auth", "status"], {
20404
+ stdout: "pipe",
20405
+ stderr: "pipe",
20406
+ env: { ...process.env, GH_NO_UPDATE_NOTIFIER: "1" }
20407
+ });
20408
+ const stdout = await new Response(proc.stdout).text();
20409
+ const stderr = await new Response(proc.stderr).text();
20410
+ await proc.exited;
20411
+ const output = stderr || stdout;
20412
+ if (proc.exitCode === 0) {
20413
+ const usernameMatch = output.match(/Logged in to github\.com account (\S+)/);
20414
+ const username = usernameMatch?.[1]?.replace(/[()]/g, "") ?? null;
20415
+ const scopesMatch = output.match(/Token scopes?:\s*(.+)/i);
20416
+ const scopes = scopesMatch?.[1] ? scopesMatch[1].split(/,\s*/).map((s) => s.replace(/['"]/g, "").trim()).filter(Boolean) : [];
20417
+ return { authenticated: true, username, scopes, error: null };
20418
+ }
20419
+ const errorMatch = output.match(/error[:\s]+(.+)/i);
20420
+ return {
20421
+ authenticated: false,
20422
+ username: null,
20423
+ scopes: [],
20424
+ error: errorMatch?.[1]?.trim() ?? "Not authenticated"
20425
+ };
20426
+ } catch (err) {
20427
+ return {
20428
+ authenticated: false,
20429
+ username: null,
20430
+ scopes: [],
20431
+ error: err instanceof Error ? err.message : "Failed to check auth status"
20432
+ };
20433
+ }
20434
+ }
20435
+ async function getGhCliInfo() {
20436
+ const binaryCheck = await checkBinaryExists2("gh");
20437
+ if (!binaryCheck.exists) {
20438
+ return {
20439
+ installed: false,
20440
+ version: null,
20441
+ path: null,
20442
+ authenticated: false,
20443
+ username: null,
20444
+ scopes: [],
20445
+ error: null
20446
+ };
20447
+ }
20448
+ const [version2, authStatus] = await Promise.all([getGhVersion(), getGhAuthStatus()]);
20449
+ return {
20450
+ installed: true,
20451
+ version: version2,
20452
+ path: binaryCheck.path,
20453
+ authenticated: authStatus.authenticated,
20454
+ username: authStatus.username,
20455
+ scopes: authStatus.scopes,
20456
+ error: authStatus.error
20457
+ };
20458
+ }
20459
+ async function checkGhCli() {
20460
+ const info = await getGhCliInfo();
20461
+ const name = CHECK_NAMES[CHECK_IDS.GH_CLI];
20462
+ if (!info.installed) {
20463
+ return {
20464
+ name,
20465
+ status: "warn",
20466
+ message: "Not installed (optional)",
20467
+ details: [
20468
+ "GitHub CLI is used by librarian agent and scripts",
20469
+ "Install: https://cli.github.com/"
20470
+ ]
20471
+ };
20472
+ }
20473
+ if (!info.authenticated) {
20474
+ return {
20475
+ name,
20476
+ status: "warn",
20477
+ message: `${info.version ?? "installed"} - not authenticated`,
20478
+ details: [
20479
+ info.path ? `Path: ${info.path}` : null,
20480
+ "Authenticate: gh auth login",
20481
+ info.error ? `Error: ${info.error}` : null
20482
+ ].filter((d3) => d3 !== null)
20483
+ };
20484
+ }
20485
+ const details = [];
20486
+ if (info.path)
20487
+ details.push(`Path: ${info.path}`);
20488
+ if (info.username)
20489
+ details.push(`Account: ${info.username}`);
20490
+ if (info.scopes.length > 0)
20491
+ details.push(`Scopes: ${info.scopes.join(", ")}`);
20492
+ return {
20493
+ name,
20494
+ status: "pass",
20495
+ message: `${info.version ?? "installed"} - authenticated as ${info.username ?? "unknown"}`,
20496
+ details: details.length > 0 ? details : undefined
20497
+ };
20498
+ }
20499
+ function getGhCliCheckDefinition() {
20500
+ return {
20501
+ id: CHECK_IDS.GH_CLI,
20502
+ name: CHECK_NAMES[CHECK_IDS.GH_CLI],
20503
+ category: "tools",
20504
+ check: checkGhCli,
20505
+ critical: false
20506
+ };
20507
+ }
20508
+
20366
20509
  // src/cli/doctor/checks/lsp.ts
20367
20510
  var DEFAULT_LSP_SERVERS = [
20368
20511
  { id: "typescript-language-server", binary: "typescript-language-server", extensions: [".ts", ".tsx", ".js", ".jsx"] },
@@ -20370,7 +20513,7 @@ var DEFAULT_LSP_SERVERS = [
20370
20513
  { id: "rust-analyzer", binary: "rust-analyzer", extensions: [".rs"] },
20371
20514
  { id: "gopls", binary: "gopls", extensions: [".go"] }
20372
20515
  ];
20373
- async function checkBinaryExists2(binary) {
20516
+ async function checkBinaryExists3(binary) {
20374
20517
  try {
20375
20518
  const proc = Bun.spawn(["which", binary], { stdout: "pipe", stderr: "pipe" });
20376
20519
  await proc.exited;
@@ -20382,7 +20525,7 @@ async function checkBinaryExists2(binary) {
20382
20525
  async function getLspServersInfo() {
20383
20526
  const servers = [];
20384
20527
  for (const server2 of DEFAULT_LSP_SERVERS) {
20385
- const installed = await checkBinaryExists2(server2.binary);
20528
+ const installed = await checkBinaryExists3(server2.binary);
20386
20529
  servers.push({
20387
20530
  id: server2.id,
20388
20531
  installed,
@@ -20655,6 +20798,7 @@ function getAllCheckDefinitions() {
20655
20798
  getConfigCheckDefinition(),
20656
20799
  ...getAuthCheckDefinitions(),
20657
20800
  ...getDependencyCheckDefinitions(),
20801
+ getGhCliCheckDefinition(),
20658
20802
  getLspCheckDefinition(),
20659
20803
  ...getMcpCheckDefinitions(),
20660
20804
  getVersionCheckDefinition()
@@ -8,6 +8,9 @@ export declare const BuiltinAgentNameSchema: z.ZodEnum<{
8
8
  "document-writer": "document-writer";
9
9
  "multimodal-looker": "multimodal-looker";
10
10
  }>;
11
+ export declare const BuiltinSkillNameSchema: z.ZodEnum<{
12
+ playwright: "playwright";
13
+ }>;
11
14
  export declare const OverridableAgentNameSchema: z.ZodEnum<{
12
15
  Sisyphus: "Sisyphus";
13
16
  oracle: "oracle";
@@ -57,6 +60,7 @@ export declare const HookNameSchema: z.ZodEnum<{
57
60
  "preemptive-compaction": "preemptive-compaction";
58
61
  "compaction-context-injector": "compaction-context-injector";
59
62
  "claude-code-hooks": "claude-code-hooks";
63
+ "auto-slash-command": "auto-slash-command";
60
64
  }>;
61
65
  export declare const BuiltinCommandNameSchema: z.ZodEnum<{
62
66
  "init-deep": "init-deep";
@@ -781,6 +785,9 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
781
785
  "document-writer": "document-writer";
782
786
  "multimodal-looker": "multimodal-looker";
783
787
  }>>>;
788
+ disabled_skills: z.ZodOptional<z.ZodArray<z.ZodEnum<{
789
+ playwright: "playwright";
790
+ }>>>;
784
791
  disabled_hooks: z.ZodOptional<z.ZodArray<z.ZodEnum<{
785
792
  "anthropic-context-window-limit-recovery": "anthropic-context-window-limit-recovery";
786
793
  "todo-continuation-enforcer": "todo-continuation-enforcer";
@@ -808,6 +815,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
808
815
  "preemptive-compaction": "preemptive-compaction";
809
816
  "compaction-context-injector": "compaction-context-injector";
810
817
  "claude-code-hooks": "claude-code-hooks";
818
+ "auto-slash-command": "auto-slash-command";
811
819
  }>>>;
812
820
  disabled_commands: z.ZodOptional<z.ZodArray<z.ZodEnum<{
813
821
  "init-deep": "init-deep";
@@ -1419,6 +1427,7 @@ export type AgentOverrides = z.infer<typeof AgentOverridesSchema>;
1419
1427
  export type AgentName = z.infer<typeof AgentNameSchema>;
1420
1428
  export type HookName = z.infer<typeof HookNameSchema>;
1421
1429
  export type BuiltinCommandName = z.infer<typeof BuiltinCommandNameSchema>;
1430
+ export type BuiltinSkillName = z.infer<typeof BuiltinSkillNameSchema>;
1422
1431
  export type SisyphusAgentConfig = z.infer<typeof SisyphusAgentConfigSchema>;
1423
1432
  export type CommentCheckerConfig = z.infer<typeof CommentCheckerConfigSchema>;
1424
1433
  export type ExperimentalConfig = z.infer<typeof ExperimentalConfigSchema>;
@@ -1,3 +1,4 @@
1
+ import type { SkillMcpConfig } from "../skill-mcp-manager/types";
1
2
  export interface BuiltinSkill {
2
3
  name: string;
3
4
  description: string;
@@ -10,4 +11,5 @@ export interface BuiltinSkill {
10
11
  model?: string;
11
12
  subtask?: boolean;
12
13
  argumentHint?: string;
14
+ mcpConfig?: SkillMcpConfig;
13
15
  }
@@ -1,4 +1,5 @@
1
1
  import type { CommandDefinition } from "../claude-code-command-loader/types";
2
+ import type { SkillMcpConfig } from "../skill-mcp-manager/types";
2
3
  export type SkillScope = "builtin" | "config" | "user" | "project" | "opencode" | "opencode-project";
3
4
  export interface SkillMetadata {
4
5
  name?: string;
@@ -11,6 +12,7 @@ export interface SkillMetadata {
11
12
  compatibility?: string;
12
13
  metadata?: Record<string, string>;
13
14
  "allowed-tools"?: string;
15
+ mcp?: SkillMcpConfig;
14
16
  }
15
17
  export interface LoadedSkill {
16
18
  name: string;
@@ -22,4 +24,5 @@ export interface LoadedSkill {
22
24
  compatibility?: string;
23
25
  metadata?: Record<string, string>;
24
26
  allowedTools?: string[];
27
+ mcpConfig?: SkillMcpConfig;
25
28
  }
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export { SkillMcpManager } from "./manager";
@@ -0,0 +1,21 @@
1
+ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
+ import type { Tool, Resource, Prompt } from "@modelcontextprotocol/sdk/types.js";
3
+ import type { ClaudeCodeMcpServer } from "../claude-code-mcp-loader/types";
4
+ import type { SkillMcpClientInfo, SkillMcpServerContext } from "./types";
5
+ export declare class SkillMcpManager {
6
+ private clients;
7
+ private getClientKey;
8
+ getOrCreateClient(info: SkillMcpClientInfo, config: ClaudeCodeMcpServer): Promise<Client>;
9
+ private createClient;
10
+ disconnectSession(sessionID: string): Promise<void>;
11
+ disconnectAll(): Promise<void>;
12
+ listTools(info: SkillMcpClientInfo, context: SkillMcpServerContext): Promise<Tool[]>;
13
+ listResources(info: SkillMcpClientInfo, context: SkillMcpServerContext): Promise<Resource[]>;
14
+ listPrompts(info: SkillMcpClientInfo, context: SkillMcpServerContext): Promise<Prompt[]>;
15
+ callTool(info: SkillMcpClientInfo, context: SkillMcpServerContext, name: string, args: Record<string, unknown>): Promise<unknown>;
16
+ readResource(info: SkillMcpClientInfo, context: SkillMcpServerContext, uri: string): Promise<unknown>;
17
+ getPrompt(info: SkillMcpClientInfo, context: SkillMcpServerContext, name: string, args: Record<string, string>): Promise<unknown>;
18
+ private getOrCreateClientWithRetry;
19
+ getConnectedServers(): string[];
20
+ isConnected(info: SkillMcpClientInfo): boolean;
21
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { ClaudeCodeMcpServer } from "../claude-code-mcp-loader/types";
2
+ export type SkillMcpConfig = Record<string, ClaudeCodeMcpServer>;
3
+ export interface SkillMcpClientInfo {
4
+ serverName: string;
5
+ skillName: string;
6
+ sessionID: string;
7
+ }
8
+ export interface SkillMcpServerContext {
9
+ config: ClaudeCodeMcpServer;
10
+ skillName: string;
11
+ }
@@ -59,12 +59,12 @@ var GOOGLE_TOKEN_URL = "https://oauth2.googleapis.com/token";
59
59
  var GOOGLE_USERINFO_URL = "https://www.googleapis.com/oauth2/v1/userinfo";
60
60
  var ANTIGRAVITY_TOKEN_REFRESH_BUFFER_MS = 60000;
61
61
  var SKIP_THOUGHT_SIGNATURE_VALIDATOR = "skip_thought_signature_validator";
62
- // node_modules/jose/dist/browser/lib/buffer_utils.js
62
+ // node_modules/@openauthjs/openauth/node_modules/jose/dist/browser/lib/buffer_utils.js
63
63
  var encoder = new TextEncoder;
64
64
  var decoder = new TextDecoder;
65
65
  var MAX_INT32 = 2 ** 32;
66
66
 
67
- // node_modules/jose/dist/browser/runtime/base64url.js
67
+ // node_modules/@openauthjs/openauth/node_modules/jose/dist/browser/runtime/base64url.js
68
68
  var encodeBase64 = (input) => {
69
69
  let unencoded = input;
70
70
  if (typeof unencoded === "string") {
@@ -101,7 +101,7 @@ var decode = (input) => {
101
101
  }
102
102
  };
103
103
 
104
- // node_modules/jose/dist/browser/util/base64url.js
104
+ // node_modules/@openauthjs/openauth/node_modules/jose/dist/browser/util/base64url.js
105
105
  var exports_base64url = {};
106
106
  __export(exports_base64url, {
107
107
  encode: () => encode2,
@@ -38,5 +38,5 @@ export declare const TRUNCATE_CONFIG: {
38
38
  readonly maxTruncateAttempts: 20;
39
39
  readonly minOutputSizeToTruncate: 500;
40
40
  readonly targetTokenRatio: 0.5;
41
- readonly charsPerToken: 4;
41
+ readonly charsPerToken: 2;
42
42
  };
@@ -0,0 +1,5 @@
1
+ export declare const HOOK_NAME: "auto-slash-command";
2
+ export declare const AUTO_SLASH_COMMAND_TAG_OPEN = "<auto-slash-command>";
3
+ export declare const AUTO_SLASH_COMMAND_TAG_CLOSE = "</auto-slash-command>";
4
+ export declare const SLASH_COMMAND_PATTERN: RegExp;
5
+ export declare const EXCLUDED_COMMANDS: Set<string>;
@@ -0,0 +1,9 @@
1
+ import type { ParsedSlashCommand } from "./types";
2
+ export declare function removeCodeBlocks(text: string): string;
3
+ export declare function parseSlashCommand(text: string): ParsedSlashCommand | null;
4
+ export declare function isExcludedCommand(command: string): boolean;
5
+ export declare function detectSlashCommand(text: string): ParsedSlashCommand | null;
6
+ export declare function extractPromptText(parts: Array<{
7
+ type: string;
8
+ text?: string;
9
+ }>): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { ParsedSlashCommand } from "./types";
2
+ export interface ExecuteResult {
3
+ success: boolean;
4
+ replacementText?: string;
5
+ error?: string;
6
+ }
7
+ export declare function executeSlashCommand(parsed: ParsedSlashCommand): Promise<ExecuteResult>;
@@ -0,0 +1,8 @@
1
+ import type { AutoSlashCommandHookInput, AutoSlashCommandHookOutput } from "./types";
2
+ export * from "./detector";
3
+ export * from "./executor";
4
+ export * from "./constants";
5
+ export * from "./types";
6
+ export declare function createAutoSlashCommandHook(): {
7
+ "chat.message": (input: AutoSlashCommandHookInput, output: AutoSlashCommandHookOutput) => Promise<void>;
8
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ export interface AutoSlashCommandHookInput {
2
+ sessionID: string;
3
+ agent?: string;
4
+ model?: {
5
+ providerID: string;
6
+ modelID: string;
7
+ };
8
+ messageID?: string;
9
+ }
10
+ export interface AutoSlashCommandHookOutput {
11
+ message: Record<string, unknown>;
12
+ parts: Array<{
13
+ type: string;
14
+ text?: string;
15
+ [key: string]: unknown;
16
+ }>;
17
+ }
18
+ export interface ParsedSlashCommand {
19
+ command: string;
20
+ args: string;
21
+ raw: string;
22
+ }
23
+ export interface AutoSlashCommandResult {
24
+ detected: boolean;
25
+ parsedCommand?: ParsedSlashCommand;
26
+ injectedMessage?: string;
27
+ }
@@ -22,3 +22,4 @@ export { createInteractiveBashSessionHook } from "./interactive-bash-session";
22
22
  export { createEmptyMessageSanitizerHook } from "./empty-message-sanitizer";
23
23
  export { createThinkingBlockValidatorHook } from "./thinking-block-validator";
24
24
  export { createRalphLoopHook, type RalphLoopHook } from "./ralph-loop";
25
+ export { createAutoSlashCommandHook } from "./auto-slash-command";
@@ -1,5 +1,10 @@
1
+ export interface DetectedKeyword {
2
+ type: "ultrawork" | "search" | "analyze";
3
+ message: string;
4
+ }
1
5
  export declare function removeCodeBlocks(text: string): string;
2
6
  export declare function detectKeywords(text: string): string[];
7
+ export declare function detectKeywordsWithType(text: string): DetectedKeyword[];
3
8
  export declare function extractPromptText(parts: Array<{
4
9
  type: string;
5
10
  text?: string;
@@ -1,7 +1,8 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
1
2
  export * from "./detector";
2
3
  export * from "./constants";
3
4
  export * from "./types";
4
- export declare function createKeywordDetectorHook(): {
5
+ export declare function createKeywordDetectorHook(ctx: PluginInput): {
5
6
  "chat.message": (input: {
6
7
  sessionID: string;
7
8
  agent?: string;