Skip to content

featur(codec): universal file handler and uploading #27

Open
martsokha wants to merge 10 commits intomainfrom
feature/codec
Open

featur(codec): universal file handler and uploading #27
martsokha wants to merge 10 commits intomainfrom
feature/codec

Conversation

@martsokha
Copy link
Member

No description provided.

martsokha and others added 5 commits February 27, 2026 02:42
- Add AnyDocument enum with UniversalLoader for format-agnostic decoding
  using infer (magic bytes), MIME types, and heuristic content analysis
- Add AnyAudio (Wav/Mp3) and AnyImage (Png/Jpeg) handler enums that
  implement Handler with shared associated types for category-level dispatch
- AnyDocument uses AnyAudio/AnyImage instead of per-format variants
- Move streams to dedicated src/stream module (SpanStream, SpanEditStream)
- Rename handler/document/ to handler/rich/ for pdf/docx stubs
- Add Document::map_handler for handler type conversion preserving source
- Add Deref/DerefMut on Document<H> into H for ergonomic handler access
- Simplify Loader::decode to return single Document instead of Vec
- Add DocumentType::from_mime() in nvisy-core for centralized MIME mapping
- Make audio handlers functional (SpanData=Bytes, view/edit spans)
- Rewrite HTML handler encode to use DOM mutation via scraper/ego-tree
- Add TextHandler impl for CsvHandler
- Use derive_more::From on AnyAudio/AnyImage enums
- Complete prelude with all public types
- Add tests across all new and modified modules (99 total)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Make handler request/response modules private, re-export ServerError
- Add ContentRegistry::delete(Uuid) and delete_all() with tests
- Add DELETE /api/v1/ingest/{id} and DELETE /api/v1/ingest endpoints
  with OpenAPI docs via aide
- Create extract module with Version extractor (Accept-Version header,
  FromRequestParts, FromStr/Display, unit tests)
- Improve handler module documentation with endpoint tables and
  multipart upload field reference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add ErrorKind::NotFound and map it to HTTP 404 in ServerError
- ContentRegistry::delete now returns NotFound for missing content
  instead of InternalError (500)
- Move Health response struct from handler/check.rs to response/check.rs
  for consistency with other response types
- Move base64::Engine import to module top in execute.rs; import both
  base64::Engine and nvisy Engine traits as `_`

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merge 8 subdirectories into 3 (apply/, compiler/, engine/) to reduce
fragmentation. Absorb executor, runs, connections, ontology, and policy
runtime functions into engine/. Move RetryPolicy into compiler/retry.rs
since it's owned by GraphNode. Replace StubEngine with DefaultEngine in
the server service layer, deriving Debug/Clone/Copy on DefaultEngine and
adding it to impl_di!.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement apply_audio_doc with time-range silence/remove via WavHandler,
add audio_output_from_spec mapping, and delete the superseded single-file
engine.rs (now engine/ directory).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@martsokha martsokha self-assigned this Feb 27, 2026
@martsokha martsokha added docs improvements, updates or additions to docs feat request for or implementation of a new feature labels Feb 27, 2026
martsokha and others added 3 commits February 27, 2026 19:00
Add newtype Json<T> and Path<T> extractors in extract/ that convert
axum rejections into our ErrorResponse JSON shape. Migrate Version
extractor rejection from (StatusCode, String) to Error<'static>.
Move error types into handler/error/ module, replace ServerError
with Error/ErrorKind/Result, and simplify handler return types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…config

Add JsonSchema derives to Entity, DetectionOutput, Location variants
(ontology) and PolicyEvaluation (identify) so ExecuteResponse can use
the real types instead of lossy serde_json::Value round-trips.
Re-export DetectionOutput from nvisy-engine for downstream access.

Server improvements:
- Upload endpoint now uses api_route + post_with for OpenAPI visibility
- Crate root re-exports routes, ServiceState, Error, ErrorKind, Result
- CORS origins configurable via SecurityConfig::cors_allowed_origins
- REQUEST_ID_HEADER constant replaces hardcoded "x-request-id" strings
- Multipart extractor warns on nameless fields instead of silent default
- Expanded MIME map with audio, video, and additional image formats
- Doc comments on recovery middleware functions; fix stale handler docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Merge split `#[derive(schemars::JsonSchema)]` lines into single derive
attributes using the short-form `JsonSchema` with proper imports across
all crates. Add missing `cors_allowed_origins` field to CLI config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@martsokha martsokha changed the title Feature/codec featur(codec): universal file handler and uploading Feb 27, 2026
martsokha and others added 2 commits February 27, 2026 22:37
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…re modules

- Reduce nvisy-core ErrorKind from 12 to 9 variants: remove Python,
  InternalError, InvalidInput, Other; add Internal; rename all callers
- Split monolithic Provider enum into domain-specific types:
  AgentProvider, TranscribeProvider, AudioGenProvider, ImageGenProvider
- Rename synthesize/synthesis modules to generate, transcription to
  transcribe for consistent verb-form naming
- Convert flat files to directory modules for future extensibility
- Move client-building free functions to methods on
  AuthenticatedProvider/UnauthenticatedProvider
- Extract build_http_client into backend/http_client.rs
- Move ContextWindow from backend to agent/base (sole consumer)
- Add Debug impls to all provider types (api_key redacted)
- Remove all re-exports from lib.rs, use pub mod only

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

Labels

docs improvements, updates or additions to docs feat request for or implementation of a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant