internal/

directory
v1.117.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0

Directories

Path Synopsis
admin
settingsapi
Package settingsapi serves the /api/v1/admin/settings/smtp surface: the stored SMTP configuration (#631), the send-test action, and the test recipient's notification opt-out status (#1022).
Package settingsapi serves the /api/v1/admin/settings/smtp surface: the stored SMTP configuration (#631), the send-test action, and the test recipient's notification opt-out status (#1022).
Package apidocs Code generated by swaggo/swag.
Package apidocs Code generated by swaggo/swag.
Package contentviewer embeds the standalone content viewer JS/CSS bundle built from ui/src/content-viewer-entry.tsx.
Package contentviewer embeds the standalone content viewer JS/CSS bundle built from ui/src/content-viewer-entry.tsx.
Package httpserver assembles the platform's HTTP surface: the mux and route table (MCP streamable HTTP, SSE, OAuth, admin/portal/resources/gateway/ observability REST APIs, portal UI), CORS, and the drain/shutdown sequencing that lets connected agents reconnect to a new build.
Package httpserver assembles the platform's HTTP surface: the mux and route table (MCP streamable HTTP, SSE, OAuth, admin/portal/resources/gateway/ observability REST APIs, portal UI), CORS, and the drain/shutdown sequencing that lets connected agents reconnect to a new build.
accessgate
Package accessgate refuses portal requests from callers whose roles map to no persona.
Package accessgate refuses portal requests from callers whose roles map to no persona.
attachhttp
Package attachhttp exposes prompt resource attachments (#1013) over REST for both operator surfaces: the portal (a prompt author manages the materials on their own prompts) and the admin API (any prompt).
Package attachhttp exposes prompt resource attachments (#1013) over REST for both operator surfaces: the portal (a prompt author manages the materials on their own prompts) and the admin API (any prompt).
datahubapi
Package datahubapi serves the portal's DataHub Catalog and Context Docs REST surface (#718): browse/search/read over DataHub connections plus catalog metadata edits and context-document CRUD, gated per-persona.
Package datahubapi serves the portal's DataHub Catalog and Context Docs REST surface (#718): browse/search/read over DataHub connections plus catalog metadata edits and context-document CRUD, gated per-persona.
gatewayhttp
Package gatewayhttp exposes the apigateway toolkit's invoke operation over plain REST so non-MCP HTTP clients (e.g.
Package gatewayhttp exposes the apigateway toolkit's invoke operation over plain REST so non-MCP HTTP clients (e.g.
health
Package health provides readiness state tracking and HTTP health check handlers.
Package health provides readiness state tracking and HTTP health check handlers.
httpauth
Package httpauth is the HTTP-level authentication gate for the MCP transports: it extracts a bearer token or API key from the request, authenticates it, and refuses an unauthenticated caller with the challenge the transport expects before any MCP framing is parsed.
Package httpauth is the HTTP-level authentication gate for the MCP transports: it extracts a bearer token or API key from the request, authenticates it, and refuses an unauthenticated caller with the challenge the transport expects before any MCP framing is parsed.
mentionhttp
Package mentionhttp serves the people surfaces of the portal API: the known-users directory behind the share picker (#614), the audience-scoped candidate list behind the @-mention picker, and the caller's mentions inbox (#627).
Package mentionhttp serves the people surfaces of the portal API: the known-users directory behind the share picker (#614), the audience-scoped candidate list behind the @-mention picker, and the caller's mentions inbox (#627).
sources
Package sources provides concrete enrichment Source adapters for the platform's built-in toolkits (Trino, DataHub).
Package sources provides concrete enrichment Source adapters for the platform's built-in toolkits (Trino, DataHub).
versionhttp
Package versionhttp exposes prompt version history, draft review actions, audit-derived usage stats (#1009), and prompt collection management (#1010) over REST.
Package versionhttp exposes prompt version history, draft review actions, audit-derived usage stats (#1009), and prompt collection management (#1010) over REST.
Package logsan provides a single, shared log-sanitization helper used across the platform to neutralize log-injection (CWE-117) vectors in user-derived string values before they are passed to a logger.
Package logsan provides a single, shared log-sanitization helper used across the platform to neutralize log-injection (CWE-117) vectors in user-derived string values before they are passed to a logger.
platform
assetindex
Package assetindex is the saved-asset consumer of the shared indexjobs framework (#550).
Package assetindex is the saved-asset consumer of the shared indexjobs framework (#550).
branding
Package branding owns the resolved-once brand assets behind one Handle: the brand logo SVG, the brand URL, and the implementor logo SVG.
Package branding owns the resolved-once brand assets behind one Handle: the brand logo SVG, the brand URL, and the implementor logo SVG.
browserauth
Package browserauth builds the browser-facing authentication stack for the portal and admin web UI: the OIDC login/callback flow and the cookie authenticator, held together behind one Session handle.
Package browserauth builds the browser-facing authentication stack for the portal and admin web UI: the OIDC login/callback flow and the cookie authenticator, held together behind one Session handle.
cfgmap
Package cfgmap holds typed accessors for reading values out of the map[string]any config blobs the platform loads from YAML/JSON.
Package cfgmap holds typed accessors for reading values out of the map[string]any config blobs the platform loads from YAML/JSON.
collectionindex
Package collectionindex is the curated-collection consumer of the shared indexjobs framework (#550).
Package collectionindex is the curated-collection consumer of the shared indexjobs framework (#550).
completionlayer
Package completionlayer implements the MCP completion/complete handler for the platform: argument autocompletion for prompt arguments and resource-template variables.
Package completionlayer implements the MCP completion/complete handler for the platform: argument autocompletion for prompt arguments and resource-template variables.
connauth
Package connauth assembles the connection-OAuth token lifecycle behind one Handle: the unified connection_oauth_tokens store (pkg/connoauth), the durable connection_auth_events store together with its nil-safe writer and daily 90-day prune routine (pkg/authevents), and the background token-refresh loop.
Package connauth assembles the connection-OAuth token lifecycle behind one Handle: the unified connection_oauth_tokens store (pkg/connoauth), the durable connection_auth_events store together with its nil-safe writer and daily 90-day prune routine (pkg/authevents), and the background token-refresh loop.
connbackfill
Package connbackfill seeds connection_instances with a credential-free row for every file-configured connection, so knowledge-page references of the form mcp:connection:(kind,name) — which FK to connection_instances — resolve for connections defined only in platform.yaml.
Package connbackfill seeds connection_instances with a credential-free row for every file-configured connection, so knowledge-page references of the form mcp:connection:(kind,name) — which FK to connection_instances — resolve for connections defined only in platform.yaml.
connscope
Package connscope answers, for discovery surfaces, the question the authorizer answers for tool calls: may this caller's persona reach this connection?
Package connscope answers, for discovery surfaces, the question the authorizer answers for tool calls: may this caller's persona reach this connection?
connsource
Package connsource maps connections to their DataHub URN components (platform name and catalog mapping), with forward and reverse lookups.
Package connsource maps connections to their DataHub URN components (platform name and catalog mapping), with forward and reverse lookups.
dedup
Package dedup holds the session-level metadata deduplication config, split out of pkg/platform to keep that package under its size budget (#594).
Package dedup holds the session-level metadata deduplication config, split out of pkg/platform to keep that package under its size budget (#594).
exportadapters
Package exportadapters adapts the platform's portal stores to the export interfaces consumed by the trino and api-gateway toolkits.
Package exportadapters adapts the platform's portal stores to the export interfaces consumed by the trino and api-gateway toolkits.
iam
Package iam builds the platform's authentication and authorization identity layer: the authenticator chain (NewIdentity) and the persona authorizer (NewAuthorizer).
Package iam builds the platform's authentication and authorization identity layer: the authenticator chain (NewIdentity) and the persona authorizer (NewAuthorizer).
indexqueue
Package indexqueue assembles the shared background embedding queue (pkg/indexjobs) behind one Handle: the Postgres store, the Source/Sink registry, the worker/reaper/reconciler, the optional retention sweep and LISTEN/NOTIFY adapter, and every enabled consumer (api-catalog, tools, memory, prompts, portal assets/collections/knowledge-pages, managed resources).
Package indexqueue assembles the shared background embedding queue (pkg/indexjobs) behind one Handle: the Postgres store, the Source/Sink registry, the worker/reaper/reconciler, the optional retention sweep and LISTEN/NOTIFY adapter, and every enabled consumer (api-catalog, tools, memory, prompts, portal assets/collections/knowledge-pages, managed resources).
knowledgelayer
Package knowledgelayer assembles the knowledge-capture layer behind one Handle: the insight store (the memory-backed adapter over memory_records when a memory store is present, else the legacy Postgres store), the changeset store and DataHub writer that back apply_knowledge, and the capture_insight / apply_knowledge toolkit itself.
Package knowledgelayer assembles the knowledge-capture layer behind one Handle: the insight store (the memory-backed adapter over memory_records when a memory store is present, else the legacy Postgres store), the changeset store and DataHub writer that back apply_knowledge, and the capture_insight / apply_knowledge toolkit itself.
knowledgepageindex
Package knowledgepageindex is the knowledge-page consumer of the shared indexjobs framework (#633).
Package knowledgepageindex is the knowledge-page consumer of the shared indexjobs framework (#633).
listchanged
Package listchanged provides a debounced, broadcaster-backed notifier that publishes a single MCP "*/list_changed" notification for a runtime-mutable entity set (prompts, managed resources) to every connected SSE long-poll subscriber, cross-replica via the session broadcaster's LISTEN/NOTIFY channel.
Package listchanged provides a debounced, broadcaster-backed notifier that publishes a single MCP "*/list_changed" notification for a runtime-mutable entity set (prompts, managed resources) to every connected SSE long-poll subscriber, cross-replica via the session broadcaster's LISTEN/NOTIFY channel.
mcpapps
Package mcpapps provides MCP Apps support for interactive UI components.
Package mcpapps provides MCP Apps support for interactive UI components.
memoryindex
Package memoryindex is the memory consumer of the shared indexjobs framework (#507).
Package memoryindex is the memory consumer of the shared indexjobs framework (#507).
memorylayer
Package memorylayer assembles the memory layer behind one Handle: the Postgres-backed memory store, the embedding provider that powers vector search, the memory_manage / memory_capture toolkit (with its recall-first checker), the memory↔enrichment middleware adapter, and the background staleness watcher.
Package memorylayer assembles the memory layer behind one Handle: the Postgres-backed memory store, the embedding provider that powers vector search, the memory_manage / memory_capture toolkit (with its recall-first checker), the memory↔enrichment middleware adapter, and the background staleness watcher.
mwchain
Package mwchain validates an ordered middleware chain against declared ordering dependencies.
Package mwchain validates an ordered middleware chain against declared ordering dependencies.
notifydelivery
Package notifydelivery assembles the email-notification substrate (pkg/notification) into one startable handle: the settings, preference, and queue stores, the trigger-side enqueuer, and the send worker with its LISTEN/NOTIFY wakeup adapter.
Package notifydelivery assembles the email-notification substrate (pkg/notification) into one startable handle: the settings, preference, and queue stores, the trigger-side enqueuer, and the send worker with its LISTEN/NOTIFY wakeup adapter.
oauthserver
Package oauthserver assembles the OAuth 2.1 authorization server and its storage behind one Handle: storage selection (Postgres when a database is present, else in-memory), bcrypt-hashed pre-registration of configured clients, the server itself, its authorization-state cleanup, and metrics wiring.
Package oauthserver assembles the OAuth 2.1 authorization server and its storage behind one Handle: storage selection (Postgres when a database is present, else in-memory), bcrypt-hashed pre-registration of configured clients, the server itself, its authorization-state cleanup, and metrics wiring.
obs
Package obs owns the platform's observability layer: the metrics recorder, its /metrics HTTP listener, and the (independently-gated) OTel tracer.
Package obs owns the platform's observability layer: the metrics recorder, its /metrics HTTP listener, and the (independently-gated) OTel tracer.
portalstore
Package portalstore assembles the asset-portal store layer behind one Handle: the five Postgres stores (asset, share, version, collection, thread), the knowledge-page store, the S3 blob backend, and the save/manage-asset toolkit built on top of them.
Package portalstore assembles the asset-portal store layer behind one Handle: the five Postgres stores (asset, share, version, collection, thread), the knowledge-page store, the S3 blob backend, and the save/manage-asset toolkit built on top of them.
promptindex
Package promptindex is the prompt-library consumer of the shared indexjobs framework (#557, epic #525 phase 4).
Package promptindex is the prompt-library consumer of the shared indexjobs framework (#557, epic #525 phase 4).
promptlayer
Package promptlayer assembles the prompt subsystem behind one Handle: the Postgres-backed prompt store, the file-based tuning prompt manager, the name-keyed prompt-metadata registry (promptInfos), and every behavior that registers, serves, and manages prompts — the static/workflow/database registration path, the per-viewer dynamic-serving path behind the prompts/list visibility middleware, and the manage_prompt tool.
Package promptlayer assembles the prompt subsystem behind one Handle: the Postgres-backed prompt store, the file-based tuning prompt manager, the name-keyed prompt-metadata registry (promptInfos), and every behavior that registers, serves, and manages prompts — the static/workflow/database registration path, the per-viewer dynamic-serving path behind the prompts/list visibility middleware, and the manage_prompt tool.
reflexivecapture
Package reflexivecapture wires reflexive knowledge activation (#635) into the platform: it observes Trino query errors and mints a "misconception + fix" correction memory when a later related query succeeds in the same session.
Package reflexivecapture wires reflexive knowledge activation (#635) into the platform: it observes Trino query errors and mints a "misconception + fix" correction memory when a later related query succeeds in the same session.
resourceaudit
Package resourceaudit records reads of managed-resource content as audit events and stamps the durable last-read time on the resource row.
Package resourceaudit records reads of managed-resource content as audit events and stamps the durable last-read time on the resource row.
resourceindex
Package resourceindex is the managed-resource consumer of the shared indexjobs framework (#1012).
Package resourceindex is the managed-resource consumer of the shared indexjobs framework (#1012).
resourcelayer
Package resourcelayer assembles the managed-resources layer behind one Handle: the Postgres-backed resource store for human-uploaded reference material, the S3 blob client that holds the file bytes, and the MCP-server registration that makes each resource visible in the SDK's native resources/list.
Package resourcelayer assembles the managed-resources layer behind one Handle: the Postgres-backed resource store for human-uploaded reference material, the S3 blob client that holds the file bytes, and the MCP-server registration that makes each resource visible in the SDK's native resources/list.
routepolicy
Package routepolicy builds the api-gateway's per-route authorization policy: it resolves a caller's roles and checks a (connection, method, path) tuple against the persona authorizer's APIRoutes rules.
Package routepolicy builds the api-gateway's per-route authorization policy: it resolves a caller's roles and checks a (connection, method, path) tuple against the persona authorizer's APIRoutes rules.
searchfed
Package searchfed assembles the universal, topology-free search federation behind one Handle: the knowledge.Router that federates every searchable source a caller can access, and the search toolkit that exposes it as the one discovery entry point (#645).
Package searchfed assembles the universal, topology-free search federation behind one Handle: the knowledge.Router that federates every searchable source a caller can access, and the search toolkit that exposes it as the one discovery entry point (#645).
sessionsync
Package sessionsync assembles the session / cross-replica-sync layer behind one Handle: the externalized session store (memory or postgres), the per-session enrichment-dedup cache, the client-facing MCP notification broadcaster, and the dedicated cross-replica reload bus (its own broadcaster channel plus the publish/subscribe machinery).
Package sessionsync assembles the session / cross-replica-sync layer behind one Handle: the externalized session store (memory or postgres), the per-session enrichment-dedup cache, the client-facing MCP notification broadcaster, and the dedicated cross-replica reload bus (its own broadcaster channel plus the publish/subscribe machinery).
toolkitcfg
Package toolkitcfg resolves typed per-toolkit connection configuration out of the platform's raw toolkits config (map[string]any decoded from YAML/JSON).
Package toolkitcfg resolves typed per-toolkit connection configuration out of the platform's raw toolkits config (map[string]any decoded from YAML/JSON).
toolratelimit
Package toolratelimit wires the per-user tool-call rate limiter (#929) into the platform: an MCP receiving middleware that refuses authenticated tools/call requests exceeding a generous per-identity token-bucket limit before they reach the handler, audit pipeline, or upstream.
Package toolratelimit wires the per-user tool-call rate limiter (#929) into the platform: an MCP receiving middleware that refuses authenticated tools/call requests exceeding a generous per-identity token-bucket limit before they reach the handler, audit pipeline, or upstream.
userdir
Package userdir assembles the known-users directory (#614) behind one Handle: the Postgres-backed user store and the *user.Directory that wraps it with throttled, asynchronous upserts of authenticated people.
Package userdir assembles the known-users directory (#614) behind one Handle: the Postgres-backed user store and the *user.Directory that wraps it with throttled, asynchronous upserts of authenticated people.
utilconn
Package utilconn seeds the built-in "util" API-gateway connection (issue #1005): a handler=internal connection whose operations are served in-process (internal/platform/utilhandler) and discovered through the same catalog path as any other api connection.
Package utilconn seeds the built-in "util" API-gateway connection (issue #1005): a handler=internal connection whose operations are served in-process (internal/platform/utilhandler) and discovered through the same catalog path as any other api connection.
utilhandler
Package utilhandler implements the built-in "util" connection's in-process operations (issue #1005).
Package utilhandler implements the built-in "util" connection's in-process operations (issue #1005).
portal
publicviewer
Package publicviewer holds the embedded assets of the portal's public share pages: the two HTML templates, their Content-Security-Policy, and the default brand mark.
Package publicviewer holds the embedded assets of the portal's public share pages: the two HTML templates, their Content-Security-Policy, and the default brand mark.
sharecache
Package sharecache decides how a response served behind a portal share token may be cached.
Package sharecache decides how a response served behind a portal share token may be cached.
viewerlimit
Package viewerlimit rate-limits the portal's public share viewer.
Package viewerlimit rate-limits the portal's public share viewer.
Package server provides a factory for creating the MCP server.
Package server provides a factory for creating the MCP server.
Package ui embeds and serves the unified portal SPA frontend.
Package ui embeds and serves the unified portal SPA frontend.

Jump to

Keyboard shortcuts

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