Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
factory
command
Command factory is the KaaS Factory CLI.
|
Command factory is the KaaS Factory CLI. |
|
ee
|
|
|
internal
|
|
|
a2a
Package a2a serves the factory as an A2A agent: another agent sends a request as text, the factory files a ticket labelled ready, and the task carries the ticket id in its metadata.
|
Package a2a serves the factory as an A2A agent: another agent sends a request as text, the factory files a ticket labelled ready, and the task carries the ticket id in its metadata. |
|
api
Package api is the one contract every part of the factory shares.
|
Package api is the one contract every part of the factory shares. |
|
api/porttest
Package porttest holds in-memory fakes of the api ports for unit tests.
|
Package porttest holds in-memory fakes of the api ports for unit tests. |
|
audit
Package audit records every side effect the factory takes as one record: who or what did which action, to what, when, and with what result.
|
Package audit records every side effect the factory takes as one record: who or what did which action, to what, when, and with what result. |
|
browsercheck
Ported from browser-use/browser-use@dfb6a73 browser_use/browser/local.py
|
Ported from browser-use/browser-use@dfb6a73 browser_use/browser/local.py |
|
budget
Package budget holds pooled spend caps per team and per client.
|
Package budget holds pooled spend caps per team and per client. |
|
config
Package config resolves the runner's settings from layered sources: builtin defaults, the org, team and repo files, FACTORY_* environment variables and flags, later layers winning.
|
Package config resolves the runner's settings from layered sources: builtin defaults, the org, team and repo files, FACTORY_* environment variables and flags, later layers winning. |
|
core
Package core is the one api.Control: it owns a single reconcile loop, turns the loop's decisions into calls on the ports, and publishes every change as an api.Event (Symphony 7, 8.1 and 13).
|
Package core is the one api.Control: it owns a single reconcile loop, turns the loop's decisions into calls on the ports, and publishes every change as an api.Event (Symphony 7, 8.1 and 13). |
|
dashboard
Package dashboard is the read-only web view of the factory: board, queue and ticket timeline, server-rendered, with one SSE endpoint for live updates.
|
Package dashboard is the read-only web view of the factory: board, queue and ticket timeline, server-rendered, with one SSE endpoint for live updates. |
|
design
Package design runs the deterministic design-edit step: it hands a design delta to the pinned node pack in packs/design and reports whether the edit was made without a coding agent.
|
Package design runs the deterministic design-edit step: it hands a design delta to the pinned node pack in packs/design and reports whether the edit was made without a coding agent. |
|
dispatch/brief
Package brief renders an api.Brief to the markdown file a session reads from the cloud-briefs branch, and names that file.
|
Package brief renders an api.Brief to the markdown file a session reads from the cloud-briefs branch, and names that file. |
|
dispatch/broker
Package broker lets a sandboxed session ask for a short-lived upstream credential per action, so the session never holds the long-lived secret.
|
Package broker lets a sandboxed session ask for a short-lived upstream credential per action, so the session never holds the long-lived secret. |
|
dispatch/broker/brokertest
Package brokertest holds fakes for the broker package's tests.
|
Package brokertest holds fakes for the broker package's tests. |
|
dispatch/fire
Package fire is an api.Dispatcher that starts a session through a routine's documented fire endpoint, and the rate limiter that keeps it inside the per-routine and per-account hourly caps.
|
Package fire is an api.Dispatcher that starts a session through a routine's documented fire endpoint, and the rate limiter that keeps it inside the per-routine and per-account hourly caps. |
|
dispatch/k8s
Package k8s is an api.Dispatcher that runs each session in its own sandbox on Kubernetes: a Sandbox of kubernetes-sigs/agent-sandbox (Apache-2.0), or a plain Pod when the CRD is absent.
|
Package k8s is an api.Dispatcher that runs each session in its own sandbox on Kubernetes: a Sandbox of kubernetes-sigs/agent-sandbox (Apache-2.0), or a plain Pod when the CRD is absent. |
|
dispatch/local
Ported from sst/opencode@a1aa513f78c7e9c57ea6c1237de09b702e18f934 packages/server/src/auth.ts
|
Ported from sst/opencode@a1aa513f78c7e9c57ea6c1237de09b702e18f934 packages/server/src/auth.ts |
|
dispatch/local/autosubmit
Package autosubmit stops a local agent run that passes its call or cost cap and, for that or any abnormal exit, collects the worktree's diff and opens a pull request marked partial.
|
Package autosubmit stops a local agent run that passes its call or cost cap and, for that or any abnormal exit, collects the worktree's diff and opens a pull request marked partial. |
|
dispatch/local/input
Package input delivers text to a running agent's terminal: it waits for the screen to settle, frames the text as a bracketed paste or raw keys, and closes the agent with SIGINT before a kill.
|
Package input delivers text to a running agent's terminal: it waits for the screen to settle, frames the text as a bracketed paste or raw keys, and closes the agent with SIGINT before a kill. |
|
dispatch/local/stuck
Package stuck watches the stream-json events of a `claude -p` run and reports when the agent is looping: a nudge verdict on the first hit of a stall, an abort on the next hit before the agent makes progress.
|
Package stuck watches the stream-json events of a `claude -p` run and reports when the agent is looping: a nudge verdict on the first hit of a stall, an abort on the next hit before the agent makes progress. |
|
dispatch/routines
Package routines is an api.Dispatcher that starts a coding-agent session through the routines HTTP API: it creates a disabled trigger with no schedule, runs it, and watches the session.
|
Package routines is an api.Dispatcher that starts a coding-agent session through the routines HTTP API: it creates a disabled trigger with no schedule, runs it, and watches the session. |
|
dispatch/shadow
Package shadow is an api.Dispatcher wrapper that runs nothing and records what the wrapped dispatcher would have been asked to do, so a team can watch the factory on its repo before it touches anything.
|
Package shadow is an api.Dispatcher wrapper that runs nothing and records what the wrapped dispatcher would have been asked to do, so a team can watch the factory on its repo before it touches anything. |
|
dispatch/spend
Package spend stops a dispatcher from starting an agent session for a scope that has used up its budget.
|
Package spend stops a dispatcher from starting an agent session for a scope that has used up its budget. |
|
dispatch/untrusted
Package untrusted holds the rules for a session that works on a pull request whose author lacks write access: an allowlist of the commands it may run (everything else is refused, because a blocklist misses env, xargs, find -exec and git hooks), a deny list kept as a second layer, and a guard that puts the files the agent CLI and git trust back during and after the session.
|
Package untrusted holds the rules for a session that works on a pull request whose author lacks write access: an allowlist of the commands it may run (everything else is refused, because a blocklist misses env, xargs, find -exec and git hooks), a deny list kept as a second layer, and a guard that puts the files the agent CLI and git trust back during and after the session. |
|
docgen
Package docgen renders the CLI and config reference documents from the code, deterministically.
|
Package docgen renders the CLI and config reference documents from the code, deterministically. |
|
egress
Package egress is the in-repo HTTP CONNECT proxy a sandbox must use to reach the network.
|
Package egress is the in-repo HTTP CONNECT proxy a sandbox must use to reach the network. |
|
eval
Package eval runs a matrix of fixtures through injected dispatch, gate and hidden-test interfaces and scores the result.
|
Package eval runs a matrix of fixtures through injected dispatch, gate and hidden-test interfaces and scores the result. |
|
eval/assert
Package assert is a deterministic assertion kit with promptfoo's names and scoring.
|
Package assert is a deterministic assertion kit with promptfoo's names and scoring. |
|
eval/grade
Package grade scores a test run from its log against a fixture's expected test lists.
|
Package grade scores a test run from its log against a fixture's expected test lists. |
|
eval/infra
Package infra tells an environment failure from a failed change by signatures in a run log.
|
Package infra tells an environment failure from a failed change by signatures in a run log. |
|
eval/judgecache
Package judgecache remembers judge verdicts on disk, keyed by a hash of the fixture, the output and the rubric version, so an unchanged fixture is not judged twice.
|
Package judgecache remembers judge verdicts on disk, keyed by a hash of the fixture, the output and the rubric version, so an unchanged fixture is not judged twice. |
|
eval/replay
Package replay runs eval fixtures from a recorded conversation with no model calls.
|
Package replay runs eval fixtures from a recorded conversation with no model calls. |
|
eval/trajectory
Package trajectory is the per-task record of an eval run (one JSON file per task) and the offline statistics over a set of them.
|
Package trajectory is the per-task record of an eval run (one JSON file per task) and the offline statistics over a set of them. |
|
firstrun
Package firstrun is the first-hour demo: it runs the auditor, maps each finding to a catalogue pack, sizes the fixes and writes a scorecard.
|
Package firstrun is the first-hour demo: it runs the auditor, maps each finding to a catalogue pack, sizes the fixes and writes a scorecard. |
|
firstrun/sarif
Package sarif reads reason-tagged annotations and writes first-run findings as SARIF 2.1.0.
|
Package sarif reads reason-tagged annotations and writes first-run findings as SARIF 2.1.0. |
|
gate
Package gate runs a repo's gate command and reads its FACTORY_GATES line.
|
Package gate runs a repo's gate command and reads its FACTORY_GATES line. |
|
gate/lintdelta
Package lintdelta rejects an edit that adds linter errors the file did not have before the edit.
|
Package lintdelta rejects an edit that adds linter errors the file did not have before the edit. |
|
githubauth
Package githubauth mints GitHub App installation tokens so an organization can run the factory as an app instead of a person.
|
Package githubauth mints GitHub App installation tokens so an organization can run the factory as an app instead of a person. |
|
gitx
Package gitx wraps the git binary for the operations the orchestrator and the merge queue need.
|
Package gitx wraps the git binary for the operations the orchestrator and the merge queue need. |
|
gitx/checkpoint
Package checkpoint snapshots a worktree before an agent session and restores it afterwards.
|
Package checkpoint snapshots a worktree before an agent session and restores it afterwards. |
|
graph
Package graph runs a pipeline as nodes and edges.
|
Package graph runs a pipeline as nodes and edges. |
|
graph/checkpoint
Package checkpoint keeps a workflow run's state in SQLite, one checkpoint per step and the writes of tasks that finished after it, so a restart re-runs only the tasks that had not finished.
|
Package checkpoint keeps a workflow run's state in SQLite, one checkpoint per step and the writes of tasks that finished after it, so a restart re-runs only the tasks that had not finished. |
|
graph/interrupt
Package interrupt parks a node on a question for a person and resumes it with their answer.
|
Package interrupt parks a node on a question for a person and resumes it with their answer. |
|
graph/scanedit
Package scanedit is a two-node workflow: Scan reads every file and writes an accumulator to disk, Edit reads that accumulator and rewrites files.
|
Package scanedit is a two-node workflow: Scan reads every file and writes an accumulator to disk, Edit reads that accumulator and rewrites files. |
|
initwiz
Package initwiz is `factory init`: it asks a few questions, or takes flags, and writes .factory/factory.yaml from a tier preset.
|
Package initwiz is `factory init`: it asks a few questions, or takes flags, and writes .factory/factory.yaml from a tier preset. |
|
logs
Package logs prints what a ticket's session is doing: `factory logs <ticket> [-f]`.
|
Package logs prints what a ticket's session is doing: `factory logs <ticket> [-f]`. |
|
marker
Package marker is the one codec for the `<!-- factory:NAME {...} -->` comment markers the runner writes into issue threads: queued, spend and data.
|
Package marker is the one codec for the `<!-- factory:NAME {...} -->` comment markers the runner writes into issue threads: queued, spend and data. |
|
mcp
Package mcp serves the factory to Claude Code over stdio, using the tool names of KaaS-team/factory-mcp.
|
Package mcp serves the factory to Claude Code over stdio, using the tool names of KaaS-team/factory-mcp. |
|
mergeq
Package mergeq is a batched, speculative merge queue.
|
Package mergeq is a batched, speculative merge queue. |
|
mergeq/wire
Package wire builds the merge queue's real adapters: git over gitx, the gate over internal/gate, pull request heads over go-github, and the tracker over internal/tracker/github.
|
Package wire builds the merge queue's real adapters: git over gitx, the gate over internal/gate, pull request heads over go-github, and the tracker over internal/tracker/github. |
|
meter
Package meter turns the absolute usage totals that sessions report into deltas, sums them per node, ticket and team-day, and checks them against budgets (Symphony §13.5: absolute totals in, deltas derived, never double counted).
|
Package meter turns the absolute usage totals that sessions report into deltas, sums them per node, ticket and team-day, and checks them against budgets (Symphony §13.5: absolute totals in, deltas derived, never double counted). |
|
meter/cap
Package cap refuses to dispatch a session whose ticket has already spent its cap.
|
Package cap refuses to dispatch a session whose ticket has already spent its cap. |
|
meter/price
Package price holds the embedded model price catalog and prices usage from it.
|
Package price holds the embedded model price catalog and prices usage from it. |
|
observe
Package observe reads git and the tracker to describe one ticket's run.
|
Package observe reads git and the tracker to describe one ticket's run. |
|
observe/ghsource
Package ghsource implements observe.Source on the GitHub REST API.
|
Package ghsource implements observe.Source on the GitHub REST API. |
|
observe/sampling
Package sampling decides, the same way on every run, whether a ticket's trace is judged, and maps OTLP usage attributes to meter usage.
|
Package sampling decides, the same way on every run, whether a ticket's trace is judged, and maps OTLP usage attributes to meter usage. |
|
oidc
Package oidc checks OIDC bearer tokens from an outside identity provider (Zitadel, Keycloak, Okta, Entra) and maps the token's groups claim to a factory role.
|
Package oidc checks OIDC bearer tokens from an outside identity provider (Zitadel, Keycloak, Okta, Entra) and maps the token's groups claim to a factory role. |
|
packs
Ported from sourcegraph/zoekt@9e78667 index/file_category.go
|
Ported from sourcegraph/zoekt@9e78667 index/file_category.go |
|
packs/astgrep
Package astgrep runs the pinned ast-grep release binary in the jail and reads what it prints.
|
Package astgrep runs the pinned ast-grep release binary in the jail and reads what it prints. |
|
packs/checkmd
Package checkmd reads markdown check packs and decides which of them apply to a diff.
|
Package checkmd reads markdown check packs and decides which of them apply to a diff. |
|
packs/depup
Package depup turns dependency updates into tickets with declarative rules, no model call.
|
Package depup turns dependency updates into tickets with declarative rules, no model call. |
|
packs/migration
Package migration loads declarative migration packs and decides which files each step sees.
|
Package migration loads declarative migration packs and decides which files each step sees. |
|
packs/repomap
Ported from Aider-AI/aider@5dc9490 aider/repomap.py
|
Ported from Aider-AI/aider@5dc9490 aider/repomap.py |
|
pick
Ported from triggerdotdev/trigger.dev@2fbd5c7 packages/redis-worker/src/fair-queue/schedulers/drr.ts
|
Ported from triggerdotdev/trigger.dev@2fbd5c7 packages/redis-worker/src/fair-queue/schedulers/drr.ts |
|
plan
Package plan parses and renders the planned issue body v1 and checks a set of tickets as a DAG.
|
Package plan parses and renders the planned issue body v1 and checks a set of tickets as a DAG. |
|
plan/intent
Package intent turns a goal into a spec and then into planned tickets.
|
Package intent turns a goal into a spec and then into planned tickets. |
|
plancmd
Package plancmd is `factory plan`: it turns a goal, an epic or a spec into a ticket DAG, prints the waves, and with --approve files the tickets.
|
Package plancmd is `factory plan`: it turns a goal, an epic or a spec into a ticket DAG, prints the waves, and with --approve files the tickets. |
|
provenance
Package provenance keeps THIRD_PARTY_NOTICES.md in step with the "// Ported from <repo>@<sha> <path>" headers on copied Go files.
|
Package provenance keeps THIRD_PARTY_NOTICES.md in step with the "// Ported from <repo>@<sha> <path>" headers on copied Go files. |
|
reconcile
Package reconcile is the orchestrator's brain: a pure Decide that turns the state and the observations into actions, and a Tick pass that applies them through the api ports.
|
Package reconcile is the orchestrator's brain: a pure Decide that turns the state and the observations into actions, and a Tick pass that applies them through the api ports. |
|
reconcile/eventlog
Package eventlog keeps an append-only log of the steps the scheduler completed for each ticket.
|
Package eventlog keeps an append-only log of the steps the scheduler completed for each ticket. |
|
redact
Package redact is the one secret redactor.
|
Package redact is the one secret redactor. |
|
report
Package report builds the unit-economics report: is the factory paying for itself.
|
Package report builds the unit-economics report: is the factory paying for itself. |
|
review
Package review runs review-only checks: each check gets its own disposable worktree seeded from HEAD plus the uncommitted changes, an agent edits it under a diff-only prompt, and the edits come back as a patch.
|
Package review runs review-only checks: each check gets its own disposable worktree seeded from HEAD plus the uncommitted changes, an agent edits it under a diff-only prompt, and the edits come back as a patch. |
|
sandbox
Package sandbox holds what a per-task sandbox needs that is not Kubernetes: the .factory/environment.toml schema, the cache key of a set-up environment, and the redactor that keeps secret values out of logs.
|
Package sandbox holds what a per-task sandbox needs that is not Kubernetes: the .factory/environment.toml schema, the cache key of a set-up environment, and the redactor that keeps secret values out of logs. |
|
selfupdate
Package selfupdate checks for a newer factory release and replaces the running binary after verifying the release asset against its checksum.
|
Package selfupdate checks for a newer factory release and replaces the running binary after verifying the release asset against its checksum. |
|
serve
Ported from triggerdotdev/trigger.dev@2fbd5c7cf4e9c8e19b88e2b72a7133795611e33d internal-packages/schedule-engine/src/engine/scheduleCalculation.ts Ported from triggerdotdev/trigger.dev@2fbd5c7cf4e9c8e19b88e2b72a7133795611e33d internal-packages/schedule-engine/src/engine/distributedScheduling.ts
|
Ported from triggerdotdev/trigger.dev@2fbd5c7cf4e9c8e19b88e2b72a7133795611e33d internal-packages/schedule-engine/src/engine/scheduleCalculation.ts Ported from triggerdotdev/trigger.dev@2fbd5c7cf4e9c8e19b88e2b72a7133795611e33d internal-packages/schedule-engine/src/engine/distributedScheduling.ts |
|
serve/hostguard
Package hostguard rejects requests whose Host or Origin header is not on an allow-list, which stops DNS-rebinding and cross-site requests against a local control listener.
|
Package hostguard rejects requests whose Host or Origin header is not on an allow-list, which stops DNS-rebinding and cross-site requests against a local control listener. |
|
smoke
Package smoke drives the real factory loop against one GitHub repository with a fake agent (no model), so an operator can check the whole path end to end.
|
Package smoke drives the real factory loop against one GitHub repository with a fake agent (no model), so an operator can check the whole path end to end. |
|
store
Package store is a SQLite cache of what the factory knows about its tickets.
|
Package store is a SQLite cache of what the factory knows about its tickets. |
|
store/conformance
Package conformance is a table of behaviours every crypt.Store must show; a store's own test calls Run with a constructor.
|
Package conformance is a table of behaviours every crypt.Store must show; a store's own test calls Run with a constructor. |
|
store/crypt
Package crypt wraps a checkpoint row store with AES-GCM encryption and ships two stores (memory and SQLite) that the conformance suite in internal/store/conformance runs against.
|
Package crypt wraps a checkpoint row store with AES-GCM encryption and ships two stores (memory and SQLite) that the conformance suite in internal/store/conformance runs against. |
|
trace
Package trace is the span schema for eval traces and the sink that records them.
|
Package trace is the span schema for eval traces and the sink that records them. |
|
tracker/github
Package github implements api.Tracker over the GitHub issue thread, which is the only state the factory keeps.
|
Package github implements api.Tracker over the GitHub issue thread, which is the only state the factory keeps. |
|
tracker/jira
Package jira implements api.Tracker over Jira's REST API v3 for one project.
|
Package jira implements api.Tracker over Jira's REST API v3 for one project. |
|
tracker/linear
Package linear implements api.Tracker over Linear's GraphQL API for one team.
|
Package linear implements api.Tracker over Linear's GraphQL API for one team. |
|
tracker/safeout
Package safeout is the agent write path: a session emits typed NDJSON items, and a separate apply stage, the only holder of a tracker write credential, validates each against a per-verb policy and executes it.
|
Package safeout is the agent write path: a session emits typed NDJSON items, and a separate apply stage, the only holder of a tracker write credential, validates each against a per-verb policy and executes it. |
|
tracker/sanitize
Package sanitize cleans text on its way into an agent prompt (Prompt) and on its way out to a tracker or channel (Publication).
|
Package sanitize cleans text on its way into an agent prompt (Prompt) and on its way out to a tracker or channel (Publication). |
|
tracker/vendorkit
Package vendorkit is what the Linear and Jira adapters share: an HTTP client with bounded retries, and the marker codec that carries <!-- factory --> markers through trackers that strip HTML comments.
|
Package vendorkit is what the Linear and Jira adapters share: an HTTP client with bounded retries, and the marker codec that carries <!-- factory --> markers through trackers that strip HTML comments. |
|
tui
Package tui is the terminal board for the factory.
|
Package tui is the terminal board for the factory. |
|
tutor
Package tutor decides which model tier runs each attempt: a cheap student tier first, a stronger teacher tier once the student budget is spent.
|
Package tutor decides which model tier runs each attempt: a cheap student tier first, a stronger teacher tier once the student budget is spent. |
|
upgrade
Package upgrade keeps pinned packs current from their upstreams, bumping a pin only when the eval says the new version is not worse.
|
Package upgrade keeps pinned packs current from their upstreams, bumping a pin only when the eval says the new version is not worse. |
|
pkg
|
|
|
agentrun
Package agentrun is the stable surface other KaaS modules import to run coding agents: the Dispatcher port, the local dispatcher (`claude -p` under the operator's login), the cloud routines dispatcher and the token meter.
|
Package agentrun is the stable surface other KaaS modules import to run coding agents: the Dispatcher port, the local dispatcher (`claude -p` under the operator's login), the cloud routines dispatcher and the token meter. |
|
retry
Package retry is a small retry and backoff kit forked from temporal common/backoff (MIT).
|
Package retry is a small retry and backoff kit forked from temporal common/backoff (MIT). |
|
sandbox
Package sandbox is a light per-session jail for agent processes: Landlock and rlimits on Linux, sandbox-exec on macOS.
|
Package sandbox is a light per-session jail for agent processes: Landlock and rlimits on Linux, sandbox-exec on macOS. |
|
sandbox/cachevol
Package cachevol keeps cache volumes as plain directories under one directory, apart from the sandbox's other state, so that the directory can be handed from one process to the next.
|
Package cachevol keeps cache volumes as plain directories under one directory, apart from the sandbox's other state, so that the directory can be handed from one process to the next. |
|
sandbox/egress
Package egress is the one door out of a sandboxed session: an allow/deny proxy that holds the real credentials, plus a masker for output.
|
Package egress is the one door out of a sandboxed session: an allow/deny proxy that holds the real credentials, plus a masker for output. |
|
sandbox/remote
Package remote is a sandbox backend that runs commands on a remote sandbox service over HTTP.
|
Package remote is a sandbox backend that runs commands on a remote sandbox service over HTTP. |
|
scripts
|
|
|
price-refresh
command
Command price-refresh diffs the embedded price catalog against langfuse's price list at a pinned commit and prints a Markdown report of changed, missing and removed models.
|
Command price-refresh diffs the embedded price catalog against langfuse's price list at a pinned commit and prints a Markdown report of changed, missing and removed models. |
|
tools
|
|
|
doccheck
command
Command doccheck fails when a backticked path in README.md or AGENTS.md does not exist.
|
Command doccheck fails when a backticked path in README.md or AGENTS.md does not exist. |
|
prcheck
command
Ported from scripts/check-pr-body.ts at ts-final
|
Ported from scripts/check-pr-body.ts at ts-final |
|
ratchet
command
Command ratchet fails when non-test Go lines or deadcode entries exceed .ratchet.json.
|
Command ratchet fails when non-test Go lines or deadcode entries exceed .ratchet.json. |
Click to show internal directories.
Click to hide internal directories.