/** * Common schema definitions shared across AXM configuration files. * * @experimental This API is unstable and may change without notice. */ import * as Schema from "effect/Schema"; import * as Option from "effect/Option"; /** * Author information for a manifest. * * @experimental This API is unstable and may change without notice. */ export declare const AuthorSchema: Schema.Struct<{ readonly name: Schema.String; readonly email: Schema.optional; readonly url: Schema.optional; }>; /** * Author information in runtime/domain models. * * @experimental This API is unstable and may change without notice. */ export interface Author { readonly name: string; readonly email: Option.Option; readonly url: Option.Option; } /** Convert schema-decoded author shape into runtime/domain Author. */ export declare const toAuthor: (author: Schema.Schema.Type) => Author; /** * Repository field for extension manifests. Accepts either a URL string * (or shorthand like `github:owner/repo`) or an npm-style object with * optional `type` and `directory` for monorepo subpaths. * * Matches the shape accepted by npm's `package.json` `repository` field. * * @experimental This API is unstable and may change without notice. */ export declare const RepositorySchema: Schema.Union; readonly url: Schema.NonEmptyString; readonly directory: Schema.optional; }>]>; /** * Inferred type for {@link RepositorySchema}. * * @experimental This API is unstable and may change without notice. */ export type Repository = Schema.Schema.Type; /** * Bugs field for extension manifests. Accepts either a URL string or an * npm-style object with optional `url` and `email`. * * @experimental This API is unstable and may change without notice. */ export declare const BugsSchema: Schema.Union; readonly email: Schema.optional; }>]>; /** * Inferred type for {@link BugsSchema}. * * @experimental This API is unstable and may change without notice. */ export type Bugs = Schema.Schema.Type; /** * License field for extension manifests. * * Accepts valid SPDX license expressions plus the npm-compatible * `UNLICENSED` literal for proprietary code that grants no license. * * @experimental This API is unstable and may change without notice. */ export declare const LicenseSchema: Schema.String; /** How an extension type is distributed. All current types are registry-distributed. */ export type ExtensionDistribution = "registry"; /** * Where an extension type's installed artifacts live: in per-agent locations * AXM can collide with, in workspace-owned locations, or nowhere of its own * (container types like pack). */ export type ExtensionPlacement = "per-agent" | "workspace" | "container"; /** What a governing standard covers for a type, when one exists. */ export type StandardGoverns = "package-body" | "runtime-protocol" | "host-file"; /** Workspace-level capability a type participates in. */ export type WorkspaceCapabilityKey = "instructions"; /** * One extension type's naming and capability-axis row. Every CONDITIONAL * parity obligation is a predicate over the five axis columns. */ interface ExtensionTypeRow { readonly plural: string; readonly label: string; readonly pluralLabel: string; readonly sentenceLabel: string; readonly pluralSentenceLabel: string; readonly distribution: ExtensionDistribution; readonly placement: ExtensionPlacement; readonly governs: StandardGoverns | null; readonly installInputs: boolean; readonly workspaceCapability: WorkspaceCapabilityKey | null; } /** * Single source of truth for extension type naming. Row order is the canonical * display order. Every other type-naming export in this module derives from * this table, so a new extension type is exactly one row here: a missing * column is TS2741, an excess column is TS2353, and every downstream * `satisfies Record` table fails until the new type is * decided everywhere. * * @experimental This API is unstable and may change without notice. */ export declare const EXTENSION_TYPE_TABLE: { readonly skill: { readonly plural: "skills"; readonly label: "Skill"; readonly pluralLabel: "Skills"; readonly sentenceLabel: "skill"; readonly pluralSentenceLabel: "skills"; readonly distribution: "registry"; readonly placement: "per-agent"; readonly governs: "package-body"; readonly installInputs: false; readonly workspaceCapability: null; }; readonly "mcp-server": { readonly plural: "mcps"; readonly label: "MCP Server"; readonly pluralLabel: "MCP Servers"; readonly sentenceLabel: "MCP server"; readonly pluralSentenceLabel: "MCP servers"; readonly distribution: "registry"; readonly placement: "per-agent"; readonly governs: "runtime-protocol"; readonly installInputs: true; readonly workspaceCapability: null; }; readonly subagent: { readonly plural: "subagents"; readonly label: "Subagent"; readonly pluralLabel: "Subagents"; readonly sentenceLabel: "subagent"; readonly pluralSentenceLabel: "subagents"; readonly distribution: "registry"; readonly placement: "per-agent"; readonly governs: null; readonly installInputs: false; readonly workspaceCapability: null; }; readonly rule: { readonly plural: "rules"; readonly label: "Rule"; readonly pluralLabel: "Rules"; readonly sentenceLabel: "rule"; readonly pluralSentenceLabel: "rules"; readonly distribution: "registry"; readonly placement: "workspace"; readonly governs: "host-file"; readonly installInputs: false; readonly workspaceCapability: "instructions"; }; readonly hook: { readonly plural: "hooks"; readonly label: "Hook"; readonly pluralLabel: "Hooks"; readonly sentenceLabel: "hook"; readonly pluralSentenceLabel: "hooks"; readonly distribution: "registry"; readonly placement: "per-agent"; readonly governs: null; readonly installInputs: false; readonly workspaceCapability: null; }; readonly knowledge: { readonly plural: "knowledge"; readonly label: "Knowledge"; readonly pluralLabel: "Knowledge"; readonly sentenceLabel: "knowledge bundle"; readonly pluralSentenceLabel: "knowledge bundles"; readonly distribution: "registry"; readonly placement: "workspace"; readonly governs: "package-body"; readonly installInputs: false; readonly workspaceCapability: null; }; readonly pack: { readonly plural: "packs"; readonly label: "Pack"; readonly pluralLabel: "Packs"; readonly sentenceLabel: "pack"; readonly pluralSentenceLabel: "packs"; readonly distribution: "registry"; readonly placement: "container"; readonly governs: null; readonly installInputs: false; readonly workspaceCapability: null; }; }; export type ExtensionType = keyof typeof EXTENSION_TYPE_TABLE; export type ExtensionTypePlural = (typeof EXTENSION_TYPE_TABLE)[ExtensionType]["plural"]; export declare const extensionTypes: ReadonlyArray; export declare const extensionTypePluralSegments: ReadonlyArray; export declare const isExtensionType: (value: string | undefined) => value is ExtensionType; export declare const isExtensionTypePlural: (value: string | undefined) => value is ExtensionTypePlural; export declare const extensionTypeFromPlural: Record; export declare const extensionTypeToPlural: Record; export declare const toExtensionType: (segment: ExtensionTypePlural) => ExtensionType; export declare const toExtensionTypePlural: (type: ExtensionType) => ExtensionTypePlural; export declare const extensionTypeLabels: Record; export declare const extensionTypePluralLabels: Record; export declare const extensionTypeSentenceLabels: Record; export declare const extensionTypePluralSentenceLabels: Record; /** * Plural extension-type segments that may appear as dependency keys — * everything except `packs`. Packs cannot depend on other packs. * * @experimental This API is unstable and may change without notice. */ export type NonPackExtensionTypePlural = Exclude; export declare const nonPackExtensionTypePluralSegments: ReadonlyArray; type ExtensionTypeRows = typeof EXTENSION_TYPE_TABLE; /** * Extension types whose table row matches an axis value. Derived, never * hand-written: an axis change on a row updates every union below, and the * exact-membership pins in extension-type-table.type-test.ts fail compile in * both directions if a union gains or loses a member. */ type TypesWhere = { [Key in ExtensionType]: ExtensionTypeRows[Key][Axis] extends Value ? Key : never; }[ExtensionType]; /** Extension types materialized into agent-owned locations. */ export type PerAgentType = TypesWhere<"placement", "per-agent">; /** Extension types materialized into workspace-owned locations. */ export type WorkspaceType = TypesWhere<"placement", "workspace">; /** Extension types that coordinate other extensions instead of projecting directly. */ export type ContainerType = TypesWhere<"placement", "container">; /** Registry-distributed non-container extension types. */ export type RegistryType = PerAgentType | WorkspaceType; /** Extension types whose installs accept user-provided inputs. */ export type InputType = TypesWhere<"installInputs", true>; /** Extension types whose governing standard covers the package body. */ export type BodyGovernedType = TypesWhere<"governs", "package-body">; /** * Extension types a standard governs at all. The agent catalog records a * standards-compliance grade for exactly these, so the grade is never * hand-applied per capability schema. */ export type SpecTrackedType = TypesWhere<"governs", StandardGoverns>; /** * Extension types that double as a workspace-level capability toggle. These * carry workspace configuration of their own, so surfaces that split extension * management from workspace management group them with the workspace. */ export type WorkspaceCapabilityType = TypesWhere<"workspaceCapability", WorkspaceCapabilityKey>; export declare const PER_AGENT_EXTENSION_TYPES: ReadonlyArray; export declare const WORKSPACE_EXTENSION_TYPES: ReadonlyArray; export declare const CONTAINER_EXTENSION_TYPES: ReadonlyArray; export declare const REGISTRY_EXTENSION_TYPES: ReadonlyArray; export declare const INPUT_EXTENSION_TYPES: ReadonlyArray; export declare const BODY_GOVERNED_EXTENSION_TYPES: ReadonlyArray; export declare const SPEC_TRACKED_EXTENSION_TYPES: ReadonlyArray; export declare const WORKSPACE_CAPABILITY_EXTENSION_TYPES: ReadonlyArray; /** Extension types managed purely as extensions, with no workspace capability. */ export declare const EXTENSION_ONLY_TYPES: ReadonlyArray>; /** * Fully qualified name regex: `@//` where handle and name * use the canonical handle, plural extension type, and extension name grammar. * * @experimental This API is unstable and may change without notice. */ export declare const FQN_PATTERN: RegExp; /** * Fully qualified name regex restricted to non-pack extension types. Matches * `@//` where `` is any plural extension type other * than `packs`. * * @experimental This API is unstable and may change without notice. */ export declare const NON_PACK_FQN_PATTERN: RegExp; /** * Fully qualified name regex restricted to the pack extension type. Matches * `@/packs/`. * * @experimental This API is unstable and may change without notice. */ export declare const PACK_FQN_PATTERN: RegExp; /** * Canonical extension short name regex. */ export declare const EXTENSION_NAME_PATTERN: RegExp; /** * Canonical extension short name schema shared by generic extension surfaces. */ export declare const ExtensionNameSchema: Schema.brand; export type ExtensionName = Schema.Schema.Type; export declare const decodeExtensionNameSync: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => string & import("effect/Brand").Brand<"ExtensionName">; /** * Extension type enumeration. * * @experimental This API is unstable and may change without notice. */ export declare const ExtensionTypeSchema: Schema.Literals; /** * Plural extension-type segment enumeration used by route/FQN surfaces. * * @experimental This API is unstable and may change without notice. */ export declare const ExtensionTypePluralSchema: Schema.Literals; /** * Structured FQN parts schema composed from the canonical handle, type, and name schemas. * * @experimental This API is unstable and may change without notice. */ export declare const ExtensionFqnPartsSchema: Schema.Struct<{ readonly owner: Schema.brand; readonly type: Schema.Literals; readonly name: Schema.brand; }>; /** * Inferred type for parsed FQN parts. * * @experimental This API is unstable and may change without notice. */ export type ExtensionFqnParts = Schema.Schema.Type; /** * Parse a fully qualified name string into validated structured parts. * * @experimental This API is unstable and may change without notice. */ export declare const parseExtensionFqnParts: (input: string) => ExtensionFqnParts | undefined; /** * Parse an extension spec string (with optional version constraint) into parts. * Strips the version constraint suffix and returns the validated FQN parts. * * @experimental This API is unstable and may change without notice. */ export declare const parseExtensionSpecParts: (input: string) => ExtensionFqnParts | undefined; /** * Fully qualified name string schema validated against the composed handle, * type, and name patterns. Annotated so JSON Schema generation surfaces a * `pattern` and a top-level `ExtensionFqn` definition that `Schema.Record` * keys can reference via `propertyNames`. * * @experimental This API is unstable and may change without notice. */ export declare const ExtensionFqnSchema: Schema.String; /** * Inferred type for ExtensionFqn schema. * * @experimental This API is unstable and may change without notice. */ export type ExtensionFqn = Schema.Schema.Type; /** * Fully qualified name string schema restricted to non-pack extension types. * Used wherever pack-typed FQNs are not permitted, like the keys of a pack * manifest's `dependencies` map. * * @experimental This API is unstable and may change without notice. */ export declare const NonPackExtensionFqnSchema: Schema.String; /** * Inferred type for NonPackExtensionFqn schema. * * @experimental This API is unstable and may change without notice. */ export type NonPackExtensionFqn = Schema.Schema.Type; /** * Fully qualified name string schema restricted to the pack extension type. * Used wherever only pack-typed FQNs are permitted, like the items of a * non-pack manifest's `recommendedPacks` list. * * @experimental This API is unstable and may change without notice. */ export declare const PackFqnSchema: Schema.String; /** * Inferred type for PackFqn schema. * * @experimental This API is unstable and may change without notice. */ export type PackFqn = Schema.Schema.Type; /** * Extension spec — fully qualified extension name with an optional version * constraint suffix. Accepts `@owner/type/name` or `@owner/type/name@constraint` * where the FQN portion validates through ExtensionFqnSchema and the optional * constraint validates as a semver VersionRange. * * @experimental This API is unstable and may change without notice. */ export declare const ExtensionSpecSchema: Schema.brand; /** * Inferred type for ExtensionSpec schema. * * @experimental This API is unstable and may change without notice. */ export type ExtensionSpec = Schema.Schema.Type; /** * Pack spec — fully qualified pack name with an optional version constraint * suffix. Accepts `@owner/packs/name` or `@owner/packs/name@constraint` where * the FQN portion validates through PackFqnSchema and the optional constraint * validates as a semver VersionRange. * * @experimental This API is unstable and may change without notice. */ export declare const PackSpecSchema: Schema.brand; /** * Inferred type for PackSpec schema. * * @experimental This API is unstable and may change without notice. */ export type PackSpec = Schema.Schema.Type; /** * Map of fully-qualified extension names to semver constraints. * * @experimental This API is unstable and may change without notice. */ export declare const ExtensionDependencyConstraintMapSchema: Schema.$Record>; /** * Inferred type for extension dependency constraint maps. * * @experimental This API is unstable and may change without notice. */ export type ExtensionDependencyConstraintMap = Schema.Schema.Type; /** * Map of non-pack fully-qualified extension names to semver constraints. * Used for pack manifest `dependencies`, which cannot include other packs. * * @experimental This API is unstable and may change without notice. */ export declare const NonPackExtensionDependencyConstraintMapSchema: Schema.$Record>; /** * Inferred type for non-pack extension dependency constraint maps. * * @experimental This API is unstable and may change without notice. */ export type NonPackExtensionDependencyConstraintMap = Schema.Schema.Type; /** * Publish-time packaging options. * * Declared in the manifest rather than in workspace settings so the policy * travels with the package: whoever publishes a checkout produces the same * archive. Absent means every file under the package directory is published, * which is the default and the only behavior before this field existed. * * @experimental This API is unstable and may change without notice. */ export declare const ExtensionVisibilitySchema: Schema.Literals; /** @experimental This API is unstable and may change without notice. */ export type ExtensionVisibility = Schema.Schema.Type; export declare const PublishOptionsSchema: Schema.Struct<{ readonly visibility: Schema.optional>; readonly ignore: Schema.optional>; }>; /** @experimental This API is unstable and may change without notice. */ export type PublishOptions = Schema.Schema.Type; /** * Common base fields shared across manifest types. * Type-specific manifests provide their own `type` and `name` fields explicitly. * * @experimental This API is unstable and may change without notice. */ export declare const CommonManifestBaseFields: { publish: Schema.optional>; readonly ignore: Schema.optional>; }>>; metadata: Schema.optional>>; owner: Schema.brand; version: Schema.brand; description: Schema.optional; keywords: Schema.optional>; repository: Schema.optional; readonly url: Schema.NonEmptyString; readonly directory: Schema.optional; }>]>>; homepage: Schema.optional; license: Schema.optional; bugs: Schema.optional; readonly email: Schema.optional; }>]>>; authors: Schema.optional; readonly url: Schema.optional; }>>>; packages: Schema.optional; readonly versionRange: Schema.optional", ">="]>; readonly version: Schema.NonEmptyString; }>>; }>>, Schema.NonEmptyString, never, never>, "VersRange">>; }>>>; }; /** * Fields shared across non-pack extension manifests. These describe how an * extension relates to packs. * * @experimental This API is unstable and may change without notice. */ export declare const NonPackManifestFields: { enhances: Schema.optional>; requires: Schema.optional>; fallback: Schema.optional>; recommendedPacks: Schema.optional>>; standalone: Schema.optional; }; /** * Agent identifier enumeration for supported coding agents. * * Derived from `AGENT_IDS` in agents/types.ts — compile-time enforced, * no manual sync required. * * @experimental This API is unstable and may change without notice. */ export declare const AgentIdSchema: Schema.Literals; /** * Agent identifiers users may persist in `axm.json`. * * Synthetic materialization targets such as `universal` are known agents, but * they are injected by repository code rather than configured by users. * * @experimental This API is unstable and may change without notice. */ export declare const ConfigurableAgentIdSchema: Schema.Literals; /** * Inferred type for AgentId schema. * * @experimental This API is unstable and may change without notice. */ export type AgentId = Schema.Schema.Type; /** @experimental This API is unstable and may change without notice. */ export type ConfigurableAgentId = Schema.Schema.Type; export {}; //# sourceMappingURL=common.d.ts.map