You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/...?q=api&page=5&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=api
Returns an array of strings in format "username" or "username/projectName"
Found 18929 results for "api"(2476ms)
9}
1011interface MCPContextAPI {
12// Tool operations
13listTools: () => Promise<any[]>;
37* - Renders HTML in a secure iframe
38* - Provides fullscreen enter/exit affordances
39* - Exposes MCP context API to iframe content
40* - Handles iframe communication via postMessage
41*/
46const [isLoading, setIsLoading] = useState(true);
4748// Create MCP context API that will be exposed to iframe
49const createMCPContext = useCallback((): MCPContextAPI => {
50const findClientByName = (serverName: string) => {
51console.log("[MCP/Browser Renderer] Finding client by name:", serverName, mcpClients);
210const { type, id, method, args } = event.data;
211212if (type !== "mcp-api-call") {
213return;
214}
219220if (typeof methodFunc !== "function") {
221throw new Error(`Unknown MCP API method: ${method}`);
222}
223225226iframe.contentWindow?.postMessage({
227type: "mcp-api-response",
228id,
229success: true,
232} catch (error) {
233iframe.contentWindow?.postMessage({
234type: "mcp-api-response",
235id,
236success: false,
252</script>
253<script>
254// MCP Context API for iframe content
255window.mcpContext = {
256// Async wrapper for postMessage communication
257async callAPI(method, ...args) {
258return new Promise((resolve, reject) => {
259const id = Math.random().toString(36).substr(2, 9);
260
261const handleResponse = (event) => {
262if (event.data.type === 'mcp-api-response' && event.data.id === id) {
263window.removeEventListener('message', handleResponse);
264if (event.data.success) {
273
274window.parent.postMessage({
275type: 'mcp-api-call',
276id,
277method,
282setTimeout(() => {
283window.removeEventListener('message', handleResponse);
284reject(new Error('MCP API call timeout'));
285}, 30000);
286});
288
289// Convenience methods
290async listTools() { return this.callAPI('listTools'); },
291async callTool(serverName, toolName, args) { return this.callAPI('callTool', serverName, toolName, args); },
292async listPrompts() { return this.callAPI('listPrompts'); },
293async getPrompt(serverName, promptName, args) { return this.callAPI('getPrompt', serverName, promptName, args); },
294async listResources() { return this.callAPI('listResources'); },
295async readResource(serverName, uri) { return this.callAPI('readResource', serverName, uri); },
296log(level, message, data) { this.callAPI('log', level, message, data); },
297requestFullscreen() { this.callAPI('requestFullscreen'); },
298exitFullscreen() { this.callAPI('exitFullscreen'); },
299async isFullscreen() { return this.callAPI('isFullscreen'); }
300};
301
76<script>
77(function() {
78const API_URL = '${sourceUrl}';
79const STORE_KEYS = { projects: 'aura_projects_v1', tasks: 'aura_tasks_v1' };
80const ACTIVE_TASK_WARNING_THRESHOLD = 50;
255addMessageToChat('ai', 'Aura is thinking...');
256try {
257const res = await fetch(\`\${API_URL}?action=chat\`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ message: userMessage, tasks, projects, history: conversationHistory.slice(-4) }) });
258if (!res.ok) {
259const err = await res.json();
286toggleLoading(btn, true);
287try {
288const res = await fetch(\`\${API_URL}?action=synthesizeProject\`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ goal }) });
289if (!res.ok) {
290const err = await res.json();
363toggleLoading(btn, true);
364try {
365const res = await fetch(\`\${API_URL}?action=getDailyReschedule\`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ tasks: todayTasks }) });
366if (!res.ok) {
367const err = await res.json();