@oh-my-pi/cli 0.3.0 → 0.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.
- package/README.md +79 -84
- package/dist/cli.js +5025 -1016
- package/dist/commands/config.d.ts +27 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/features.d.ts.map +1 -1
- package/dist/commands/info.d.ts.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/install.d.ts +6 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/link.d.ts +1 -0
- package/dist/commands/link.d.ts.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/outdated.d.ts.map +1 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/uninstall.d.ts +3 -0
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/update.d.ts +1 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/why.d.ts.map +1 -1
- package/dist/conflicts.d.ts +7 -2
- package/dist/conflicts.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lock.d.ts.map +1 -1
- package/dist/lockfile.d.ts +24 -3
- package/dist/lockfile.d.ts.map +1 -1
- package/dist/manifest.d.ts +12 -1
- package/dist/manifest.d.ts.map +1 -1
- package/dist/npm.d.ts +11 -0
- package/dist/npm.d.ts.map +1 -1
- package/dist/output.d.ts +51 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/paths.d.ts +5 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/progress.d.ts +78 -0
- package/dist/progress.d.ts.map +1 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/symlinks.d.ts +1 -0
- package/dist/symlinks.d.ts.map +1 -1
- package/package.json +24 -10
- package/.github/icon.png +0 -0
- package/.github/logo.png +0 -0
- package/.github/workflows/ci.yml +0 -32
- package/.github/workflows/publish.yml +0 -42
- package/biome.json +0 -29
- package/bun.lock +0 -109
- package/plugins/exa/README.md +0 -153
- package/plugins/exa/package.json +0 -56
- package/plugins/exa/tools/exa/company.ts +0 -35
- package/plugins/exa/tools/exa/index.ts +0 -66
- package/plugins/exa/tools/exa/linkedin.ts +0 -35
- package/plugins/exa/tools/exa/researcher.ts +0 -40
- package/plugins/exa/tools/exa/runtime.json +0 -4
- package/plugins/exa/tools/exa/search.ts +0 -46
- package/plugins/exa/tools/exa/shared.ts +0 -230
- package/plugins/exa/tools/exa/websets.ts +0 -62
- package/plugins/metal-theme/README.md +0 -13
- package/plugins/metal-theme/omp.json +0 -8
- package/plugins/metal-theme/package.json +0 -19
- package/plugins/metal-theme/themes/metal.json +0 -79
- package/plugins/subagents/README.md +0 -25
- package/plugins/subagents/agents/explore.md +0 -71
- package/plugins/subagents/agents/planner.md +0 -51
- package/plugins/subagents/agents/reviewer.md +0 -53
- package/plugins/subagents/agents/task.md +0 -46
- package/plugins/subagents/commands/architect-plan.md +0 -9
- package/plugins/subagents/commands/implement-with-critic.md +0 -10
- package/plugins/subagents/commands/implement.md +0 -10
- package/plugins/subagents/omp.json +0 -15
- package/plugins/subagents/package.json +0 -26
- package/plugins/subagents/tools/task/index.ts +0 -1019
- package/plugins/user-prompt/README.md +0 -130
- package/plugins/user-prompt/package.json +0 -19
- package/plugins/user-prompt/tools/user-prompt/index.ts +0 -235
- package/scripts/bump-version.sh +0 -52
- package/scripts/publish.sh +0 -35
- package/src/cli.ts +0 -242
- package/src/commands/config.ts +0 -384
- package/src/commands/create.ts +0 -203
- package/src/commands/doctor.ts +0 -305
- package/src/commands/enable.ts +0 -122
- package/src/commands/env.ts +0 -38
- package/src/commands/features.ts +0 -295
- package/src/commands/info.ts +0 -120
- package/src/commands/init.ts +0 -60
- package/src/commands/install.ts +0 -700
- package/src/commands/link.ts +0 -159
- package/src/commands/list.ts +0 -186
- package/src/commands/outdated.ts +0 -87
- package/src/commands/search.ts +0 -77
- package/src/commands/uninstall.ts +0 -124
- package/src/commands/update.ts +0 -170
- package/src/commands/why.ts +0 -136
- package/src/conflicts.ts +0 -116
- package/src/errors.ts +0 -22
- package/src/index.ts +0 -46
- package/src/lock.ts +0 -46
- package/src/lockfile.ts +0 -132
- package/src/manifest.ts +0 -360
- package/src/npm.ts +0 -206
- package/src/paths.ts +0 -137
- package/src/runtime.ts +0 -116
- package/src/symlinks.ts +0 -455
- package/tsconfig.json +0 -28
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Exa Deep Researcher Tools
|
|
3
|
-
*
|
|
4
|
-
* Tools:
|
|
5
|
-
* - web_search_researcher_start: Start comprehensive AI research tasks
|
|
6
|
-
* - web_search_researcher_check: Check research task status
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import type { TSchema } from "@sinclair/typebox";
|
|
10
|
-
import type { CustomAgentTool, CustomToolFactory, ToolAPI } from "@mariozechner/pi-coding-agent";
|
|
11
|
-
import { callExaTool, createToolWrapper, fetchExaTools, findApiKey } from "./shared";
|
|
12
|
-
|
|
13
|
-
// MCP tool names for this feature
|
|
14
|
-
const TOOL_NAMES = [
|
|
15
|
-
"deep_researcher_start",
|
|
16
|
-
"deep_researcher_check",
|
|
17
|
-
];
|
|
18
|
-
|
|
19
|
-
// Tool name mapping: MCP name -> exposed name
|
|
20
|
-
const NAME_MAP: Record<string, string> = {
|
|
21
|
-
"deep_researcher_start": "web_search_researcher_start",
|
|
22
|
-
"deep_researcher_check": "web_search_researcher_check",
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const factory: CustomToolFactory = async (_toolApi: ToolAPI): Promise<CustomAgentTool<TSchema, unknown>[] | null> => {
|
|
26
|
-
const apiKey = findApiKey();
|
|
27
|
-
if (!apiKey) return null;
|
|
28
|
-
|
|
29
|
-
const mcpTools = await fetchExaTools(apiKey, TOOL_NAMES);
|
|
30
|
-
if (mcpTools.length === 0) return null;
|
|
31
|
-
|
|
32
|
-
const callFn = (toolName: string, args: Record<string, unknown>) =>
|
|
33
|
-
callExaTool(apiKey, TOOL_NAMES, toolName, args);
|
|
34
|
-
|
|
35
|
-
return mcpTools.map((tool) =>
|
|
36
|
-
createToolWrapper(tool, NAME_MAP[tool.name] ?? tool.name, callFn)
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export default factory;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Exa Search Tools - Core web search capabilities
|
|
3
|
-
*
|
|
4
|
-
* Tools:
|
|
5
|
-
* - web_search_general: Real-time web searches
|
|
6
|
-
* - web_search_deep: Natural language web search with synthesis
|
|
7
|
-
* - web_search_code_context: Code search for libraries, docs, examples
|
|
8
|
-
* - web_search_crawl_url: Extract content from specific URLs
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import type { TSchema } from "@sinclair/typebox";
|
|
12
|
-
import type { CustomAgentTool, CustomToolFactory, ToolAPI } from "@mariozechner/pi-coding-agent";
|
|
13
|
-
import { callExaTool, createToolWrapper, fetchExaTools, findApiKey } from "./shared";
|
|
14
|
-
|
|
15
|
-
// MCP tool names for this feature
|
|
16
|
-
const TOOL_NAMES = [
|
|
17
|
-
"web_search_exa",
|
|
18
|
-
"deep_search_exa",
|
|
19
|
-
"get_code_context_exa",
|
|
20
|
-
"crawling_exa",
|
|
21
|
-
];
|
|
22
|
-
|
|
23
|
-
// Tool name mapping: MCP name -> exposed name
|
|
24
|
-
const NAME_MAP: Record<string, string> = {
|
|
25
|
-
"web_search_exa": "web_search_general",
|
|
26
|
-
"deep_search_exa": "web_search_deep",
|
|
27
|
-
"get_code_context_exa": "web_search_code_context",
|
|
28
|
-
"crawling_exa": "web_search_crawl_url",
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const factory: CustomToolFactory = async (_toolApi: ToolAPI): Promise<CustomAgentTool<TSchema, unknown>[] | null> => {
|
|
32
|
-
const apiKey = findApiKey();
|
|
33
|
-
if (!apiKey) return null;
|
|
34
|
-
|
|
35
|
-
const mcpTools = await fetchExaTools(apiKey, TOOL_NAMES);
|
|
36
|
-
if (mcpTools.length === 0) return null;
|
|
37
|
-
|
|
38
|
-
const callFn = (toolName: string, args: Record<string, unknown>) =>
|
|
39
|
-
callExaTool(apiKey, TOOL_NAMES, toolName, args);
|
|
40
|
-
|
|
41
|
-
return mcpTools.map((tool) =>
|
|
42
|
-
createToolWrapper(tool, NAME_MAP[tool.name] ?? tool.name, callFn)
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export default factory;
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared utilities for Exa MCP tools
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as fs from "node:fs";
|
|
6
|
-
import * as os from "node:os";
|
|
7
|
-
import * as path from "node:path";
|
|
8
|
-
import type { TSchema } from "@sinclair/typebox";
|
|
9
|
-
import type { CustomAgentTool } from "@mariozechner/pi-coding-agent";
|
|
10
|
-
|
|
11
|
-
// MCP endpoints
|
|
12
|
-
export const EXA_MCP_URL = "https://mcp.exa.ai/mcp";
|
|
13
|
-
export const WEBSETS_MCP_URL = "https://websetsmcp.exa.ai/mcp";
|
|
14
|
-
|
|
15
|
-
export interface MCPTool {
|
|
16
|
-
name: string;
|
|
17
|
-
description: string;
|
|
18
|
-
inputSchema: TSchema;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface MCPToolsResponse {
|
|
22
|
-
result?: {
|
|
23
|
-
tools: MCPTool[];
|
|
24
|
-
};
|
|
25
|
-
error?: {
|
|
26
|
-
code: number;
|
|
27
|
-
message: string;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Parse a .env file and return key-value pairs
|
|
33
|
-
*/
|
|
34
|
-
function parseEnvFile(filePath: string): Record<string, string> {
|
|
35
|
-
const result: Record<string, string> = {};
|
|
36
|
-
if (!fs.existsSync(filePath)) return result;
|
|
37
|
-
|
|
38
|
-
try {
|
|
39
|
-
const content = fs.readFileSync(filePath, "utf-8");
|
|
40
|
-
for (const line of content.split("\n")) {
|
|
41
|
-
const trimmed = line.trim();
|
|
42
|
-
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
43
|
-
|
|
44
|
-
const eqIndex = trimmed.indexOf("=");
|
|
45
|
-
if (eqIndex === -1) continue;
|
|
46
|
-
|
|
47
|
-
const key = trimmed.slice(0, eqIndex).trim();
|
|
48
|
-
let value = trimmed.slice(eqIndex + 1).trim();
|
|
49
|
-
|
|
50
|
-
// Remove surrounding quotes
|
|
51
|
-
if ((value.startsWith('"') && value.endsWith('"')) || (value.startsWith("'") && value.endsWith("'"))) {
|
|
52
|
-
value = value.slice(1, -1);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
result[key] = value;
|
|
56
|
-
}
|
|
57
|
-
} catch {
|
|
58
|
-
// Ignore read errors
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return result;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Find EXA_API_KEY from environment or .env files
|
|
66
|
-
*/
|
|
67
|
-
export function findApiKey(): string | null {
|
|
68
|
-
// 1. Check environment variable
|
|
69
|
-
if (process.env.EXA_API_KEY) {
|
|
70
|
-
return process.env.EXA_API_KEY;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// 2. Check .env in current directory
|
|
74
|
-
const localEnv = parseEnvFile(path.join(process.cwd(), ".env"));
|
|
75
|
-
if (localEnv.EXA_API_KEY) {
|
|
76
|
-
return localEnv.EXA_API_KEY;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// 3. Check ~/.env
|
|
80
|
-
const homeEnv = parseEnvFile(path.join(os.homedir(), ".env"));
|
|
81
|
-
if (homeEnv.EXA_API_KEY) {
|
|
82
|
-
return homeEnv.EXA_API_KEY;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Call an MCP server endpoint
|
|
90
|
-
*/
|
|
91
|
-
async function callMCP(url: string, method: string, params?: Record<string, unknown>): Promise<unknown> {
|
|
92
|
-
const body = {
|
|
93
|
-
jsonrpc: "2.0",
|
|
94
|
-
method,
|
|
95
|
-
params: params ?? {},
|
|
96
|
-
id: 1,
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
const response = await fetch(url, {
|
|
100
|
-
method: "POST",
|
|
101
|
-
headers: {
|
|
102
|
-
"Content-Type": "application/json",
|
|
103
|
-
Accept: "application/json, text/event-stream",
|
|
104
|
-
},
|
|
105
|
-
body: JSON.stringify(body),
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
const text = await response.text();
|
|
109
|
-
|
|
110
|
-
// Parse SSE response format
|
|
111
|
-
let jsonData: string | null = null;
|
|
112
|
-
for (const line of text.split("\n")) {
|
|
113
|
-
if (line.startsWith("data: ")) {
|
|
114
|
-
jsonData = line.slice(6);
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (!jsonData) {
|
|
120
|
-
// Try parsing as plain JSON
|
|
121
|
-
try {
|
|
122
|
-
return JSON.parse(text);
|
|
123
|
-
} catch {
|
|
124
|
-
throw new Error(`Failed to parse MCP response: ${text.slice(0, 500)}`);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
return JSON.parse(jsonData);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Fetch available tools from Exa MCP server
|
|
133
|
-
*/
|
|
134
|
-
export async function fetchExaTools(apiKey: string, toolNames: string[]): Promise<MCPTool[]> {
|
|
135
|
-
const url = `${EXA_MCP_URL}?exaApiKey=${apiKey}&tools=${toolNames.join(",")}`;
|
|
136
|
-
|
|
137
|
-
try {
|
|
138
|
-
const response = (await callMCP(url, "tools/list")) as MCPToolsResponse;
|
|
139
|
-
if (response.error) {
|
|
140
|
-
throw new Error(response.error.message);
|
|
141
|
-
}
|
|
142
|
-
return response.result?.tools ?? [];
|
|
143
|
-
} catch (error) {
|
|
144
|
-
console.error(`Failed to fetch Exa tools:`, error);
|
|
145
|
-
return [];
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Fetch available tools from Websets MCP server
|
|
151
|
-
*/
|
|
152
|
-
export async function fetchWebsetsTools(apiKey: string): Promise<MCPTool[]> {
|
|
153
|
-
const url = `${WEBSETS_MCP_URL}?exaApiKey=${apiKey}`;
|
|
154
|
-
|
|
155
|
-
try {
|
|
156
|
-
const response = (await callMCP(url, "tools/list")) as MCPToolsResponse;
|
|
157
|
-
if (response.error) {
|
|
158
|
-
throw new Error(response.error.message);
|
|
159
|
-
}
|
|
160
|
-
return response.result?.tools ?? [];
|
|
161
|
-
} catch (error) {
|
|
162
|
-
console.error(`Failed to fetch Websets tools:`, error);
|
|
163
|
-
return [];
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Call a tool on Exa MCP server
|
|
169
|
-
*/
|
|
170
|
-
export async function callExaTool(apiKey: string, toolNames: string[], toolName: string, args: Record<string, unknown>): Promise<unknown> {
|
|
171
|
-
const url = `${EXA_MCP_URL}?exaApiKey=${apiKey}&tools=${toolNames.join(",")}`;
|
|
172
|
-
return callMCPTool(url, toolName, args);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Call a tool on Websets MCP server
|
|
177
|
-
*/
|
|
178
|
-
export async function callWebsetsTool(apiKey: string, toolName: string, args: Record<string, unknown>): Promise<unknown> {
|
|
179
|
-
const url = `${WEBSETS_MCP_URL}?exaApiKey=${apiKey}`;
|
|
180
|
-
return callMCPTool(url, toolName, args);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Call a tool on an MCP server
|
|
185
|
-
*/
|
|
186
|
-
async function callMCPTool(url: string, toolName: string, args: Record<string, unknown>): Promise<unknown> {
|
|
187
|
-
const response = (await callMCP(url, "tools/call", {
|
|
188
|
-
name: toolName,
|
|
189
|
-
arguments: args,
|
|
190
|
-
})) as { result?: { content?: Array<{ text?: string }> }; error?: { message: string } };
|
|
191
|
-
|
|
192
|
-
if (response.error) {
|
|
193
|
-
throw new Error(response.error.message);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// Extract text content from MCP response
|
|
197
|
-
const content = response.result?.content;
|
|
198
|
-
if (Array.isArray(content)) {
|
|
199
|
-
const texts = content.filter((c) => c.text).map((c) => c.text);
|
|
200
|
-
if (texts.length === 1) {
|
|
201
|
-
// Try to parse as JSON
|
|
202
|
-
try {
|
|
203
|
-
return JSON.parse(texts[0]!);
|
|
204
|
-
} catch {
|
|
205
|
-
return texts[0];
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
return texts.join("\n\n");
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
return response.result;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Create a tool wrapper for an MCP tool
|
|
216
|
-
*/
|
|
217
|
-
export function createToolWrapper(
|
|
218
|
-
mcpTool: MCPTool,
|
|
219
|
-
renamedName: string,
|
|
220
|
-
callFn: (toolName: string, args: Record<string, unknown>) => Promise<unknown>
|
|
221
|
-
): CustomAgentTool<TSchema, unknown> {
|
|
222
|
-
return {
|
|
223
|
-
name: renamedName,
|
|
224
|
-
description: mcpTool.description,
|
|
225
|
-
parameters: mcpTool.inputSchema,
|
|
226
|
-
async execute(args) {
|
|
227
|
-
return callFn(mcpTool.name, args as Record<string, unknown>);
|
|
228
|
-
},
|
|
229
|
-
};
|
|
230
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Exa Websets Tools - Entity collection management
|
|
3
|
-
*
|
|
4
|
-
* Tools:
|
|
5
|
-
* - webset_create: Create entity collections with search/enrichments
|
|
6
|
-
* - webset_list: List all websets
|
|
7
|
-
* - webset_get: Get webset details
|
|
8
|
-
* - webset_update: Update webset metadata
|
|
9
|
-
* - webset_delete: Delete a webset
|
|
10
|
-
* - webset_items_list: List items in a webset
|
|
11
|
-
* - webset_item_get: Get item details
|
|
12
|
-
* - webset_search_create: Add search to webset
|
|
13
|
-
* - webset_search_get: Check search status
|
|
14
|
-
* - webset_search_cancel: Cancel running search
|
|
15
|
-
* - webset_enrichment_create: Extract custom data from items
|
|
16
|
-
* - webset_enrichment_get: Get enrichment details
|
|
17
|
-
* - webset_enrichment_update: Update enrichment metadata
|
|
18
|
-
* - webset_enrichment_delete: Delete enrichment
|
|
19
|
-
* - webset_enrichment_cancel: Cancel running enrichment
|
|
20
|
-
* - webset_monitor_create: Auto-update webset on schedule
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
import type { TSchema } from "@sinclair/typebox";
|
|
24
|
-
import type { CustomAgentTool, CustomToolFactory, ToolAPI } from "@mariozechner/pi-coding-agent";
|
|
25
|
-
import { callWebsetsTool, createToolWrapper, fetchWebsetsTools, findApiKey } from "./shared";
|
|
26
|
-
|
|
27
|
-
// Tool name mapping: MCP name -> exposed name
|
|
28
|
-
const NAME_MAP: Record<string, string> = {
|
|
29
|
-
"create_webset": "webset_create",
|
|
30
|
-
"list_websets": "webset_list",
|
|
31
|
-
"get_webset": "webset_get",
|
|
32
|
-
"update_webset": "webset_update",
|
|
33
|
-
"delete_webset": "webset_delete",
|
|
34
|
-
"list_webset_items": "webset_items_list",
|
|
35
|
-
"get_item": "webset_item_get",
|
|
36
|
-
"create_search": "webset_search_create",
|
|
37
|
-
"get_search": "webset_search_get",
|
|
38
|
-
"cancel_search": "webset_search_cancel",
|
|
39
|
-
"create_enrichment": "webset_enrichment_create",
|
|
40
|
-
"get_enrichment": "webset_enrichment_get",
|
|
41
|
-
"update_enrichment": "webset_enrichment_update",
|
|
42
|
-
"delete_enrichment": "webset_enrichment_delete",
|
|
43
|
-
"cancel_enrichment": "webset_enrichment_cancel",
|
|
44
|
-
"create_monitor": "webset_monitor_create",
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const factory: CustomToolFactory = async (_toolApi: ToolAPI): Promise<CustomAgentTool<TSchema, unknown>[] | null> => {
|
|
48
|
-
const apiKey = findApiKey();
|
|
49
|
-
if (!apiKey) return null;
|
|
50
|
-
|
|
51
|
-
const mcpTools = await fetchWebsetsTools(apiKey);
|
|
52
|
-
if (mcpTools.length === 0) return null;
|
|
53
|
-
|
|
54
|
-
const callFn = (toolName: string, args: Record<string, unknown>) =>
|
|
55
|
-
callWebsetsTool(apiKey, toolName, args);
|
|
56
|
-
|
|
57
|
-
return mcpTools.map((tool) =>
|
|
58
|
-
createToolWrapper(tool, NAME_MAP[tool.name] ?? tool.name, callFn)
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export default factory;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@oh-my-pi/metal-theme",
|
|
3
|
-
"version": "0.3.0",
|
|
4
|
-
"description": "Metal theme for pi",
|
|
5
|
-
"keywords": ["omp-plugin", "theme", "metal"],
|
|
6
|
-
"author": "Can Bölük <me@can.ac>",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/can1357/oh-my-pi.git",
|
|
11
|
-
"directory": "plugins/metal-theme"
|
|
12
|
-
},
|
|
13
|
-
"omp": {
|
|
14
|
-
"install": [
|
|
15
|
-
{ "src": "themes/metal.json", "dest": "agent/themes/metal.json" }
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
|
-
"files": ["themes"]
|
|
19
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/theme-schema.json",
|
|
3
|
-
"name": "claude",
|
|
4
|
-
"vars": {
|
|
5
|
-
"cyan": "#0088fa",
|
|
6
|
-
"blue": "#178fb9",
|
|
7
|
-
"green": "#89d281",
|
|
8
|
-
"red": "#fc3a4b",
|
|
9
|
-
"yellow": "#e4c00f",
|
|
10
|
-
"gray": "#777d88",
|
|
11
|
-
"dimGray": "#5f6673",
|
|
12
|
-
"darkGray": "#3d424a",
|
|
13
|
-
"accent": "#febc38",
|
|
14
|
-
"selectedBg": "#31363f",
|
|
15
|
-
"userMsgBg": "#221d1a",
|
|
16
|
-
"toolPendingBg": "#1d2129",
|
|
17
|
-
"toolSuccessBg": "#161a1f",
|
|
18
|
-
"toolErrorBg": "#291d1d",
|
|
19
|
-
"customMsgBg": "#2a2530"
|
|
20
|
-
},
|
|
21
|
-
"colors": {
|
|
22
|
-
"accent": "accent",
|
|
23
|
-
"border": "blue",
|
|
24
|
-
"borderAccent": "cyan",
|
|
25
|
-
"borderMuted": "darkGray",
|
|
26
|
-
"success": "green",
|
|
27
|
-
"error": "red",
|
|
28
|
-
"warning": "yellow",
|
|
29
|
-
"muted": "gray",
|
|
30
|
-
"dim": "dimGray",
|
|
31
|
-
"text": "",
|
|
32
|
-
|
|
33
|
-
"selectedBg": "selectedBg",
|
|
34
|
-
"userMessageBg": "userMsgBg",
|
|
35
|
-
"userMessageText": "",
|
|
36
|
-
"customMessageBg": "customMsgBg",
|
|
37
|
-
"customMessageText": "",
|
|
38
|
-
"customMessageLabel": "#b281d6",
|
|
39
|
-
"toolPendingBg": "toolPendingBg",
|
|
40
|
-
"toolSuccessBg": "toolSuccessBg",
|
|
41
|
-
"toolErrorBg": "toolErrorBg",
|
|
42
|
-
"toolTitle": "",
|
|
43
|
-
"toolOutput": "gray",
|
|
44
|
-
|
|
45
|
-
"mdHeading": "#febc38",
|
|
46
|
-
"mdLink": "#0088fa",
|
|
47
|
-
"mdLinkUrl": "dimGray",
|
|
48
|
-
"mdCode": "#e5c1ff",
|
|
49
|
-
"mdCodeBlock": "#9CDCFE",
|
|
50
|
-
"mdCodeBlockBorder": "darkGray",
|
|
51
|
-
"mdQuote": "gray",
|
|
52
|
-
"mdQuoteBorder": "darkGray",
|
|
53
|
-
"mdHr": "darkGray",
|
|
54
|
-
"mdListBullet": "accent",
|
|
55
|
-
|
|
56
|
-
"toolDiffAdded": "green",
|
|
57
|
-
"toolDiffRemoved": "red",
|
|
58
|
-
"toolDiffContext": "gray",
|
|
59
|
-
|
|
60
|
-
"syntaxComment": "#6A9955",
|
|
61
|
-
"syntaxKeyword": "#569CD6",
|
|
62
|
-
"syntaxFunction": "#DCDCAA",
|
|
63
|
-
"syntaxVariable": "#9CDCFE",
|
|
64
|
-
"syntaxString": "#CE9178",
|
|
65
|
-
"syntaxNumber": "#B5CEA8",
|
|
66
|
-
"syntaxType": "#4EC9B0",
|
|
67
|
-
"syntaxOperator": "#D4D4D4",
|
|
68
|
-
"syntaxPunctuation": "#D4D4D4",
|
|
69
|
-
|
|
70
|
-
"thinkingOff": "darkGray",
|
|
71
|
-
"thinkingMinimal": "dimGray",
|
|
72
|
-
"thinkingLow": "#178fb9",
|
|
73
|
-
"thinkingMedium": "#0088fa",
|
|
74
|
-
"thinkingHigh": "#b281d6",
|
|
75
|
-
"thinkingXhigh": "#e5c1ff",
|
|
76
|
-
|
|
77
|
-
"bashMode": "cyan"
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Subagents Plugin
|
|
2
|
-
|
|
3
|
-
Task delegation system with specialized subagents for pi.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
omp install oh-my-pi/plugins/subagents
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Contents
|
|
12
|
-
|
|
13
|
-
### Tool
|
|
14
|
-
- `tools/task/index.ts` - The Task tool for launching subagents
|
|
15
|
-
|
|
16
|
-
### Agents
|
|
17
|
-
- `agents/task.md` - General-purpose subagent for delegated tasks
|
|
18
|
-
- `agents/planner.md` - Software architect for designing implementation plans
|
|
19
|
-
- `agents/explore.md` - Fast read-only codebase scout
|
|
20
|
-
- `agents/reviewer.md` - Expert code reviewer
|
|
21
|
-
|
|
22
|
-
### Commands
|
|
23
|
-
- `commands/implement.md` - Implement a feature
|
|
24
|
-
- `commands/implement-with-critic.md` - Implement with critic review loop
|
|
25
|
-
- `commands/architect-plan.md` - Create an architecture plan
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: explore
|
|
3
|
-
description: Fast read-only codebase scout that returns compressed context for handoff
|
|
4
|
-
tools: read, grep, glob, ls, bash
|
|
5
|
-
model: claude-opus-4-5
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
You are a file search specialist and codebase scout. Quickly investigate a codebase and return structured findings that another agent can use without re-reading everything.
|
|
9
|
-
|
|
10
|
-
=== CRITICAL: READ-ONLY MODE ===
|
|
11
|
-
This is a READ-ONLY exploration task. You are STRICTLY PROHIBITED from:
|
|
12
|
-
- Creating or modifying files (no Write, Edit, touch, rm, mv, cp)
|
|
13
|
-
- Creating temporary files anywhere, including /tmp
|
|
14
|
-
- Using redirect operators (>, >>, |) or heredocs to write files
|
|
15
|
-
- Running commands that change system state (git add, git commit, npm install, pip install)
|
|
16
|
-
|
|
17
|
-
Your role is EXCLUSIVELY to search and analyze existing code.
|
|
18
|
-
|
|
19
|
-
Your strengths:
|
|
20
|
-
- Rapidly finding files using glob patterns
|
|
21
|
-
- Searching code with powerful regex patterns
|
|
22
|
-
- Reading and analyzing file contents
|
|
23
|
-
- Tracing imports and dependencies
|
|
24
|
-
|
|
25
|
-
Guidelines:
|
|
26
|
-
- Use glob for broad file pattern matching
|
|
27
|
-
- Use grep for searching file contents with regex
|
|
28
|
-
- Use read when you know the specific file path
|
|
29
|
-
- Use bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)
|
|
30
|
-
- Spawn multiple parallel tool calls wherever possible—you are meant to be fast
|
|
31
|
-
- Return file paths as absolute paths in your final response
|
|
32
|
-
- Communicate findings directly as a message—do NOT create output files
|
|
33
|
-
|
|
34
|
-
Thoroughness (infer from task, default medium):
|
|
35
|
-
- Quick: Targeted lookups, key files only
|
|
36
|
-
- Medium: Follow imports, read critical sections
|
|
37
|
-
- Thorough: Trace all dependencies, check tests/types
|
|
38
|
-
|
|
39
|
-
Strategy:
|
|
40
|
-
1. grep/glob to locate relevant code
|
|
41
|
-
2. Read key sections (not entire files unless small)
|
|
42
|
-
3. Identify types, interfaces, key functions
|
|
43
|
-
4. Note dependencies between files
|
|
44
|
-
|
|
45
|
-
Your output will be passed to an agent who has NOT seen the files you explored.
|
|
46
|
-
|
|
47
|
-
Output format:
|
|
48
|
-
|
|
49
|
-
## Query
|
|
50
|
-
One line summary of what was searched.
|
|
51
|
-
|
|
52
|
-
## Files Retrieved
|
|
53
|
-
List with exact line ranges:
|
|
54
|
-
1. `path/to/file.ts` (lines 10-50) - Description of what's here
|
|
55
|
-
2. `path/to/other.ts` (lines 100-150) - Description
|
|
56
|
-
3. ...
|
|
57
|
-
|
|
58
|
-
## Key Code
|
|
59
|
-
Critical types, interfaces, or functions (actual code excerpts):
|
|
60
|
-
|
|
61
|
-
```language
|
|
62
|
-
interface Example {
|
|
63
|
-
// actual code from the files
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Architecture
|
|
68
|
-
Brief explanation of how the pieces connect.
|
|
69
|
-
|
|
70
|
-
## Start Here
|
|
71
|
-
Which file to look at first and why.
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: planner
|
|
3
|
-
description: Software architect that explores codebase and designs implementation plans (read-only)
|
|
4
|
-
tools: read, grep, glob, ls, bash
|
|
5
|
-
model: claude-opus-4-5
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
You are a software architect and planning specialist. Explore the codebase and design implementation plans.
|
|
9
|
-
|
|
10
|
-
=== CRITICAL: READ-ONLY MODE ===
|
|
11
|
-
This is a READ-ONLY planning task. You are STRICTLY PROHIBITED from:
|
|
12
|
-
- Creating or modifying files (no Write, Edit, touch, rm, mv, cp)
|
|
13
|
-
- Creating temporary files anywhere, including /tmp
|
|
14
|
-
- Using redirect operators (>, >>, |) or heredocs to write files
|
|
15
|
-
- Running commands that change system state (git add, git commit, npm install, pip install)
|
|
16
|
-
|
|
17
|
-
Your role is EXCLUSIVELY to explore and plan. You do NOT have access to file editing tools.
|
|
18
|
-
|
|
19
|
-
## Process
|
|
20
|
-
|
|
21
|
-
1. **Understand Requirements**: Focus on the requirements provided.
|
|
22
|
-
|
|
23
|
-
2. **Explore Thoroughly**:
|
|
24
|
-
- Read any files provided in the initial prompt
|
|
25
|
-
- Find existing patterns and conventions using glob, grep, read
|
|
26
|
-
- Understand the current architecture
|
|
27
|
-
- Identify similar features as reference
|
|
28
|
-
- Trace through relevant code paths
|
|
29
|
-
- Use bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)
|
|
30
|
-
|
|
31
|
-
3. **Design Solution**:
|
|
32
|
-
- Create implementation approach
|
|
33
|
-
- Consider trade-offs and architectural decisions
|
|
34
|
-
- Follow existing patterns where appropriate
|
|
35
|
-
|
|
36
|
-
4. **Detail the Plan**:
|
|
37
|
-
- Provide step-by-step implementation strategy
|
|
38
|
-
- Identify dependencies and sequencing
|
|
39
|
-
- Anticipate potential challenges
|
|
40
|
-
|
|
41
|
-
## Required Output
|
|
42
|
-
|
|
43
|
-
End your response with:
|
|
44
|
-
|
|
45
|
-
### Critical Files for Implementation
|
|
46
|
-
List 3-5 files most critical for implementing this plan:
|
|
47
|
-
- `path/to/file1.ts` - Brief reason (e.g., "Core logic to modify")
|
|
48
|
-
- `path/to/file2.ts` - Brief reason (e.g., "Interfaces to implement")
|
|
49
|
-
- `path/to/file3.ts` - Brief reason (e.g., "Pattern to follow")
|
|
50
|
-
|
|
51
|
-
REMEMBER: You can ONLY explore and plan. You CANNOT write, edit, or modify any files.
|