Skip to content

Comments

feat(gateway): Phase 2 - Session Management & Browse Directory#33

Merged
TelivANT merged 1 commit intomainfrom
feat/wiki-connector-phase2
Feb 21, 2026
Merged

feat(gateway): Phase 2 - Session Management & Browse Directory#33
TelivANT merged 1 commit intomainfrom
feat/wiki-connector-phase2

Conversation

@TelivANT
Copy link
Owner

Phase 2 Implementation

Features

  • βœ… Session management for connectors
  • βœ… Store connectors after test_connection
  • βœ… Browse directory with actual file listing
  • βœ… Thread-safe connector sharing (Arc<RwLock<>>)

Changes

  1. WikiState: Added connector_sessions field
  2. test_connection: Stores connector in session after successful connection
  3. browse_directory: Retrieves connector from session and lists files

Supported Connectors

  • Local filesystem
  • Git repositories

API Flow

1. POST /v1/wiki/connectors/test -> returns connector_id
2. POST /v1/wiki/connectors/browse -> uses connector_id to browse

Next Steps (Phase 2.1)

  • Session expiry (1 hour)
  • Cleanup task
  • S3 connector support

Testing

# Test local connector
curl -X POST http://localhost:3000/v1/wiki/connectors/test \
  -H "Content-Type: application/json" \
  -d '{"type":"local","config":{"path":"/tmp"}}'

# Browse directory
curl -X POST http://localhost:3000/v1/wiki/connectors/browse \
  -H "Content-Type: application/json" \
  -d '{"connector_id":"<id>","path":"/"}'

Closes #32 follow-up

Changes:
- Add connector_sessions to WikiState
- Store connectors after successful test_connection
- Implement browse_directory with actual file listing
- Use Arc<RwLock<>> for thread-safe connector sharing

Features:
- Session-based connector storage (UUID v7 keys)
- Browse files/directories from connected storage
- Support for Local and Git connectors

Next: Session expiry and cleanup (Phase 2.1)
@TelivANT TelivANT merged commit 277c790 into main Feb 21, 2026
3 checks passed
@TelivANT TelivANT deleted the feat/wiki-connector-phase2 branch February 21, 2026 15:14
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.

1 participant