JacellJamble commited on
Commit
c8a5e79
·
2 Parent(s): 8938eb1c29a284

Merge branch 'master' of https://github.com/rhine-pereira/meta-hack-finale

Browse files
.cursor/rules/graphify.mdc ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ description: graphify knowledge graph context
3
+ alwaysApply: true
4
+ ---
5
+
6
+ This project has a graphify knowledge graph at graphify-out/.
7
+
8
+ - Before answering architecture or codebase questions, read graphify-out/GRAPH_REPORT.md for god nodes and community structure
9
+ - If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
10
+ - After modifying code files in this session, run `graphify update .` to keep the graph current (AST-only, no API cost)
.graphify_detect.json ADDED
Binary file (7.3 kB). View file
 
.graphify_python ADDED
@@ -0,0 +1 @@
 
 
1
+ C:\Users\Rhine\AppData\Local\Programs\Python\Python314\python.exe
frontend/src/lib/genesis-client.ts CHANGED
@@ -36,7 +36,8 @@ export class GenesisClient {
36
  this.sessionId = res.headers.get("mcp-session-id");
37
  const text = await res.text();
38
  const data = this.parseResponse(text);
39
- console.log("MCP Initialized:", data);
 
40
 
41
  // Complete initialization handshake
42
  await fetch(`${this.baseUrl}/mcp`, {
 
36
  this.sessionId = res.headers.get("mcp-session-id");
37
  const text = await res.text();
38
  const data = this.parseResponse(text);
39
+ console.log("MCP Initialized. Session ID:", this.sessionId);
40
+ console.log("MCP Init Data:", data);
41
 
42
  // Complete initialization handshake
43
  await fetch(`${this.baseUrl}/mcp`, {
server/app.py CHANGED
@@ -50,6 +50,22 @@ app.add_middleware(
50
  expose_headers=["mcp-session-id"],
51
  )
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  from starlette.responses import JSONResponse, StreamingResponse
54
 
55
  async def health(request: Request):
 
50
  expose_headers=["mcp-session-id"],
51
  )
52
 
53
+ @app.middleware("http")
54
+ async def log_requests(request: Request, call_next):
55
+ # Log incoming request
56
+ session_id = request.headers.get("mcp-session-id")
57
+ # print(f"Incoming request: {request.method} {request.url.path}, session-id: {session_id}")
58
+
59
+ response = await call_next(request)
60
+
61
+ # Ensure session id is exposed
62
+ if "mcp-session-id" in response.headers:
63
+ pass # Already there
64
+ elif session_id:
65
+ response.headers["mcp-session-id"] = session_id
66
+
67
+ return response
68
+
69
  from starlette.responses import JSONResponse, StreamingResponse
70
 
71
  async def health(request: Request):
server/role_views.py CHANGED
@@ -320,7 +320,8 @@ class CEOViewFilter(RoleViewFilter):
320
  ),
321
  messages=role_messages,
322
  active_personal_crises=[
323
- {"id": c.id, "severity": c.severity, "description": c.description} for c in crises
 
324
  ],
325
  company_brain=filtered_brain,
326
  )
@@ -405,7 +406,8 @@ class CTOViewFilter(RoleViewFilter):
405
  ),
406
  messages=role_messages,
407
  active_personal_crises=[
408
- {"id": c.id, "severity": c.severity, "description": c.description} for c in crises
 
409
  ],
410
  company_brain={k: v for k, v in state.company_brain.items()
411
  if any(domain in k.lower() for domain in ["tech", "product", "architecture", "feature"])},
@@ -486,7 +488,8 @@ class SalesViewFilter(RoleViewFilter):
486
  ),
487
  messages=role_messages,
488
  active_personal_crises=[
489
- {"id": c.id, "severity": c.severity, "description": c.description} for c in crises
 
490
  ],
491
  company_brain={k: v for k, v in state.company_brain.items()
492
  if any(domain in k.lower() for domain in ["go_to_market", "sales", "customer", "pricing", "positioning"])},
@@ -628,7 +631,8 @@ class CFOViewFilter(RoleViewFilter):
628
  ),
629
  messages=role_messages,
630
  active_personal_crises=[
631
- {"id": c.id, "severity": c.severity, "description": c.description} for c in crises
 
632
  ],
633
  company_brain={k: v for k, v in state.company_brain.items()
634
  if any(domain in k.lower() for domain in ["financial", "fundraising", "burn", "runway", "equity"])},
 
320
  ),
321
  messages=role_messages,
322
  active_personal_crises=[
323
+ {"id": c.id, "severity": c.severity, "description": c.description,
324
+ "target_role": c.target_role.value if hasattr(c.target_role, 'value') else str(c.target_role)} for c in crises
325
  ],
326
  company_brain=filtered_brain,
327
  )
 
406
  ),
407
  messages=role_messages,
408
  active_personal_crises=[
409
+ {"id": c.id, "severity": c.severity, "description": c.description,
410
+ "target_role": c.target_role.value if hasattr(c.target_role, 'value') else str(c.target_role)} for c in crises
411
  ],
412
  company_brain={k: v for k, v in state.company_brain.items()
413
  if any(domain in k.lower() for domain in ["tech", "product", "architecture", "feature"])},
 
488
  ),
489
  messages=role_messages,
490
  active_personal_crises=[
491
+ {"id": c.id, "severity": c.severity, "description": c.description,
492
+ "target_role": c.target_role.value if hasattr(c.target_role, 'value') else str(c.target_role)} for c in crises
493
  ],
494
  company_brain={k: v for k, v in state.company_brain.items()
495
  if any(domain in k.lower() for domain in ["go_to_market", "sales", "customer", "pricing", "positioning"])},
 
631
  ),
632
  messages=role_messages,
633
  active_personal_crises=[
634
+ {"id": c.id, "severity": c.severity, "description": c.description,
635
+ "target_role": c.target_role.value if hasattr(c.target_role, 'value') else str(c.target_role)} for c in crises
636
  ],
637
  company_brain={k: v for k, v in state.company_brain.items()
638
  if any(domain in k.lower() for domain in ["financial", "fundraising", "burn", "runway", "equity"])},