Network access packages

Network packages group the public destinations already listed in Internet policy templates. They reuse the existing managed egress proxy and policy revision/delivery flow. They do not provide credentials, service discovery, a new proxy, or arbitrary TCP access.

Open Settings → Network access → Configure access packages, or the same action in a repository's Internet policy editor. Use arrows to select a scope, Space to toggle a package, and Enter to inspect its domain tree. The browser and desktop app expose the same checkboxes. Use inherited choices removes this scope's overrides; saving an empty explicit package selection is different from removing it.

Scope and authority

The order is shared system defaults, the signed-in server user's defaults, that user's project group, then repository. A group is scoped by its immutable owner and ID: two users with the same organization label do not share private settings. Scope identifiers are server-derived or selected from the owned inventory; changing a JSON owner field does not select another user.

Shared system defaults and the team catalog require a team administrator. Members can read the approved public domain catalog and edit only their own scopes. The administrator can publish an existing private template into the shared catalog, approve its named packages, and choose whether members may add public destinations beyond approved packages. New shared templates are not automatically approved. Revoking approval removes inherited grants from desired policies while retaining the disabled local choice for inspection.

A member may disable an approved package and later re-enable it. The server checks the retained administrator-approved ceiling and current approved catalog, not merely the currently enabled hosts. A user-selected package does not become a permanent administrator grant. HTTP, session MCP and direct controller mutation enter the same Store authority check. Existing explicit policies and their approved ceiling are retained until an explicit repository change; a catalog update does not silently rewrite legacy policies.

New repositories use package inheritance. Existing repositories show their explicit-policy status, inheriting/overridden repository counts, and Use package inheritance. Adopting inheritance is an explicit saved change; no bulk migration runs when opening Settings. Private legacy templates retain their own settings; choosing the default template affects repositories that have explicitly enabled inheritance and future repositories.

Effective access and delivery

Package and individual-host overrides are additional grants, not a separate deny engine. Disabling an exact host cannot remove access granted by a broader wildcard. *.example.com covers subdomains, not example.com. Mandatory agent execution/sign-in exceptions remain visible and locked. Their connection is not an optional model API permission or a credential grant.

The managed proxy accepts public HTTP on80 and HTTPS CONNECT on443. A DNS package does not grant another port, a private address, a database route, an HTTP method, or a URL path. * still means public websites on those supported ports. Private Services and nonstandard ports use separately approved managed resource routes. DNS rebinding and private-address checks are unchanged.

Saving a scope materializes the desired policy only for repositories using inheritance. Changes to an enforced restricted container enqueue the existing durable workspace.egress.reconcile command. The repository Internet policy view shows pending, applied, unconfirmed or failed; only a host result with reloadVerified:true confirms application. A queued command or a saved revision is not confirmation. Mode changes or legacy containers still need explicit recreation. Saving packages never restarts an agent, container or provider.

For permanent public-site additions requested by an agent, use session request_repository_network_access with hosts, a secret-free reason and optional idempotency UUID. Its fixed public HTTP/HTTPS ports are 80 and 443. The existing Approvals inbox selects host actions while keeping repository scope and safety limits mandatory. An authorized manual decision adds the selected hosts to this repository without removing previous choices. They survive sessions and container restarts until removed in Network settings. Poll get_repository_network_access_status: a saved persisted or queued rule is separate from a host-confirmed applied gateway revision; provision-error requires host/gateway repair. This typed path does not convert older session permission documents. Workflow and status meanings.

Catalog, selection and desired-policy writes use a synchronous SQLite savepoint. A failed write restores the touched in-memory repository/workspace records as well as SQL commands and revisions. Network delivery is sent only after this commit. Optimistic catalog/selection revisions reject stale saves without silently overwriting another client.

API and command line

./devctl network packages scopes
./devctl network packages catalog
./devctl network packages show '{"kind":"repository","id":"my-repository"}'
./devctl network packages save '{"scope":{"kind":"user"},"catalogRevision":0,"selection":{"revision":0,"packages":{"infrastructure-default:GitHub":false},"hosts":[]}}'

Read the actual revision immediately before a write. Omitted package entries inherit; false disables a local package contribution. To remove all local overrides, save packages:{} and hosts:[] at the current revision. Legacy repository adoption also requires adoptInheritance:true. Never send a private key, URL credential, owner override or IP address in these bodies.

Operator MCP discovers these exact real routes through controller_operations and calls them through controller_request, preserving the same server-user boundary. Session MCP get_project_network_policy includes its primary repository's package/authority view. configure_project_network_policy remains a manually approved full-policy replacement, within the team's approved authority; it switches that repository back to an explicit policy. A secondary checkout cannot change a shared container's primary policy. An ordinary approval does not lift team authority or count as gateway delivery; administrator exception escalation is a separate approval feature and is not implied by these package settings.

The first package catalog is derived from existing template categories, including source-control APIs, package registries, image registries/CDNs, language tooling, documentation, hosting APIs and the reviewed AI-provider domain groups. No additional domain was guessed or enabled as part of this grouping. Sources and provider-specific limitations remain in Internet policy and the AI-provider inventory.

Validation

The isolated feature cohort passed49 ordinary cases, including25 new contracts, real HTTP/SQLite/MCP, CLI, actual shared App/DOM and native keyboard cases. A focused native3-case supplement passed after moving one fixture assertion to the real HTTP response. Production bytes remained unchanged between those observations. Contracts/controller and TUI/CLI source-alias noEmit checks passed in the corresponding runs. These observations are not a whole-repository coverage result or a deployed gateway test.

The durable-delivery regression uses a disposable SQLite database, restart and an explicitly synthetic host receipt; it does not operate Docker. A separate intentional SQLite enqueue failure verifies rollback and recovery. No live policy, credential, cloud resource or production container was changed.

An active autonomous Run may hold the existing capability-mutation lock. A scope save affecting that repository fails atomically rather than changing its signed capabilities in the background. Use the approved Run reconfiguration path or wait for that Run. Generated site assets and demo routes require the normal integration build and checks before publication.