Initial implementation of vault-os
Complete implementation across all 13 phases: - vault-core: types, YAML frontmatter parsing, entity classification, filesystem ops, config, prompt composition, validation, search - vault-watch: filesystem watcher with daemon write filtering, event classification - vault-scheduler: cron engine, process executor, task runner with retry logic and concurrency limiting - vault-api: Axum REST API (15 route modules), WebSocket with broadcast, AI assistant proxy, validation, templates - Dashboard: React + TypeScript + Tailwind v4 with kanban, CodeMirror editor, dynamic view system, AI chat sidebar - Nix flake with dev shell and NixOS module - Graceful shutdown, inotify overflow recovery, tracing instrumentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
f820a72b04
123 changed files with 18288 additions and 0 deletions
28
crates/vault-api/src/lib.rs
Normal file
28
crates/vault-api/src/lib.rs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
pub mod error;
|
||||
pub mod routes;
|
||||
pub mod state;
|
||||
pub mod ws;
|
||||
pub mod ws_protocol;
|
||||
|
||||
use axum::Router;
|
||||
use std::sync::Arc;
|
||||
use tower_http::cors::{Any, CorsLayer};
|
||||
use tower_http::trace::TraceLayer;
|
||||
|
||||
pub use state::AppState;
|
||||
|
||||
pub fn build_router(state: Arc<AppState>) -> Router {
|
||||
let cors = CorsLayer::new()
|
||||
.allow_origin(Any)
|
||||
.allow_methods(Any)
|
||||
.allow_headers(Any);
|
||||
|
||||
let api = routes::api_routes();
|
||||
|
||||
Router::new()
|
||||
.nest("/api", api)
|
||||
.route("/ws", axum::routing::get(ws::ws_handler))
|
||||
.layer(cors)
|
||||
.layer(TraceLayer::new_for_http())
|
||||
.with_state(state)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue