Directories
¶
| Path | Synopsis |
|---|---|
|
Package agent is the core of bide, a Go framework for AI agents that move money: a durability-first, Go-idiomatic toolkit whose side effects fire at most once, whose approvals are signed and counted by k-of-n, and whose every action is provable afterwards.
|
Package agent is the core of bide, a Go framework for AI agents that move money: a durability-first, Go-idiomatic toolkit whose side effects fire at most once, whose approvals are signed and counted by k-of-n, and whose every action is provable afterwards. |
|
agenttest
Package agenttest holds test doubles and helpers for code built on package agent: a scripted model that plays back the turns you give it, so an agent runs with no provider or API key (ScriptedModel, NewScriptedModel, ToolTurn, TextTurn, ErrorTurn); a Store that counts its round trips (CountingStore); and constructors that panic instead of returning an error (MemJournal, MustJournal, MustNew, Must), for tests whose setup cannot fail.
|
Package agenttest holds test doubles and helpers for code built on package agent: a scripted model that plays back the turns you give it, so an agent runs with no provider or API key (ScriptedModel, NewScriptedModel, ToolTurn, TextTurn, ErrorTurn); a Store that counts its round trips (CountingStore); and constructors that panic instead of returning an error (MemJournal, MustJournal, MustNew, Must), for tests whose setup cannot fail. |
|
storetest
Package storetest checks that an agent.Store meets the requirements the journal builds on (A1 to A8, documented on agent.Store), that a Journal over it writes and checks the journal format header, and that records round-trip byte for byte.
|
Package storetest checks that an agent.Store meets the requirements the journal builds on (A1 to A8, documented on agent.Store), that a Journal over it writes and checks the journal format header, and that records round-trip byte for byte. |
|
Package approvals is the intake an application serves so that approvers can decide on gated calls over HTTP: an http.Handler that shows a pending call from the journal, and takes an approver's signed decision, verifies it against the recorded call, and records it through the application's own journal.
|
Package approvals is the intake an application serves so that approvers can decide on gated calls over HTTP: an http.Handler that shows a pending call from the journal, and takes an approver's signed decision, verifies it against the recorded call, and records it through the application's own journal. |
|
cmd/approvepage
command
Command approvepage writes the approve page's files (approvals.PageFiles) to a directory, with a SHA256SUMS file in the format sha256sum -c reads, for an organization that hosts the page on an origin of its own.
|
Command approvepage writes the approve page's files (approvals.PageFiles) to a directory, with a SHA256SUMS file in the format sha256sum -c reads, for an organization that hosts the page on an origin of its own. |
|
assets
|
|
|
demo/browser-shots/intake
command
Command intake runs a real approval intake with the approve page for the v0.17.0 screenshots: an agent paused at a refund tool gated 2 of {finance, ops, risk}, finance already approved.
|
Command intake runs a real approval intake with the approve page for the v0.17.0 screenshots: an agent paused at a refund tool gated 2 of {finance, ops, risk}, finance already approved. |
|
Package audit turns an agent's durable journal into a verifiable, tamper-evident record.
|
Package audit turns an agent's durable journal into a verifiable, tamper-evident record. |
|
crlrefresh
Package crlrefresh keeps the status snapshot of a certificate-bound approver (audit.CertApprover) supplied with the newest verified CRLs of the issuing CAs its policy pins, and archives every CRL it accepts (docs/design/crl-refresher.md, docs/guides/certificate-approvers.md).
|
Package crlrefresh keeps the status snapshot of a certificate-bound approver (audit.CertApprover) supplied with the newest verified CRLs of the issuing CAs its policy pins, and archives every CRL it accepts (docs/design/crl-refresher.md, docs/guides/certificate-approvers.md). |
|
eventstoretest
Package eventstoretest checks that an audit.EventStore keeps the contract the event trail builds on: contiguous, append-only positions per run, an idempotent re-append of the same leaf, a refusal (audit.ErrSeqTaken) of a different leaf at a stored position, and exactly one winner among writers racing for one position.
|
Package eventstoretest checks that an audit.EventStore keeps the contract the event trail builds on: contiguous, append-only positions per run, an idempotent re-append of the same leaf, a refusal (audit.ErrSeqTaken) of a different leaf at a stored position, and exactly one winner among writers racing for one position. |
|
rfc3161
Package rfc3161 verifies RFC 3161 time-stamp tokens with the standard library alone.
|
Package rfc3161 verifies RFC 3161 time-stamp tokens with the standard library alone. |
|
verify
Package verify is a dependency-light, standalone verifier for Bide audit proofs.
|
Package verify is a dependency-light, standalone verifier for Bide audit proofs. |
|
Package chaos is a deterministic crash-injection benchmark for agent runtimes: it drives a NON-IDEMPOTENT side effect through a fault schedule and checks it fires at most once.
|
Package chaos is a deterministic crash-injection benchmark for agent runtimes: it drives a NON-IDEMPOTENT side effect through a fault schedule and checks it fires at most once. |
|
cmd
|
|
|
bench
command
Command bench is a concurrency/scale load harness: it drives N durable agent runs concurrently in one process against a stub model (so it measures the FRAMEWORK's orchestration, journaling, and concurrency overhead, not LLM latency), and reports throughput, latency percentiles, peak goroutines, and memory.
|
Command bench is a concurrency/scale load harness: it drives N durable agent runs concurrently in one process against a stub model (so it measures the FRAMEWORK's orchestration, journaling, and concurrency overhead, not LLM latency), and reports throughput, latency percentiles, peak goroutines, and memory. |
|
bide
module
|
|
|
bide-view
module
|
|
|
bide/bide-hsm
module
|
|
|
codec
|
|
|
gcf
module
|
|
|
Package eval is a statistical evaluation harness for agents.
|
Package eval is a statistical evaluation harness for agents. |
|
examples
|
|
|
chaosbench
command
Command chaosbench runs the crash-injection benchmark: it drives a non-idempotent side effect through an exhaustive crash-point sweep plus randomized multi-crash schedules, and reports whether the side effect ever fired more than once.
|
Command chaosbench runs the crash-injection benchmark: it drives a non-idempotent side effect through an exhaustive crash-point sweep plus randomized multi-crash schedules, and reports whether the side effect ever fired more than once. |
|
eval
command
Command eval shows how to use the statistical evaluation harness.
|
Command eval shows how to use the statistical evaluation harness. |
|
hedge
command
Command hedge shows the hedged-model middleware: race the primary model against a backup and take the first good answer, which cuts tail latency and fails over around a down provider.
|
Command hedge shows the hedged-model middleware: race the primary model against a backup and take the first good answer, which cuts tail latency and fails over around a down provider. |
|
intake
command
Command intake shows the approval intake: an application mounts approvals.Handler so approvers decide on a gated call over HTTP, and the application stays the only writer of its journal and the only signer of its audit log.
|
Command intake shows the approval intake: an application mounts approvals.Handler so approvers decide on a gated call over HTTP, and the application stays the only writer of its journal and the only signer of its audit log. |
|
interrupt
command
Command interrupt shows human-in-the-loop as a durable pause: a retry-safe tool calls agent.Interrupt to ask a human a typed question, Run returns *InterruptPending (the run has paused at the interrupt point), the caller records an answer with agent.Journal.AnswerInterrupt, and re-invoking Run with the SAME runID resumes past the interrupt with that answer.
|
Command interrupt shows human-in-the-loop as a durable pause: a retry-safe tool calls agent.Interrupt to ask a human a typed question, Run returns *InterruptPending (the run has paused at the interrupt point), the caller records an answer with agent.Journal.AnswerInterrupt, and re-invoking Run with the SAME runID resumes past the interrupt with that answer. |
|
notify-routing
command
Command notify-routing shows the notifier routing events to different receivers, escalating one nobody handles, sending an all-clear, and writing a trail that is signed and anchored as it is written, which bide audit notifications (audit.VerifyNotifications) then checks offline.
|
Command notify-routing shows the notifier routing events to different receivers, escalating one nobody handles, sending an all-clear, and writing a trail that is signed and anchored as it is written, which bide audit notifications (audit.VerifyNotifications) then checks offline. |
|
parallel
command
Command parallel shows agent.Journal.Parallel: a durable, auditable fan-out/fan-in.
|
Command parallel shows agent.Journal.Parallel: a durable, auditable fan-out/fan-in. |
|
rag
command
Command rag shows bring-your-own retrieval: a trivial in-memory Retriever wired two ways.
|
Command rag shows bring-your-own retrieval: a trivial in-memory Retriever wired two ways. |
|
recover
command
Command recover shows durable resume via named-step memoization: a run journals its model turns and tool results to the store, so re-invoking Run with the SAME runID against the SAME store reuses the recorded steps rather than re-running them.
|
Command recover shows durable resume via named-step memoization: a run journals its model turns and tool results to the store, so re-invoking Run with the SAME runID against the SAME store reuses the recorded steps rather than re-running them. |
|
session
command
Command session shows a durable multi-turn conversation: each Session.Send is one full agent run seeded with the transcript so far, so the agent remembers earlier turns.
|
Command session shows a durable multi-turn conversation: each Session.Send is one full agent run seeded with the transcript so far, so the agent remembers earlier turns. |
|
signals
command
Command signals shows the externally-pushed durable pauses: Await for a single-shot signal delivered from outside the run with agent.Journal.Signal, AwaitFor with a durable timeout (the signal-vs-deadline race), and an ordered per-run channel consumed exactly-once with Enqueue / Receive / Ack.
|
Command signals shows the externally-pushed durable pauses: Await for a single-shot signal delivered from outside the run with agent.Journal.Signal, AwaitFor with a durable timeout (the signal-vs-deadline race), and an ordered per-run channel consumed exactly-once with Enqueue / Receive / Ack. |
|
smoke
command
Command smoke runs the agent end-to-end against a live OpenAI-compatible endpoint (here, OpenRouter) to prove the loop + tool calling work against a real model.
|
Command smoke runs the agent end-to-end against a live OpenAI-compatible endpoint (here, OpenRouter) to prove the loop + tool calling work against a real model. |
|
streaming
command
Command streaming shows Agent.Stream: range the lifecycle Events to render progress (token deltas, turn boundaries, tool start/finish) while the durable loop runs underneath, then call Result for the terminal answer, which is what Run returns.
|
Command streaming shows Agent.Stream: range the lifecycle Events to render progress (token deltas, turn boundaries, tool start/finish) while the durable loop runs underneath, then call Result for the terminal answer, which is what Run returns. |
|
subagent
command
Command subagent shows a parent agent delegating to a SubAgent exposed as a tool.
|
Command subagent shows a parent agent delegating to a SubAgent exposed as a tool. |
|
typed
command
Command typed shows RunTyped[T]: the agent does its work with real tools, then returns a strongly-typed Go struct instead of free-form text.
|
Command typed shows RunTyped[T]: the agent does its work with real tools, then returns a strongly-typed Go struct instead of free-form text. |
|
webhook
command
Command webhook shows how to drive an agent from an inbound messenger webhook (Slack, Telegram, Twilio, Meta, Discord) without shipping any messenger-specific code in the SDK.
|
Command webhook shows how to drive an agent from an inbound messenger webhook (Slack, Telegram, Twilio, Meta, Discord) without shipping any messenger-specific code in the SDK. |
|
flowedit
module
|
|
|
govern
module
|
|
|
postgreslog
module
|
|
|
redislog
module
|
|
|
sqlitelog
module
|
|
|
internal
|
|
|
approveline
Package approveline builds the bide approve command line for one call that waits for a decision: the line bide approve -list prints, and the one a notification can carry, so an approver who reads that a call is waiting can run it as it stands.
|
Package approveline builds the bide approve command line for one call that waits for a decision: the line bide approve -list prints, and the one a notification can carry, so an approver who reads that a call is waiting can run it as it stands. |
|
auditcli
Package auditcli is the bide audit command: it produces and verifies audit ProofBundles from the command line, for the auditor/compliance persona who does not write Go.
|
Package auditcli is the bide audit command: it produces and verifies audit ProofBundles from the command line, for the auditor/compliance persona who does not write Go. |
|
auditcli/auditmain
command
Command auditmain is the audit CLI as a program of its own, which the auditcli tests build to run a binary (exit statuses, the version stamp, files resolved from the working directory).
|
Command auditmain is the audit CLI as a program of its own, which the auditcli tests build to run a binary (exit statuses, the version stamp, files resolved from the working directory). |
|
dbpath
Package dbpath names a SQLite database file the one way every handle on it will agree on.
|
Package dbpath names a SQLite database file the one way every handle on it will agree on. |
|
errgroup
Package errgroup runs a group of functions in goroutines, collects the first error, and cancels the group's context when one fails.
|
Package errgroup runs a group of functions in goroutines, collects the first error, and cancels the group's context when one fails. |
|
filegate
Package filegate queues the writers in one process that share a database file, first come first served, with lease statements ahead of the rest.
|
Package filegate queues the writers in one process that share a database file, first come first served, with lease statements ahead of the rest. |
|
identitygate
Package identitygate holds the switch that lets an approval gate use certificate-bound approvers.
|
Package identitygate holds the switch that lets an approval gate use certificate-bound approvers. |
|
journalhook
Package journalhook gives the packages of this module that write raw journal records (audit's leaves, plan's flow records) the journal's step functions without them being part of package agent's API.
|
Package journalhook gives the packages of this module that write raw journal records (audit's leaves, plan's flow records) the journal's step functions without them being part of package agent's API. |
|
journaltest
Package journaltest gives bide's own tests what a journal keeps unexported: a raw record write.
|
Package journaltest gives bide's own tests what a journal keeps unexported: a raw record write. |
|
jsonfields
Package jsonfields finds the fields encoding/json reads from a JSON object into a Go struct.
|
Package jsonfields finds the fields encoding/json reads from a JSON object into a Go struct. |
|
mermaid
Package mermaid writes text into a Mermaid diagram as data.
|
Package mermaid writes text into a Mermaid diagram as data. |
|
policyfile
Package policyfile reads a certificate policy file (audit.ParseIdentityPolicy) from disk, for the commands that check a certificate-bound decision outside a running gate.
|
Package policyfile reads a certificate policy file (audit.ParseIdentityPolicy) from disk, for the commands that check a certificate-bound decision outside a running gate. |
|
runview
Package runview is a read-only, local web viewer for a journal's runs: a run list (RunList) with each run's kind and state, and one run's page: a plan flow's declared topology with the run's path drawn over it, or an agent run's timeline of model turns, tool calls, attempts, approvals and halts, with the audit verdict when a signed head or evidence package is given.
|
Package runview is a read-only, local web viewer for a journal's runs: a run list (RunList) with each run's kind and state, and one run's page: a plan flow's declared topology with the run's path drawn over it, or an agent run's timeline of model turns, tool calls, attempts, approvals and halts, with the audit verdict when a signed head or evidence package is given. |
|
sample
Package sample writes a journal of runs in every state the bide view run list tells apart, driven by the real runtime on scripted models and fake tools (no API key, no network, no hand-written records), with the evidence, keys and flow configs that go with it.
|
Package sample writes a journal of runs in every state the bide view run list tells apart, driven by the real runtime on scripted models and fake tools (no API key, no network, no hand-written records), with the evidence, keys and flow configs that go with it. |
|
strictjson
Package strictjson decodes JSON so that what a reader sees in the text is exactly what the decoded value holds.
|
Package strictjson decodes JSON so that what a reader sees in the text is exactly what the decoded value holds. |
|
term
Package term styles the bide command's text output for a terminal: a check mark and green for what passed, a cross and red for what failed, amber for a warning or a gate, bold cyan for a path or address to act on, dim for secondary detail.
|
Package term styles the bide command's text output for a terminal: a check mark and green for what passed, a cross and red for what failed, amber for a warning or a gate, bold cyan for a path or address to act on, dim for secondary detail. |
|
testca
Package testca is a small certificate authority for the tests of the approver identity feature (docs/design/approver-identity.md, "Test plan").
|
Package testca is a small certificate authority for the tests of the approver identity feature (docs/design/approver-identity.md, "Test plan"). |
|
testcertreceipt
Package testcertreceipt builds, for tests, a certificate-bound decision and the files the receipt commands read: the receipt (with and without its anchoring proof), the journal export, signed heads, the log's public key, and the certificate policy file with its trust anchor.
|
Package testcertreceipt builds, for tests, a certificate-bound decision and the files the receipt commands read: the receipt (with and without its anchoring proof), the journal export, signed heads, the log's public key, and the certificate policy file with its trust anchor. |
|
toolhook
Package toolhook holds the hooks by which a tool wrapper in this module (audit's AttenuatingSubAgent) takes part in the agent's engine without exported API: the agent checks for these interfaces, and only packages of this module can name them.
|
Package toolhook holds the hooks by which a tool wrapper in this module (audit's AttenuatingSubAgent) takes part in the agent's engine without exported API: the agent checks for these interfaces, and only packages of this module can name them. |
|
tools/apiref
Package apiref generates the SDK API reference, docs/reference/api/, from the Go sources of every published module: for each non-internal package its import path, its synopsis and its stability label, then every exported constant, variable, function and type (with the constructors and methods go/doc groups under it) as the declaration and the first sentence of its doc comment.
|
Package apiref generates the SDK API reference, docs/reference/api/, from the Go sources of every published module: for each non-internal package its import path, its synopsis and its stability label, then every exported constant, variable, function and type (with the constructors and methods go/doc groups under it) as the declaration and the first sentence of its doc comment. |
|
tools/changelog
command
Command changelog manages bide's changelog fragments (changes/unreleased, see CONTRIBUTING.md).
|
Command changelog manages bide's changelog fragments (changes/unreleased, see CONTRIBUTING.md). |
|
tools/covmerge
command
Command covmerge merges Go coverage profiles into one, taking the highest count for each block.
|
Command covmerge merges Go coverage profiles into one, taking the highest count for each block. |
|
tools/doccheck
command
Command doccheck enforces bide's documentation policy over every module in the repository: every exported type, func, method, package-level const and var has a doc comment that starts with its name, and every package has a package comment ("Package name ..." outside package main).
|
Command doccheck enforces bide's documentation policy over every module in the repository: every exported type, func, method, package-level const and var has a doc comment that starts with its name, and every package has a package comment ("Package name ..." outside package main). |
|
tools/docsnip
command
Command docsnip checks that every Go code block in bide's documentation compiles against the current code, so the docs cannot drift silently when an API changes.
|
Command docsnip checks that every Go code block in bide's documentation compiles against the current code, so the docs cannot drift silently when an API changes. |
|
tools/docsnip/snip
Package snip reads the Go code blocks of bide's markdown documentation and makes each a Go file, which docsnip type-checks.
|
Package snip reads the Go code blocks of bide's markdown documentation and makes each a Go file, which docsnip type-checks. |
|
tools/modelsync
command
Command modelsync keeps bide's Go code and its TLA+ models (spec/tla) in step.
|
Command modelsync keeps bide's Go code and its TLA+ models (spec/tla) in step. |
|
tools/oldnames
command
Command oldnames fails when a name the pre-1.0 API redesign removed (docs/design/api-v1.md, section 10.2) appears in bide's Go code, its godoc, or its documentation: the transitional names (RunMessage, Build, ResolveHaltRef, ...), the string entry points they replaced (RunSaga, RunResult, ...), the pause aliases, the Durable interface and its shims, the old Tool method set's SpecOf, the context decorators, the mcp package's old path, and agent.ScriptedModel.
|
Command oldnames fails when a name the pre-1.0 API redesign removed (docs/design/api-v1.md, section 10.2) appears in bide's Go code, its godoc, or its documentation: the transitional names (RunMessage, Build, ResolveHaltRef, ...), the string entry points they replaced (RunSaga, RunResult, ...), the pause aliases, the Durable interface and its shims, the old Tool method set's SpecOf, the context decorators, the mcp package's old path, and agent.ScriptedModel. |
|
tools/sendcheck
command
Command sendcheck fails when a goroutine hands a result to another goroutine (a channel send or a close) and only afterwards runs a deferred call that is more than a signal: a decrement, a slot release, an unlock, a flag reset.
|
Command sendcheck fails when a goroutine hands a result to another goroutine (a channel send or a close) and only afterwards runs a deferred call that is more than a signal: a decrement, a slot release, an unlock, a flag reset. |
|
mcp
module
|
|
|
mcptools
module
|
|
|
Package middleware provides composable func(Handler) Handler batteries for the model call — the "LiteLLM for Go" layer at the semantic level (handlers see messages, tool calls, and token usage, not raw bytes).
|
Package middleware provides composable func(Handler) Handler batteries for the model call — the "LiteLLM for Go" layer at the semantic level (handlers see messages, tool calls, and token usage, not raw bytes). |
|
model
|
|
|
anthropic
Package anthropic adapts Anthropic's Messages API to agent.Model.
|
Package anthropic adapts Anthropic's Messages API to agent.Model. |
|
gemini
Package gemini adapts Google's Gemini generateContent API to agent.Model.
|
Package gemini adapts Google's Gemini generateContent API to agent.Model. |
|
internal/errtext
Package errtext bounds provider-supplied text that an adapter quotes in an error.
|
Package errtext bounds provider-supplied text that an adapter quotes in an error. |
|
internal/toolcfg
Package toolcfg checks a request's tools and tool choice against the rules the model providers enforce, so an adapter refuses a setup the provider would answer with a 400 before sending it, with an agent.ErrConfig that says what is wrong.
|
Package toolcfg checks a request's tools and tool choice against the rules the model providers enforce, so an adapter refuses a setup the provider would answer with a 400 before sending it, with an agent.ErrConfig that says what is wrong. |
|
modeltest
Package modeltest checks an HTTP-backed agent.Model against the streaming contract the agent loop relies on:
|
Package modeltest checks an HTTP-backed agent.Model against the streaming contract the agent loop relies on: |
|
openai
Package openai adapts the OpenAI Chat Completions API to agent.Model.
|
Package openai adapts the OpenAI Chat Completions API to agent.Model. |
|
provider
Package provider is the kit a model adapter is built from: HTTP error classification, SSE framing, a cap on a streamed reply, Retry-After parsing, and the tool-result codec.
|
Package provider is the kit a model adapter is built from: HTTP error classification, SSE framing, a cap on a streamed reply, Retry-After parsing, and the tool-result codec. |
|
Package notify ships bide's webhook notifier: a signed HTTPS POST of a structured notification, and the receiver-side Verify that checks one.
|
Package notify ships bide's webhook notifier: a signed HTTPS POST of a structured notification, and the receiver-side Verify that checks one. |
|
relay
Package relay receives bide's signed webhooks and forwards each verified notification to Slack, PagerDuty, or any other Sink.
|
Package relay receives bide's signed webhooks and forwards each verified notification to Slack, PagerDuty, or any other Sink. |
|
Package plan is rung-1 of the expression-surfaces stack: a handle-based flow builder that lowers to the journal-backed runtime and adds no new executor.
|
Package plan is rung-1 of the expression-surfaces stack: a handle-based flow builder that lowers to the journal-backed runtime and adds no new executor. |
|
internal/digesttypes/a/model
Package model is a test fixture: packages a/model and b/model both declare model.Req, a pair of distinct types whose reflect.Type.String() is the same ("model.Req"), so plan's digest tests can show the digest tells them apart by their package path.
|
Package model is a test fixture: packages a/model and b/model both declare model.Req, a pair of distinct types whose reflect.Type.String() is the same ("model.Req"), so plan's digest tests can show the digest tells them apart by their package path. |
|
internal/digesttypes/b/model
Package model is a test fixture: packages a/model and b/model both declare model.Req, a pair of distinct types whose reflect.Type.String() is the same ("model.Req"), so plan's digest tests can show the digest tells them apart by their package path.
|
Package model is a test fixture: packages a/model and b/model both declare model.Req, a pair of distinct types whose reflect.Type.String() is the same ("model.Req"), so plan's digest tests can show the digest tells them apart by their package path. |
|
planview
Package planview embeds bide view's flow-config page in a program, with the program's plan.Registry, so the page checks a config the way plan.Load does: blocks, predicates, merges and types, as well as structure, and shows the digest a run of the flow would journal.
|
Package planview embeds bide view's flow-config page in a program, with the program's plan.Registry, so the page checks a config the way plan.Load does: blocks, predicates, merges and types, as well as structure, and shows the digest a run of the flow would journal. |
|
Package schema derives JSON Schema from Go types and emits provider-specific dialects.
|
Package schema derives JSON Schema from Go types and emits provider-specific dialects. |
|
signer
|
|
|
awskms
module
|
|
|
azurekv
module
|
|
|
gcpkms
module
|
|
|
pkcs11
module
|
|
|
store
|
|
|
postgres
module
|
|
|
sqlite
module
|
|
|
trace
module
|
Click to show internal directories.
Click to hide internal directories.

A pause you can clear beats a double-fire you can't.


