@manifesto-ai/core 2.6.1 → 2.8.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.
package/dist/index.d.ts CHANGED
@@ -775,16 +775,6 @@ declare const SystemState: z.ZodObject<{
775
775
  timestamp: z.ZodNumber;
776
776
  context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
777
777
  }, z.core.$strip>>;
778
- errors: z.ZodArray<z.ZodObject<{
779
- code: z.ZodString;
780
- message: z.ZodString;
781
- source: z.ZodObject<{
782
- actionId: z.ZodString;
783
- nodePath: z.ZodString;
784
- }, z.core.$strip>;
785
- timestamp: z.ZodNumber;
786
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
787
- }, z.core.$strip>>;
788
778
  pendingRequirements: z.ZodArray<z.ZodObject<{
789
779
  id: z.ZodString;
790
780
  type: z.ZodString;
@@ -833,16 +823,6 @@ declare const Snapshot: z.ZodObject<{
833
823
  timestamp: z.ZodNumber;
834
824
  context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
835
825
  }, z.core.$strip>>;
836
- errors: z.ZodArray<z.ZodObject<{
837
- code: z.ZodString;
838
- message: z.ZodString;
839
- source: z.ZodObject<{
840
- actionId: z.ZodString;
841
- nodePath: z.ZodString;
842
- }, z.core.$strip>;
843
- timestamp: z.ZodNumber;
844
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
845
- }, z.core.$strip>>;
846
826
  pendingRequirements: z.ZodArray<z.ZodObject<{
847
827
  id: z.ZodString;
848
828
  type: z.ZodString;
@@ -1139,16 +1119,6 @@ declare const SystemDelta: z.ZodObject<{
1139
1119
  timestamp: z.ZodNumber;
1140
1120
  context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1141
1121
  }, z.core.$strip>>>;
1142
- appendErrors: z.ZodArray<z.ZodObject<{
1143
- code: z.ZodString;
1144
- message: z.ZodString;
1145
- source: z.ZodObject<{
1146
- actionId: z.ZodString;
1147
- nodePath: z.ZodString;
1148
- }, z.core.$strip>;
1149
- timestamp: z.ZodNumber;
1150
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1151
- }, z.core.$strip>>;
1152
1122
  addRequirements: z.ZodArray<z.ZodObject<{
1153
1123
  id: z.ZodString;
1154
1124
  type: z.ZodString;
@@ -1215,16 +1185,6 @@ declare const ComputeResult: z.ZodObject<{
1215
1185
  timestamp: z.ZodNumber;
1216
1186
  context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1217
1187
  }, z.core.$strip>>>;
1218
- appendErrors: z.ZodArray<z.ZodObject<{
1219
- code: z.ZodString;
1220
- message: z.ZodString;
1221
- source: z.ZodObject<{
1222
- actionId: z.ZodString;
1223
- nodePath: z.ZodString;
1224
- }, z.core.$strip>;
1225
- timestamp: z.ZodNumber;
1226
- context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1227
- }, z.core.$strip>>;
1228
1188
  addRequirements: z.ZodArray<z.ZodObject<{
1229
1189
  id: z.ZodString;
1230
1190
  type: z.ZodString;
@@ -1365,6 +1325,15 @@ declare function validate(schema: unknown): ValidationResult;
1365
1325
  */
1366
1326
  declare function explain(schema: DomainSchema, snapshot: Snapshot, path: SemanticPath): ExplainResult;
1367
1327
 
1328
+ /**
1329
+ * Check whether an action is available for a new invocation.
1330
+ */
1331
+ declare function isActionAvailable(schema: DomainSchema, snapshot: Snapshot, actionName: string): boolean;
1332
+ /**
1333
+ * Return all currently dispatchable actions in schema key order.
1334
+ */
1335
+ declare function getAvailableActions(schema: DomainSchema, snapshot: Snapshot): readonly string[];
1336
+
1368
1337
  /**
1369
1338
  * ComputedFieldSpec - Definition of a single computed field
1370
1339
  */
@@ -1479,6 +1448,7 @@ declare function toCanonical(obj: unknown): string;
1479
1448
  * - Non-finite numbers: null
1480
1449
  */
1481
1450
  declare function toJcs(value: unknown): string;
1451
+ declare function compareUnicodeCodePoints(a: string, b: string): number;
1482
1452
  /**
1483
1453
  * Parse canonical JSON string
1484
1454
  */
@@ -1778,10 +1748,18 @@ interface ManifestoCore {
1778
1748
  * Explain why a value is what it is.
1779
1749
  */
1780
1750
  explain(schema: DomainSchema, snapshot: Snapshot, path: SemanticPath): ExplainResult;
1751
+ /**
1752
+ * Check whether an action is currently dispatchable.
1753
+ */
1754
+ isActionAvailable(schema: DomainSchema, snapshot: Snapshot, actionName: string): boolean;
1755
+ /**
1756
+ * Return all currently dispatchable action names.
1757
+ */
1758
+ getAvailableActions(schema: DomainSchema, snapshot: Snapshot): readonly string[];
1781
1759
  }
1782
1760
  /**
1783
1761
  * Create a ManifestoCore instance
1784
1762
  */
1785
1763
  declare function createCore(): ManifestoCore;
1786
1764
 
1787
- export { AbsExpr, ActionSpec, AddExpr, AndExpr, AppendExpr, AtExpr, CallFlow, CeilExpr, CoalesceExpr, ComputeResult, ComputeStatus, ComputedFieldSpec, ComputedSpec, ConcatExpr, CoreErrorCode, type DependencyGraph, DivExpr, DomainSchema, EffectFlow, EndsWithExpr, EntriesExpr, EnumFieldType, EqExpr, ErrorValue, type EvalContext, EveryExpr, ExplainResult, ExprKind, type ExprNode, ExprNodeSchema, type ExprResult, FailFlow, FieldExpr, FieldSpec, FieldType, FilterExpr, FindExpr, FirstExpr, FlatExpr, FloorExpr, FlowKind, type FlowNode, FlowNodeSchema, FlowPosition, type FlowResult, type FlowState, type FlowStatus, FromEntriesExpr, GetExpr, GtExpr, GteExpr, HaltFlow, HasKeyExpr, HostContext, IfExpr, IfFlow, IncludesExpr, IndexOfExpr, Intent, IsNullExpr, KeysExpr, LastExpr, LenExpr, LitExpr, LtExpr, LteExpr, type ManifestoCore, MapExpr, MaxArrayExpr, MaxExpr, MergeExpr, type MergePatch, MinArrayExpr, MinExpr, ModExpr, MulExpr, NegExpr, NeqExpr, NotExpr, ObjectExpr, OmitExpr, OrExpr, Patch, PatchFlow, PatchOp, PatchPath, PatchSegment, PickExpr, PowExpr, PrimitiveFieldType, ReplaceExpr, Requirement, Result, ReverseExpr, RoundExpr, type SchemaHashInput, type SchemaHashMode, SchemaMeta, SemanticPath, SeqFlow, type SetPatch, SliceExpr, Snapshot, SnapshotMeta, SomeExpr, SplitExpr, SqrtExpr, StartsWithExpr, StateSpec, StrIncludesExpr, StrLenExpr, SubExpr, SubstringExpr, SumArrayExpr, SystemDelta, SystemState, ToBooleanExpr, ToLowerCaseExpr, ToNumberExpr, ToStringExpr, ToUpperCaseExpr, type TraceContext, TraceGraph, TraceNode, TraceNodeKind, TraceTermination, TrimExpr, TypeDefinition, TypeSpec, TypeofExpr, UniqueExpr, type UnsetPatch, ValidationError, ValidationResult, ValuesExpr, apply, applySystemDelta, buildDependencyGraph, canonicalEqual, compute, computeSync, createContext, createCore, createError, createFlowState, createInitialSystemState, createIntent, createSnapshot, createTraceContext, createTraceNode, detectCycles, err, evaluateComputed, evaluateExpr, evaluateFlow, evaluateFlowSync, evaluateSingleComputed, explain, extractDefaults, fromCanonical, generateRequirementId, generateRequirementIdSync, generateTraceId, getByPatchPath, getByPath, getTransitiveDeps, hasPath, hashSchema, hashSchemaEffective, hashSchemaEffectiveSync, hashSchemaSync, indexSegment, invalidResult, isErr, isErrorValue, isOk, isSafePatchPath, joinPath, lastSegment, mergeAtPatchPath, mergeAtPath, mergePatch, ok, parentPath, parsePath, patchPathToDisplayString, propSegment, semanticPathToPatchPath, setByPatchPath, setByPath, setPatch, sha256, sha256Sync, sortKeys, toCanonical, toJcs, topologicalSort, unsetByPatchPath, unsetByPath, unsetPatch, validResult, validate, withCollectionContext, withNodePath, withSnapshot };
1765
+ export { AbsExpr, ActionSpec, AddExpr, AndExpr, AppendExpr, AtExpr, CallFlow, CeilExpr, CoalesceExpr, ComputeResult, ComputeStatus, ComputedFieldSpec, ComputedSpec, ConcatExpr, CoreErrorCode, type DependencyGraph, DivExpr, DomainSchema, EffectFlow, EndsWithExpr, EntriesExpr, EnumFieldType, EqExpr, ErrorValue, type EvalContext, EveryExpr, ExplainResult, ExprKind, type ExprNode, ExprNodeSchema, type ExprResult, FailFlow, FieldExpr, FieldSpec, FieldType, FilterExpr, FindExpr, FirstExpr, FlatExpr, FloorExpr, FlowKind, type FlowNode, FlowNodeSchema, FlowPosition, type FlowResult, type FlowState, type FlowStatus, FromEntriesExpr, GetExpr, GtExpr, GteExpr, HaltFlow, HasKeyExpr, HostContext, IfExpr, IfFlow, IncludesExpr, IndexOfExpr, Intent, IsNullExpr, KeysExpr, LastExpr, LenExpr, LitExpr, LtExpr, LteExpr, type ManifestoCore, MapExpr, MaxArrayExpr, MaxExpr, MergeExpr, type MergePatch, MinArrayExpr, MinExpr, ModExpr, MulExpr, NegExpr, NeqExpr, NotExpr, ObjectExpr, OmitExpr, OrExpr, Patch, PatchFlow, PatchOp, PatchPath, PatchSegment, PickExpr, PowExpr, PrimitiveFieldType, ReplaceExpr, Requirement, Result, ReverseExpr, RoundExpr, type SchemaHashInput, type SchemaHashMode, SchemaMeta, SemanticPath, SeqFlow, type SetPatch, SliceExpr, Snapshot, SnapshotMeta, SomeExpr, SplitExpr, SqrtExpr, StartsWithExpr, StateSpec, StrIncludesExpr, StrLenExpr, SubExpr, SubstringExpr, SumArrayExpr, SystemDelta, SystemState, ToBooleanExpr, ToLowerCaseExpr, ToNumberExpr, ToStringExpr, ToUpperCaseExpr, type TraceContext, TraceGraph, TraceNode, TraceNodeKind, TraceTermination, TrimExpr, TypeDefinition, TypeSpec, TypeofExpr, UniqueExpr, type UnsetPatch, ValidationError, ValidationResult, ValuesExpr, apply, applySystemDelta, buildDependencyGraph, canonicalEqual, compareUnicodeCodePoints, compute, computeSync, createContext, createCore, createError, createFlowState, createInitialSystemState, createIntent, createSnapshot, createTraceContext, createTraceNode, detectCycles, err, evaluateComputed, evaluateExpr, evaluateFlow, evaluateFlowSync, evaluateSingleComputed, explain, extractDefaults, fromCanonical, generateRequirementId, generateRequirementIdSync, generateTraceId, getAvailableActions, getByPatchPath, getByPath, getTransitiveDeps, hasPath, hashSchema, hashSchemaEffective, hashSchemaEffectiveSync, hashSchemaSync, indexSegment, invalidResult, isActionAvailable, isErr, isErrorValue, isOk, isSafePatchPath, joinPath, lastSegment, mergeAtPatchPath, mergeAtPath, mergePatch, ok, parentPath, parsePath, patchPathToDisplayString, propSegment, semanticPathToPatchPath, setByPatchPath, setByPath, setPatch, sha256, sha256Sync, sortKeys, toCanonical, toJcs, topologicalSort, unsetByPatchPath, unsetByPath, unsetPatch, validResult, validate, withCollectionContext, withNodePath, withSnapshot };