@almadar/core 8.4.0 → 8.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -70,6 +70,29 @@ interface OwnershipOverlayEntry {
70
70
  ownerField: string;
71
71
  }
72
72
 
73
+ /**
74
+ * Recursive JSON Schema. Intentionally narrow — only the keywords V2's
75
+ * signature → schema generator emits. Custom `x-*` extensions carry
76
+ * descriptive metadata (synonyms, label) that doesn't shape validation
77
+ * but stays in the schema for prompt rendering / studio UIs.
78
+ */
79
+ interface JsonSchema {
80
+ type?: JsonSchemaType | ReadonlyArray<JsonSchemaType>;
81
+ description?: string;
82
+ properties?: Readonly<Record<string, JsonSchema>>;
83
+ required?: ReadonlyArray<string>;
84
+ additionalProperties?: boolean | JsonSchema;
85
+ items?: JsonSchema;
86
+ enum?: ReadonlyArray<string | number | boolean>;
87
+ oneOf?: ReadonlyArray<JsonSchema>;
88
+ anyOf?: ReadonlyArray<JsonSchema>;
89
+ default?: string | number | boolean | ReadonlyArray<unknown> | Readonly<Record<string, unknown>> | null;
90
+ /** Knob's `@synonyms` from the source `.lolo`. */
91
+ 'x-synonyms'?: string;
92
+ /** Knob's `@label` from the source `.lolo`. */
93
+ 'x-label'?: string;
94
+ }
95
+ type JsonSchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object' | 'null';
73
96
  /**
74
97
  * OrbitalSchema field type tags. The factory-signature extractor lifts
75
98
  * these directly from the resolved `.orb`; consumers narrow further at
@@ -201,6 +224,27 @@ interface FactorySignature {
201
224
  emittedEvents: ReadonlyArray<string>;
202
225
  /** Union of all `traits[].listenedEvents`. */
203
226
  listenedEvents: ReadonlyArray<string>;
227
+ /**
228
+ * JSON Schema for the orbital's `AnalysisOrbitalParams` shape. Walks
229
+ * `traitOverrides.<TraitName>.config.<knob>` with the exact type
230
+ * (string/number/boolean/array/object) lifted from each knob's
231
+ * declaration, `enum` from `enumValues`, recursive `items` for array
232
+ * slots, recursive `properties` for struct slots. Every level carries
233
+ * `additionalProperties: false` so the LLM cannot emit unknown trait
234
+ * names, invented knob keys, or out-of-set enum values.
235
+ *
236
+ * Pre-computed at signature extraction time by
237
+ * `tools/almadar-pattern-sync/src/std-ts/signatures/`. V2 tool-calling
238
+ * (`@almadar-io/agent`'s coordinator + per-orbital subagent) feeds this
239
+ * directly to OpenAI's `tool.parameters` with `strict: true` — the
240
+ * LLM is physically constrained by the schema instead of relying on
241
+ * post-hoc validation.
242
+ *
243
+ * Optional for backward compatibility: signatures emitted by older
244
+ * pattern-sync versions don't carry it, in which case V2 tools fall
245
+ * back to a loose schema + post-hoc validation.
246
+ */
247
+ paramsSchema?: JsonSchema;
204
248
  }
205
249
  /**
206
250
  * Aggregate catalog written to
@@ -406,4 +450,4 @@ interface FactoryCallPlanState {
406
450
  */
407
451
  declare function applyFactoryCallPlanMutation(state: FactoryCallPlanState, m: FactoryCallPlanMutation): FactoryCallPlanState;
408
452
 
