Skip to content

feat: NodeRegistry mesh node discovery and OneDriveConnector#22

Open
KetchCyork wants to merge 1 commit into
mainfrom
feature/remote-ingestion
Open

feat: NodeRegistry mesh node discovery and OneDriveConnector#22
KetchCyork wants to merge 1 commit into
mainfrom
feature/remote-ingestion

Conversation

@KetchCyork

Copy link
Copy Markdown
Owner

Summary

  • NodeRegistry (src/memory/node-registry.ts): JSON-persisted registry of mesh runner nodes. Idempotent register() (matches by name, updates in place). heartbeat() marks online; deregister() marks offline; remove() hard-deletes. findByCapability() returns only online nodes.
  • OneDriveConnector (src/connectors/onedrive.ts): Microsoft Graph API client with injectable FetchFn for testing. listItems(), getItem(), listFilesRecursive(). Returns raw metadata — no auto-indexing; callers must queue for human-approved ingestion (per CLAUDE.md hard rule).
  • Engine wires NodeRegistry with 8 public methods.
  • HTTP: POST /nodes/register, GET /nodes, GET/DELETE /nodes/:id, POST /nodes/:id/heartbeat, POST /nodes/:id/deregister, POST /connectors/onedrive/list
  • MCP: register_node, list_nodes, list_onedrive_files

Test plan

  • NodeRegistry: register, re-register idempotency, list/filter, heartbeat, deregister, remove, findByCapability, persistence across instances
  • OneDriveConnector: listItems (with/without folderId), getItem, listFilesRecursive, error propagation — all via mock fetch, no real credentials needed
  • All existing 80+ tests still pass
  • npm run typecheck exits 0

Closes #15
Closes #16

🤖 Generated with Claude Code

…#16)

- NodeRegistry: JSON-persisted mesh node store with register (idempotent),
  heartbeat, deregister (marks offline), remove (hard-delete), and
  findByCapability; re-registration by name updates in place, keeping the
  same ID
- OneDriveConnector: Microsoft Graph API client (Files.Read scope) for
  listing folder items, fetching single items, and recursive file traversal;
  injectable mock fetch interface for unit testing without real credentials;
  does NOT auto-ingest — returns metadata only, callers must explicitly
  queue for human-approved indexing
- Engine exposes all node registry operations as public methods
- HTTP routes: POST /nodes/register, GET /nodes, GET/DELETE /nodes/:id,
  POST /nodes/:id/heartbeat, POST /nodes/:id/deregister,
  POST /connectors/onedrive/list
- MCP tools: register_node, list_nodes, list_onedrive_files
- Test suites: NodeRegistry (16 assertions), OneDrive (6 assertions with mock fetch)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Windows OneDrive/M365 remote ingestion connector Add remote memory node registration and health API

1 participant