Aggrega Wasm Linter Socket schema
Generated reference. Do not edit by hand — regenerate from the published JSON Schema.
Schema id: https://aggrega.ai/schemas/wasm-linter-v1beta1.schema.json
The wire shapes the linter socket consumes (LinterInput) and emits (LinterOutput). The linter runs at publish time over a previous-version + proposed-version entity pair (the schema-evolution rule) and at workspace lint time over individual entities (per-rule structural rules). One shipping Wasm plugin hosts many rules; the plugin selects which rule to run by LinterInput.rule_id. This schema is the single source of both wire shapes: the Go, Rust and TypeScript payload types are generated from it into the shared plugin-ABI package, and each plugin kit re-exports those generated types rather than declaring its own copy.
One of the following shapes
LinterInputLinterOutput
Definitions
LinterInput
The payload the host hands the publishing-linter plugin on each invocation. rule_id selects which rule the plugin dispatches to. entity_kind identifies the entity kind being linted (Component, Feature, Recipe, FeatureRecipe, SchemaLibrary, MappingLibrary, Aggregate). proposed carries the parsed entity structure being classified (the host parses YAML to JSON before sending; the plugin never sees raw bytes). previous carries the parsed previous-version entity for the schema-evolution rule; omitted when not applicable. implemented_component carries a related entity of a different kind — the Component a linted Recipe realizes — for rules that compare an entity against a contract another entity declares; omitted when not applicable. release and components carry the rest of a Release for a rule that reads one whole — proposed is then the Aggregate the Release deploys, release that Release, and components the Component each of the Aggregate’s component instances is an instance of; both are omitted on every other input. policies carries the per-workspace publishing-discipline configuration the rule consults.
| Property | Type | Required | Description |
|---|---|---|---|
rule_id | string | yes | The rule the plugin should dispatch to, named by its rule id — the same kebab-case identifier the resulting finding carries in rule_id, so a suppressed or reported rule is named the same way on every surface. The recognised set is whatever the shipped plugin dispatches; a rule id the plugin does not recognise produces an ‘unknown_rule’ finding rather than a silent pass. |
entity_kind | string (enum) | yes | The entity kind the proposed/previous values encode. The schema-evolution rule’s classification varies per kind; structural rules scope to specific kinds. Allowed values: "Component", "Feature", "Recipe", "FeatureRecipe", "SchemaLibrary", "MappingLibrary", "Aggregate" |
proposed | object | yes | Parsed structure of the entity being classified. The host converts YAML to JSON before sending, so the plugin receives an already-structured value and never sees raw bytes. On the input of a rule that reads a whole Release it is the Aggregate that Release deploys. On every input every parameter value is removed before the entity is handed over, because a parameter’s value can be the credential itself, so no parameter value reaches a linter plugin through this field. An Aggregate keeps its spec.parameters declarations, each holding only the keys the Aggregate schema admits on a parameter declaration other than default, and every declaration nested under properties, items and valuesType is held to the same: a default is removed rather than replaced, so a plugin cannot tell whether a declaration gives one, and a key the schema does not admit there is removed with whatever it holds. The parameters block of each module under spec.aggregates, which carries the values passed to that module, is removed whole, as is spec.parameters on an entity of any other kind. Template text that reads a parameter is kept as written. |
previous | object | no | Parsed structure of the previous-version entity, for rules that perform pairwise comparison (schema-evolution), with its parameter values removed exactly as they are from proposed. Omitted when the rule does not need a previous-version reference (e.g., first publication, structural-only rules). |
implemented_component | object | no | Parsed structure of the Component a linted Recipe names in spec.implements, resolved by the host. It is a related entity of a DIFFERENT kind from the one being linted, which is what distinguishes it from previous: previous carries another version of the same entity, while this carries the Component whose declared output contract the Recipe realizes. The host resolves it through the same catalog lookup a build uses, keyed on the Component’s name, so all three pin forms spec.implements accepts (unversioned, exact, major-compatible range) reach the same entry. Omitted when the linted entity is not a Recipe, when it names no Component, or when no Component of that name is reachable in the workspace’s catalog directories. An absent value means the comparison is unavailable, not that the contract is empty: a rule that reads this field emits no finding when it is absent. |
release | object | no | Parsed structure of the Release a release-scoped lint names, with its extends chain folded in, so a child Release carries what it inherits from its base. The host converts it from YAML to JSON as it does proposed. Its spec.parameters block holds the values that fulfil the Aggregate’s parameters, so it is removed whole before the Release is handed over: a parameter’s value can be the credential itself, no rule reads the block, and so no parameter value reaches a linter plugin through this field. Present only on the input of a rule that reads a whole Release, where proposed is the Aggregate this Release deploys, with its parameter values removed as proposed describes; omitted on every other input. |
components | map of object | no | The Component each component instance of the Aggregate is an instance of, keyed by the instance name the Aggregate gives it, which is the same key the Aggregate’s and the Release’s own components maps use. Each value is the Component the instance’s type resolves to, with any extends chain folded in, converted to JSON as implemented_component is. An instance whose Component is not reachable in the workspace’s catalog directories is absent, and a rule reads that absence as unavailable rather than as a Component declaring nothing. Present only beside release, on the input of a rule that reads a whole Release; omitted on every other input. |
source_path | string | no | Filesystem path the entity was loaded from. Populated by host callers walking the catalog filesystem; consumed by path-aware rules (e.g., category-matches-directory). Omitted when the caller has no path context. |
policies | Policies | no | The per-workspace publishing-discipline configuration the rule consults, carried as a Policies object the host assembles from the workspace configuration and any command-line overrides. |
Additional properties are not permitted.
LinterOutput
The response shape the publishing-linter plugin emits. findings carries one entry per rule invocation that produced a result. The schema-evolution rule emits exactly one finding (the classification verdict); structural rules may emit zero (no violations) or many (one per offence).
| Property | Type | Required | Description |
|---|---|---|---|
findings | Diagnostic[] | yes | Per-rule findings produced by the plugin invocation, in plugin emit order. |
error | string | no | A failure message set when the guest ran but could not complete the operation; absent on success. It is distinct from any diagnostics the output carries: diagnostics report issues found during a run that still produced a result, while error reports that the operation itself did not complete. The host surfaces a present error as a failed plugin invocation. |
Additional properties are not permitted.
Policies
Per-workspace publishing-discipline configuration the rule set consults, assembled by the host from the workspace configuration’s publishing-discipline settings and any command-line overrides. This schema is the contract for the shape. Field omission defaults each flag to false, and the host writes only the fields whose value is not the default.
| Property | Type | Required | Description |
|---|---|---|---|
allow_dynamic_refs | boolean | no | When true, $dynamicAnchor / $dynamicRef usage in SchemaLibrary entries is permitted (suppresses the dynamic-refs rule). Default false. |
allow_id_overrides | boolean | no | When true, $id overrides in SchemaLibrary entries are permitted (suppresses the id-overrides rule). Default false. |
allow_direct_x_aggrega_extensions | boolean | no | When true, direct x-aggrega-selector / x-aggrega-inject authoring is permitted (suppresses the x-aggrega-discouragement rule). Default false. |
allow_aggrega_ai_prefix | boolean | no | When true, the annotation-prefix rule is suppressed entirely (both the bare aggrega.ai/ check and the feature.aggrega.ai/ kind-conditional check). Default false. |
allow_nonstandard_names | boolean | no | When true, name-shape violations are permitted (suppresses the name-shape rule). Default false. |
allow_category_mismatches | boolean | no | When true, suppress the category-matches-directory rule’s findings. The standard-catalog convention requires Components under core/ |
allow_undeclared_recipe_provides | boolean | no | When true, suppress the provides-declared-by-component rule’s findings. That rule reports each key a Recipe publishes in spec.provides that the Component named by its spec.implements does not declare in the provides pillar of its spec.schema. Publishing beyond the declared contract is accepted at build time, so the finding is advisory; a workspace whose Recipes deliberately publish keys their Component does not declare opts out here. Default false. |
allow_connection_credential_mismatches | boolean | no | When true, suppress the connection-credential-matches-target-key rule’s findings. That rule reads a whole Release and compares, for each connection whose target declares the key it requires of its callers, the credential the connection presents with the key the target holds: it reports two ends naming different secrets, and a key declared at one end only. Agreement between the two ends is a catalog convention rather than something a build checks, so the finding is advisory; a workspace whose two ends deliberately differ opts out here. Default false. |
Additional properties are not permitted.