Skip to main content
Blitz
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage
Edit page

053 · Enterprise foundations

What the open-source Blitz gives a licensed enterprise service to build on: the service assembled from pkg/ with extension points, and clients that connect to an organization’s service, sign in through it, use its models and its catalog, run jobs on it, and wear its branding (spec_053_enterprise)

Status Draft (the owner’s request, 2026-10-27: “licensable closed source features that would include a configurable oAuth provider interface, … the ability for users to create and share workspaces, run jobs on schedules in the cloud and still access all of the current features”). Drafted 2026-11-01 for the owner’s review, before the first release: the catalog’s client side with Publish to organization (EN-31 to EN-36), organization workspaces with sync (§8, EN-60 to EN-65), both needing sign-in (EN-10 to EN-14) first
Source pkg/service (the assembly: service.go; network.go: the network listener, Authenticator, Authorizer), pkg/service/server (listen.go: ServeTLS), tools/check_deps.sh (EN-04); to come: pkg/config (EnterpriseConfig), pkg/enterprise (discovery, sign-in, the catalog cache), pkg/engine/workers.go (runs_on), pkg/engine/gates (checks on model messages), the desktop’s Settings and model menu, apps/cli (blitz enterprise)
Tests the policy (EN-35, EN-38, EN-39): pkg/config TestOrgLayer, TestOrgPolicyProviders; pkg/enterprise TestPolicy; pkg/engine/runtime TestEnterprisePolicy, TestNotSetUp, TestListModelsFindsOllama, TestOllamaAuto; pkg/engine/connectors TestOrgConnections; pkg/service/server TestEnterprisePolicyLoop; the window’s OrgPolicy.test.ts; pkg/service/service_test.go, pkg/service/network_test.go (TestRunNetwork, TestNetworkCheck, TestGuard), pkg/service/server (its tests, moved with it); to come
Depends on spec_021_service (one service, many clients), spec_023_workers (jobs and their schedules), spec_039_secrets (the keychain), spec_041_gates (rules and guardrails), spec_040_studio (what a workspace’s .agents folder holds)

1. Purpose

Companies want Blitz’s agents with their own sign-in, their own approved models, rules every employee works under, workspaces they share, and jobs that run when a laptop is shut. That service is licensed and closed source, in its own repository (blitz-enterprise), and the customer runs it in their own Google Cloud project. This spec is the open-source half: the seams that service plugs into, and what the desktop app, the CLI and the tray do when they’re pointed at one. Without an enterprise service set, nothing here changes how Blitz works.

The line: open source holds the interfaces, their open-source defaults and the clients; the enterprise repository holds the implementations (OIDC, RBAC, SCIM, licensing, the model gateway, the catalog’s authoring, Git sync, sharing, cloud jobs, Terraform). Nothing public imports anything private.

