oh-my-opencode-kikokikok 2.14.1 → 2.15.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.
@@ -1,10 +1,13 @@
1
1
  export type ClaudeSubscription = "no" | "yes" | "max20";
2
2
  export type BooleanArg = "no" | "yes";
3
+ export type MemoryProvider = "no" | "mem0-cloud" | "mem0-local" | "letta";
3
4
  export interface InstallArgs {
4
5
  tui: boolean;
5
6
  claude?: ClaudeSubscription;
6
7
  chatgpt?: BooleanArg;
7
8
  gemini?: BooleanArg;
9
+ memory?: MemoryProvider;
10
+ memoryEndpoint?: string;
8
11
  skipAuth?: boolean;
9
12
  }
10
13
  export interface InstallConfig {
@@ -12,6 +15,8 @@ export interface InstallConfig {
12
15
  isMax20: boolean;
13
16
  hasChatGPT: boolean;
14
17
  hasGemini: boolean;
18
+ memoryProvider: MemoryProvider;
19
+ memoryEndpoint?: string;
15
20
  }
16
21
  export interface ConfigMergeResult {
17
22
  success: boolean;
@@ -24,4 +29,6 @@ export interface DetectedConfig {
24
29
  isMax20: boolean;
25
30
  hasChatGPT: boolean;
26
31
  hasGemini: boolean;
32
+ memoryProvider: MemoryProvider;
33
+ memoryEndpoint?: string;
27
34
  }
@@ -1512,8 +1512,20 @@ export declare const OpenSpecConfigSchema: z.ZodObject<{
1512
1512
  }>>>;
1513
1513
  rootDir: z.ZodDefault<z.ZodString>;
1514
1514
  }, z.core.$strip>;
1515
+ export declare const MCPTransportTypeSchema: z.ZodEnum<{
1516
+ stdio: "stdio";
1517
+ sse: "sse";
1518
+ }>;
1515
1519
  export declare const MCPKnowledgeProviderConfigSchema: z.ZodObject<{
1516
1520
  name: z.ZodString;
1521
+ transport: z.ZodOptional<z.ZodEnum<{
1522
+ stdio: "stdio";
1523
+ sse: "sse";
1524
+ }>>;
1525
+ command: z.ZodOptional<z.ZodString>;
1526
+ args: z.ZodOptional<z.ZodArray<z.ZodString>>;
1527
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1528
+ url: z.ZodOptional<z.ZodString>;
1517
1529
  searchTool: z.ZodString;
1518
1530
  getTool: z.ZodOptional<z.ZodString>;
1519
1531
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -1551,6 +1563,14 @@ export declare const KnowledgeProviderConfigSchema: z.ZodObject<{
1551
1563
  enabled: z.ZodDefault<z.ZodBoolean>;
1552
1564
  servers: z.ZodDefault<z.ZodArray<z.ZodObject<{
1553
1565
  name: z.ZodString;
1566
+ transport: z.ZodOptional<z.ZodEnum<{
1567
+ stdio: "stdio";
1568
+ sse: "sse";
1569
+ }>>;
1570
+ command: z.ZodOptional<z.ZodString>;
1571
+ args: z.ZodOptional<z.ZodArray<z.ZodString>>;
1572
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1573
+ url: z.ZodOptional<z.ZodString>;
1554
1574
  searchTool: z.ZodString;
1555
1575
  getTool: z.ZodOptional<z.ZodString>;
1556
1576
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -2878,6 +2898,28 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
2878
2898
  company: "company";
2879
2899
  }>>>;
2880
2900
  }, z.core.$strip>>;
2901
+ letta: z.ZodOptional<z.ZodObject<{
2902
+ enabled: z.ZodDefault<z.ZodBoolean>;
2903
+ apiKey: z.ZodOptional<z.ZodString>;
2904
+ endpoint: z.ZodOptional<z.ZodString>;
2905
+ userId: z.ZodOptional<z.ZodString>;
2906
+ sessionId: z.ZodOptional<z.ZodString>;
2907
+ projectId: z.ZodOptional<z.ZodString>;
2908
+ teamId: z.ZodOptional<z.ZodString>;
2909
+ orgId: z.ZodOptional<z.ZodString>;
2910
+ companyId: z.ZodOptional<z.ZodString>;
2911
+ agentId: z.ZodOptional<z.ZodString>;
2912
+ autoRehydrate: z.ZodDefault<z.ZodBoolean>;
2913
+ rehydrateLayers: z.ZodDefault<z.ZodArray<z.ZodEnum<{
2914
+ user: "user";
2915
+ agent: "agent";
2916
+ session: "session";
2917
+ project: "project";
2918
+ team: "team";
2919
+ org: "org";
2920
+ company: "company";
2921
+ }>>>;
2922
+ }, z.core.$strip>>;
2881
2923
  knowledge_repo: z.ZodOptional<z.ZodObject<{
2882
2924
  enabled: z.ZodDefault<z.ZodBoolean>;
2883
2925
  rootDir: z.ZodDefault<z.ZodString>;
@@ -2921,6 +2963,14 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
2921
2963
  enabled: z.ZodDefault<z.ZodBoolean>;
2922
2964
  servers: z.ZodDefault<z.ZodArray<z.ZodObject<{
2923
2965
  name: z.ZodString;
2966
+ transport: z.ZodOptional<z.ZodEnum<{
2967
+ stdio: "stdio";
2968
+ sse: "sse";
2969
+ }>>;
2970
+ command: z.ZodOptional<z.ZodString>;
2971
+ args: z.ZodOptional<z.ZodArray<z.ZodString>>;
2972
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2973
+ url: z.ZodOptional<z.ZodString>;
2924
2974
  searchTool: z.ZodString;
2925
2975
  getTool: z.ZodOptional<z.ZodString>;
2926
2976
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -6,3 +6,4 @@ export { MCPKnowledgeProvider } from "./providers/mcp";
6
6
  export type { MCPInvoker } from "./providers/mcp";
7
7
  export { NotebookLMKnowledgeProvider } from "./providers/notebooklm";
8
8
  export type { NotebookLMProviderConfig } from "./providers/notebooklm";
9
+ export { KnowledgeMcpManager } from "./mcp-manager";
@@ -0,0 +1,67 @@
1
+ import type { MCPInvoker } from "./providers/mcp";
2
+ import type { MCPProviderConfig } from "./types";
3
+ /**
4
+ * Manages MCP server connections for knowledge providers.
5
+ * Implements MCPInvoker interface to allow MCPKnowledgeProvider to invoke tools.
6
+ *
7
+ * Based on SkillMcpManager pattern but simplified for knowledge provider use case.
8
+ */
9
+ export declare class KnowledgeMcpManager implements MCPInvoker {
10
+ private clients;
11
+ private pendingConnections;
12
+ private serverConfigs;
13
+ private cleanupRegistered;
14
+ private cleanupInterval;
15
+ private readonly IDLE_TIMEOUT;
16
+ /**
17
+ * Register an MCP server configuration.
18
+ * The server will be started lazily on first invoke.
19
+ */
20
+ registerServer(config: MCPProviderConfig): void;
21
+ /**
22
+ * Unregister an MCP server and disconnect if connected.
23
+ */
24
+ unregisterServer(serverName: string): Promise<void>;
25
+ /**
26
+ * Check if an MCP server is available (registered and can connect).
27
+ */
28
+ isServerAvailable(serverName: string): Promise<boolean>;
29
+ /**
30
+ * Invoke a tool on an MCP server.
31
+ */
32
+ invoke(serverName: string, toolName: string, args: Record<string, unknown>): Promise<unknown>;
33
+ /**
34
+ * Get or create a client for the given server.
35
+ */
36
+ private getOrCreateClient;
37
+ /**
38
+ * Create a new MCP client connection.
39
+ */
40
+ private createClient;
41
+ private createStdioTransport;
42
+ private createSseTransport;
43
+ /**
44
+ * Disconnect a specific server.
45
+ */
46
+ private disconnectServer;
47
+ /**
48
+ * Disconnect all servers and clean up.
49
+ */
50
+ disconnectAll(): Promise<void>;
51
+ private registerProcessCleanup;
52
+ private startCleanupTimer;
53
+ private stopCleanupTimer;
54
+ private cleanupIdleClients;
55
+ /**
56
+ * Get list of registered server names.
57
+ */
58
+ getRegisteredServers(): string[];
59
+ /**
60
+ * Get list of connected server names.
61
+ */
62
+ getConnectedServers(): string[];
63
+ /**
64
+ * Check if a server is currently connected.
65
+ */
66
+ isConnected(serverName: string): boolean;
67
+ }
@@ -232,17 +232,37 @@ export interface Mem0ProviderConfig {
232
232
  /** Layers to search */
233
233
  searchLayers?: MemoryLayer[];
234
234
  }
235
+ /**
236
+ * Transport type for MCP connections.
237
+ * - stdio: Spawns a local process and communicates via stdin/stdout (default)
238
+ * - sse: Connects to an HTTP/SSE endpoint (for servers like Dust CLI that run as HTTP servers)
239
+ */
240
+ export type MCPTransportType = "stdio" | "sse";
235
241
  /**
236
242
  * Configuration for an MCP knowledge provider.
237
243
  */
238
244
  export interface MCPProviderConfig {
239
- /** MCP server name (from .mcp.json) */
245
+ /** MCP server name (unique identifier) */
240
246
  name: string;
247
+ /**
248
+ * Transport type for connecting to the MCP server.
249
+ * - "stdio" (default): Spawn a local process
250
+ * - "sse": Connect to an HTTP/SSE endpoint
251
+ */
252
+ transport?: MCPTransportType;
253
+ /** Command to start the MCP server (e.g., 'npx'). Required for stdio transport. */
254
+ command?: string;
255
+ /** Arguments for the command */
256
+ args?: string[];
257
+ /** Environment variables for the MCP process */
258
+ env?: Record<string, string>;
259
+ /** URL for SSE transport (e.g., 'http://localhost:60062/sse'). Required for sse transport. */
260
+ url?: string;
241
261
  /** Tool name for search operations */
242
262
  searchTool: string;
243
263
  /** Tool name for get-by-id operations */
244
264
  getTool?: string;
245
- /** Additional config for the MCP */
265
+ /** Additional config passed to MCP tools */
246
266
  config?: Record<string, unknown>;
247
267
  }
248
268
  /**