409
- export { type CallSiteDiff, type FactoryCallPlanMutation, type FactoryCallPlanState, type FactoryCallSite, type FactoryCallSiteParams, type FactoryConfigParam, type FactoryEntitySignature, type FactoryPageSignature, type FactoryParamValue, type FactorySignature, type FactorySignatureCatalog, type FactorySignatureEntityField, type FactoryTraitSignature, type OrbitalCallInput, type OwnershipOverlayEntry, type PresentationNavItem, type PresentationOverlay, type RuleOverlay, type RuleOverlayEntry, type SchemaFieldType, type TraitOverlay, type TraitOverlayEntry, type TraitOverlayListener, type TranslationBinding, type TranslationResult, type TranslationWarning, applyFactoryCallPlanMutation, diffFactoryCalls, translateOverlaysToParams };
453
+ export { type CallSiteDiff, type FactoryCallPlanMutation, type FactoryCallPlanState, type FactoryCallSite, type FactoryCallSiteParams, type FactoryConfigParam, type FactoryEntitySignature, type FactoryPageSignature, type FactoryParamValue, type FactorySignature, type FactorySignatureCatalog, type FactorySignatureEntityField, type FactoryTraitSignature, type JsonSchema, type JsonSchemaType, type OrbitalCallInput, type OwnershipOverlayEntry, type PresentationNavItem, type PresentationOverlay, type RuleOverlay, type RuleOverlayEntry, type SchemaFieldType, type TraitOverlay, type TraitOverlayEntry, type TraitOverlayListener, type TranslationBinding, type TranslationResult, type TranslationWarning, applyFactoryCallPlanMutation, diffFactoryCalls, translateOverlaysToParams };
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { A as AgentEffect, a as AnimationDef, b as AnimationDefInput, c as Anima
5
5
  export { C as CORE_BINDINGS, a as CoreBinding, E as EvalContext, b as EventPayload, c as EventPayloadValue, d as Expression, e as ExpressionInput, f as ExpressionSchema, L as LogMeta, P as ParsedBinding, S as SExpr, g as SExprAtom, h as SExprAtomSchema, i as SExprInput, j as SExprSchema, k as collectBindings, l as getArgs, m as getOperator, n as isBinding, o as isSExpr, p as isSExprAtom, q as isSExprCall, r as isValidBinding, s as parseBinding, t as sexpr, w as walkSExpr } from './expression-BVRFm0sV.js';
6
6
  import { ResolvedIR, ResolvedEntity, ResolvedPage, ResolvedTrait, ChangesetValue, SchemaChange, CategorizedRemovals, PageContentReduction, SemanticSchemaChange } from './types/index.js';
7
7
  export { AgentCodeSearchResult, AgentCompactResult, AgentCompactStrategy, AgentContext, AgentGenerateOptions, AgentMemoryCategory, AgentMemoryRecord, AppSummary, AssetLoadStatus, BINDING_CONTEXT_RULES, BINDING_DOCS, BINDING_ROOTS, BindingContext, BindingRoot, BindingSchema, BridgeHealth, BusEvent, BusEventListener, BusEventSource, ChangeAuthor, ChangeSetDocument, ChangeSummary, CheckStatus, ContextExtensions, CreateFlow, DEFAULT_INTERACTION_MODELS, DeleteFlow, EditFlow, EffectTrace, EventEmit, EventKey, EventListen, EventLogEntry, GitHubLink, HistoryMeta, InteractionModel, InteractionModelInput, InteractionModelSchema, LazyService, ListInteraction, OrbitalVerificationAPI, PatternTypeSchema, PersistActionName, ResolvedEntityBinding, ResolvedField, ResolvedNavigation, ResolvedPattern, ResolvedSection, ResolvedSectionEvent, ResolvedTraitBinding, ResolvedTraitDataEntity, ResolvedTraitEvent, ResolvedTraitGuard, ResolvedTraitListener, ResolvedTraitState, ResolvedTraitTick, ResolvedTraitTransition, ResolvedTraitUIBinding, SaveOptions, SaveResult, SemanticChangeKind, ServerResponseTrace, ServiceAction, ServiceActionName, ServiceContract, ServiceEvents, SnapshotDocument, StatsView, StoreContract, StoreFilter, StoreFilterOp, TraitFieldRef, TraitFieldRefSchema, TraitStateSnapshot, TransitionFrom, TransitionTrace, Unsubscribe, ValidationDocument, ValidationIssue, ValidationMeta, ValidationResults, VerificationCheck, VerificationSnapshot, VerificationSummary, ViewFlow, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, getAllPatternTypes, getBindingExamples, getInteractionModelForDomain, inferTsType, isResolvedIR, isTraitFieldRef, toBindingRoot, validateBindingInContext } from './types/index.js';
8
- export { CallSiteDiff, FactoryCallPlanMutation, FactoryCallPlanState, FactoryCallSite, FactoryCallSiteParams, FactoryConfigParam, FactoryEntitySignature, FactoryPageSignature, FactoryParamValue, FactorySignature, FactorySignatureCatalog, FactorySignatureEntityField, FactoryTraitSignature, OrbitalCallInput, OwnershipOverlayEntry, PresentationNavItem, PresentationOverlay, RuleOverlay, RuleOverlayEntry, SchemaFieldType, TraitOverlay, TraitOverlayEntry, TraitOverlayListener, TranslationBinding, TranslationResult, TranslationWarning, applyFactoryCallPlanMutation, diffFactoryCalls, translateOverlaysToParams } from './factory/index.js';
8
+ export { CallSiteDiff, FactoryCallPlanMutation, FactoryCallPlanState, FactoryCallSite, FactoryCallSiteParams, FactoryConfigParam, FactoryEntitySignature, FactoryPageSignature, FactoryParamValue, FactorySignature, FactorySignatureCatalog, FactorySignatureEntityField, FactoryTraitSignature, JsonSchema, JsonSchemaType, OrbitalCallInput, OwnershipOverlayEntry, PresentationNavItem, PresentationOverlay, RuleOverlay, RuleOverlayEntry, SchemaFieldType, TraitOverlay, TraitOverlayEntry, TraitOverlayListener, TranslationBinding, TranslationResult, TranslationWarning, applyFactoryCallPlanMutation, diffFactoryCalls, translateOverlaysToParams } from './factory/index.js';
9
9
  export { C as ComposeBehaviorsInput, a as ComposeBehaviorsResult, E as EventWiringEntry, L as LayoutStrategy, b as applyEventWiring, c as composeBehaviors, d as detectLayoutStrategy } from './compose-behaviors-TSp2c_dn.js';
10
10
  export { PATTERN_TYPES, PatternConfig, PatternType, isValidPatternType } from '@almadar/patterns';
11
11
  export { BFSNode, BFSPathNode, EdgeWalkTransition, GraphTransition, GuardPayload, ReplayStep, ReplayTransition, StateEdge, WalkStep, buildEdgeCoveringWalk, buildGuardPayloads, buildReplayPaths, buildStateGraph, collectReachableStates, extractPayloadFieldRef, walkStatePairs } from './state-machine/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/core",
3
- "version": "8.4.0",
3
+ "version": "8.5.0",
4
4
  "description": "Core schema types and definitions for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",