internal/

directory
v0.25.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2026 License: MIT

Directories

Path Synopsis
Package action computes the deterministic identifiers Part A's structural and LLM extraction paths both use for the actions table — most notably identity_key (spec §5.5), whose stability across re-extraction is what lets a user's done/ignored decision (action_status) survive a rerun.
Package action computes the deterministic identifiers Part A's structural and LLM extraction paths both use for the actions table — most notably identity_key (spec §5.5), whose stability across re-extraction is what lets a user's done/ignored decision (action_status) survive a rerun.
Package api wires together the HTTP router, middleware, and handlers.
Package api wires together the HTTP router, middleware, and handlers.
Package askeval implements issue #266's offline end-to-end evaluation runner for POST /api/v1/ask: it drives the REAL handler (internal/api, via httptest — see runner.go) against a synthetic, isolated corpus (see corpus.go) and a scripted LLM (see llm.go), so retrieval, query rewriting, the query planner, excerpt budgeting, synthesis, and the deterministic citation validator (issue #268) all run exactly as they do in production — never a mock of /ask's own logic.
Package askeval implements issue #266's offline end-to-end evaluation runner for POST /api/v1/ask: it drives the REAL handler (internal/api, via httptest — see runner.go) against a synthetic, isolated corpus (see corpus.go) and a scripted LLM (see llm.go), so retrieval, query rewriting, the query planner, excerpt budgeting, synthesis, and the deterministic citation validator (issue #268) all run exactly as they do in production — never a mock of /ask's own logic.
Package audiovalidate provides lightweight audio-file integrity checks that run before expensive transcription or disk-write operations.
Package audiovalidate provides lightweight audio-file integrity checks that run before expensive transcription or disk-write operations.
Package auth provides shared token sources for HTTP-based API clients (embeddings, LLM chat completions, etc.) that authenticate with CliProxyAPI-issued OAuth tokens or static API keys.
Package auth provides shared token sources for HTTP-based API clients (embeddings, LLM chat completions, etc.) that authenticate with CliProxyAPI-issued OAuth tokens or static API keys.
Package briefing turns a set of open actions into a short, evidence-backed summary.
Package briefing turns a set of open actions into a short, evidence-backed summary.
Package calendarauto registers confirmed future appointments from new communications.
Package calendarauto registers confirmed future appointments from new communications.
Package chunkctx builds the deterministic context header that gets prepended to a chunk's text before it is used as either an embedding input (internal/scheduler) or a sparse-search match target (internal/search, internal/store — issue #270).
Package chunkctx builds the deterministic context header that gets prepended to a chunk's text before it is used as either an embedding input (internal/scheduler) or a sparse-search match target (internal/search, internal/store — issue #270).
Package chunker — adaptive strategy selection.
Package chunker — adaptive strategy selection.
Package classify implements the retention/segment classification pipeline for SMS, Gmail, and call documents: a deterministic Gate that short-circuits obvious cases and asymmetrically bounds the Jev-based Classifier's output, plus the Classifier itself (see classifier.go).
Package classify implements the retention/segment classification pipeline for SMS, Gmail, and call documents: a deterministic Gate that short-circuits obvious cases and asymmetrically bounds the Jev-based Classifier's output, plus the Classifier itself (see classifier.go).
Package collector defines the Collector interface and common types used by all source-specific collectors.
Package collector defines the Collector interface and common types used by all source-specific collectors.
extractor
Package extractor provides content extraction for binary and structured file formats (HTML, PDF, Office, etc.) that cannot be read as plain text.
Package extractor provides content extraction for binary and structured file formats (HTML, PDF, Office, etc.) that cannot be read as plain text.
smsmap
Package smsmap provides pure functions that map raw SMS and call-log fields to model.Document.
Package smsmap provides pure functions that map raw SMS and call-log fields to model.Document.
Package config — embedding_check.go
Package config — embedding_check.go
Package dataset owns the train/holdout split of the search feedback labels and the boundary that keeps the holdout half out of the optimiser's reach.
Package dataset owns the train/holdout split of the search feedback labels and the boundary that keeps the holdout half out of the optimiser's reach.
Package durable provides reusable helpers for building durable, retry-safe workflows.
Package durable provides reusable helpers for building durable, retry-safe workflows.
Package evalcompare pairs two cmd/eval --dump files (baseline vs candidate) by query_id and reports per-slice regressions with a fixed-seed paired bootstrap confidence interval, instead of collapsing everything into one macro-average delta.
Package evalcompare pairs two cmd/eval --dump files (baseline vs candidate) by query_id and reports per-slice regressions with a fixed-seed paired bootstrap confidence interval, instead of collapsing everything into one macro-average delta.
Package evaldump reads the JSON Lines dump files written by cmd/eval's --dump flag (cmd/eval/diagnostics.go).
Package evaldump reads the JSON Lines dump files written by cmd/eval's --dump flag (cmd/eval/diagnostics.go).
Package graph owns every interaction with the Neo4j derived projection.
Package graph owns every interaction with the Neo4j derived projection.
Package intent implements Stage 1 of the /ask pipeline: classifying a user's natural-language question into a Kind that Stage 2 uses to shape document retrieval (entity-weighted search, recency sort, exact-token matching, or a plain general search).
Package intent implements Stage 1 of the /ask pipeline: classifying a user's natural-language question into a Kind that Stage 2 uses to shape document retrieval (entity-weighted search, recency sort, exact-token matching, or a plain general search).
Package jev provides a client for the TypeSafe "Jev" classification API (POST https://api.typesafe.ai/v1/systemone).
Package jev provides a client for the TypeSafe "Jev" classification API (POST https://api.typesafe.ai/v1/systemone).
Package llm provides an OpenAI-compatible chat completion client.
Package llm provides an OpenAI-compatible chat completion client.
Package note contains the shared logic for persisting a user- or agent-authored note into the second-brain knowledge base.
Package note contains the shared logic for persisting a user- or agent-authored note into the second-brain knowledge base.
Package recordingbackfill implements the one-time backfill described in issue #166: migrate call-recording audio files and their JSON sidecars that were ingested BEFORE v0.21.2 (#164) and therefore still carry the raw phone number in plaintext — either in the on-disk filename ({rawNumber}_{timestamp}.ext) or in the sidecar's "number" field (instead of the current number_hash-only scheme).
Package recordingbackfill implements the one-time backfill described in issue #166: migrate call-recording audio files and their JSON sidecars that were ingested BEFORE v0.21.2 (#164) and therefore still carry the raw phone number in plaintext — either in the on-disk filename ({rawNumber}_{timestamp}.ext) or in the sidecar's "number" field (instead of the current number_hash-only scheme).
Package scheduler periodically triggers collectors and persists the resulting documents.
Package scheduler periodically triggers collectors and persists the resulting documents.
Package search provides the search service and embedding engine abstractions.
Package search provides the search service and embedding engine abstractions.
Package setup implements an interactive setup wizard for the collector binary.
Package setup implements an interactive setup wizard for the collector binary.
Package sparsectx runs the #270 phase B backfill: it fills chunk_sparse_context (migration 040) with deterministic sparse-matching text (internal/chunkctx.BuildSparseText) for every chunk, in batches so a run can be interrupted and resumed without re-scanning everything or losing progress.
Package sparsectx runs the #270 phase B backfill: it fills chunk_sparse_context (migration 040) with deterministic sparse-matching text (internal/chunkctx.BuildSparseText) for every chunk, in batches so a run can be interrupted and resumed without re-scanning everything or losing progress.
Package sparseq 는 문장형 질의에서 희소(sparse) 레인용 키워드를 뽑는다(#276).
Package sparseq 는 문장형 질의에서 희소(sparse) 레인용 키워드를 뽑는다(#276).
Package store provides PostgreSQL-backed persistence for documents and chunks.
Package store provides PostgreSQL-backed persistence for documents and chunks.
Package telemetry configures OpenTelemetry tracing for the second-brain backend and exports spans to a self-hosted Langfuse instance over OTLP/HTTP.
Package telemetry configures OpenTelemetry tracing for the second-brain backend and exports spans to a self-hosted Langfuse instance over OTLP/HTTP.
Package textclean은 청킹 직전에 적용되는 소스별 텍스트 전처리를 모아둔다.
Package textclean은 청킹 직전에 적용되는 소스별 텍스트 전처리를 모아둔다.
Package timeutil holds the single timezone Second Brain resolves calendar boundaries and renders dates in.
Package timeutil holds the single timezone Second Brain resolves calendar boundaries and renders dates in.
Package tune measures search-weight candidates against labelled feedback.
Package tune measures search-weight candidates against labelled feedback.
Package worker provides background goroutine workers for the second-brain service.
Package worker provides background goroutine workers for the second-brain service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL