feat: port MCP retrieval and write hardening
- align os MCP/runtime/docs with ra-h contract - add safe direct node lookup and context-optional flows - gate edge and context writes behind confirmation
This commit is contained in:
@@ -3,7 +3,6 @@ import { contextService, nodeService } from '@/services/database';
|
||||
import { Node, NodeFilters } from '@/types/database';
|
||||
import { autoEmbedQueue } from '@/services/embedding/autoEmbedQueue';
|
||||
import { generateDescription } from '@/services/database/descriptionService';
|
||||
import { scheduleAutoEdgeCreation } from '@/services/agents/autoEdge';
|
||||
import { coerceDescriptionForStorage } from '@/services/database/quality';
|
||||
import { normalizeNodeLink } from '@/utils/nodeLink';
|
||||
import { buildCanonicalNodeMetadata } from '@/services/nodes/metadata';
|
||||
@@ -181,11 +180,6 @@ export async function POST(request: NextRequest) {
|
||||
autoEmbedQueue.enqueue(node.id, { reason: 'node_created' });
|
||||
}
|
||||
|
||||
// Schedule auto-edge creation (fire-and-forget, non-blocking)
|
||||
if (node.id) {
|
||||
scheduleAutoEdgeCreation(node.id);
|
||||
}
|
||||
|
||||
return NextResponse.json({
|
||||
success: true,
|
||||
data: node,
|
||||
|
||||
Reference in New Issue
Block a user