Requires Agent Code ≥ 0.1.3, the first supporting version. The README and JSDoc refer to it as "Agent Code ≥ the first supporting version". Older hosts refuse a manifest that requests net.origins.
Feature-detect api.secrets. It is optional (secrets?) on every API-v2 context. Older v2 hosts do not provide it, and a secrets-only extension requests no new permission, so an older host still loads it. Check if (context.api.secrets) before use, and never fall back to api.storage for a credential.
net.originspermission + manifestnetworkOrigins(API v2):- 1–4 exact HTTPS origins that
net.fetchmay reach; - the install and update consent dialog lists them;
- no wildcards, paths, IP literals,
localhost,.localor trailing dots.
- 1–4 exact HTTPS origins that
net.fetch:responseType: 'text' | 'base64'in the init;bodyEncoding: 'text' | 'base64'in the result;- hosts older than Agent Code ≥ the first supporting version ignore
responseType, so checkbodyEncoding.
- Transport attestation contract exported for services:
TRANSPORT_ATTESTATION_HEADER(x-agent-code-transport) andTRANSPORT_ATTESTATION(service/lan), with the rules for when a service may trust it. api.secrets(get,set,delete) on views and runtimes, API v2, no permission:- values are encrypted with the OS keychain and scoped to the extension id;
- they are deleted on uninstall.
- Documented:
NetFetchInitnames the verbhttpMethod(older hosts readmethod);- the fixed timeouts: 10 s for private addresses, 15 s for declared origins;
- the body and response caps;
- runtimes and views receive the same
net.fetchresponses (the runtime channel admits a result up to the 256 KiB cap after base64); - invalid view arguments now reject with
Invalid arguments for <method>.instead of leaving the promise pending;