Documentation
¶
Overview ¶
Package config is the broker's one config file (a ConfigMap, Flux-substituted). Load decodes it strictly, applies the defaults and validates it, so a typo or a bad pattern fails the rollout rather than the first request.
Index ¶
- Constants
- Variables
- type AccessConfig
- type Config
- func (c *Config) ApplyDefaults()
- func (c Config) ForgeReadTokenFile() string
- func (c Config) IntakePlan() PlanConfig
- func (c Config) Knowledge() KnowledgeConfig
- func (c Config) PushRepositories() []string
- func (c Config) RoomToolsAuth() string
- func (c Config) RoomToolsEnabled() bool
- func (c Config) SlackIntents() (SlackIntentsConfig, bool)
- func (c *Config) Validate() error
- type DashboardConfig
- type Duration
- type GitHubLinkConfig
- type GroupsConfig
- type HumanConfig
- type Install
- type IntakeConfig
- type IssuerConfig
- type KnowledgeConfig
- type MCPConfig
- type MCPStart
- type NeedsConfig
- type PlanConfig
- type PreflightConfig
- type RoomToolsConfig
- type SlackDecideConfig
- type SlackIntentsConfig
- type SlackLinkConfig
- type SponsoredConfig
- type SuspendConfig
- type TLSConfig
- type WebhookConfig
Constants ¶
const ( DefaultCertFile = "/etc/room-broker/tls/tls.crt" DefaultKeyFile = "/etc/room-broker/tls/tls.key" )
The :8443 key pair's defaults: cert-manager's Certificate room-broker-tls (GP-18).
const ( // IssuerModeJWKS verifies a token offline against the issuer's JWKS. IssuerModeJWKS = "jwks" // IssuerModeTokenReview asks the apiserver, so no issuer URL has to be reachable from the pod. IssuerModeTokenReview = "tokenreview" )
How a token issuer is verified. An empty mode is JWKS: the bytes a deployed broker already carries need no edit.
const ( // HumanModeOIDC is the ZITADEL-backed default: oauth2-proxy in front, a token per member. HumanModeOIDC = "oidc" // HumanModeLocal is one loopback user behind a port-forward, for an install with no IdP. HumanModeLocal = "local" )
The human listener's modes. An empty mode is OIDC: the bytes a deployed broker already carries need no edit, and a local one is explicit (adoption 3b).
const ( // PlanModel is the one alias the planner may name: the gateway serves `tier-frontier` to the // `planner` client, and any other alias is a different, unreviewed spend (CD17). PlanModel = "tier-frontier" // DefaultPlanDeadline is 20 s, under /mcp's 25 s bound (mcp.go:64): a plan that outlives it is // refused with planner_timeout rather than hanging the tool. DefaultPlanDeadline = 20 * time.Second // DefaultDailyPlans is the per-requester daily cap (spec §budget): one call per plan attempt, // never a retry loop. DefaultDailyPlans = 50 // DefaultMaxRounds is the clarification-round cap. Reaching it accepts the remaining // recommendations deterministically rather than making another model call. DefaultMaxRounds = 10 )
The planner's one route, and the values that are not a deployment's to choose.
const ( PlanFallbackOff = "off" PlanFallbackComposer = "composer" )
The degraded composer's two positions (CD18): it is off unless a deployment says `composer`, and every surface that renders it labels it as not the natural-language experience.
const ( // PresetZITADEL keeps today's token rules: the project id in every token's aud, the groups // claim or the project roles, token use access. An empty preset is this one. PresetZITADEL = "zitadel" // PresetGeneric reads any OIDC issuer: a configured roles claim, token use id by default. PresetGeneric = "generic" )
The human block's presets (v4 D8).
const ( // TokenUseID makes the ID token the credential. TokenUseID = authn.TokenUseID // TokenUseAccess is the ID-plus-access pair for the web, and maku's access token as a bearer. TokenUseAccess = authn.TokenUseAccess )
What a human presents (v4 D8, PR3).
const ( DefaultGitHubWebURL = "https://github.com" DefaultGitHubActiveWindow = 168 * time.Hour MaxGitHubActiveWindow = 720 * time.Hour )
The GitHub link's defaults and bound.
const ( // ClassifyModel is the one alias intent_classify may name. ClassifyModel = "tier-light" // DefaultClassifyDeadline bounds the one call; a reply is waiting in a thread. DefaultClassifyDeadline = 5 * time.Second // DefaultMinConfidence is SI18's threshold: under it a classification is unknown. DefaultMinConfidence = 0.7 // DefaultConfirmTTL is SI18's lifetime of a confirm message. DefaultConfirmTTL = 10 * time.Minute // DefaultMaxInputChars is SI18's cap on the reply the model is shown. DefaultMaxInputChars = 2000 // DefaultIntentDailyCalls is SI13's cap on the App's calls in a UTC day. DefaultIntentDailyCalls = 500 // DefaultIntentPerUserPerHour is SI13's per-user cap. DefaultIntentPerUserPerHour = 20 // DefaultIntentRetentionDays is SI19's retention of an opted-in channel's replies. DefaultIntentRetentionDays = 30 )
The classifier's one alias and its defaults (SI3, SI13, SI18, SI19). The alias is a constant as PlanModel is: the gateway serves it to the `classifier` client, and any other alias is a different, unreviewed spend.
const ( DefaultKnowledgeTimeout = 10 * time.Second DefaultKnowledgeMaxBytes = 64 << 10 )
The knowledge endpoint's defaults and bounds (EX11).
const ( // RoomToolsAuthKey trusts a gateway's injected key and verified subject. RoomToolsAuthKey = "key" // RoomToolsAuthTokenReview verifies the run's own token (audience room-tools) through the apiserver. RoomToolsAuthTokenReview = "tokenreview" )
How :8090 authenticates a run. An empty auth is key: the bytes a deployed broker carries need no edit.
const ( UnsafeAllowRunc = "unsafe_allow_runc" // runs have no sandbox RuntimeClass UnsafeNetworkPolicyNone = "network_policy_none" // nothing confines a run's network UnsafeModelKeyInSandbox = "model_key_in_sandbox" // model.mode secret: the provider key is in every run (v4 step 8, R4) // UnsafePrivateCodeUnacknowledged is the factory's code, never the chart's: a served repository // is private code without spec.privateCode.acknowledged (v4 D3). The broker reads it from the // factory's GET /v1/install; install.unsafe refuses it. UnsafePrivateCodeUnacknowledged = "private_code_unacknowledged" )
The codes of Install.Unsafe: the chart's unsafe settings (v4 D18, plan PR9), a bounded set.
const (
DefaultSuspendAfter = 5 * time.Minute
)
The bounds of suspend.after: a suspend and its resume cost a cold start, so not at once, and the attended approval expires at 30 minutes, so before that.
const MaxAccessTTL = 5 * time.Minute
MaxAccessTTL is the longest a GitHub access answer is trusted, and the default: a revoked read must lapse within it (D7).
const (
MaxDashboards = 8
)
The bounds of human.dashboards: a strip of a few links, each label a chip's width.
const MaxPreflightTimeout = 30 * time.Second
MaxPreflightTimeout is one check's bound: all of them run within 30 s (IN3).
Variables ¶
var FactoryInstallCodes = []string{UnsafePrivateCodeUnacknowledged}
FactoryInstallCodes are the codes the broker takes from the factory's GET /v1/install.
Functions ¶
This section is empty.
Types ¶
type AccessConfig ¶
type AccessConfig struct {
TTL Duration `json:"ttl,omitempty"`
}
AccessConfig is D7's GitHub check. The login comes from the GitHub account link (human.githubLink), the only identity source (v4 D8). TTL caches each answer.
func (*AccessConfig) UnmarshalJSON ¶ added in v0.50.0
func (a *AccessConfig) UnmarshalJSON(b []byte) error
UnmarshalJSON decodes the block strictly, refusing the ZITADEL reader by name: readerFile was removed in v4 step 8 (D8), and a file still setting it fails on what replaced it rather than on an unknown field.
type Config ¶
type Config struct {
PublicURL string `json:"publicURL"`
RunIssuers []IssuerConfig `json:"runIssuers"`
// SystemIssuer is optional: only the factory calls the system routes, and without it they
// answer 401. systemPrincipals without it is refused: no principal could ever be vouched for.
SystemIssuer *IssuerConfig `json:"systemIssuer,omitempty"`
SystemPrincipals map[string]string `json:"systemPrincipals"` // token sub -> system:<component>
Human HumanConfig `json:"human"`
// RoomTools is the agents' :8090 listener (I8). Absent, it starts; explicit false is the opt-out.
RoomTools *RoomToolsConfig `json:"roomTools,omitempty"`
FactoryURL string `json:"factoryURL,omitempty"`
// Warnings are sentences about a file that loads and that the next minor refuses (WF13), for
// the binary to log: Load has no logger.
Warnings []string `json:"-"`
// FactoryCAFile is the PEM CA that signs the factory's api certificate, read on every run
// request so a rotation needs no restart (S-1). Empty: the system roots.
FactoryCAFile string `json:"factoryCAFile,omitempty"`
// FactoryInsecure admits an http:// factoryURL. The broker forwards each human's bearer token
// there, so plaintext is an explicit opt-out, never a default (D6).
FactoryInsecure bool `json:"factoryInsecure,omitempty"`
TLS TLSConfig `json:"tls"`
Suspend SuspendConfig `json:"suspend,omitzero"`
// Runs is where AgentRuns live (adoption 3a): the run-controller's kind, runwatch.DefaultKind's fields where omitted.
Runs runwatch.Kind `json:"runs,omitzero"`
// Webhooks are the subscribers to room events (factory interfaces F6).
Webhooks []WebhookConfig `json:"webhooks,omitempty"`
// Preflight bounds the broker's own preflight checks, served on the ops port at GET /preflight
// (v4 D24): timeout bounds each, 10 s by default, at most 30 s. The route is always on.
Preflight PreflightConfig `json:"preflight,omitzero"`
// Coordination is the factory's multi-repository switch, read here with the factory's own type
// and rules (v4 MR16): coordination_plan is listed only while it is not off.
Coordination fconfig.Coordination `json:"coordination,omitzero"`
// PolicyManagement is the factory's merge-policy switches, read here with the factory's own type
// (merge policy stage 6): promotion serves the settings pages and the promotion records, and
// operators approve exceptions. The broker reads nothing else of it.
PolicyManagement fconfig.PolicyManagement `json:"policyManagement,omitzero"`
// Install is the install's own state, which GET /api/install shows every signed-in human.
Install Install `json:"install,omitzero"`
}
Config is the broker's configuration.
func (*Config) ApplyDefaults ¶
func (c *Config) ApplyDefaults()
ApplyDefaults fills what the file may leave out.
func (Config) ForgeReadTokenFile ¶ added in v0.47.0
ForgeReadTokenFile is the token forge_read posts to the factory with; "" serves no forge_read.
func (Config) IntakePlan ¶ added in v0.35.0
func (c Config) IntakePlan() PlanConfig
IntakePlan is the planner's config with its defaults applied: `tier-frontier`, 20 s, 50 plans a day, 10 clarification rounds and the degraded composer off. A caller reads this rather than re-spelling a default, so an absent block and a block that leaves them out serve the same values.
func (Config) Knowledge ¶ added in v0.47.0
func (c Config) Knowledge() KnowledgeConfig
Knowledge is roomTools.knowledge with its defaults; a zero value (no URL) serves nothing.
func (Config) PushRepositories ¶ added in v0.46.0
PushRepositories are the repositories :8090 serves output_push to: none unless roomTools names them.
func (Config) RoomToolsAuth ¶ added in v0.37.0
RoomToolsAuth is the auth :8090 serves: key unless tokenreview is set.
func (Config) RoomToolsEnabled ¶
RoomToolsEnabled is the listener's switch: absent block or nil enabled means true, as every existing deployment expects.
func (Config) SlackIntents ¶ added in v0.45.0
func (c Config) SlackIntents() (SlackIntentsConfig, bool)
SlackIntents is human.slackIntents with its defaults applied, and whether the block is set.
type DashboardConfig ¶
DashboardConfig is one link the room page shows in its title strip, such as a Grafana dashboard. URL is a template: the page fills {room}, {run} and {task} with the room's ids, each URL-encoded, and hides a link whose placeholder the room has no value for.
type Duration ¶
Duration is a time.Duration written as a string such as "90s".
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON parses a Go duration string; a bare number is refused, since its unit is a guess.
type GitHubLinkConfig ¶ added in v0.47.0
type GitHubLinkConfig struct {
ClientIDFile string `json:"clientIDFile"`
ClientSecretFile string `json:"clientSecretFile"`
WebURL string `json:"webURL,omitempty"`
ActiveWindow Duration `json:"activeWindow,omitempty"`
}
GitHubLinkConfig is human.githubLink: the OAuth client the link runs GitHub's web flow with (the factory App's, or an OAuth App's; its callback URL is <publicURL>/link/github/callback), read at use from the two files, GitHub's site, and how long a link stays active without its human signing in (the Slack App acting for them is refused past it).
type GroupsConfig ¶
GroupsConfig names the IdP's two agent groups, which feed policy.Groups. They are literals: names we choose, not ids the IdP mints.
type HumanConfig ¶
type HumanConfig struct {
// Mode is "" or "oidc" (the ZITADEL-backed default), or "local": one loopback user behind a
// port-forward, for an install with no IdP (adoption 3b).
Mode string `json:"mode,omitempty"`
// Preset is "" or "zitadel" (today's token rules, byte for byte), or "generic": any OIDC issuer,
// its roles claim named by RolesClaim (v4 D8).
Preset string `json:"preset,omitempty"`
Issuer string `json:"issuer"`
// JWKSURL is optional when Issuer is https: its discovery document names jwks_uri.
JWKSURL string `json:"jwksURL"`
ClientIDFile string `json:"clientIDFile"` // the rooms-proxy client id, from agents-secrets
RoomctlClientIDFile string `json:"roomctlClientIDFile,omitempty"` // phase 6
ProjectIDFile string `json:"projectIDFile"` // a human token's aud must hold it (Ruling AS)
// TokenUse is what a human presents: "id" (the ID token is the credential, generic's default)
// or "access" (the ID-plus-access pair, zitadel's only one).
TokenUse string `json:"tokenUse,omitempty"`
// Audience, or AudienceFile read at use, is the aud value every access token must hold under
// preset generic: required with tokenUse access, and with a sponsored principal. The zitadel
// preset's is ProjectIDFile.
Audience string `json:"audience,omitempty"`
AudienceFile string `json:"audienceFile,omitempty"`
// RolesClaim names the claim holding Groups' values, or an RFC 6901 pointer to it when it
// starts with "/": required with preset generic. Unset under zitadel: groups, else the keys
// of urn:zitadel:iam:org:project:roles.
RolesClaim string `json:"rolesClaim,omitempty"`
// Scopes are added to openid profile email offline_access by maku login.
Scopes []string `json:"scopes,omitempty"`
Origin string `json:"origin"`
Groups GroupsConfig `json:"groups"`
// Access turns on D7: a member sees a room only if they can read its repository
// on GitHub. Unset, rooms are visible to admins only, never to every member.
Access *AccessConfig `json:"access,omitempty"`
// MCP serves /mcp, the MCP server maku mcp relays (factory interfaces F2). Off unless
// enabled: v3 ships each feature behind a switch (D4).
MCP MCPConfig `json:"mcp,omitzero"`
// Needs serves GET /api/needs, needs/v1's human door (CD28): every room's needs for one caller,
// read-only, with a `since` cursor. On unless a file turns it off.
Needs NeedsConfig `json:"needs,omitzero"`
// Dashboards are the room page's links out, such as Grafana's, filled with the room's ids.
// None by default: the page then shows no group at all.
Dashboards []DashboardConfig `json:"dashboards,omitempty"`
// SlackLink turns on the Slack self-serve link: the Slack App mints one-time codes, and a
// signed-in human confirms one on /link/slack. Off unless set.
SlackLink *SlackLinkConfig `json:"slackLink,omitempty"`
// GitHubLink turns on the GitHub account link (v4 D8): each human links their GitHub account once,
// through GitHub's OAuth flow, on /link/github. Off unless set.
GitHubLink *GitHubLinkConfig `json:"githubLink,omitempty"`
// SlackDecide turns on POST /api/slack/decisions: the Slack App's Approve/Deny buttons decide a
// forge.push approval. Off unless set: the path is then the mux's 404.
SlackDecide *SlackDecideConfig `json:"slackDecide,omitempty"`
// SlackStop turns on POST /api/slack/stops: a confirmed Slack stop ends a queued or running task.
// Off unless set: the path is then the mux's 404.
SlackStop *SlackDecideConfig `json:"slackStop,omitempty"`
// SlackRetry turns on POST /api/slack/retries: a confirmed Slack retry re-queues an escalated task.
// Off unless set: the path is then the mux's 404.
SlackRetry *SlackDecideConfig `json:"slackRetry,omitempty"`
// SlackAnswer turns on POST /api/slack/answers: a confirmed Slack answer writes a decision record
// to the issue's ## Decisions section and, for a maintainer, restarts the task. Off unless set.
SlackAnswer *SlackDecideConfig `json:"slackAnswer,omitempty"`
// SlackIntents serves intent_classify, the Slack App's read-only classification of a thread reply
// (natural-language intents, SI3). Off unless set: the tool is then on no list.
SlackIntents *SlackIntentsConfig `json:"slackIntents,omitempty"`
// Intake is the governed planner (v3.x conversational intake, CD5, CD17, CD18). Off unless the
// block turns it on: no block, no tool on any list.
Intake IntakeConfig `json:"intake,omitzero"`
// ApprovalMemory serves saved approval grants (merge policy stage 5): the
// /settings/approval-memory page and its API to humans, and the grant routes on :8443 to the
// factory. Off unless set; the factory consults grants only under its own
// policyManagement.approvalMemory.
ApprovalMemory bool `json:"approvalMemory,omitempty"`
}
HumanConfig is the viewers' identity provider (phase 2). The client and project ids are read from mounted files at use, never literals (Ruling AS-a): the IdP mints them, anew on every gcp-0 build, and a rotation needs no restart.
func (HumanConfig) EffectiveGroups ¶
func (h HumanConfig) EffectiveGroups() GroupsConfig
EffectiveGroups is the two group names the listener admits and the policy matrix reads. Local mode has one human and no IdP to name a group, so it takes the two fixed names; every other mode keeps the configured ones.
func (HumanConfig) EffectiveMode ¶
func (h HumanConfig) EffectiveMode() string
EffectiveMode is the mode the broker serves: an empty mode is the OIDC deployment every existing config carries, so nothing has to be added to it.
func (HumanConfig) EffectivePreset ¶ added in v0.47.0
func (h HumanConfig) EffectivePreset() string
EffectivePreset is the preset the broker serves: an empty one is zitadel, the deployment every existing config carries.
func (HumanConfig) EffectiveTokenUse ¶ added in v0.47.0
func (h HumanConfig) EffectiveTokenUse() string
EffectiveTokenUse is the configured token use, else the preset's: zitadel's access, generic's id.
func (HumanConfig) NeedsEnabled ¶ added in v0.35.0
func (h HumanConfig) NeedsEnabled() bool
NeedsEnabled is the needs route's switch: an absent block, or a block with no enabled, is true, and false is the opt-out the decoder keeps — a plain bool could not tell the absent block from a refusal.
func (HumanConfig) StartDefault ¶ added in v0.53.0
func (h HumanConfig) StartDefault() bool
StartDefault reports whether human.mcp.start.default is on: explicit Default wins; unset defaults to true in OIDC mode when human.intake.plan is enabled (UX3).
type Install ¶ added in v0.46.0
type Install struct {
Unsafe []string `json:"unsafe,omitempty"`
}
Install is what the chart says about the install. Unsafe lists the settings that weaken a run's isolation; the web UI shows a banner on every page while it is non-empty.
type IntakeConfig ¶ added in v0.35.0
type IntakeConfig struct {
Plan PlanConfig `json:"plan,omitzero"`
}
IntakeConfig is human.intake. It holds one block today; it exists so the planner's switch has a name of its own beside the other v3 switches, rather than growing on the listener's config.
type IssuerConfig ¶
type IssuerConfig struct {
Issuer string `json:"issuer"`
JWKSURL string `json:"jwksURL"`
SubPattern string `json:"subPattern,omitempty"`
// Mode names how the issuer's tokens are verified: "" or "jwks" against JWKSURL; "tokenreview"
// asks the apiserver, for a cluster whose issuer is not reachable (kind, adoption 3b).
Mode string `json:"mode,omitempty"`
}
IssuerConfig is one allowlisted token issuer. SubPattern, for a run issuer only, maps a subject to its runId with exactly one capture group.
func (IssuerConfig) EffectiveMode ¶
func (is IssuerConfig) EffectiveMode() string
EffectiveMode is the mode this issuer serves: JWKS unless another is set.
type KnowledgeConfig ¶ added in v0.47.0
type KnowledgeConfig struct {
// URL is the endpoint, MCP over Streamable HTTP: https, or http to an in-cluster Service.
URL string `json:"url"`
// Tools are the ones forwarded, a subset of kb_search and kb_get; both by default.
Tools []string `json:"tools,omitempty"`
// Roles are the AgentRun roles that list and may call them; triager by default.
Roles []string `json:"roles,omitempty"`
// Timeout bounds one call, 1 s to 12 s, under :8090's 15 s bound on any call; 10 s by default.
Timeout Duration `json:"timeout,omitzero"`
// MaxBytes is the most of an answer forwarded, at most 256 KiB; 64 KiB by default.
MaxBytes int `json:"maxBytes,omitempty"`
}
KnowledgeConfig is roomTools.knowledge.
type MCPConfig ¶
type MCPConfig struct {
Enabled bool `json:"enabled,omitempty"`
// Sponsored are the service accounts that may call run_create (factory interfaces F4, R13);
// each is also declared in the factory's api.sponsored, which decides everything else.
Sponsored []SponsoredConfig `json:"sponsored,omitempty"`
// SponsoredClientClaim names the claim holding a sponsored token's client id under preset
// generic, for an IdP that puts it elsewhere than azp or client_id: cid (Okta) or appid
// (Entra). It mirrors the factory's api.sponsoredClientClaim, so both admit the same principals.
SponsoredClientClaim string `json:"sponsoredClientClaim,omitempty"`
// SessionStart lists the repositories ("owner/name") whose task says canStart: the
// handoff prompt may start the factory there for a caller who writes to them. Empty, none does.
// Start's former list, honoured with a warning in release N.
SessionStart []string `json:"sessionStart,omitempty"`
// Start configures where the broker offers to start factory work from a coding session (UX3).
Start MCPStart `json:"start,omitzero"`
}
MCPConfig switches the human listener's MCP server.
type MCPStart ¶ added in v0.53.0
type MCPStart struct {
// Default offers start on planner-served repositories (or every repository when no planner is
// configured) except those in Except. ApplyDefaults sets it to true when human.intake.plan is
// enabled and Default is unset.
Default *bool `json:"default,omitempty"`
// Except lists repositories ("owner/name") where start is never offered.
Except []string `json:"except,omitempty"`
}
MCPStart configures where the broker offers to start factory work from a coding session (UX3).
type NeedsConfig ¶ added in v0.35.0
type NeedsConfig struct {
Enabled *bool `json:"enabled,omitempty"`
}
NeedsConfig switches the human listener's needs route (CD28). An absent block is on: needs/v1 is a read-only list, which the spec ships on with its release, and only an explicit false closes the door.
type PlanConfig ¶ added in v0.35.0
type PlanConfig struct {
// Enabled serves intake_plan and plan_check. Off unless set: neither tool is on any list, so a
// deployment that has not declared the block answers `unknown tool`, as run_create does to a
// human token today.
Enabled bool `json:"enabled,omitempty"`
// URL is the model gateway's in-cluster route (agentgateway, `maku-gateway`: its clients
// listener's /clients/planner/v1), straight to it: a package never hard-codes a platform
// endpoint, and factoryURL is configured the same way.
URL string `json:"url,omitempty"`
// Model is the pinned alias, and the only value it may hold (CD17); empty takes PlanModel.
Model string `json:"model,omitempty"`
// APIKeyFile is the `planner` client's bearer (the broker's projected token, or a mounted key),
// read at use so a rotation needs no restart.
APIKeyFile string `json:"apiKeyFile,omitempty"`
// Deadline bounds the one model call; empty takes DefaultPlanDeadline.
Deadline Duration `json:"deadline,omitzero"`
// ReasoningEffort is sent as the call's `reasoning_effort` when set (low, medium or high); empty
// sends nothing and the model's default stands. A model that always reasons (glm-5.3) spends the
// whole 20 s deadline thinking at its default, and answers in about 4 s at "low".
ReasoningEffort string `json:"reasoningEffort,omitempty"`
// DailyPlans is the cap per requester per UTC day; empty takes DefaultDailyPlans.
DailyPlans int `json:"dailyPlans,omitempty"`
// MaxRounds is the clarification-round cap; empty takes DefaultMaxRounds. A revision that
// reaches it is finished deterministically, with every remaining recommendation accepted.
MaxRounds int `json:"maxRounds,omitempty"`
// Fallback is "off" or "composer": only the second reaches the degraded deterministic composer,
// and it is unreachable otherwise (CD18).
Fallback string `json:"fallback,omitempty"`
// Repositories narrows the factory's served repositories for the planner (WF12): when empty, the
// planner's candidates come from the factory's catalog; when set, only repositories both lists
// name are planned for, and an entry the factory does not serve logs a warning.
Repositories []string `json:"repositories,omitempty"`
}
PlanConfig is human.intake.plan: the switch, the route to the gateway, the cap, the repositories the planner may ever name (CD5) and the class table its roles and money come from (CD17).
type PreflightConfig ¶ added in v0.48.0
type PreflightConfig struct {
Timeout Duration `json:"timeout,omitzero"`
}
PreflightConfig is the broker's preflight block (v4 D24).
type RoomToolsConfig ¶
type RoomToolsConfig struct {
// Enabled unset means on, today's :8090 listener: every deployed config keeps working with no
// edit. An explicit false binds no port at all — not even one to close again — and starts no
// server, so a broker with no room-tool client stays clean.
Enabled *bool `json:"enabled,omitempty"`
// Auth is who vouches for a caller: "" or "key", a gateway that verified the run's token and
// injects ROOMS_MCP_KEY and the subject (production); "tokenreview", the broker itself asks the
// apiserver about the run's own bearer token, where no gateway stands in front (the demo).
Auth string `json:"auth,omitempty"`
// PushRepositories are the repositories :8090 serves output_push to (hardening H3): the
// broker's own gate beside the run's safe-outputs annotation, so a claim alone never opens push.
// It mirrors the factory's enforceOutputs naming push (stage H3). Empty by default: no run is
// served output_push.
PushRepositories []string `json:"pushRepositories,omitempty"`
// ForgeReadTokenFile is the broker's projected ServiceAccount token for the factory's system
// audience (hardening H4, HR35): set, :8090 serves forge_read to a run annotated forge-api: deny,
// read and filtered by the factory at factoryURL. Empty by default: forge_read is not served.
ForgeReadTokenFile string `json:"forgeReadTokenFile,omitempty"`
// Knowledge is a knowledge MCP endpoint, RunLore's (EX11, owner ruling R5): :8090 forwards
// kb_search and kb_get to it for the roles it names. Absent, no knowledge tool is served.
Knowledge *KnowledgeConfig `json:"knowledge,omitempty"`
}
RoomToolsConfig switches the agents' :8090 room tools listener (I8). It sits at the top level, apart from human.mcp: the two MCP servers are different trust domains on different ports.
type SlackDecideConfig ¶ added in v0.35.0
SlackDecideConfig is human.slackDecide: the sponsored principal (the Slack App) that may post a decision, and the one Slack workspace whose clicks are this broker's (v3.x Slack push approval D14). On, it serves POST /api/slack/decisions; off, the path is a 404. The class it decides is a constant (D13), so it is not configurable here.
type SlackIntentsConfig ¶ added in v0.45.0
type SlackIntentsConfig struct {
Principal string `json:"principal"`
TeamID string `json:"teamID"`
// URL is the model gateway's in-cluster route (agentgateway, `maku-gateway`: its clients
// listener's /clients/classifier/v1), and APIKeyFile the `classifier` client's bearer (the
// broker's projected token), read at use so a rotation needs no restart.
URL string `json:"url"`
APIKeyFile string `json:"apiKeyFile"`
// Model is the pinned alias, and the only value it may hold; empty takes ClassifyModel.
Model string `json:"model,omitempty"`
Deadline Duration `json:"deadline,omitzero"`
// MinConfidence, ConfirmTTL and MaxInputChars are SI18's tunable thresholds.
MinConfidence float64 `json:"minConfidence,omitempty"`
ConfirmTTL Duration `json:"confirmTTL,omitzero"`
MaxInputChars int `json:"maxInputChars,omitempty"`
// DailyCalls and PerUserPerHour are SI13's caps on the App's own budget.
DailyCalls int `json:"dailyCalls,omitempty"`
PerUserPerHour int `json:"perUserPerHour,omitempty"`
// RetentionDays is how long an opted-in channel's replies are kept (SI19).
RetentionDays int `json:"retentionDays,omitempty"`
}
SlackIntentsConfig is human.slackIntents: the sponsored principal (the Slack App) that may ask for a classification, the one workspace whose users are classified, the route to the gateway and the bounds of the call (SI3, SI12, SI13, SI18, SI19). On, it serves intent_classify; off, no list names it.
type SlackLinkConfig ¶
type SlackLinkConfig struct {
Principal string `json:"principal"`
TeamID string `json:"teamID"`
Repository string `json:"repository"`
}
SlackLinkConfig is human.slackLink: the sponsored principal (one of human.mcp.sponsored, the Slack App) that may mint link codes, the one Slack workspace a code may be for, and the repository whose GitHub App installation names the account's login on the page.
type SponsoredConfig ¶
type SponsoredConfig struct {
Name string `json:"name"`
ClientIDFile string `json:"clientIDFile"`
// Repositories is the principal's upper bound into a coordination family (v4 MR13): it has
// no GitHub login, so a child outside this list is restricted. Empty reads no child.
Repositories []string `json:"repositories,omitempty"`
}
SponsoredConfig is one sponsored principal the broker admits on /mcp.
type SuspendConfig ¶
type SuspendConfig struct {
Enabled bool `json:"enabled,omitempty"`
After Duration `json:"after,omitzero"`
}
SuspendConfig is the broker's suspend trigger (v2 warm-sandboxes design §6): a suspendable run in an attended room whose approval waits while the room stays idle for After is suspended, and resumed once nothing waits. Off unless Enabled.
type TLSConfig ¶
type TLSConfig struct {
CertFile string `json:"certFile,omitempty"`
KeyFile string `json:"keyFile,omitempty"`
}
TLSConfig names the :8443 key pair, re-read when it changes (GP-18).
type WebhookConfig ¶
type WebhookConfig struct {
Name string `json:"name"`
Network string `json:"network"` // cluster | internet
URL string `json:"url"`
Events []string `json:"events"`
SecretFile string `json:"secretFile"`
Repositories []string `json:"repositories"`
// Generation re-enables a subscriber the emitter disabled: changing it is the reviewed act (R17).
Generation int `json:"generation,omitempty"`
}
WebhookConfig is one subscriber (factory interfaces F6, O7): declared here because subscribers are few, this file is a gate path, and ai-native-ref generates the broker's egress from it.