@rigstate/mcp 0.5.4 ā 0.5.6
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/dist/index.js +0 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +0 -2
- package/src/server/telemetry.ts +0 -4
- package/src/tools/query-brain.ts +0 -7
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/server/telemetry.ts
CHANGED
|
@@ -12,7 +12,6 @@ export let watcherState: WatcherState = {
|
|
|
12
12
|
export async function startFrankWatcher(supabase: SupabaseClient, userId: string) {
|
|
13
13
|
if (watcherState.isRunning) return;
|
|
14
14
|
watcherState.isRunning = true;
|
|
15
|
-
console.error(`š¤ Frank Watcher started for user ${userId}`);
|
|
16
15
|
|
|
17
16
|
const checkTasks = async () => {
|
|
18
17
|
try {
|
|
@@ -33,7 +32,6 @@ export async function startFrankWatcher(supabase: SupabaseClient, userId: string
|
|
|
33
32
|
|
|
34
33
|
// Heartbeat Logic
|
|
35
34
|
if (task.proposal?.startsWith('ping') || (task.task_id === null && !task.proposal?.startsWith('report'))) {
|
|
36
|
-
console.error(`\nā” HEARTBEAT: Frank received REAL-TIME PING for project ${task.project_id}. Response: PONG`);
|
|
37
35
|
await supabase.from('agent_bridge').update({
|
|
38
36
|
status: 'COMPLETED',
|
|
39
37
|
summary: 'Pong! Frank is active and listening.',
|
|
@@ -47,7 +45,6 @@ export async function startFrankWatcher(supabase: SupabaseClient, userId: string
|
|
|
47
45
|
const parts = task.proposal.split(':');
|
|
48
46
|
const signalType = parts[1];
|
|
49
47
|
const reportType = signalType === 'MANIFEST' ? 'SYSTEM_MANIFEST' : 'INVESTOR_REPORT';
|
|
50
|
-
console.error(`\nš Frank is generating ${reportType} report...`);
|
|
51
48
|
|
|
52
49
|
try {
|
|
53
50
|
const result = await generateProfessionalPdf(supabase, userId, task.project_id, reportType);
|
|
@@ -69,7 +66,6 @@ export async function startFrankWatcher(supabase: SupabaseClient, userId: string
|
|
|
69
66
|
|
|
70
67
|
// Execution Logic
|
|
71
68
|
if (task.status === 'APPROVED') {
|
|
72
|
-
console.error(`\nšļø Worker: EXECUTING approved task: [${task.id}]`);
|
|
73
69
|
await supabase.from('agent_bridge').update({ status: 'EXECUTING', updated_at: new Date().toISOString() }).eq('id', task.id);
|
|
74
70
|
|
|
75
71
|
await new Promise(resolve => setTimeout(resolve, 2000));
|
package/src/tools/query-brain.ts
CHANGED
|
@@ -40,7 +40,6 @@ async function generateQueryEmbedding(query: string): Promise<number[] | null> {
|
|
|
40
40
|
const googleKey = process.env.GOOGLE_GENERATIVE_AI_API_KEY;
|
|
41
41
|
|
|
42
42
|
if (!openRouterKey && !googleKey) {
|
|
43
|
-
console.warn('Neither OPENROUTER_API_KEY nor GOOGLE_GENERATIVE_AI_API_KEY found, skipping vector search.');
|
|
44
43
|
return null;
|
|
45
44
|
}
|
|
46
45
|
|
|
@@ -66,7 +65,6 @@ async function generateQueryEmbedding(query: string): Promise<number[] | null> {
|
|
|
66
65
|
return embedding;
|
|
67
66
|
}
|
|
68
67
|
} catch (error) {
|
|
69
|
-
console.error('Failed to generate embedding for search:', error);
|
|
70
68
|
return null;
|
|
71
69
|
}
|
|
72
70
|
}
|
|
@@ -98,9 +96,6 @@ export async function queryBrain(
|
|
|
98
96
|
let memories: MemoryRecord[] = [];
|
|
99
97
|
|
|
100
98
|
// Use the hybrid search RPC
|
|
101
|
-
console.error(`Searching brain for "${query}" (limit: ${limit}, threshold: ${threshold})`);
|
|
102
|
-
console.error(`Embedding present: ${!!embedding}`);
|
|
103
|
-
|
|
104
99
|
const { data: searchResults, error: searchError } = await supabase
|
|
105
100
|
.rpc('hybrid_search_memories', {
|
|
106
101
|
p_project_id: projectId,
|
|
@@ -111,7 +106,6 @@ export async function queryBrain(
|
|
|
111
106
|
});
|
|
112
107
|
|
|
113
108
|
if (searchError) {
|
|
114
|
-
console.error('Hybrid search error:', searchError);
|
|
115
109
|
// Fallback to basic recent fetch if RPC fails
|
|
116
110
|
const { data: recentMemories } = await supabase
|
|
117
111
|
.from('project_memories')
|
|
@@ -132,7 +126,6 @@ export async function queryBrain(
|
|
|
132
126
|
}));
|
|
133
127
|
}
|
|
134
128
|
} else if (searchResults) {
|
|
135
|
-
console.error(`Found ${searchResults.length} results from RPC`);
|
|
136
129
|
memories = searchResults.map((m: any) => ({
|
|
137
130
|
id: m.id,
|
|
138
131
|
content: m.content,
|