internal/

directory
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2026 License: Apache-2.0

Directories

Path Synopsis
Package app assembles kōjō from its deployment config: the store, the day-2 config manager, the model gateway, the sandbox driver and its proxy, the surfaces, the engine and the HTTP server.
Package app assembles kōjō from its deployment config: the store, the day-2 config manager, the model gateway, the sandbox driver and its proxy, the surfaces, the engine and the HTTP server.
Package cli is the kojo command line: the server and the proxy, the commands that drive a running server (run, sessions, eval, config), and the ones that work on files (doctor, setup, skills validate, schema).
Package cli is the kojo command line: the server and the proxy, the commands that drive a running server (run, sessions, eval, config), and the ones that work on files (doctor, setup, skills validate, schema).
Package client is the HTTP client of kōjō's API.
Package client is the HTTP client of kōjō's API.
Package config holds kōjō's two kinds of configuration.
Package config holds kōjō's two kinds of configuration.
Package core is the factory itself: the orchestrator that delegates to skill subagents, the goal critic that checks their work, the merge policy that decides what happens to a change, and the scheduler.
Package core is the factory itself: the orchestrator that delegates to skill subagents, the goal critic that checks their work, the merge policy that decides what happens to a change, and the scheduler.
Package dashboard is kōjō's web UI and its API, served by the same binary as everything else.
Package dashboard is kōjō's web UI and its API, served by the same binary as everything else.
Package doctor checks that a kōjō deployment is safe and complete: the database, the sandbox driver and its isolation, that egress is really blocked, the replicas of a remote kojo-proxy, the forges and their branch protection, chat, the model gateway, budgets, sign-in and the activation gate.
Package doctor checks that a kōjō deployment is safe and complete: the database, the sandbox driver and its isolation, that egress is really blocked, the replicas of a remote kojo-proxy, the forges and their branch protection, chat, the model gateway, budgets, sign-in and the activation gate.
Package eval runs skills against fixture repositories (design §10).
Package eval runs skills against fixture repositories (design §10).
Package models is kōjō's model gateway client.
Package models is kōjō's model gateway client.
modelstest
Package modelstest fakes the HTTP APIs of the cloud model providers the embedded gateway calls: Azure OpenAI's v1 API, Amazon Bedrock's Converse and InvokeModel, and Vertex AI's generateContent with a Google OAuth token endpoint.
Package modelstest fakes the HTTP APIs of the cloud model providers the embedded gateway calls: Azure OpenAI's v1 API, Amazon Bedrock's Converse and InvokeModel, and Vertex AI's generateContent with a Google OAuth token endpoint.
Package proxy is kojo-proxy: the egress proxy every sandbox must go through.
Package proxy is kojo-proxy: the egress proxy every sandbox must go through.
Package report makes shareable session reports: a read-only, redacted page of one session that anyone with its link can open without signing in to the dashboard.
Package report makes shareable session reports: a read-only, redacted page of one session that anyone with its link can open without signing in to the dashboard.
Package sandbox defines the driver interface the core uses to run untrusted code (repo code, model-written code) away from its own credentials.
Package sandbox defines the driver interface the core uses to run untrusted code (repo code, model-written code) away from its own credentials.
docker
Package docker is the sandbox driver that runs each sandbox as a plain Docker container.
Package docker is the sandbox driver that runs each sandbox as a plain Docker container.
e2b
Package e2b is the sandbox driver for E2B-compatible services: E2B Cloud, a self-hosted E2B, and CubeSandbox, which serves the same API.
Package e2b is the sandbox driver for E2B-compatible services: E2B Cloud, a self-hosted E2B, and CubeSandbox, which serves the same API.
e2b/e2btest
Package e2btest is an in-process E2B-compatible service for tests: the control API and envd behind one HTTP server, as far as the e2b driver uses them (see internal/sandbox/e2b/api.go).
Package e2btest is an in-process E2B-compatible service for tests: the control API and envd behind one HTTP server, as far as the e2b driver uses them (see internal/sandbox/e2b/api.go).
fake
Package fake is the sandbox driver unit tests use.
Package fake is the sandbox driver unit tests use.
k8s
Package k8s is the sandbox driver for Kubernetes Agent Sandbox (kubernetes-sigs/agent-sandbox): one claim per session, isolated by the cluster's Kata or gVisor RuntimeClass.
Package k8s is the sandbox driver for Kubernetes Agent Sandbox (kubernetes-sigs/agent-sandbox): one claim per session, isolated by the cluster's Kata or gVisor RuntimeClass.
sbx
Package sbx is the sandbox driver for Docker Sandboxes: one microVM per session, each with its own kernel and a private Docker daemon.
Package sbx is the sandbox driver for Docker Sandboxes: one microVM per session, each with its own kernel and a private Docker daemon.
Package skills loads factory-as-code: the .factory/ files of a repository, the org's skills, and the built-in skills, layered in that order.
Package skills loads factory-as-code: the .factory/ files of a repository, the org's skills, and the built-in skills, layered in that order.
Package store is kōjō's persistence: the job queue, sessions and their checkpoints, the audit log, day-2 config revisions, skill drafts, team memory, eval results and the proposals kōjō makes for its own skills.
Package store is kōjō's persistence: the job queue, sessions and their checkpoints, the audit log, day-2 config revisions, skill drafts, team memory, eval results and the proposals kōjō makes for its own skills.
memory
Package memory is an in-process store.Store for unit tests and for `kojo eval --local`.
Package memory is an in-process store.Store for unit tests and for `kojo eval --local`.
postgres
Package postgres is kōjō's production store: one Postgres database holds the queue (FOR UPDATE SKIP LOCKED), sessions and checkpoints (JSONB), team memory (pgvector, with a full-text fallback), the append-only audit log, config revisions (hot reload through LISTEN/NOTIFY) and everything else.
Package postgres is kōjō's production store: one Postgres database holds the queue (FOR UPDATE SKIP LOCKED), sessions and checkpoints (JSONB), team memory (pgvector, with a full-text fallback), the append-only audit log, config revisions (hot reload through LISTEN/NOTIFY) and everything else.
storetest
Package storetest is the behaviour every store.Store must have.
Package storetest is the behaviour every store.Store must have.
surfaces
alerts
Package alerts is the interface every source of production alerts implements: an error tracker (Sentry) whose alert rule fires starts a session that reproduces and fixes the error on the repository the alert's project maps to.
Package alerts is the interface every source of production alerts implements: an error tracker (Sentry) whose alert rule fires starts a session that reproduces and fixes the error on the repository the alert's project maps to.
alerts/alertstest
Package alertstest is an in-memory alert source for the core's and the app's tests, as trackertest is for issue trackers.
Package alertstest is an in-memory alert source for the core's and the app's tests, as trackertest is for issue trackers.
asana
Package asana is Asana as an issue tracker: webhooks established with the X-Hook-Secret handshake and signed with X-Hook-Signature, and the REST API reached with the token of the Asana user or service account kōjō acts as.
Package asana is Asana as an issue tracker: webhooks established with the X-Hook-Secret handshake and signed with X-Hook-Signature, and the REST API reached with the token of the Asana user or service account kōjō acts as.
bitbucket
Package bitbucket is the forge adapter for Bitbucket Cloud (api.bitbucket.org/2.0).
Package bitbucket is the forge adapter for Bitbucket Cloud (api.bitbucket.org/2.0).
chat
Package chat is the interface every chat surface implements: Slack, Microsoft Teams, Discord and Mattermost.
Package chat is the interface every chat surface implements: Slack, Microsoft Teams, Discord and Mattermost.
datadog
Package datadog is Datadog Error Tracking as a source of production alerts.
Package datadog is Datadog Error Tracking as a source of production alerts.
discord
Package discord is the Discord chat adapter: mentions and direct messages in, replies and approval buttons out.
Package discord is the Discord chat adapter: mentions and direct messages in, replies and approval buttons out.
forge
Package forge is the interface the core uses to talk to a code forge (GitHub, GitLab, Forgejo/Gitea, Bitbucket Cloud).
Package forge is the interface the core uses to talk to a code forge (GitHub, GitLab, Forgejo/Gitea, Bitbucket Cloud).
forge/forgetest
Package forgetest is an in-memory forge.Forge for the core's unit tests and for dev stacks that run without a real forge.
Package forgetest is an in-memory forge.Forge for the core's unit tests and for dev stacks that run without a real forge.
forgejo
Package forgejo is the forge adapter for Forgejo and Gitea, which share one API (config.Forgejo.BaseURL is the instance root).
Package forgejo is the forge adapter for Forgejo and Gitea, which share one API (config.Forgejo.BaseURL is the instance root).
github
Package github is the forge adapter for GitHub: github.com, GitHub Enterprise Cloud with data residency (api.<tenant>.ghe.com) and GitHub Enterprise Server (config.GitHub.BaseURL, https://ghe.example.com/api/v3).
Package github is the forge adapter for GitHub: github.com, GitHub Enterprise Cloud with data residency (api.<tenant>.ghe.com) and GitHub Enterprise Server (config.GitHub.BaseURL, https://ghe.example.com/api/v3).
gitlab
Package gitlab is the forge adapter for GitLab: gitlab.com or a self-managed instance (config.GitLab.BaseURL).
Package gitlab is the forge adapter for GitLab: gitlab.com or a self-managed instance (config.GitLab.BaseURL).
jira
Package jira is Jira Cloud as an issue tracker: webhooks signed with the webhook's secret (X-Hub-Signature), and the REST API v3 reached with the API token of the Atlassian account kōjō acts as.
Package jira is Jira Cloud as an issue tracker: webhooks signed with the webhook's secret (X-Hub-Signature), and the REST API v3 reached with the API token of the Atlassian account kōjō acts as.
linear
Package linear is the Linear issue tracker: webhooks signed with HMAC (Linear-Signature), and the GraphQL API reached with the personal API key of the Linear user kōjō acts as.
Package linear is the Linear issue tracker: webhooks signed with HMAC (Linear-Signature), and the GraphQL API reached with the personal API key of the Linear user kōjō acts as.
mattermost
Package mattermost is the Mattermost chat adapter: mentions and direct messages in, threaded replies and approval buttons out.
Package mattermost is the Mattermost chat adapter: mentions and direct messages in, threaded replies and approval buttons out.
mcp
Package mcp exposes the factory to editors and other coding agents over the Model Context Protocol: start a session, follow it and read its result, and everything else the dashboard and the CLI do (skills and drafts, runtime config and its history, schedules, evals, memory, the audit log, doctor).
Package mcp exposes the factory to editors and other coding agents over the Model Context Protocol: start a session, follow it and read its result, and everything else the dashboard and the CLI do (skills and drafts, runtime config and its history, schedules, evals, memory, the audit log, doctor).
sentry
Package sentry is Sentry as a source of production alerts: an issue alert rule whose action is kōjō's internal integration sends a webhook signed with the integration's Client Secret, and kōjō reads the alert's issue through Sentry's API with a token of the same integration.
Package sentry is Sentry as a source of production alerts: an issue alert rule whose action is kōjō's internal integration sends a webhook signed with the integration's Client Secret, and kōjō reads the alert's issue through Sentry's API with a token of the same integration.
slack
Package slack is the Slack chat adapter: mentions and DMs in, threaded replies and approval buttons out.
Package slack is the Slack chat adapter: mentions and DMs in, threaded replies and approval buttons out.
teams
Package teams is the Microsoft Teams chat adapter: personal messages and mentions in, threaded replies and approval cards out.
Package teams is the Microsoft Teams chat adapter: personal messages and mentions in, threaded replies and approval cards out.
tracker
Package tracker is the interface every issue tracker implements: Linear, Jira Cloud and Asana.
Package tracker is the interface every issue tracker implements: Linear, Jira Cloud and Asana.
tracker/trackertest
Package trackertest is an in-memory issue tracker for the core's tests, as forgetest is for forges.
Package trackertest is an in-memory issue tracker for the core's tests, as forgetest is for forges.
Package version holds the build's version, set by the linker at release time (see .goreleaser.yaml).
Package version holds the build's version, set by the linker at release time (see .goreleaser.yaml).

Jump to

Keyboard shortcuts

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