2. The service, assembled from pkg/

  • EN-01 Built. The service’s assembly is in pkg/service (moved from apps/service/internal/daemon and apps/service/internal/server): service.Run(ctx, service.Options) opens each workspace a client names and serves it; pkg/service/server has the Connect handlers; pkg/service/servicetest runs it in other packages’ tests. apps/service/main.go is the flags and that call. Another Go module can’t import internal/, so this is what lets the enterprise service reuse the whole service rather than copy it.

  • EN-02 service.Options takes the extension points, each an interface in pkg/ with an open-source default that keeps today’s behaviour. Authenticator and Authorizer are built (pkg/service/network.go, with EN-03); each of the others is added with the feature that first uses it, so none is an interface nothing calls:

    Point What it decides Open-source default
    Authenticator who a request is from, from its credentials the Unix socket’s owner (only they can open it)
    Authorizer whether that caller may do an action on a workspace or item allow (one user)
    Catalog the organization’s agents, rules, skills, guardrails, MCP servers, connectors and policies (§5) none
    ModelRouter where a model’s requests go and which models a caller may use, for the engine when it runs in the service (jobs, §6); clients reach the organization’s models through its gateway (§4) the person’s own settings ([llm.*])
    JobRunner where a job runs (§6) this service
    Telemetry usage counts sent elsewhere none
    WorkspaceStore where a workspace’s files come from and go back to: on the client, the sync of an organization’s workspace with the service (its clone through <url>/git/<handle>.git); agents never run in the service’s own pod, only in job pods (§6) the local folder
  • EN-03 Built. service.Options.Network serves the API on a second listener, beside the Unix socket, over TLS (HTTP/2, and HTTP/1.1; server.ServeTLS). It’s used only when the program running the service sets it (blitzd never does), and it needs a listener, a certificate and an Authenticator. Every request on it needs credentials the Authenticator accepts, else 401 with {"code": "unauthenticated", …}, and the Authorizer (when given) must allow its procedure, else 403 with forbidden. The caller is in the request’s context (service.CallerFrom). Network.Routes are the program’s own paths on the same listener (discovery, health checks, its own sign-in): a request one of its patterns matches goes there without the Authenticator, the program checking its callers itself, and every other request is Blitz’s, guarded. An Authenticator or Authorizer that returns a service.Refusal answers with its own status and code (403 terms_required, say). The socket serves its owner as before. Network.Wrap sees every request first, so a program’s own session can stand in for the credentials Auth reads (the enterprise admin console’s cookie, its spec_011_admin AD-11). Network.Plain serves without TLS instead (HTTP/1.1, and HTTP/2 in the clear; server.ServePlain), for a platform that ends TLS in front of the program and forwards over its own network: Cloud Run’s front end, say. Plain needs no certificate; everything else is the same.

  • EN-03a 2026-11-05 (scan N26-service#8: nothing read the caller from the request’s context, here or in blitz-enterprise). service.CallerFrom is gone: the Authorizer is handed the caller, and is where a program decides what each caller may call. Blitz’s handlers don’t tell network callers apart (they share one Server: its open workspaces, logs, Shutdown and RunShell), so a program’s Authorizer refuses the procedures its callers mustn’t reach.

  • EN-04 Built. //tools:check_deps checks that nothing in this repository imports github.com/retail-cortex/blitz-enterprise, and that the CLI, the tray and the Electron app’s tools don’t reach pkg/service.

  • EN-05 Built (2026-11-01; pkg/webui, @blitz/webui: bazel test //pkg/webui:all). The page’s controls as a package: the desktop page’s controls (src/ui: Button, IconButton, Tabs, Segmented, MultiSelect, Menu, Dialog, Snackbar, Switch, Field, Drawer, the charts), its styles and themes (m3.css, glass.css, themes.css, the palettes) move to pkg/webui, a TypeScript package (pnpm’s workspace:*, linked by Bazel as //pkg/webui:pkg; its words come from the app’s translator, setTranslator) the desktop page imports, so another program’s web pages look like Blitz without copying it: the enterprise admin console (its spec_011_admin) builds on it from Blitz’s Bazel module. It holds no Blitz-specific state or API calls. New shared controls (a data table, a diff viewer, a date range) are added there.

3. Connecting to an organization’s service

  • EN-10 Built (2026-11-01; pkg/config [enterprise] url, config.SetEnterpriseURL; machine-wide 2026-11-02: managed.toml in /Library/Application Support/Blitz on macOS, %ProgramData%\Blitz on Windows, /etc/blitz elsewhere, or BLITZ_MANAGED_SETTINGS, with [enterprise] url and workspaces_dir over the person’s; while it sets the address, blitzd refuses to change it (MANAGED), and Settings › Organization and blitz enterprise status say it’s device management’s). [enterprise] in the settings: url (the service’s address). Set by the person (Settings › Organization, blitz enterprise connect <url>) or by the company’s device management in the machine-wide settings; a workspace’s settings can’t set it.
  • EN-10 2026-11-05 (scan N26-api-client-config#16). A managed.toml that can’t be read or decoded keeps the computer managed (the person can’t change the address, MANAGED) and is reported as a load warning; it no longer counts as none.
  • EN-11 Built (pkg/enterprise, its Discover). Discovery: GET <url>/api/v1/info gives the service’s name, version, its OIDC issuer and client ID, the token lifetime, and its capabilities (models, catalog, jobs, sharing, workspaces, branding). Clients show only what’s listed.
  • EN-12 Built (pkg/enterprise; blitzd’s ConfigService.EnterpriseSignIn, blitz enterprise login, Settings › Organization; since 2026-11-03 the browser ends on a card on Blitz’s glass (pkg/signedin, also blitz mcp login’s) saying whether it worked, with Open Blitz, a blitz://show link that brings the window forward; in the organization’s branding when Blitz keeps one (EN-50): its logo for each theme, else its name, its accent on the button, and a small “Blitz” below). A provider that needs a client for each kind of app (Google) has the service name them in /api/v1/info (oidc.desktop, oidc.device, each with its non-confidential secret); one client serves all when it doesn’t. Blitz renews with the latest refresh token kept, read just before, so a CLI and the service on one computer don’t spend each other’s. Sign-in goes straight to the company’s identity provider: the desktop app and the tray with authorization code and PKCE on a loopback redirect, the CLI with the device-code flow (blitz enterprise login). The refresh token is kept in the keychain (spec_039_secrets); the access token in memory. A token is renewed before it expires (the service sets how often, in hours); a refused renewal signs the person out and says so. The calls are JSON over HTTPS, so open-source clients need nothing from the service’s code:
  • EN-12 2026-11-05 (scan N26-safety-enterprise#16, #17: a renewal answered without a refresh token was kept and read as signed out next time; an access token the service ended early kept being sent by every call but the catalog’s and the models’, each refused). A renewal answered without its access or refresh token is an error and the sign-in is kept as it was; one without the person keeps who’s signed in. Any call the service refuses with 401 drops the access token: a JSON call (signedCall: jobs, runs, usage, notices, reviews, terms, workspaces) renews it once and asks again; a stream, a resource or a catalog file renews on the next call.
  • EN-12 2026-11-05 (scan N26-safety-enterprise#18: the browser sign-in sent a nonce and nothing checked it). The ID token’s nonce claim, when it has one, must be the one this sign-in sent; one that differs is refused before the token goes to the service.
  • EN-12z 2026-11-05 (PR #90’s CI: the signed-in page came out cut short). The sign-in’s local server (the organization’s, and an MCP server’s: signedin.Close) shuts down once the page it’s writing has gone out, at most a second, instead of closing at once: the sign-in carries on as soon as the page’s handler has the code, before the page is sent, so the browser sometimes got half a page.
    • POST <url>/api/v1/session with {"id_token", "client"} (the provider’s ID token, and the client and its version) answers {"access_token", "refresh_token", "expires_in", "person": {"id", "email", "name", "roles"}, "terms": {"version"}}; terms is there when there’s a version to accept (EN-53).
    • POST <url>/api/v1/session/refresh with {"refresh_token"} answers the same, with a new refresh token: the old one ends the session if it’s used again, so a client renews one at a time and keeps the new one before it uses it.
    • DELETE <url>/api/v1/session signs this session out; GET <url>/api/v1/sessions lists the person’s sessions; POST <url>/api/v1/sessions/end-others signs the others out.
    • Every other request carries Authorization: Bearer <access token>.
    • Refusals are {"code", "message"}, the message written for the person: 401 unauthenticated (sign in again), 403 forbidden, 403 license_lapsed (no new sign-ins), 403 terms_required (EN-53).
  • EN-13 Built (2026-11-02): a banner in the window, checked at start, every 2 minutes and when the settings change, with Sign in (Settings › Organization) or Retry, and the model’s error, which says to sign in. Signed out, or the service unreachable: the window says which, with Sign in or Retry. Work that needs the service (its models, cloud jobs, shared workspaces) waits; local workspaces work as before, under the last catalog (EN-33).
  • EN-13a 2026-11-12 (the owner: “when logged into an organization and the oAuth expires, the user has to click twice to login … it then opens the settings page… why? It should just go straight to sign-in.”) The signed-out banner’s Sign in signs in at once: the organization’s sign-in page opens in the browser, the banner says to finish there (“Finish signing in to Acme in your browser.”) with Cancel, and once signed in it says so and goes. Settings › Organization’s Sign in does the same (one signInToOrg, orgBranding.tsx); the banner no longer opens Settings.
  • EN-14 Built (blitz doctor’s organization line, blitz enterprise status). blitz doctor shows the service, whether it’s reached, who is signed in and when the token renews.

4. The organization’s models

  • EN-20 Built (runtime provider enterprise), but for the catalog’s policy letting personal providers in, which comes with §5: connected, the organization’s models are the only ones. With models listed, the service is the model provider: the api provider ([llm.api]) is filled from the service (its base URL), with the access token in place of a token script, and the person’s own providers are off unless the catalog’s policy allows them.
  • EN-21 Built (2026-11-02) for IDs, display names, the default, prices and capabilities, with the ETag: Settings › Providers shows the organization as the one provider, its models to choose the default from (enterprise/<model>) and, under the choice, what that model can do and its price; blitz models lists each with its name, the default and what it can do. The capabilities are tools, images, thinking (true or false) and context (tokens), set in the admin console’s model form; Blitz shows them, and doesn’t yet hold back what a model can’t take. The model menu lists GET <url>/api/v1/models (sent with If-None-Match): each model’s ID, display name, vendor, the API it speaks (Anthropic’s Messages or OpenAI’s Responses; the service translates for the models that speak neither), capabilities (tools, images, thinking, context size), price per million tokens and whether it’s the default. The list is the caller’s: the service filters it by role.
  • EN-22 Built (2026-11-02): Blitz-Workspace is the service’s ID for the workspace, found as it opens by matching its folder to the organization’s workspaces (a clone, or a folder shared in place); a workspace that isn’t the organization’s sends none. Every model request carries Blitz-Workspace, Blitz-Session and Blitz-Agent, so the service applies the workspace’s and the agent’s guardrails to it.
  • EN-23 Built (pkg/guardrails, a public package over the engine’s private pkg/engine/gates). The guardrail checks the service runs on model traffic are the ones this repository runs (pkg/engine/gates: RedactInjection, ConfirmInjection, CommandDenied, DomainAllowed, the secret scan, the limits), exported for a caller that has a model’s request and reply rather than an engine turn, so a rule means the same at the service as on the desktop.
  • EN-23 2026-11-05 (scan N26-safety-enterprise#1, #19: a key with no fixed length, streamed in pieces, was masked once its first 20 characters had come and the rest of it sent; a known value longer than the window was never whole in it). guardrails.Output checks only what’s settled: the run of characters at the end that a key or an assigned value may still be growing into (anything but white space and "',;) is held, with the window before it, until something ends it or the text does. The window is 160 characters or the longest value the redactor knows (redact.Redactor.Longest), whichever is longer.
  • EN-24 Built (2026-11-02): Your usage in Settings › Providers & keys under the organization’s models, and blitz enterprise usage (blitzd’s GetOrgUsage); a request refused for a budget or quota says the gateway’s own words (whose limit, what’s left, when it resets) and where to see the rest, never HTTP 429 (runtime.ErrOrgLimit). A rate-limited request is retried by the model’s own client after Retry-After, up to max_retries, with Waiting for : busy. Trying again in Ns… in the window and the terminal while it waits (any provider’s 429, 503 or 529; the model from Gemini’s path or the request’s model). Your usage and limits. Settings › Models shows the person’s own usage of the organization’s models this day and month, by model (tokens and cost), with each budget and token quota that applies and what’s left (GET <url>/api/v1/usage, the enterprise spec’s GW-27). A request refused for a budget or quota (budget_exceeded, quota_exceeded) is shown as that, never as a model failure: which limit, what’s left, when it resets, and the other models the person may still use. A request refused for a rate limit (rate_limited, GW-15) is sent again after its Retry-After, with Waiting for : busy in the window, for up to 2 minutes before it’s shown as an error. While the organization keeps full prompt logs that include the person (the enterprise spec’s GW-21), Settings › Models says “Your organization keeps what’s sent to its models”, from /api/v1/usage.
  • EN-24a 2026-11-05 (scan N26-desktop-1#14: the desktop card took a token quota’s input or output cap as its total and counted input and output against it, so a quota of 1M input tokens with 600K in and 600K out read “1.2M of 1M”). Your usage shows a line and a bar for each cap a token quota sets, as the gateway counts them: the total against input and output together, input_tokens against input alone, output_tokens against output alone, each with what’s used and left.

5. The organization’s catalog

  • EN-30 Built (2026-11-02): checking in pkg/catalog, for the service’s builds; the clients’ side in pkg/enterprise (its RefreshCatalog), blitzd’s catalog loop and pkg/config’s organization layer. Agents, skills, rules, guardrails, commands, MCP servers and connections apply (connections 2026-11-02: the catalog’s connectors/<category>/<name>.yaml are the org-locked and org-default scopes beside global and workspace; a locked one takes the place of the person’s of its name and can’t be turned off, a default gives way to a person’s that’s used; they’re trusted, take the person’s global secrets, show in Studio’s Connectors as the organization’s and don’t open there; blitz enterprise catalog --kind connector lists them). With catalog listed, the organization’s agents, rules, skills, guardrails, MCP server and connector definitions (never their secrets), slash commands and policies come from the service, as a signed bundle with a version.
  • EN-30 2026-11-05 (scan N26-safety-enterprise#15: only an MCP server’s env and headers were checked for secrets, so a key in its args or url, a connection’s password: or a key pasted into an agent went to every person). catalog.Check refuses a secret anywhere in an item: every file but an MCP server’s is scanned as the commit scan does (secretscan.Scan: the key formats anywhere, and a long random value given to a key-like name in a settings file; a line naming {secrets:…} passes), and an MCP server’s env, headers and args values, an argument after a key-like option (--api-key, --token=), and its url’s password or a key-like query parameter must be {secrets:name}.
  • EN-30a 2026-11-21 (re-check of N26 safety-enterprise#15: an opaque value, Authorization = "Bearer 9f8e…", matched no key format). An MCP server’s env or headers value whose name says it’s a credential (whole parts: Authorization, X-Api-Key, *_TOKEN, *_PASSWORD, *_SECRET, *_KEY, *_CREDENTIALS) is a secret whatever it looks like: it must be {secrets:name}.
  • EN-31 Built: the catalog’s files are laid out in ~/.blitz/enterprise/<host>/catalog/default and …/locked, each as an .agents folder; defaults load before the person’s and the workspace’s (which win) and locked items after (which win over them), for agents, skills and commands; for rules and guardrails, where the first folder wins, the other way round; an MCP server locked replaces the person’s of its name, a default one is added unless they have one. The policy’s [builtins] off switches off Blitz’s built-in agents, skills and guardrails by name (2026-11-02), but the agent sessions start with, which is kept with a warning; a switched-off agent’s name stays reserved. A layer above the workspace’s and the person’s: an organization item is locked (it applies and can’t be changed or switched off) or a default (a workspace or the person may override it). The policy may switch off Blitz’s built-in items.
  • EN-31 2026-11-05 (scan N26-engine-top-1#1: the catalog’s guardrails/ were read as rules, so a locked guardrail was prompt advice that blocked nothing, and a locked limits.md was ignored). The catalog’s guardrails are read as guardrails (Workspace.guardrailDirs): the locked ones before the workspace’s and the person’s, the defaults after, the first of a name winning; the rule folders hold only its rules/. So a workspace’s or the person’s file of a locked guardrail’s name neither replaces nor switches it off, and a locked limits.md’s ceilings and refused commands hold whatever the workspace’s says (each limits file is checked, and a turn takes the lowest ceilings).
  • EN-31 2026-11-05 (scan N26-engine-sub-2#1: a plugin’s skill folder was searched after the locked one, so a plugin’s skill of a locked skill’s name replaced it, with no warning). A locked skill wins over a skill of its name from any other folder (the person’s, the workspace’s, a plugin’s), whichever is searched first, and the clash is reported when the workspace opens and at /reload (spec_013 SK-02a).
  • EN-32 Built: blitzd fetches it once signed in (each file by its SHA-256, checked, kept across versions), follows the stream, fetching again for each version it announces, and fetches on the policy’s refresh whether the stream is up or not (a stream that stays open but silent never keeps the old one), and every 30 s while it has none. Delivery (the service’s side is the enterprise spec’s: GET <url>/api/v1/catalog, signed with a key /api/v1/info lists as catalog_keys; its files at /api/v1/catalog/files/<sha256>; the stream at /api/v1/catalog/watch, server-sent events): a stream from the service sends a new bundle as soon as it’s published; when the stream isn’t up (at start, after a reconnect), the bundle is fetched with If-None-Match, and again after its Cache-Control: max-age. A bundle whose signature doesn’t check against the service’s key is refused and the last one kept.
  • EN-33 Built: the manifest is kept signed beside its layers and checked again when read; past its expiry the organization’s models wait (your organization's catalog is out of date). The last good bundle is kept on disk (EN-54) with its expiry. Out of date past the expiry, organization workspaces stop until the bundle is fetched again; Blitz never falls back to working without the organization’s rules. The branding doesn’t expire with it (EN-54).
  • EN-33 2026-11-05 (scan N26-safety-enterprise#5: an unsigned 404 from /api/v1/catalog, as a proxy or a misrouted deploy might answer, deleted the kept catalog and policy.json, lifting the organization’s rules). Only a signed manifest changes the kept catalog: a 404 with one kept is reported (a Refusal) and the catalog and its policy stay; a signed manifest with no files withdraws them. With none kept, a 404 is “none published”.
  • EN-33 2026-11-05 (scan N26-api-client-config#4, #16, the reader: a missing or damaged policy.json silently meant no policy). With a service set and its policy.json missing (not fetched yet) or damaged, Blitz works under the strictest policy (the zero policy: nothing of the person’s own, no ! commands, no own connections), the organization’s work waits as past an expiry (your organization's policy can't be read, once signed in), and a load warning says why. A locked or default MCP file that doesn’t decode is reported, not skipped silently.
  • EN-33a 2026-11-21 (security review enterprise#8). The service’s unsigned “catalog removed” answer (catalog_removed) retires the kept catalog only once a policy from the policy API is kept (policy.etag and policy.json): before that it’s a refusal, and the catalog and its locked servers and connectors stay.
  • EN-33b 2026-11-21 (security review enterprise#6: schema was never read, so a newer policy’s restrictions this client doesn’t know were dropped). A policy envelope newer than the client reads (enterprise.PolicySchema, 2; 0 is one from before the field) isn’t taken: ErrPolicySchema (“update Blitz”), the policy kept stays, and with none the strictest applies, as for one that can’t be read.
  • EN-33c 2026-11-21 (security review enterprise#10). A policy whose policy/ folder can’t be swapped into place leaves the old folder there and the policy.json that goes with it: never no policy folder, and never a new policy.json over old rules.
  • EN-34 Built (2026-11-02): the window’s agent menu marks the organization’s agents (AgentInfo.org_lock); Studio’s Agents, Skills, Rules and Guardrails lists end with From your organization: each item with its lock and groups, a locked one saying its Admins change it through a review, a default one with Copy to this workspace (and, once copied, saying the workspace’s own takes its place); blitz enterprise catalog [--kind] and blitz enterprise catalog copy <kind>/<name> (commands and connectors too); blitzd’s ListOrgItems and CopyOrgItem. Studio and Settings show organization items with a badge and their lock; locked ones can’t be edited, only copied into the workspace when they’re defaults.
  • EN-36 Built (2026-11-02): Studio’s header button Publish to organization… for the organization’s Admins (the workspace’s .agents items, each with its lock and groups and what the catalog would refuse, sent as one review, and the catalog’s reviews with their state), blitz enterprise publish [<kind>/<name>…] and blitz enterprise reviews; blitzd’s ListPublishable, PublishToOrganization, ListCatalogReviews; catalog.Place sets lock and groups in the published copy (the workspace’s own file is unchanged). An Admin (its author too) approves in the admin console’s Catalog › Reviews. Publish to organization in Studio, for a signed-in Admin: from an item’s menu, or several chosen in the list, with each one’s lock (locked or default) and groups. Blitz sends them to the service as a review (the enterprise spec’s CA-04) and shows its state on the items (In review, with its problems if the checks found any, then Published with the version); an Admin, its author too, approves it in the admin pages. Locked organization items show who may change them (Admins, through a review) instead of an edit button.
  • EN-36 2026-11-05 (scan N26-safety-enterprise#12: catalog.Place left a connector’s file as it was, so a connection published as locked for a group shipped as a default for everyone). A connector’s lock and groups are comments at its top, # lock: locked and # groups: data, eng, since its YAML is read strictly (descriptors) or by Toolbox (connections), where a lock: key isn’t allowed: Place writes them (any it had replaced) and Check reads them, a connector without them still read by its YAML’s lock: and groups:.
  • EN-36a 2026-11-05 (scan N26-service#21, #22: publishing sent a workspace’s files with no secret scan; the catalog calls took the workspace as given, so "" was blitzd’s own folder). What would be published is read for secrets first (pkg/secretscan, as sharing a folder is, EN-66): any found, nothing is sent (SECRETS_FOUND, each by file and line as the file has it). ListPublishable, PublishToOrganization, ListOrgItems and CopyOrgItem take an absolute workspace folder, links followed, as every workspace call does (INVALID_WORKSPACE otherwise), and a workspace whose items can’t be read is an error, not an empty list.
  • EN-36b 2026-11-21 (re-check of N26 service#21: the catalog’s publishing went away, and what replaced it, sharing your own asset (EN-95) and syncing them (EN-93), sent the files unscanned). An asset of your own is read for secrets before it leaves the computer (enterprise.PersonalSecrets, pkg/secretscan): ShareOwnItem refuses with SECRETS_FOUND, each by file and line, and a sync leaves the asset out and says why in its skipped list. A line marked blitz:allow-secret is a false alarm.
  • EN-36c 2026-11-21 (security review packages#3: blitz pkg publish sent an asset unscanned, and an agent file that’s a link was read where it led, a cloned repository’s helper.md -> ~/.aws/credentials). Publishing to the registry is read for secrets as sharing is, and an asset’s files that are links aren’t read (“is a link, not a file of its own”): for publish, compile, share and sync alike.
  • EN-31, EN-34, EN-36 Changed 2026-11-14 (the owner: the catalog “should only be managed on the server and in the admin console”; blitz-enterprise spec_012_policy PO-41 to PO-43). The catalog stops distributing items. The organization’s agents, skills and commands no longer apply in Blitz: their catalog folders aren’t searched (AgentSearchPaths, SkillSearchPaths, the command folders), and a service that still sends them is ignored; the organization runs agents and skills in its own jobs. Its rules and guardrails come with the person’s policy (EN-38), locked, and Studio’s Rules and Guardrails end with From your organization, read-only, each saying who decided it (ListOrgItems, rules and guardrails only, OrgItem.decided_by); Agents and Skills no longer list the organization’s, and nothing is copied into a workspace. Publish to organization is gone: Studio’s button, blitz enterprise publish and blitz enterprise reviews, and blitzd’s ListPublishable, PublishToOrganization, ListCatalogReviews and CopyOrgItem (the service answers 410 to a publish from an older Blitz). blitz enterprise policy (catalog as before) lists the person’s settings with who decided each, then their rules and guardrails, from what this computer keeps, so it works offline. The catalog’s MCP servers and connections still apply until the organization’s hosted connectors replace them.
  • EN-31 Removed 2026-11-15 (blitz-enterprise M8, the catalog removed: spec_012 PO-44); back the same day for the library’s required assets (EN-81). The agent and skill folders’ locking (agents.Registry.Lock, skills.Provider.Lock), uncalled since the catalog stopped sending agents and skills, was gone. A service without the catalog answers /api/v1/catalog 404, which Blitz reads as none.
  • EN-37 Built (2026-11-04; pkg/enterprise reach.go). When the service doesn’t answer. Blitz works on as if offline, signed in or not: workspaces open and their files, the editor, Git and the terminal work; the organization’s models (so the agent) wait, the conversation saying the organization can’t be reached. A service that takes a request and never answers is given up on: connecting (10 s), its TLS handshake (10 s), the wait for its answer to start (20 s; a stream’s or a download’s body takes as long as it takes), the organization’s models as a workspace opens (8 s), the workspace’s ID (5 s); and once it hasn’t answered, calls to it fail at once for 30 s instead of each waiting again (an answer clears that; a caller giving up doesn’t count). An organization workspace keeps what the service last said of it while it doesn’t answer: its ID, and a Viewer’s clone stays read-only. While a workspace opens, the Files view says so (after 0.3 s, a spinner and Opening the workspace…), and after 1.5 s what it’s waiting for: Waiting for : the workspace opens without it in a moment; never an empty list that isn’t.
  • EN-35 Built for the person’s own providers (allowed: a model named with their provider uses it, bare names stay the organization’s), MCP servers (not allowed: theirs are dropped), connections ([connectors] own and kinds: the person’s not allowed, or of a kind not listed, are listed with why and not served, and can’t be saved), ! commands, and tools (denied for every agent). The policy may also: allow or forbid the person’s own providers, MCP servers and connectors; switch off ! commands or named tools; set guardrails no workspace can loosen.
  • EN-35 2026-11-05 (scan N26-safety-enterprise#4, #13: enterprise.Policy had no connectors, so the policy.json it wrote never had them and [connectors] own and kinds were never applied). enterprise.Policy is config.OrgPolicy (with refresh), one type for the manifest and policy.json, so neither drops what the other reads; builtins.off names built-in agents, skills and guardrails.
  • EN-35 2026-11-05 (scan N26-api-client-config#1, pkg-small-2#2). The MCP policy holds for servers added after the settings load too: a trusted project’s and a plugin’s go through Config.AddMCPServer, which refuses them while [mcp] own is false.
  • EN-35 2026-11-05 (scan N26-engine-sub-1#17, #18: kinds was checked against a file’s # kind: comment, which anyone writes, and skipped when it had none; an unreadable file of the person’s pushed the organization’s default of its name aside and wasn’t served either). kinds is checked against what a file connects to: every source’s type (connectors.SourceLister), each of which must be an allowed kind’s source. A file whose sources can’t be told (not YAML, a document with no kind, a source with no type) isn’t served while kinds lists any. Only the person’s files that can be read give the organization’s defaults way.
  • EN-35 2026-11-05 (scan N26 policy-mode: the person’s own plugins loaded under any policy, with their hooks and MCP servers). The policy may switch off the person’s own plugins: [plugins] own = false ("plugins": {"own": false} in the manifest and policy.json; OrgPolicy.Plugins.Own, unset allowing them, so a service that doesn’t send it changes nothing). Then none of their plugins loads (spec_033_plugins PLG-48), and Blitz says “your organization turns off your own plugins”; a policy that can’t be read turns them off too (EN-33). blitz-enterprise’s policy.toml needs the [plugins] table to set it.
  • EN-35 Built 2026-11-14 (the owner: “allow Ollama”; blitz-enterprise spec_012_policy PO-21). Own providers one by one. The policy’s models.own names, for each provider of the person’s own (gemini, anthropic, openai, ollama, bedrock, azure, vertex-anthropic, api), whether it’s allowed and which of its models (patterns, path.Match: llama3*; every model when none). OrgPolicy.OwnProvider(p) reads it, and models.own_providers alone when a service doesn’t send models.own. Under an organization, ConfiguredProviders lists the organization’s and then only the allowed providers set up; ListModels drops the models it doesn’t allow (Ollama’s too, found on this machine only when allowed); NotSetUp offers only the allowed; a model named with an allowed provider that isn’t one of its patterns is refused (ErrModelNotAllowed, naming the patterns and who decided), a provider not allowed gives way to the organization’s default as before; Ollama with no model chosen takes the first it has that’s allowed, and says so when none is. Settings › Providers shows the organization’s models and, below them, Your own providers: only the allowed ones, each with its patterns; a provider chosen before that isn’t allowed isn’t shown.
  • EN-35a 2026-11-21 (the owner: “the organization should be an extension that when active, ollama is still available, but other models are not. In this case, the organization is a provider”; security review runtime#3, #5, #6). While Blitz is connected to an organization it is the person’s provider: of their own, only the local provider (config.LocalProvider, Ollama) stays, with the models the service names for it under models.own.ollama if it names any (it can’t be switched off). Every other provider of their own (Gemini, Anthropic, OpenAI, Bedrock, Azure, api) is off whatever own_providers or models.own say: a chat model named with one has the organization’s default stand in; pictures, speech and voice with one refuse (ErrOwnProviderOff, “your organization is your provider”); a provider’s default model is checked against the patterns as a named one is. Disconnecting (blitz enterprise disconnect) gives them all back.
  • EN-35b 2026-11-21 (security review databases#5). A connection of the person’s own sent to be tested, tried or queried (Studio, the Data panel) is held to the organization’s rules as one saved and served is: connectors.own and connectors.kinds, judged by what its file connects to.
  • EN-38 Built 2026-11-14 (pkg/enterprise RefreshPolicy; blitzd’s catalog loop). The person’s own policy. From a service that serves GET /api/v1/policy (blitz-enterprise PO-20), blitzd fetches the person’s effective policy after the catalog, on sign-in, each announcement and the refresh: sealed with the catalog’s key (PolicyEnvelope, schema 2; one that doesn’t check is refused and the last kept), with If-None-Match. It writes policy.json (the policy, its expiry, and why each setting is what it is), policy.etag, and the rules and guardrails the policy switches on for the person under <host>/policy/rules and …/guardrails (names checked as file names; the folders replaced whole). Those apply as locked, before the catalog’s locked ones (LockedFirst, LockOf). Once policy.etag exists, the catalog’s manifest no longer writes policy.json; a service that answers 404 (ErrNoPolicyAPI) keeps the catalog’s policy, as before.
  • EN-39 Built 2026-11-14. Who decided. policy.json’s explain gives, for each setting, its value, the level that decided it (default, global, group, person), who (the groups’ names, the person’s email) and whether it’s locked (OrgLayer.Explain, OrgLayer.Why(path)). Every refusal of the policy says it: connections of one’s own and their kinds, MCP servers, ! commands, own models ("… (the policy for Data decides it: an admin can allow it in the console’s Policies)"). EnterpriseState carries policy (path, value as JSON, level, by, locked) and own_providers, and Settings › Providers › Organization shows Your policy, read-only: each setting, its value and who decided it.
  • EN-38a Built 2026-11-14 (the owner: “How do I refresh my local policy?”). Besides on sign-in, on each change the service announces and at the policy’s refresh, the person can fetch the catalog and their policy now: Refresh on Settings › Providers › Organization’s Your policy, blitz enterprise refresh, blitzd’s RefreshEnterprise (NOT_CONNECTED, NOT_SIGNED_IN, or the service’s refusal). It says whether anything changed; open workspaces take a change at once. One fetch runs at a time, the loop’s and the person’s alike (refreshOrg).

5a. The organization’s shared connectors

Built 2026-11-14 (the owner: shared connectors “run by the server, which holds their secrets”; blitz-enterprise spec_013_connectors). The organization’s admins make connections to its databases in its console; its service holds them and their secrets and runs the person’s queries, under their policy (which connectors, which tables, whether they may write, how many rows). Blitz offers them beside the person’s own connections.

  • EN-70 pkg/enterprise: SharedConnectors (GET /api/v1/connectors; none from a service before them, which answers 404), SharedSchema (GET /api/v1/databases/{name}/schema) and SharedQuery (POST /api/v1/databases/{name}/query, the service’s table as JSON; a refusal of the policy is a *Refusal, 403, saying who decided it). Which the person may use, and whether they may write to each, is in their policy’s explanation (connectors.shared.<name>.use, .write, EN-38), so Blitz knows without asking.
  • EN-71 The agents. When the policy lets the person use any, the workspace’s MCP servers include organization, in process (withOrgConnectors, orgTransport): on connecting it asks the service which they may use and offers each one’s org__<name>_execute_sql (sql; at most 200 rows, fewer when the policy says) and org__<name>_list_tables, every agent’s; they run through the service as the person. Listing tables, and running SQL where the policy doesn’t let them write, run without asking, as a read-only database’s tools do. The server restarts when what the policy allows changes (its fingerprint).
  • EN-72 Studio, the Data menu and blitz data. The shared connectors are listed with the workspace’s connections (ListConnectors, scope org-shared: shown as the organization’s, run by its service, never opened or switched off here; ListDataConnections and blitz data mark them org, “your organization’s”), but one named as one of the person’s own, which that name means. A query on one (RunConnectorQuery with its scope, RunDataQuery by name) runs through the service: a statement, never a saved query or parameters. Drafting a query reads its schema from the service.
  • EN-73 @db: mentions of a shared connector add what it holds, the tables the person may use with their columns, and its tools’ names (orgSchemaText).
  • EN-74 The list is asked of the service at most every 30 s per workspace (orgShared), within 8 s; when it can’t be asked, the last one stands, and with none the person’s own connections work as before.
  • EN-75 Built 2026-11-14 (blitz-enterprise spec_013 CN-50 to CN-52). A shared connector that’s a remote MCP server (kind mcp) offers its tools through the organization server: on connecting, it connects to the service’s /api/v1/mcp/<name> as the person (Client.MCPEndpoint, SignedHTTP: their access token, renewed), lists the server’s tools and offers each as org__<name>_<tool>, each call sent on through the service (which adds the organization’s token and logs it). One that can’t be reached is left out, logged. These aren’t databases: the Data menu, @db: and Studio’s connection list leave them out.
  • EN-76 Built 2026-11-14 (blitz-enterprise spec_013 CN-60 to CN-62). A shared BigQuery connector may query as each person (auth = "person" in the list): the service runs its queries with the person’s own Google access, after the policy’s checks. Settings › Providers › Organization shows Data as you when one of theirs does (GetConnectorConsent: those connectors, whether they’ve allowed it, and Google’s consent page, from the service’s /api/v1/connectors/consent): Allow with Google opens it in the browser, Check again reads the answer, Revoke forgets it (RevokeConnectorConsent, DELETE). blitz enterprise consent [--revoke] does the same. Until they allow it, a query on such a connector is refused with where to (consent_required). A service that can’t (another sign-in provider, or no web client secret) answers 404: the card isn’t shown and the CLI says so.

5b. The organization’s library

  • EN-80 Built 2026-11-15 (the owner: agents and skills are “meta-data that a user may enable on blitz desktop and is synced, and inherits automatically required agents and skills”; blitz-enterprise spec_014_library LB-20 to LB-23, R1). The person’s policy carries what the organization’s library offers them (PolicyEnvelope.items): each agent, skill, workflow, rule and guardrail their policy doesn’t leave off, its version, required or available, whether they have it, what it locks to, and the files of those they have. Blitz lays them out in ~/.blitz/enterprise/<host>/policy/ (layOutItems): the available ones it has under available/, the required ones under required/, each as a workspace’s .agents folder, and items.json, what’s offered. An asset’s files must be its own (an agent’s one file, a skill’s folder, a workflow’s file) and match its digest (spec_065 PK-05), or the policy isn’t taken and the last one stands. The agents and skills load around the person’s and the workspace’s (AgentSearchPaths, SkillSearchPaths): the available ones first, so the person’s or the workspace’s own of a name replaces it; the required ones last, locked. The workspace’s workflows (Workflows) add the organization’s the same way. A service before the library sends no items: its rules and guardrails stand as before.

  • EN-81 Built 2026-11-15. A required agent or skill is locked (agents.Registry.Lock, skills.Provider.Lock, back since EN-31’s removal): nothing of its name replaces it, and the clash is reported as the workspace opens. A required workflow is chosen over the workspace’s of its name.

  • EN-82 Built 2026-11-15. Each of the organization’s agents runs the skill versions it was published with, side by side with others: every version an agent the person has locks to is laid out under versions/skills/<name>@<version>/, and while that agent runs, its skills (the prompt’s list, list_or_search_skills, activate_skill, read_skill_file, run_skill_script, \skill mentions, a workflow step’s skills) are those versions (skills.Provider.GetFor, ListFor, SetVersions). A person’s own agent of the name runs the skills the person has.

  • EN-83 Built 2026-11-15. The person switches an available asset on or off (SetOrgItem, the service’s PUT /api/v1/me/items/{kind}/{name}); the service keeps the choice, so it follows them to every computer, and Blitz fetches the policy again at once. A required one can’t be switched off (REQUIRED). Settings › Resources › Agents and Skills end with From your organization, Settings › Organization shows Your organization’s library (every kind), and Studio’s Rules and Guardrails keep theirs: each required one locked with who decided it, each available one with a switch (ListOrgItems, OrgItem.version, state, on, locks). blitz enterprise items [--kind] lists them; items enable|disable <kind>/<name> switches one.

  • EN-90 Built 2026-11-15 (the library plan’s R4). The organization’s required workflows that run on a git hook (spec_043 WF-30) are installed as that hook in every git workspace Blitz opens, and again when the policy changes (InstallOrgHooks): in the hooks folder the repository uses (git rev-parse --git-path hooks, so core.hooksPath too), a script that runs blitz hook run <hook> (WF-32). A hook of the repository’s own is kept, moved to <hook>.local and run first; one Blitz wrote before (its header) is brought up to date; with both a new hook and a kept .local, Blitz says so and leaves them. Without blitz on PATH, the hook says the checks didn’t run and lets the commit through. A workspace that isn’t a git repository gets none. A repository whose hooks are in its own files (core.hooksPath in the work tree, as the secrets hook sets it: spec_051) isn’t rewritten: Blitz says so, and to add blitz hook run <hook> to that folder’s hook.

  • EN-91 Built 2026-11-15. A workflow’s API step calls the organization’s API connectors through the service as the person (WF-31; enterprise.Client.CallAPI, the service’s /api/v1/apis/{name}/{path...}), the connector’s token added there and every call logged; one the policy doesn’t let the person use is refused there.

  • EN-91a 2026-11-21 (security review enterprise#5: a workflow’s API step needs no approval, and its path was joined under the connector with .. kept). An API step’s path can’t leave its connector: one with a .. segment, plain or escaped (%2e%2e, \), is refused before anything is sent.

  • EN-92 Built 2026-11-15. What each workflow a git hook ran found goes to the service as a receipt (enterprise.Client.Receipt, POST /api/v1/me/receipts: the workflow, its version, the event, the repository, the tree, passed, the message, the workspace’s folder name, when; WF-33), which the console shows on the workflow in the Library (the service’s spec_014 LB-40).

  • EN-93 Built 2026-11-15 (the owner: personal items “sync too, visible read-only to admins”; the library plan’s R5). The person’s own assets sync with the organization’s service: their agents (~/.blitz/agents/<name>.md), skills (~/.blitz/skills/<name>/, every text file in it but hidden ones; a linked folder isn’t theirs to sync), workflows (~/.blitz/workflows/<name>.flow.yaml, which every workspace now loads, after the organization’s available ones and before its own), rules and guardrails (~/.blitz/rules/, ~/.blitz/guardrails/), each as its files under ~/.blitz (enterprise.SyncPersonal; the service’s spec_014 LB-50 to LB-52). blitzd syncs after each fetch of the policy, and blitz enterprise items sync (SyncOwnItems) or Settings › Organization’s Sync now at once. What changed here since the last sync (personal.json beside the policy) is sent from the revision it had; what changed on another computer is brought here; what was removed on one side is removed on the other. Sync state writes are atomic (pkg/atomicfile), and a damaged state file is logged and quarantined (<state>.damaged) while an unreadable one fails clearly rather than silently resetting sync state. Changed on both, this computer’s wins and the other’s is kept under ~/.blitz/conflicts/, said in the sync’s report. A kind the policy doesn’t keep (library.personal.<kind>s), a name the service doesn’t take, a file that isn’t text or is over 1 MB, or an asset over 5 MB is left alone and said.

  • EN-93a 2026-11-21 (security review since v0.9.1, packages#1, #2: a name or version the service sent became a path: a skill named ../.. with no files removed the home folder in the background sync, and a version 1/../../… wrote files anywhere). An asset’s name is written or removed only when it’s one Blitz gives (agentpkg.ValidName: lowercase letters, digits, single - or _), and a skill’s version names a folder only when it’s agentpkg.ValidVersion (letters, digits, ., -, _, +, no ..); OrgLayer.VersionDir returns nothing for either. Anything else is refused, whatever the service’s signature says.

  • EN-93b 2026-11-21 (security review enterprise#3: the sync’s state was the service’s, not the person’s, so another account signing in, or a service that was reset, made every local asset look removed elsewhere, and the sync deleted them). The sync’s state records whose it is (the person’s ID); when it’s another’s, or the service lists none of what it remembers, nothing here is taken for removed elsewhere: what’s here is sent.

  • EN-94 Built 2026-11-15. Each workflow and eval run that ends is reported to the service (enterprise.Client.ReportRun, POST /api/v1/me/runs: kind, name, status, workspace folder, when, cost, a summary), in the background; a report that can’t be sent is logged, never a failure of the run. Its admins see them on the person (the service’s LB-54).

  • EN-95 Built 2026-11-15 (the owner: people “publish as a shared skill”; failures “rejected and the user notified”). The person submits one of their own assets to share with the organization (ShareOwnItem; blitz enterprise items share <kind>/<name> [--note]; Settings › Organization › Yours, with your organization, Share, for the kinds the organization takes: its policy’s library.contribute.<kind>s). The organization’s evaluator judges it (the service’s LB-60 to LB-63); a refusal says the service’s reason (NO_EVALUATOR, CONTRIBUTE_OFF, NAME_TAKEN, SUBMISSION_OPEN, INVALID), one they don’t have is NOT_FOUND. blitz enterprise items submissions and the section list their submissions with what each check found (ListSubmissions, refreshed while one is judged); the decision also reaches them by their notice settings.

  • EN-96 Built 2026-11-15 (the library plan’s R6). The organization’s registry (the service’s spec_016): blitz pkg fetches, searches and publishes through it (spec_065 PK-16), and, with the organization’s library, its MCP server (organization) offers every agent search_library (query, kind; read only): what the library offers the person, each with its version, whether it’s required or available, and, when it’s available and off, how to switch it on. The server is offered with the library alone, without shared connectors.

  • EN-97 2026-11-15 (the owner’s report: “the organization’s catalog is gone” in the log, and a blank panel under Your policy). A service whose catalog is retired answers it 404 catalog_removed: Blitz drops a catalog it kept from before, quietly, and asks no more of it than its refresh does. Settings › Organization’s library says why it’s empty (what the organization offers is chosen in its console’s Policies) rather than drawing an empty card; Yours, with your organization shows only when the service answers it. Your policy names every setting: the library’s assets (Agent: …, Skill: …, their state available or required), people’s own assets (library.personal, library.contribute), jobs and shared connectors. The retired catalog’s calls (ListPublishable, PublishToOrganization, ListCatalogReviews, CopyOrgItem) stay in the API, retired, answering UNIMPLEMENTED CATALOG_REMOVED, so an older client’s call fails plainly and the API doesn’t break.

6. Jobs on the service

  • EN-40 Built (2026-11-02; pkg/jobspec, which the service reads jobs with too; the local scheduler skips service jobs; Studio keeps it through an edit). Studio’s Runs on and Move to the service (with what wouldn’t work there), and blitz jobs move <name> [--anyway]; a run on the service is service.RunJob (blitz-enterprise’s blitz-runner, or blitzd run-job), which works in its own folder, jobs/<person-id>/<job-id>/<run-id>/ (the clone in workspace/, what it leaves for people in out/), clones the workspace with its run’s token, runs the job as its owner, pushes its changes to the run’s own branch blitz/jobs/<job>/<run-id>, keeps out/ and its log (events.jsonl) as the run’s artifacts (spec_055_urns), and reports its end. A job has runs_on: here (the default, today’s) or service, and Runs on in Studio › Jobs with Move to the service. One job runs in one place; there is no “here when on, the service otherwise”.

  • EN-41 Built (2026-11-02; engine.Workspace.ServiceProblems, MoveToService; WorkerService MoveWorkerToService): Studio’s Move to the service and blitz jobs move <name> say what won’t work there (an MCP server that’s a program here or at a local address, a connector reaching this computer, a file outside the workspace the job names, a localhost address in it) and move only when nothing does, or Move anyway (--anyway). Studio’s job form shows Runs on and When it needs more in an organization workspace and keeps both through every edit (before, an edit in Studio dropped runs_on). Before a job moves, Blitz checks it can run there and says what can’t: an MCP server that runs only on this computer (stdio), a file outside the workspace, a localhost address, a connector the service doesn’t have.

  • EN-42 Built in Studio › Jobs (2026-11-02): a job with runs_on: service in an organization workspace shows the service’s runs of it in place of this computer’s (status, how it started, its last message, cost, its branch, and its files on request, each saved to Downloads), with Run now and Turn on/off there (ConfigService GetServiceJob, RunServiceJob, SetServiceJobEnabled, ListServiceRunFiles, SaveServiceRunFile; refreshed as the service’s stream says a run of it changed). A job the service hasn’t got says why, with what to do (2026-11-02, the owner: the old note had no action): its WORKER.md isn’t in .agents/workers/<name>/; its changes aren’t on main (Push to main: blitzd’s PushServiceJob commits the job’s folder, pushes the workspace to main and has the service read it; blitz enterprise jobs push <job>); sync is putting them there (with sync’s state, looked at again until it’s done); or main has it and the service doesn’t run it (the service’s why). Each look has the service read main at once (POST /api/v1/workspaces/{handle}/jobs/read), so a service that scales to zero doesn’t keep it waiting. The runs going now on the service show in the status bar’s Processes menu and the Processes view under On your organization’s service, one picked opening its job in Studio (WatchServiceRuns, over the service’s GET /api/v1/runs/watch; nothing is polled). A service job’s runs show beside local ones in Studio › Jobs and the Processes view, with their output, from the service (JobRunner); the person’s computer doesn’t need to be on for them to run.

  • EN-42a 2026-11-05 (scan N26-service#18, #20: a run’s file larger than 100 MB was saved cut off, saying nothing; a git failure read as changes not pushed). SaveServiceRunFile saves a file of at most 100 MB, the most a run’s file may be; a larger one isn’t saved at all (UPLOAD_TOO_LARGE, max_bytes in its metadata). When Studio asks why the service has no job, a git command that fails (or settings that can’t be read) is not_read with what failed, never not_pushed.

  • EN-42b 2026-11-05 (scan N26-cli-1#9: the CLI had only a snapshot of a job’s runs). blitz enterprise jobs watch follows the runs going now on the service from the terminal (WatchServiceRuns, keepalives skipped): the list again, timed, each time one starts, changes or ends, until Ctrl+C.

  • EN-42c 2026-11-05 (scan N26-desktop-2#12: a service run or approval of another workspace picked in the status bar did nothing, or opened this workspace’s Processes). A service run or approval picked in the status bar (Processes’ service runs, the approvals item) opens its job in its own workspace’s Jobs view, opening that workspace and bringing it forward when it’s another.

  • EN-44 Built (2026-11-03): a run’s changes reach main (blitz-enterprise spec_009_jobs JB-10): the runner adds a succeeded run’s branch to main as WORKER.md’s merge says (main, the default, when they merge cleanly; never), through pkg/runmerge (fetch, merge, push, again when main moved), and says whether they’re on main and why not (merged, merge_note). Studio › Jobs shows a run’s changes on main, or its branch and why with Add to my workspace; blitz enterprise jobs take <job> [run]. Both are blitzd’s TakeServiceRun: the merge in a clone of its own (never the folder’s files; CONFLICTS, NO_CHANGES, UNKNOWN_RUN), then the service told (POST /api/v1/jobs/{id}/runs/{run}/merged, an Editor) and the folder’s sync fetching it. A job run on the service never leaves work where nobody finds it.

  • EN-44a 2026-11-05 (scan N26-service#5, #6, #7: a run its deadline stopped kept the engine’s error as its note; the run’s token was on git’s command line; the runner’s waits were in no spec). A run its deadline stopped is stopped, “it ran past its time limit”, whatever the engine called it. The run’s access token reaches git through its environment (GIT_CONFIG_COUNT), never its command line. Past the run’s own time limit, its runner waits at most 30 s to tell the service how it ended, 10 min to keep its files, 2 min to push its branch and 2 min to merge it (endTimeout, keepTimeout, pushTimeout, mergeTimeout in pkg/service/runjob.go).

  • EN-44b 2026-11-05 (scan N26-pkg-small-2, spec gaps: every failed push was tried three times, a refused sign-in included, and the last error said only “pushing main”). runmerge.IntoMain tries again only when main moved on the remote (git’s [rejected], fetch first or non-fast-forward), up to three times, then says main kept moving; any other refusal (sign-in, a hook, branch protection) ends it at once, with git’s refusal in the error.

  • EN-44c 2026-11-05 (scan N26-apps-other#9: the runner’s stop, SIGTERM from Cloud Run or a timeout, killed blitzd run-job at once, so the run was never reported or saved). blitzd run-job ends its run on SIGTERM or Ctrl-C as the service does (its context is cancelled), so RunJob reports and saves what the run did.

  • EN-43 Built (2026-11-02): on_request in WORKER.md (refuse or pause; unset, pause on the service); the runner pauses at the first request its permissions don’t allow, pushes its branch, keeps its session among its files and reports paused with the request; answered, the service starts the same run again, which restores its session and branch and goes on with the answer as its next message, the approved request allowed once (engine.RunOptions OnRequest, Session, Prompt). The status bar’s waiting for your answer item (with a notification for each new one) and Studio › Jobs show and answer them, as blitz enterprise jobs pending|approve|deny does; blitzd’s ListServiceApprovals, AnswerServiceRun; the tray’s Jobs: N waiting for your answer menu, each run with what it asks, Approve, Deny and Show in Blitz; email and webhook notices (the enterprise spec’s JB-31) set in Settings › Organization’s Job notices and blitz enterprise notices (blitzd’s GetOrgNotices, SetOrgNotices). A job’s on_request says what a run does when it needs something its permissions don’t allow: refuse (today’s, WK-42; the default for jobs here) or pause (the default on the service). A paused run is saved, not kept running: its session with the waiting request, and its changes on its branch. Its process ends. The owner sees the request (a notification, the Jobs view, the tray’s Jobs menu, blitz jobs pending) with Approve or Deny, whenever they get to it. The answer resumes the run from where it stopped, with the decision as the tool’s result. Background processes the run had started don’t come back. A run waiting longer than approval_wait (7 days by default) stops. While a run waits, the job’s next times are skipped, as overlap: skip skips them while a run goes on.

  • EN-43a 2026-11-05 (scan N26-service#3, #4: out/ could fill the service’s 1,000 files a run before the session was kept, so a paused run couldn’t go on; and a resume without the artifacts’ name started a fresh session). A run keeps its log and its session first, then out/’s files in what’s left of the service’s 1,000 (maxRunFiles, blitz-enterprise’s jobs.MaxRunFiles); the note says how many of out/’s were kept. BLITZ_RESUME without BLITZ_ARTIFACTS is refused as a service too old to resume.

  • EN-45 Built 2026-11-14 (blitz-enterprise spec_009_jobs §9). The organization’s own jobs, which its admins write in its console and its service runs, in no workspace of the person’s: Settings › Jobs lists those the policy lets the person see, under Your organization’s jobs, each with what it does, when it runs and when next, and Run now (the service refuses it, saying why, when the policy doesn’t let them run it). ListServiceJobs marks them organization, with no clone folder; blitz enterprise jobs lists them as the workspace organization. Their results reach the person as any service job’s do (EN-42, EN-43).

7. Branding and terms

  • EN-50 Built (2026-11-02; pkg/enterprise, its RefreshBranding; blitzd’s GetBranding). The envelope is {"kid", "payload", "signature"}: the payload’s JSON in base64url, and an Ed25519 signature, base64url, of blitz-enterprise/v1, NUL, the key ID, NUL and the payload, checked against /api/v1/info’s catalog_keys (base64), asked again once for a key published since. The desktop app asks for it at start, every 10 minutes and when the settings change. With branding listed, GET <url>/api/v1/branding (with If-None-Match) gives:

  • EN-50 2026-11-05 (scan N26-desktop-3#17: a slow refresh answering after a sign-out’s put the organization’s look back for ten minutes). The window takes the branding, the organization banner’s state and the organization’s workspaces in the order they were asked: an answer older than one already taken is dropped, as is one that comes after its view went.

    • the app’s name and short name;
    • a logo and an icon, each for light and dark;
    • two accent colours, one for the light theme and one for the dark (no one colour reads well on both);
    • a support link and an about text;
    • the terms of service and privacy notice, each as text or a link, with a version.

    It needs no sign-in, so the sign-in screen is branded too. It comes signed with the catalog bundle’s key (EN-32), the images inside it rather than linked, so one signature covers everything the window shows and an offline start has all of it. A copy whose signature doesn’t check is refused and the last one kept. It’s kept on disk (EN-54), so the window is branded before it reaches the service.

  • EN-51 Built (2026-11-02): the window’s title, the top bar (the short name, the logo for the theme), the welcome page and the accents (checked at 4.5:1 against each theme’s background); every word the window, the tray, the CLI and blitzd’s notifications say through their translations (setAppName in the page’s i18n.ts, i18n.SetAppName in Go, the organization’s name in place of “Blitz”), but for the keys that name the program itself (its releases, license, themes, reinstall hints and “Built on Blitz”: pkg/i18n/fixed_keys.json, one list both read); the CLI’s banner and title. The tray and the CLI read the kept branding when they start. The name replaces “Blitz” wherever the app says it at run time:

  • EN-51a 2026-11-05 (scan N26-cli-1#7). The CLI’s enterprise commands (connect, disconnect, login, logout, status, terms, about, workspaces, open, create, share, sync), blitz auth, the background-run commands and config key and permission changes print through the catalogs, so they follow ui.locale and say the organization’s name; enterprise jobs, usage, publish, reviews, catalog and notices are still English (left: about 45 lines).

  • EN-51b 2026-11-05 (scan N26-cli-1#7 follow-up). enterprise jobs, usage, publish, reviews, catalog and notices print through the catalogs too; why the service hasn’t got a job is an error, so English with the CLI’s others (spec_020 CLI-30b).

    • the window’s title;
    • the page’s menus, the welcome page and dialogs;
    • notifications;
    • the tray’s tooltip and menu titles;
    • the CLI’s banner and help.

    The logo replaces the mark in the title bar and on the welcome page. Each accent replaces its theme’s accent tokens, and is refused, keeping Blitz’s, when it doesn’t meet WCAG AA contrast (4.5:1) against that theme’s background. What the system names from the app’s bundle can’t change at run time: the macOS Dock and menu bar, the installer, the Start menu and file names. Those need a rebranded build, which is out of scope here.

  • EN-52 Built in the desktop app. About shows the organization’s name, logo, about text, terms of service, privacy notice and support link. It always ends with “Built on Blitz ”, plus Blitz’s license and notices (the Apache License’s NOTICE must stay with the program).

  • EN-52a 2026-11-05 (scan N26-cli-1#8: the owner wants every enterprise feature in the CLI too). blitz enterprise about shows the same from the terminal (ConfigService.GetBranding, refreshed): the organization’s name, about text, support link, its terms (their link, or blitz enterprise terms) and its privacy notice (its link, or its text); “nothing published” when there’s none, and a note when the service couldn’t be asked and the kept copy is shown.

  • EN-53 Built in the desktop app (a dialog before anything else, checked at start, every 10 minutes and when the settings change; Decline signs out) and blitzd (GetTerms, AcceptTerms); and the CLI (blitz enterprise login asks [y/N] when a version waits, blitz enterprise terms any time). The user agreement: after sign-in, and whenever the terms’ version changes, the window shows the terms with Accept and Decline before anything else. The CLI shows them, or their link, and asks [y/N]. Accept is recorded on the service with the version and the time (POST <url>/api/v1/terms/accept with {"version"}; GET <url>/api/v1/terms is the version in force and whether it’s accepted). Decline signs out. Until the current version is accepted, the service answers every other request with 403 terms_required, so no client can skip it.

  • EN-53a 2026-11-05 (scan N26-cli-behaviour, the owner’s decision: a scripted blitz enterprise login read no answer from its pipe and signed out, so it could never stay signed in). When stdin isn’t a terminal, blitz enterprise login and blitz enterprise terms don’t ask and don’t sign out: the person stays signed in with the terms not yet accepted, and the CLI says so, that the organization’s features wait until they’re accepted, and how to accept them (blitz enterprise terms in a terminal, or the desktop app, whose dialog asks before anything else). Nothing is accepted for them: the organization’s service still answers every other request with 403 terms_required until they are, and blitz enterprise status shows the version waiting. In a terminal, Decline still signs out.

  • EN-54 Built for the branding: kept in ~/.blitz/enterprise/<host>/ with the keys it was checked with, read back and checked again offline, removed on disconnecting or moving to another organization. Offline (the owner’s question, 2026-10-29: “how it will be persisted when the user is offline”):

    • Where. The last good bundle and branding, each as the signed copy the service sent, are kept in the service’s own folder, ~/.blitz/enterprise/<the service's host>/ (0700, files 0600, each written to a temporary file and renamed into place), so another service’s never mixes in. At start the window reads the branding from there and checks its signature again before it shows it; a copy that doesn’t check is ignored (Blitz’s own look until the service answers).
    • No expiry. The branding is how the app looks, not a rule, so it stays until a newer one replaces it. Past the bundle’s expiry (EN-33) the organization’s workspaces stop, but the window keeps the organization’s name and logo. A service that stops listing branding returns the app to Blitz’s.
    • Signed out. Signing out, or a token that can’t be renewed, keeps the branding and the terms: it’s still the organization’s computer, and the sign-in screen (EN-13) wears its name.
    • Disconnected. Removing [enterprise] url (Settings › Organization, blitz enterprise disconnect, or device management) deletes the folder, and the app is Blitz again.
    • The terms. Their text and version are kept with the branding, so About shows them offline. Acceptance is recorded only on the service (EN-53). Offline, the version last accepted on this computer stands, and a newer one is asked for, before anything else, when the service answers again.

8. Organization workspaces

Draft (2026-11-01). The client’s WorkspaceStore (EN-02): an organization’s workspaces are Git repositories kept by the service (the enterprise spec’s spec_007_workspaces), cloned to the person’s disk, where Blitz’s agents work as they do in any folder.

  • EN-60 Built (2026-11-02; Create in the window, New workspace… with Just for me for a personal one, and the Viewer’s read-only clone, Tools.ReadOnly set by blitzd as the workspace opens, added later that day): the Workspaces menu lists them under the organization’s name, blitz enterprise workspaces, open <handle> and create <name>; blitzd’s ListOrgWorkspaces, OpenOrgWorkspace (cloning with only Blitz’s helper, never asking at a terminal) and CreateOrgWorkspace; [enterprise] workspaces_dir. Open an organization workspace. Signed in, the window’s workspace picker and blitz workspaces list the workspaces the person has a role in (GET <url>/api/v1/workspaces), under the organization’s name, with Create a workspace. Opening one the first time clones it through the service (<url>/git/<handle>.git) to [enterprise] workspaces_dir (~/Blitz/<organization>/ by default) and opens it; after that it opens the clone. The clone is made beside that folder and moved into place whole, so its sync never finds one half made, and a folder of the person’s own files already there is left as it is (FOLDER_IN_THE_WAY: move them, then open it again). A Viewer’s clone is read-only: Blitz’s file tools and the editor refuse to change it, saying why.
  • EN-60a 2026-11-21 (security review files#6; the owner: “files#6 yes”). The Viewer’s clone is read-only everywhere: every change the editor and the file tree ask for (write, new folder, rename, copy, upload, delete, restore) is refused with READ_ONLY and why, and the Files shelf says so under its title and offers no new file or folder (GetSettings.read_only).
  • EN-61 Built (pkg/gitcred): the clone’s settings name blitzd git-credential, which asks the running service (GitCredential), the one process that renews the token; blitz git-credential does the same for Git’s own settings. The credential helper blitz git-credential (Git’s credential protocol: get, store, erase). Blitz sets it in each organization clone’s own Git config (credential.<url>.helper), never the person’s global config. get answers the service’s host with the access token from the keychain (spec_039_secrets), renewed first when it’s within its last minute (EN-12); signed out, it answers nothing, so Git fails with “sign in to Blitz”, and Blitz says so. A person may set it globally to use Git’s own clients with the service. Changes’ Pull and Push accept this one setting in a folder’s own config, exactly as Blitz writes it (DSK-90b), and each sync start rewrites it with the running Blitz’s path.
  • EN-61 2026-11-05 (scan N26-safety-enterprise#23: the helper answered protocol=http for the service’s host too, so a remote at http:// would get the access token in clear). The helper answers http only for this computer (localhost, a loopback address), as the service’s address allows; elsewhere only https.
  • EN-61a 2026-11-05 (scan N26-service#15: the helper matched the host only, so Git asking for http://<service host> got the token, sent in the clear). The helper passes Git’s protocol on (GitCredentialRequest.protocol), and the service gives the token only when it’s the service’s own scheme (https for a real service); an older helper that sends none is answered by host as before.
  • EN-62 Built (2026-11-02; pkg/orgsync, blitzd’s sync manager): for each cloned workspace with sync on (not a Viewer’s), while signed in. Changes are found by git status every 2 seconds rather than a file watcher; others’ changes are merged rather than rebased onto (the person never sees the history’s shape, and keeping both versions is simpler and safer mid-merge), after this person’s edits are committed. Its stream is followed, with a fetch each minute besides. Sync (for a workspace with sync on; the enterprise spec’s WS-04). Blitz’s service, not the window, runs it, so it goes on with the window closed:
  • EN-62 2026-11-05 (scan N26-safety-enterprise#14: sync committed and pushed whatever had changed, a .env with a key in it too, to every member and the service’s history). Before each save, the files it would commit are scanned (secretscan.Scan); any that hold what looks like a secret hold the save back on this computer, in a state of its own, secrets (Not saved: it holds what looks like a secret, with each file:line and the kind, masked), and it isn’t tried again until something changes. blitz enterprise sync fails on it as it does offline.
  • EN-62 2026-11-06 (CI: the service’s TestShareWithOrganization failed about one run in thirteen on Linux). A sync whose first look found saves to send, sent meanwhile by Changes in the same folder (a pull, a push), had no state until the next fetch a minute on: it asked whether it was ahead twice, and the second answer was no. Nothing left to send is now in step (Saved) at once (TestSentMeanwhile).
    • Saving: a change on disk (the person’s, or an agent’s write) starts a timer; 5 seconds after the last change, and never while an agent’s turn in that workspace is still writing, Blitz commits everything (git add -A, its ignore rules included) with a message that says who changed what (“Ana: edited plan.md”, “Coder (Ana’s session): 4 files”) and pushes.
    • Getting others’ changes: Blitz fetches when the workspace opens, when the watch stream (WS-06) names a commit it doesn’t have, and before each push. It rebases its own commits onto what it fetched. Changes from others land between turns: while a turn runs in the workspace, they wait for it to end, so an agent never has a file change under it mid-turn.
    • A push refused as not a fast-forward is fetched, rebased and tried again, up to 3 times, then retried as the watch stream brings news.
  • EN-63 Built, the agent’s next turn told of each pair once (2026-11-02: blitzd adds a <workspace-sync> note to the turn’s prompt, the transcript keeping what the person wrote); the window’s 2 files have both versions is the status bar’s, with each pair in its hover. Conflicts. When a rebase can’t apply a change to a file, Blitz keeps both: the other person’s version under the file’s name, and this person’s beside it as name (conflict, Ana).ext, committed and pushed like any change. The window shows 2 files have both versions with each pair, and the agent’s next turn is told of them. A file deleted by one and changed by the other keeps the changed one. Nothing is ever lost: the person’s own commits stay in the clone’s reflog.
  • EN-64 Built (2026-11-02): the status bar, whose menu has Save now (SaveOrgSync: commit, take others’ changes and push at once, the state after; NOT_SYNCED, GIT_BUSY while a turn runs) with why it isn’t saved, and blitz enterprise sync (sync status to only look) (in place of Git’s item for a sync workspace in simple mode, beside it in advanced mode; GetOrgSync), and a sync workspace’s Changes menu: Session and Workspace history… (each save with who and when, opened or restored, which sync saves as a new save), in simple mode too, and Git’s items (Git view, Include all, Commit) only in advanced mode (the owner, who lost them on a folder shared in place). A push the service reached and turned down is Not saved: the service refused it, Git’s reason in its tooltip and in blitzd’s log (orgsync.Refused; GetOrgSync’s error), never Offline. The state is always shown, never in Git’s words. The status bar shows the workspace’s sync state: Saved, Saving…, Offline: saved on this computer (commits wait and go when the service is back), Signed out: sign in to sync, or Both versions kept (EN-63). The window never says commit, push, pull or rebase for a sync workspace; its Changes view shows History instead, each save with who and when, and any one can be opened or restored as a new save.
  • EN-64a 2026-11-05 (scan N26-desktop-2#10, #11, #13: the window and the CLI each kept their own list of the states that mean “not saved”, and the status bar asked every workspace for its sync every 3 s, organization workspace or not; the conflicts state read “1 file has both versions”). GetOrgSync and SaveOrgSync say failed when the service hasn’t got this computer’s saves (orgsync.Failed: offline, signed out, refused, secrets), and the window and blitz enterprise sync go by it. A workspace that isn’t an organization’s is asked again every 30 s (it may be shared meanwhile), an organization one every 3 s. The conflicts state reads Both versions kept: 1 file (n files).
  • EN-64b 2026-11-05 (PR #90’s CI: a shared folder’s sync vanished for seconds under load). The service keeps a sync for each of the organization’s workspaces that’s cloned here, looking at the organization’s list every 30 s and when kicked. A look that can’t read the list (the service slow or restarting, a network blip) or the settings leaves the syncs running as they are; only a list that’s read, or signing out, starts or stops them. Before, one failed request stopped every sync until the next look.
  • EN-64c 2026-11-05 (PR #90’s CI: a folder shared in place sometimes never showed a sync state). A sync whose workspace has no main shared yet (it started before the share’s own push landed) pushes what’s committed here, or, with nothing on either side, is in step (saved). Before, it did neither and had no state until the next fetch a minute later or a push from someone else.
  • EN-65 Built for the clones; the watch stream’s New changes on main comes with EN-62. Workspaces without sync (code, the default for repositories with a build file) are plain clones: Blitz’s Git features work as with any repository (Changes, branches, merges, worktrees), with the credential helper, and the watch stream only shows New changes on main in the window.
  • EN-66 Built (2026-11-02; the owner asked how an existing workspace can sync): Share with … in the Workspaces menu, blitz enterprise share, blitzd’s ShareWithOrganization, ~/.blitz/org-folders.json. Share a folder where it is. A folder already on this computer becomes an organization workspace (a team’s, or the person’s own) without moving: its changes are committed first (said so), the folder and its whole history are checked for secrets (pkg/secretscan; nothing is made or sent when any are found, each named by file and line), files over 50 MB are mentioned, the workspace is made, and the folder is pushed to its main through a remote of its own, organization, so a repository’s origin stays as it was; its branch follows organization/main when it followed nothing (so Changes can pull and count; a folder shared before 2026-11-02 gets it as its sync starts). From then on it’s kept in step where it is, as any clone is (EN-62), and listed where it is. A folder inside another repository is refused (its repository’s folder is shared instead), as is one that’s the organization’s already.
  • EN-66 2026-11-05 (scan N26-safety-enterprise#9: a history of more than 50,000 objects was shared with only part of it checked, folders counted among the files, and a version first seen under a name that isn’t a settings file skipped the settings check). The history’s files are counted, not its folders; a version seen at several paths is read as a settings file when one of them is one; and a history with more files than are checked isn’t shared (SECRETS_UNCHECKED, saying to share a copy without its history).
  • EN-66a 2026-11-05 (scan N26-service#12, #13, #14: a history past the scan’s 50,000-file cap was shared with only a note, and changes were committed before the scan, so a refusal left a commit holding the secret; a failed push left a workspace no retry could finish). Checked before committed; unchecked isn’t shared. The changes a share would commit (files Git doesn’t ignore that differ from HEAD, read from the folder) and then the history are read for secrets before anything is committed: on SECRETS_FOUND the folder is as it was (no commit; a folder that wasn’t a repository isn’t left one). When there are more than 50,000 files to read, changes and history together, nothing is committed, made or sent (SECRETS_UNCHECKED, max_files in its metadata). The folder is recorded as shared once the workspace is made, before the push: a push that fails (PUSH_FAILED, handle in its metadata) leaves it shared, and its sync sends it (Save now tries at once); sharing it again is ALREADY_SHARED. A folder is matched with links followed (as /var and /private/var), here and in Studio’s service jobs.

9. Not in scope

  • The enterprise service itself: OIDC, roles and SCIM, licensing and the heartbeat, the gateway, the catalog’s authoring (policy as code), Git sync, sharing, cloud jobs, the database and Terraform. Those are specified in blitz-enterprise.
  • Making the person’s own computer enforce the organization’s rules against the person: a local agent runs under rules it fetched (EN-33), which is best effort; what a company must be sure of goes through the service (its models, its data, its jobs).