internal/

directory
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: GPL-3.0

Directories

Path Synopsis
Package appearance indexes where each Knowledge Graph Node was mentioned in play (#545, ADR-0008 amendment).
Package appearance indexes where each Knowledge Graph Node was mentioned in play (#545, ADR-0008 amendment).
Package assist is the on-demand LLM campaign-creation helper (#479): from a short GM prompt it drafts a Character NPC's Persona, or a small set of linked Knowledge Graph entries (Nodes + Edges among them) as a PREVIEW the GM reviews before anything lands.
Package assist is the on-demand LLM campaign-creation helper (#479): from a short GM prompt it drafts a Character NPC's Persona, or a small set of linked Knowledge Graph entries (Nodes + Edges among them) as a PREVIEW the GM reviews before anything lands.
Package auth is the single-operator authentication tier (ADR-0016 / ADR-0039): the net/http Discord OAuth carve-out (ADR-0015), the opaque cookie session it issues, and ONE transport-agnostic policy (#446, policy.go) that gates both transports — the Connect interceptor stack (NewStack) over the management RPCs and the guarded plain-mount table (MustGuardMounts) over the byte endpoints.
Package auth is the single-operator authentication tier (ADR-0016 / ADR-0039): the net/http Discord OAuth carve-out (ADR-0015), the opaque cookie session it issues, and ONE transport-agnostic policy (#446, policy.go) that gates both transports — the Connect interceptor stack (NewStack) over the management RPCs and the guarded plain-mount table (MustGuardMounts) over the byte endpoints.
Package billing is the SaaS subscription foundation (ADR-0054): the declarative Plan catalog the operator syncs into the plan table, and the Usage Ledger sink that persists per-Tenant metered usage for cost attribution.
Package billing is the SaaS subscription foundation (ADR-0054): the declarative Plan catalog the operator syncs into the plan table, and the Usage Ledger sink that persists per-Tenant metered usage for cost attribution.
Package blob is the object-storage seam (ADR-0048).
Package blob is the object-storage seam (ADR-0048).
Package bundle defines the campaign bundle format (ADR-0053): a versioned, gzipped-JSON envelope for exporting and importing a campaign setup.
Package bundle defines the campaign bundle format (ADR-0053): a versioned, gzipped-JSON envelope for exporting and importing a campaign setup.
Package busproject is the shared scaffold under the process's Voice-Session bus projections (#447): the transcript Relay (ADR-0040, Line grain) and the Chunker (ADR-0011, Chunk grain) fold the same voiceevent.Bus into different records of the same speech, and everything around their fold rules is identical plumbing.
Package busproject is the shared scaffold under the process's Voice-Session bus projections (#447): the transcript Relay (ADR-0040, Line grain) and the Chunker (ADR-0011, Chunk grain) fold the same voiceevent.Bus into different records of the same speech, and everything around their fold rules is identical plumbing.
Package discordguild proves a Discord User administers a Guild (#504, ADR-0058): the guild-ownership proof SaveDiscordSettings runs before binding a guild_id to a Tenant, so a squat-first attacker cannot bind a guild they do not administer.
Package discordguild proves a Discord User administers a Guild (#504, ADR-0058): the guild-ownership proof SaveDiscordSettings runs before binding a guild_id to a Tenant, so a squat-first attacker cannot bind a guild they do not administer.
Package discordinvite resolves a pasted Discord invite code to its Guild and that Guild's voice channels (#105, ADR-0047), backing the Configuration screen's invite picker.
Package discordinvite resolves a pasted Discord invite code to its Guild and that Guild's voice channels (#105, ADR-0047), backing the Configuration screen's invite picker.
Package discordmsg holds the single Discord message-splitting implementation shared by every surface that posts free-form text to a channel: Discord rejects a message whose content exceeds Limit characters, so long answers (a recap's Followups, a Butler text reply) are split into ordered messages instead of being truncated or 400ing.
Package discordmsg holds the single Discord message-splitting implementation shared by every surface that posts free-form text to a channel: Discord rejects a message whose content exceeds Limit characters, so long answers (a recap's Followups, a Butler text reply) are split into ordered messages instead of being truncated or 400ing.
Package discordshare posts a Session Highlight into Discord with the deployment Bot token (#310, Epic 8, ADR-0051 GM-only sharing): it lists a guild's text channels for the share dialog and uploads a clip as a message attachment — the codebase's first file-attachment path.
Package discordshare posts a Session Highlight into Discord with the deployment Bot token (#310, Epic 8, ADR-0051 GM-only sharing): it lists a guild's text channels for the share dialog and uploads a clip as a message attachment — the codebase's first file-attachment path.
Package discordtag resolves a Discord bot's live tag (e.g.
Package discordtag resolves a Discord bot's live tag (e.g.
Package embedworker is the async embedding backfill worker (#116, ADR-0011).
Package embedworker is the async embedding backfill worker (#116, ADR-0011).
Package highlight is the Session Highlights moment detector (#307, Epic 8): a bus side-consumer that watches the live Voice Session transcript and flags the epic moments worth cutting a clip from the rollover tape (#306, ADR-0051).
Package highlight is the Session Highlights moment detector (#307, Epic 8): a bus side-consumer that watches the live Voice Session transcript and flags the epic moments worth cutting a clip from the rollover tape (#306, ADR-0051).
Package idleclose is the Voice Instance's Idle Close watchdog (CONTEXT.md "Idle Close", ADR-0061): it ends a Voice Session that has processed no audio for the Idle Close Window, and sheds the quietest session when the process crosses a configured resource ceiling.
Package idleclose is the Voice Instance's Idle Close watchdog (CONTEXT.md "Idle Close", ADR-0061): it ends a Voice Session that has processed no audio for the Idle Close Window, and sheds the quietest session when the process crosses a configured resource ceiling.
Package imagegen is the AI image-generation seam (#311, Epic 8, ADR-0004 amendment): a small Generator interface plus a Gemini adapter that turns a text prompt into a single generated image.
Package imagegen is the AI image-generation seam (#311, Epic 8, ADR-0004 amendment): a small Generator interface plus a Gemini adapter that turns a text prompt into a single generated image.
Package jobs is the minimal DB-backed background job runner (#286, ADR-0049).
Package jobs is the minimal DB-backed background job runner (#286, ADR-0049).
Package kgfacts is the NPC Knowledge Graph fact-recall component (#126, ADR-0008 v1.0 / v1.5): the production agent.FactsRecaller the voice loop consults each turn to fill the reserved Hot Context KG-facts slot.
Package kgfacts is the NPC Knowledge Graph fact-recall component (#126, ADR-0008 v1.0 / v1.5): the production agent.FactsRecaller the voice loop consults each turn to fill the reserved Hot Context KG-facts slot.
Package knowledge is the storage-backed adapter behind the read-only knowledge Tools (#296, S1): it wraps internal/storage's retrieval paths in the neutral, storage-free interfaces pkg/tool declares (tool.TranscriptSearcher, tool.KGReader), so pkg/tool never imports internal/storage.
Package knowledge is the storage-backed adapter behind the read-only knowledge Tools (#296, S1): it wraps internal/storage's retrieval paths in the neutral, storage-free interfaces pkg/tool declares (tool.TranscriptSearcher, tool.KGReader), so pkg/tool never imports internal/storage.
Package llmbuild constructs an llm.Provider from a saved Provider Config (ADR-0004), keyed off the config's provider id rather than a hardwired adapter.
Package llmbuild constructs an llm.Provider from a saved Provider Config (ADR-0004), keyed off the config's provider id rather than a hardwired adapter.
Package llmcall is the shared drain-and-meter LLM completion caller for off-session (web-tier) text generation: the recap engine (#272) and the campaign-assist engine (#479) drive single system+user completions through one implementation, so the subtle ADR-0045 metering semantics — reported usage verbatim, ceil(chars/4) estimates only on COMPLETED calls, reported-only metering on error/truncation — cannot drift between call sites.
Package llmcall is the shared drain-and-meter LLM completion caller for off-session (web-tier) text generation: the recap engine (#272) and the campaign-assist engine (#479) drive single system+user completions through one implementation, so the subtle ADR-0045 metering semantics — reported usage verbatim, ceil(chars/4) estimates only on COMPLETED calls, reported-only metering on error/truncation — cannot drift between call sites.
Package mapgen turns a GM's prompt into a map image, on demand (#541, ADR-0060, ADR-0004 amendment).
Package mapgen turns a GM's prompt into a map image, on demand (#541, ADR-0060, ADR-0004 amendment).
Package mixdown turns a rollover-tape Snapshot — per-speaker runs of Opus frames stamped with arrival wall-clock — into a single mono 16-bit PCM WAV clip.
Package mixdown turns a rollover-tape Snapshot — per-speaker runs of Opus frames stamped with arrival wall-clock — into a single mono 16-bit PCM WAV clip.
Package nodeportrait serves Knowledge Graph Node portraits over plain HTTP (#590).
Package nodeportrait serves Knowledge Graph Node portraits over plain HTTP (#590).
Package observe holds Glyphoxa's observability seam: the orchestrator-side metric contract (this file) and, in sibling files, the filtering slog.Handler that tames the disgo DAVE/codec noise (A1) and the Prometheus adapter that implements the recorders (A2, task #3).
Package observe holds Glyphoxa's observability seam: the orchestrator-side metric contract (this file) and, in sibling files, the filtering slog.Handler that tames the disgo DAVE/codec noise (A1) and the Prometheus adapter that implements the recorders (A2, task #3).
Package planchat is the Butler planning chat engine (#592, ADR-0062): the Campaign's Butler (ADR-0009) reachable as a GM-only chat from the Campaign screen, with persisted planning threads.
Package planchat is the Butler planning chat engine (#592, ADR-0062): the Campaign's Butler (ADR-0009) reachable as a GM-only chat from the Campaign screen, with persisted planning threads.
Package portraitgen turns a Knowledge Graph entry's own prose into a portrait image, on demand (#590).
Package portraitgen turns a Knowledge Graph entry's own prose into a portrait image, on demand (#590).
Package presence owns the Bot's standing Discord gateway (ADR-0010 amendment, #489): a REGISTRY of standing disgo clients, keyed by resolved Bot token, that both registers the v1.0 Slash Command surface against each Tenant's configured Guild and — shared with the voice Manager — backs live Voice Sessions.
Package presence owns the Bot's standing Discord gateway (ADR-0010 amendment, #489): a REGISTRY of standing disgo clients, keyed by resolved Bot token, that both registers the v1.0 Slash Command surface against each Tenant's configured Guild and — shared with the voice Manager — backs live Voice Sessions.
Package recall is the NPC memory-recall component (#122, ADR-0011/0042): the production agent.MemoryRecaller the voice loop consults each turn to fill the Hot Context memory slot.
Package recall is the NPC memory-recall component (#122, ADR-0011/0042): the production agent.MemoryRecaller the voice loop consults each turn to fill the Hot Context memory slot.
Package recap is the one-shot Voice Session summarization service (#272, E3): given one or more Voice Session ids it renders their Transcript Lines (ADR-0040) and asks the campaign's Butler-flavoured LLM to produce a coherent recap.
Package recap is the one-shot Voice Session summarization service (#272, E3): given one or more Voice Session ids it renders their Transcript Lines (ADR-0040) and asks the campaign's Butler-flavoured LLM to produce a coherent recap.
Package rpc adapts the storage layer to the Connect handlers that the web tier serves (ADR-0039).
Package rpc adapts the storage layer to the Connect handlers that the web tier serves (ADR-0039).
Package search is the Campaign-wide retrieval engine behind the Ctrl+K command palette (#591) and, later, the Butler planning chat's tool belt (#592: search_transcripts / find_node — appearances_of already has its own read).
Package search is the Campaign-wide retrieval engine behind the Ctrl+K command palette (#591) and, later, the Butler planning chat's tool belt (#592: search_transcripts / find_node — appearances_of already has its own read).
Package session holds the in-process SessionManager that drives the live voice loop from the web tier (ADR-0039): the Session screen's Start/Stop call into a Manager that launches the wirenpc loop, holds its cancel func, and records the run in the voice_sessions table.
Package session holds the in-process SessionManager that drives the live voice loop from the web tier (ADR-0039): the Session screen's Start/Stop call into a Manager that launches the wirenpc loop, holds its cancel func, and records the run in the voice_sessions table.
Package spa serves the built Vite + React single-page app (ADR-0013/0039) from an embedded filesystem.
Package spa serves the built Vite + React single-page app (ADR-0013/0039) from an embedded filesystem.
Package speaker resolves a Speaker Lane's Discord snowflake to a display name and GM flag for the transcript relay + chunk writer (#281, E4).
Package speaker resolves a Speaker Lane's Discord snowflake to a display name and GM flag for the transcript relay + chunk writer (#281, E4).
Package spend is the per-Voice-Session spend meter (#130, ADR-0046): a small in-memory accumulator that estimates a session's provider cost from the same usage capture points #127 already records (observe.UsageSink) and enforces two independently opt-in per-Tenant caps.
Package spend is the per-Voice-Session spend meter (#130, ADR-0046): a small in-memory accumulator that estimates a session's provider cost from the same usage capture points #127 already records (observe.UsageSink) and enforces two independently opt-in per-Tenant caps.
Package storage is the persistence layer for Glyphoxa: goose-driven schema migrations (ADR-0031) plus a thin pgx query layer over the core tables.
Package storage is the persistence layer for Glyphoxa: goose-driven schema migrations (ADR-0031) plus a thin pgx query layer over the core tables.
crypto
Package crypto encrypts BYOK Provider Config credentials at rest (ADR-0004): AES-256-GCM with a single app-level secret supplied via env var.
Package crypto encrypts BYOK Provider Config credentials at rest (ADR-0004): AES-256-GCM with a single app-level secret supplied via env var.
migrations
Package migrations holds the embedded SQL migration files for the Glyphoxa schema.
Package migrations holds the embedded SQL migration files for the Glyphoxa schema.
Package tape is the in-memory rollover tape (ADR-0051): a bounded per-Speaker ring buffer of recent Opus audio that the Session Highlights epic (#257) cuts clips from.
Package tape is the in-memory rollover tape (ADR-0051): a bounded per-Speaker ring buffer of recent Opus audio that the Session Highlights epic (#257) cuts clips from.
Package textnorm holds the single text-normalisation used across Glyphoxa to compare free text for equivalence: lower case, punctuation stripped, whitespace collapsed to single spaces and trimmed.
Package textnorm holds the single text-normalisation used across Glyphoxa to compare free text for equivalence: lower case, punctuation stripped, whitespace collapsed to single spaces and trimmed.
Package transcript is the SSE relay (ADR-0014 Hop-B): it bridges the in-process voiceevent.Bus to the browser's live Session screen.
Package transcript is the SSE relay (ADR-0014 Hop-B): it bridges the in-process voiceevent.Bus to the browser's live Session screen.
Package web is the single-operator web tier (ADR-0039): one cleartext HTTP listener that serves ONLY the Connect RPC handlers.
Package web is the single-operator web tier (ADR-0039): one cleartext HTTP listener that serves ONLY the Connect RPC handlers.
Package wirenpc constructs the one hardcoded Character NPC live voice loop for the MVP `voice` mode (task #4): it builds the Discord audio Manager, joins a voice channel, assembles the orchestrator pipeline with the production Agent loop as the ReplyFunc, and runs the audio loop via pkg/voice/wire.
Package wirenpc constructs the one hardcoded Character NPC live voice loop for the MVP `voice` mode (task #4): it builds the Discord audio Manager, joins a voice channel, assembles the orchestrator pipeline with the production Agent loop as the ReplyFunc, and runs the audio loop via pkg/voice/wire.
Package worldmap serves Campaign Map images over plain HTTP (#538, ADR-0060).
Package worldmap serves Campaign Map images over plain HTTP (#538, ADR-0060).

Jump to

Keyboard shortcuts

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