Documentation
¶
Overview ¶
Package costroid holds the published schema of costroid.yml.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ConfigSchema []byte
ConfigSchema is the JSON Schema of costroid.yml.
var Recipes embed.FS
Recipes holds the CI recipes as this release ships them, under recipes/. A recipe's Costroid pin can name an earlier release, or none, because the commit that pins a release follows its tag. costroid init rewrites each pin to the release the binary belongs to.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package catalogdata embeds the price sheets of each release the binary carries.
|
Package catalogdata embeds the price sheets of each release the binary carries. |
|
cmd
|
|
|
costroid
command
Command costroid is the cost check for pull requests.
|
Command costroid is the cost check for pull requests. |
|
internal
|
|
|
adapter
Package adapter holds what every agent adapter hands the wrapper.
|
Package adapter holds what every agent adapter hands the wrapper. |
|
adapter/claudecode
Package claudecode reads Claude Code runs.
|
Package claudecode reads Claude Code runs. |
|
adapter/codex
Package codex reads `codex exec --json` runs.
|
Package codex reads `codex exec --json` runs. |
|
adapter/ghaw
Package ghaw reads what a GitHub Agentic Workflows (gh-aw) run spent, from the usage artifact its conclusion job uploads.
|
Package ghaw reads what a GitHub Agentic Workflows (gh-aw) run spent, from the usage artifact its conclusion job uploads. |
|
agenttest
Package agenttest keeps a test from starting a real coding agent.
|
Package agenttest keeps a test from starting a real coding agent. |
|
catalog
Package catalog prices token classes against the pinned sheets.
|
Package catalog prices token classes against the pinned sheets. |
|
cicontext
Package cicontext reads what the CI system says about a run.
|
Package cicontext reads what the CI system says about a run. |
|
comment
Package comment turns FOCUS rows into the check output and the sticky pull request comment.
|
Package comment turns FOCUS rows into the check output and the sticky pull request comment. |
|
config
Package config checks a costroid.yml against the published schema.
|
Package config checks a costroid.yml against the published schema. |
|
decimal
Package decimal is an exact base-10 number for money and quantities.
|
Package decimal is an exact base-10 number for money and quantities. |
|
egress
Package egress is the one way out of costroid serve.
|
Package egress is the one way out of costroid serve. |
|
export
Package export writes a rows file in the import format of another cost tool: FOCUS 1.4 CSV, a Vantage custom provider's CSV, or Datadog's Custom Costs CSV.
|
Package export writes a rows file in the import format of another cost tool: FOCUS 1.4 CSV, a Vantage custom provider's CSV, or Datadog's Custom Costs CSV. |
|
fanout
Package fanout runs CPU-bound work over a list on every core the process has.
|
Package fanout runs CPU-bound work over a list on every core the process has. |
|
focus
Package focus holds the Costroid FOCUS row, version 0.3, and its writer.
|
Package focus holds the Costroid FOCUS row, version 0.3, and its writer. |
|
gateway
Package gateway gives one CI run its own key on a LiteLLM proxy.
|
Package gateway gives one CI run its own key on a LiteLLM proxy. |
|
gateway/gatewaytest
Package gatewaytest serves the LiteLLM proxy routes costroid gateway calls, as LiteLLM v1.108.1 answered them on 2026-11-07, for tests.
|
Package gatewaytest serves the LiteLLM proxy routes costroid gateway calls, as LiteLLM v1.108.1 answered them on 2026-11-07, for tests. |
|
history
Package history reads the result objects earlier reports posted on a pull request's commits, and adds their figures up with this run's.
|
Package history reads the result objects earlier reports posted on a pull request's commits, and adds their figures up with this run's. |
|
mcpserver
Package mcpserver answers the Model Context Protocol over one connection, so an agent can ask what its run has cost while it works.
|
Package mcpserver answers the Model Context Protocol over one connection, so an agent can ask what its run has cost while it works. |
|
oidc
Package oidc verifies CI OIDC ID tokens and reads a run's identity from them.
|
Package oidc verifies CI OIDC ID tokens and reads a run's identity from them. |
|
oidc/oidctest
Package oidctest is a stub OIDC issuer for tests: an RSA key, a JWKS endpoint and a signer.
|
Package oidctest is a stub OIDC issuer for tests: an RSA key, a JWKS endpoint and a signer. |
|
otlp
Package otlp reads OTLP/HTTP traces and logs into per-request usage.
|
Package otlp reads OTLP/HTTP traces and logs into per-request usage. |
|
otlpemit
Package otlpemit sends a rows file to an OpenTelemetry backend as traces over OTLP/HTTP: one span per model request.
|
Package otlpemit sends a rows file to an OpenTelemetry backend as traces over OTLP/HTTP: one span per model request. |
|
policy
Package policy decides the check's conclusion.
|
Package policy decides the check's conclusion. |
|
reason
Package reason holds the words a run states about itself: why it wrote no rows, what to do about the error its agent ended in, and the reader's error line.
|
Package reason holds the words a run states about itself: why it wrote no rows, what to do about the error its agent ended in, and the reader's error line. |
|
recipelint
Package recipelint holds the shipped CI recipes to their security rules: no privileged trigger, every action pinned by SHA, and an agent's job that holds nothing but read access to the code.
|
Package recipelint holds the shipped CI recipes to their security rules: no privileged trigger, every action pinned by SHA, and an agent's job that holds nothing but read access to the code. |
|
reconcile
Package reconcile compares the ledger with the provider's own reports, per credential per day.
|
Package reconcile compares the ledger with the provider's own reports, per credential per day. |
|
reconcile/state
Package state names a reconciliation's verdict on its tokens.
|
Package state names a reconciliation's verdict on its tokens. |
|
review
Package review renders the agent's own answer as a second pull request comment, apart from Costroid's report.
|
Package review renders the agent's own answer as a second pull request comment, apart from Costroid's report. |
|
run
Package run launches an agent under a budget and turns its usage into rows.
|
Package run launches an agent under a budget and turns its usage into rows. |
|
scm
Package scm reaches a source-code host through one interface.
|
Package scm reaches a source-code host through one interface. |
|
scm/scmtest
Package scmtest holds stub GitHub and GitLab APIs for tests.
|
Package scmtest holds stub GitHub and GitLab APIs for tests. |
|
server
Package server is the ingest service behind costroid serve: the result-stream and OTLP paths, pricing against the pinned catalog, and the per-PR view.
|
Package server is the ingest service behind costroid serve: the result-stream and OTLP paths, pricing against the pinned catalog, and the per-PR view. |
|
status
Package status writes a run's status file: what the run has spent so far, its cap, what is left and what holds it, for the agent and the job to read while the agent works.
|
Package status writes a run's status file: what the run has spent so far, its cap, what is left and what holds it, for the agent and the job to read while the agent works. |
|
store
Package store is the ledger: FOCUS rows in Postgres, one tenant at a time.
|
Package store is the ledger: FOCUS rows in Postgres, one tenant at a time. |
|
store/storetest
Package storetest runs Postgres in Docker for the packages that need it.
|
Package storetest runs Postgres in Docker for the packages that need it. |
|
vcs
Package vcs reads the names a version control system gives a commit.
|
Package vcs reads the names a version control system gives a commit. |
|
Package migrations embeds the forward-only schema migrations.
|
Package migrations embeds the forward-only schema migrations. |
|
scripts
|
|
|
accuracy
command
Command accuracy keeps the inputs of one day's reconciliation, writes the accuracy page from every day kept, and checks the page against them.
|
Command accuracy keeps the inputs of one day's reconciliation, writes the accuracy page from every day kept, and checks the page against them. |
|
notice
command
Command notice writes NOTICE from the modules a release build of costroid links and the licence and notice files each holds in the module cache.
|
Command notice writes NOTICE from the modules a release build of costroid links and the licence and notice files each holds in the module cache. |
|
record
command
Command record turns an agent's run into a test fixture that holds no content: no prompt, no reply, no tool output, no path and no credential.
|
Command record turns an agent's run into a test fixture that holds no content: no prompt, no reply, no tool output, no path and no credential. |