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 ChatConfig
- type ChatIntentsConfig
- type ChatProviders
- type ChatSlackConfig
- type Config
- func (c *Config) ApplyDefaults()
- func (c Config) ChatIntents() (ChatIntentsConfig, bool)
- func (c Config) ChatSynthesized() bool
- func (c Config) EffectiveUnsafe() []string
- func (c Config) ForgeReadTokenFile() string
- func (c Config) IntakePlan() PlanConfig
- func (c Config) IntakeWholePlans() bool
- func (c Config) Knowledge() KnowledgeConfig
- func (c Config) PushRepositories() []string
- func (c Config) RoomToolsAuth() string
- func (c Config) RoomToolsEnabled() bool
- func (c Config) SkillRecommendations() (SkillRecommendationsConfig, bool)
- func (c Config) SlackIntents() (SlackIntentsConfig, bool)
- func (c *Config) Validate() error
- type DashboardConfig
- type Duration
- type GitHubLinkConfig
- type GroupsConfig
- type HumanConfig
- func (h HumanConfig) EffectiveGroups() GroupsConfig
- func (h HumanConfig) EffectiveMode() string
- func (h HumanConfig) EffectivePreset() string
- func (h HumanConfig) EffectiveRoomActs() []string
- func (h HumanConfig) EffectiveTokenUse() string
- func (h HumanConfig) NeedsEnabled() bool
- func (h HumanConfig) StartDefault() bool
- type Install
- type IntakeConfig
- type IssuerConfig
- type KnowledgeConfig
- type LessonsConfig
- type MCPConfig
- type MCPStart
- type NeedsConfig
- type PlanConfig
- type PlanInternalConfig
- type PreflightConfig
- type RoomToolsConfig
- type SkillRecommendationsConfig
- type SlackDecideConfig
- type SlackIntentsConfig
- type SlackLinkConfig
- type SponsoredConfig
- type SuspendConfig
- type TLSConfig
- type TracingConfig
- type WebhookConfig
Constants ¶
const ( ChatTransportSocket = "socket" ChatTransportEvents = "events" )
The chat transports of a provider: socket is outbound-only and unsigned, events is a signed HTTP edge the broker verifies itself.
const ( ChatIntentsOn = "on" ChatIntentsShadow = "shadow" ChatIntentsOff = "off" )
The intent classifier's modes.
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 ( // DefaultRecModel is the logical model Find more names when the file names none. DefaultRecModel = "tier-standard" // DefaultRecDailyPasses caps Find more over every repository in a UTC day. DefaultRecDailyPasses = 20 )
The Find more pass's fixed values (run skills plan 4, D40).
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) UnsafeDBSingleReplica = "db_single_replica" // bundled single-replica Postgres (v5 DB2): brief downtime on restart or drain UnsafeDBBackupsOff = "db_backups_off" // bundled Postgres has no scheduled backup CronJob (v5 DB4) // 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).
const UnsafeChatUnsignedDeputy = "chat_unsigned_deputy"
UnsafeChatUnsignedDeputy is the broker's own install code, never the chart's: a chat provider runs over an unsigned transport (Slack Socket Mode) with allowUnsignedDecisions set, so a compromised adapter could forge forge.push decisions. GET /api/install derives it, see Config.EffectiveUnsafe.
Variables ¶
var DefaultRoomActs = []string{"answer", "retry"}
DefaultRoomActs is release G's default for human.roomActs.
var FactoryInstallCodes = []string{UnsafePrivateCodeUnacknowledged}
FactoryInstallCodes are the codes the broker takes from the factory's GET /v1/install.
var KnownRoomActs = []string{"answer", "retry", "split", "plan", "file", "stop"}
KnownRoomActs are the valid entries of human.roomActs (phase G).
var RecModels = []string{"tier-light", "tier-standard", "tier-frontier"}
RecModels are the C5 logical names Find more may name.
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 ChatConfig ¶ added in v0.59.0
type ChatConfig struct {
// Intents enables intent_classify for all chat providers. Absent, classification is off.
Intents *ChatIntentsConfig `json:"intents,omitempty"`
Providers ChatProviders `json:"providers,omitzero"`
}
ChatConfig is human.chat: every chat provider and the Tier-1 intent classifier they share. It replaces the six human.slack* blocks, which stay accepted for one release (see applyLegacyChat).
type ChatIntentsConfig ¶ added in v0.59.0
type ChatIntentsConfig struct {
URL string `json:"url,omitempty"`
APIKeyFile string `json:"apiKeyFile,omitempty"`
InternalURL string `json:"internalURL,omitempty"`
InternalAPIKeyFile string `json:"internalAPIKeyFile,omitempty"`
Mode string `json:"mode,omitempty"`
MinConfidence float64 `json:"minConfidence,omitempty"`
ConfirmTTL Duration `json:"confirmTTL,omitzero"`
MaxInputChars int `json:"maxInputChars,omitempty"`
DailyCalls int `json:"dailyCalls,omitempty"`
PerUserPerHour int `json:"perUserPerHour,omitempty"`
RetentionDays int `json:"retentionDays,omitempty"`
}
ChatIntentsConfig is human.chat.intents: the route to the model gateway and the bounds of a classification, shared by every provider. InternalURL and InternalAPIKeyFile name a second, internal gateway that private repositories' text may go to; they are set together or not at all.
type ChatProviders ¶ added in v0.59.0
type ChatProviders struct {
Slack *ChatSlackConfig `json:"slack,omitempty"`
}
ChatProviders names the providers a broker serves; each is off unless declared and enabled.
type ChatSlackConfig ¶ added in v0.59.0
type ChatSlackConfig struct {
Enabled bool `json:"enabled,omitempty"`
// Principal is the sponsored principal (one of human.mcp.sponsored) the Slack adapter acts as.
Principal string `json:"principal,omitempty"`
// WorkspaceID is the one Slack team whose users are this broker's.
WorkspaceID string `json:"workspaceID,omitempty"`
// Transport is socket (default) or events.
Transport string `json:"transport,omitempty"`
// SigningSecretFile is Slack's signing secret, read at use so a rotation needs no restart:
// required under events, forbidden under socket (Slack signs nothing there).
SigningSecretFile string `json:"signingSecretFile,omitempty"`
// AllowPrivateRepos admits a private repository to chat intake. Default false.
AllowPrivateRepos bool `json:"allowPrivateRepos,omitempty"`
// AllowUnsignedDecisions lets Approve/Deny buttons decide a forge.push over an unsigned
// transport. Default false; true under socket raises chat_unsigned_deputy.
AllowUnsignedDecisions bool `json:"allowUnsignedDecisions,omitempty"`
// LinkRepository (owner/name) is the repository whose GitHub App installation names the
// account's login on the link page. Optional.
LinkRepository string `json:"linkRepository,omitempty"`
}
ChatSlackConfig is human.chat.providers.slack. The defaults are the safe ones: Socket Mode, no private repository (Lock 3) and no decision over an unsigned transport (SS4).
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"`
// Learning turns on repository lessons on the broker (learning.enabled).
Learning LessonsConfig `json:"learning,omitzero"`
// Tracing is where the broker's spans go: the MCP servers', on POST /mcp and :8090.
Tracing TracingConfig `json:"tracing,omitzero"`
// contains filtered or unexported fields
}
Config is the broker's configuration.
func (*Config) ApplyDefaults ¶
func (c *Config) ApplyDefaults()
ApplyDefaults fills what the file may leave out.
func (Config) ChatIntents ¶ added in v0.59.0
func (c Config) ChatIntents() (ChatIntentsConfig, bool)
ChatIntents is human.chat.intents with its defaults applied, and whether the block is set.
func (Config) ChatSynthesized ¶ added in v0.59.0
ChatSynthesized reports whether human.chat.providers.slack was built by the legacy shim from the human.slack* blocks rather than declared: such a provider serves an /api/chat/* act route only where the matching legacy block is set.
func (Config) EffectiveUnsafe ¶ added in v0.59.0
EffectiveUnsafe is Install.Unsafe plus the codes the broker derives from its own config: today chat_unsigned_deputy, when an enabled provider is on the unsigned socket transport and allows unsigned decisions. GET /api/install serves it. It never aliases Install.Unsafe.
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) IntakeWholePlans ¶ added in v0.54.0
IntakeWholePlans reports whether human.intake.wholePlans is enabled (default true).
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) SkillRecommendations ¶ added in v0.60.0
func (c Config) SkillRecommendations() (SkillRecommendationsConfig, bool)
SkillRecommendations is human.skillRecommendations with its defaults, and whether it is set.
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, {created} with the room's creation time and {ended} with its end time (epoch milliseconds), or "now" while it runs, each URL-encoded, and hides a link whose placeholder the room has no value for. `from={created}&to={ended}` opens a Grafana dashboard on the room's own lifetime (#630).
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"`
// SkillRecommendations is Find more's route to the model gateway, its model and its daily cap
// (run skills plan 4, D40). Off unless set: rule cards still show, there is no Find more.
SkillRecommendations *SkillRecommendationsConfig `json:"skillRecommendations,omitempty"`
// Chat consolidates the six human.slack* blocks above (v5 first-class chat): one provider
// block plus the shared intent classifier. Declaring it together with any legacy block is
// refused; a file with only the legacy blocks gets a provider synthesized, with a warning.
Chat ChatConfig `json:"chat,omitzero"`
// 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"`
// RoomActs lists the room acts enabled over a room's connection (phase G): a subset of
// answer, retry, split, plan, file, stop. Nil takes DefaultRoomActs ([answer, retry]); an
// explicit empty list disables all gated room acts.
RoomActs []string `json:"roomActs,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) EffectiveRoomActs ¶ added in v0.54.0
func (h HumanConfig) EffectiveRoomActs() []string
EffectiveRoomActs returns the configured roomActs, or DefaultRoomActs when unset (nil).
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"`
// WholePlans files every issue of a confirmed multi-issue plan in order (phase H2), linking
// later issues to the earlier ones they depend on. Defaults to true when omitted; set false to
// restrict filing to the first issue only (and refuse multi-issue Slack plans).
WholePlans *bool `json:"wholePlans,omitempty"`
}
IntakeConfig is human.intake. It holds the planner block and the wholePlans switch so intake settings live together beside the other listener switches.
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 LessonsConfig ¶ added in v0.59.0
type LessonsConfig struct {
Enabled bool `json:"enabled,omitempty"`
}
LessonsConfig configures repository lessons (learning.enabled).
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"`
// Internal is the governed model route for private and internal repositories (v5 P0-T1). Off
// when nil or Enabled is false: private repositories are then refused before any model call.
Internal *PlanInternalConfig `json:"internal,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 PlanInternalConfig ¶ added in v0.54.0
type PlanInternalConfig struct {
Enabled bool `json:"enabled,omitempty"`
URL string `json:"url,omitempty"`
APIKeyFile string `json:"apiKeyFile,omitempty"`
}
PlanInternalConfig is human.intake.plan.internal: the governed model route used whenever a plan's candidates include a non-public repository (v5 P0-T1). Both URL and APIKeyFile are required when Enabled is true.
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 SkillRecommendationsConfig ¶ added in v0.60.0
type SkillRecommendationsConfig struct {
// URL is the gateway's chat/completions base route; APIKeyFile its client's bearer, read at use.
URL string `json:"url"`
APIKeyFile string `json:"apiKeyFile"`
// Model is a C5 logical name (RecModels); empty takes DefaultRecModel.
Model string `json:"model,omitempty"`
// DailyPasses caps passes over all repositories per UTC day; empty takes DefaultRecDailyPasses.
DailyPasses int `json:"dailyPasses,omitempty"`
// Internal is the governed route for a non-public repository; nil refuses one before any call.
Internal *PlanInternalConfig `json:"internal,omitempty"`
}
SkillRecommendationsConfig is human.skillRecommendations: Find more's route to the model gateway (its own `recommender` client), the logical model it names, and its daily cap. Absent, there is no Find more; rule cards still show.
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 TracingConfig ¶ added in v0.60.0
type TracingConfig struct {
OTLPEndpoint string `json:"otlpEndpoint,omitempty"`
}
TracingConfig is the broker's span export (tracing.otlpEndpoint): the trace collector's OTLP/gRPC port as host:port, in the cluster, plaintext, as the factory's. Empty: no span leaves.
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.