Package Model
An A3S cognitive package is an npm-like versioned distribution unit. It may contain native capabilities, declarative cognitive content, or both, and may depend on other cognitive packages by package ID and SemVer range. Every surface shares one signed identity, generation, and uninstall boundary.
A typical schema-v3 package has this shape:
Only the manifest and README.md names are fixed. Contribution paths are declared by the manifest.
Schema-v3 surfaces
In this model, a Tool is not an MCP tools/list item. A Tool keeps its own CLI or HTTP contract; Use does not translate every workload into a private universal protocol. Static UI is not a Runtime workload either. Only its declared Tool or MCP backend enters Runtime.
Tool, MCP, OKF, Flow, Skill, and UI share the schema-v3 package baseline. The current graph lifecycle provides bounded SemVer resolution, an exact Registry/TUF lock, dependency-forward preparation, retained shared dependencies, one durable cutover, reverse retirement, exact-generation drain, and crash replay. Flow uses only the a3s-flow engine and binds Native TypeScript source evidence to explicit Tool/MCP/OKF edges. A3S Code composes local Tool Task, stdio MCP, Flow preflight, Skill, and UI adapters. The standalone lifecycle adds scope-isolated SQLite/FTS5 OKF plus Flow preflight only from an explicit absolute compiler path. Production Runtime Service, HTTP MCP/Gateway, managed Knowledge/UI composition, distributed Flow, and complete cross-platform host qualification remain release blockers; missing host evidence stays unpublished.
OKF is not an executable workload. It is a shareable knowledge package: each non-reserved concept is UTF-8 Markdown with YAML frontmatter, the file path is concept identity, standard Markdown links form the knowledge graph, and type is required. A3S Use accepts only OKF v0.2 and provides no older-format fallback. Raw PDF, Office, image, or web sources do not become OKF authority directly; an independent compiler must emit a conformant bundle first.
ACL manifest
Packages use a3s-use-extension.acl, parsed by A3S ACL. ACL means A3S Agent Configuration Language, not HCL.
Only schema v3 is accepted. It defines repeatable named surfaces, package dependencies, a required bounded UTF-8 README.md, and an acyclic readiness graph. Superseded preview manifests and receipts are rejected with cleanup and reinstall guidance. All paths are relative to the package root. Activation rejects path traversal, links, archive ambiguity, oversized packages, provenance drift, and incompatible host ranges. The optional route is a human alias: duplicates are allowed, and explicit ambiguous lookup fails closed.
The repository contains executable plugin-v3.acl, knowledge plugin-v3-okf.acl, and an all-six-surface plugin-v3-cognitive fixture.
Package dependencies and exact lock
A dependency block may contain only a canonical package ID and canonical SemVer requirement. The package cannot select its download URL, Registry, trust root, channel, target, or a mutable tag. The host resolves the complete transitive closure from enabled named Registries and fails closed on a missing release, incompatible constraints, a cycle, a resolution bound, or the same dependency identity appearing in multiple Registries.
The canonical a3s.use.plugin-package-lock.v1 freezes each selected version and dependency edge, archive/package/manifest digests, host target and Use version, Registry name and URL, channel and target, TUF root identity, and TUF role versions. The operation plan binds the lock digest. Apply revalidates the complete lock before downloading the first archive.
Shared dependencies are not recommitted. A Retain node is reusable only when the exact Registry-backed generation is installed, enabled, and visible in the current capability snapshot. Direct uninstall is rejected while another installed package depends on the target.
The public CognitivePackageManager accepts a root Registry and a bounded set of host-injected dependency Registries. It persists the exact root lock plus admitted pending manifest/generation evidence, so a published install can finish incomplete journals and reverse uninstall can resume even after root metadata has already been removed. Product hosts inject surface owners through CognitivePackageLifecycleFactory; the standalone factory never substitutes a missing Runtime, Gateway, or Knowledge provider. Its Flow owner is enabled only by an explicit absolute compiler path, and failed candidate preparation remains unpublished while retaining exact replay evidence.
Surface dependencies and readiness
Surfaces are not installed independently. The Surface Reconciler builds a complete dependency closure for one package generation:
- Tool and MCP require an explicit Runtime provider that satisfies workload, network, resource, and isolation requirements.
- An OKF surface must pass frontmatter, path, link, size, and content-digest checks; A3S Knowledge indexes only a generation atomically promoted by the host.
- Flow source must match its digest, pass typed
a3s-flowpreflight, and wait for every required Tool/MCP/OKF dependency. - Skill content must match its digest, and all required Flow or direct dependencies must be usable.
- UI content must be intact, with every declared backend binding authorized.
- One capability generation is published atomically only after every required surface is ready. Optional failure may produce
degraded; required failure withholds it.
Identity and ownership
- package ID: stable lifecycle identity, such as
acme/research; - generation: one immutable installed content set; upgrade creates a new generation;
- route: optional presentation/CLI alias that may be duplicated and never owns the package;
- receipt: records files, projections, and resources owned by a generation;
- grant: binds actor, scope, permissions, and exact generation.
Uninstall removes receipt-owned content only. Plugin data is retained by default; permanent purge is a separate, explicit, user-only operation.