Skip to main content
The .aispec file is a UTF-8 JSON document stored at the root of an .aipkg archive. It describes the package’s identity, metadata, capabilities, targeting, dependencies, and embedded assets. It corresponds to NuGet’s .nuspec but uses JSON instead of XML and contains AI•Pkg-specific fields.
File naming: {id}.aispec — the filename must match the id field inside the manifest.

JSON Schema


Field Reference

Required Fields

Capability Values

A package may declare multiple capabilities.

Permission Values

Platforms may enforce permissions at install or runtime. Installers must warn users when a package requests sensitive permissions (process:exec, secrets:read, env:write).

lspServers[] Fields

Each entry in lspServers configures one Language Server Protocol server the package installs.

hooks[] Fields

Each entry in hooks declares one lifecycle hook the package installs. Requires the hook capability. Hook event values:

Examples


Validation Rules

Beyond JSON Schema conformance, the registry enforces these additional rules:
  1. ID uniqueness: The combination of id + version must be unique on the registry.
  2. ID immutability: Once published, a version’s id cannot change.
  3. Version uniqueness: Once a version is published, it cannot be republished (even after deletion).
  4. Filename match: The .aispec filename must match the id field exactly.
  1. Icon format: iconFile must reference a valid square PNG (validated server-side).
  2. MCP server names: All mcpServers[].name values within a single package must be unique.
  3. LSP server names: All lspServers[].name values within a single package must be unique.
  4. Hook matcher scope: hooks[].matcher is only permitted when event is PreToolUse or PostToolUse. Setting it on any other event is a validation error.
  5. Hook capability: Packages that declare entries in hooks[] must include "hook" in capabilities.
  6. LSP capability: Packages that declare entries in lspServers[] must include "lsp-server" in capabilities.
  1. Dependency cycles: Circular dependencies are rejected at push time (server resolves the full graph).
  1. License: At least one of licenseExpression or licenseFile is strongly recommended. A warning (not error) is emitted if both are absent.

Relationship to .nuspec