@manifesto-ai/core 2.8.0 → 2.10.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/README.md +6 -5
- package/dist/core/action-availability.d.ts +27 -0
- package/dist/core/apply.d.ts +11 -0
- package/dist/core/compute.d.ts +16 -0
- package/dist/core/explain.d.ts +13 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/system-delta.d.ts +8 -0
- package/dist/core/validate.d.ts +15 -0
- package/dist/core/validation-utils.d.ts +22 -0
- package/dist/errors.d.ts +29 -0
- package/dist/evaluator/computed.d.ts +13 -0
- package/dist/evaluator/context.d.ts +61 -0
- package/dist/evaluator/dag.d.ts +29 -0
- package/dist/evaluator/expr.d.ts +10 -0
- package/dist/evaluator/flow.d.ts +35 -0
- package/dist/evaluator/index.d.ts +5 -0
- package/dist/factories.d.ts +21 -0
- package/dist/index.d.ts +20 -1715
- package/dist/index.js +1 -18499
- package/dist/index.js.map +1 -1
- package/dist/schema/action.d.ts +13 -0
- package/dist/schema/common.d.ts +36 -0
- package/dist/schema/computed.d.ts +22 -0
- package/dist/schema/defaults.d.ts +11 -0
- package/dist/schema/domain.d.ts +49 -0
- package/dist/schema/expr.d.ts +482 -0
- package/dist/schema/field.d.ts +47 -0
- package/dist/schema/flow.d.ts +108 -0
- package/dist/schema/host-context.d.ts +11 -0
- package/dist/schema/index.d.ts +14 -0
- package/dist/schema/patch.d.ts +105 -0
- package/dist/schema/result.d.ts +175 -0
- package/dist/schema/snapshot.d.ts +132 -0
- package/dist/schema/trace.d.ts +97 -0
- package/dist/schema/type-spec.d.ts +33 -0
- package/dist/utils/canonical.d.ts +37 -0
- package/dist/utils/hash.d.ts +54 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/patch-path.d.ts +15 -0
- package/dist/utils/path.d.ts +41 -0
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ Host -> CORE -> ComputeResult
|
|
|
37
37
|
| Execute effects | Host |
|
|
38
38
|
| Perform IO (network, filesystem) | Host |
|
|
39
39
|
| Persist snapshots | Host |
|
|
40
|
-
| Govern authority/proposals |
|
|
40
|
+
| Govern authority/proposals | `@manifesto-ai/governance` + `@manifesto-ai/lineage` |
|
|
41
41
|
| Handle UI/event bindings | SDK |
|
|
42
42
|
|
|
43
43
|
---
|
|
@@ -140,7 +140,7 @@ type Patch = { op: "set" | "unset" | "merge", path, value? };
|
|
|
140
140
|
type ComputeResult = { status, snapshot, requirements, trace };
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
> See [SPEC
|
|
143
|
+
> See [core-SPEC.md](docs/core-SPEC.md) for the current living specification.
|
|
144
144
|
|
|
145
145
|
---
|
|
146
146
|
|
|
@@ -186,7 +186,7 @@ Use Core directly when:
|
|
|
186
186
|
- Testing domain logic in isolation
|
|
187
187
|
- Building developer tools (debuggers, visualizers)
|
|
188
188
|
|
|
189
|
-
For typical usage, see [`@manifesto-ai/sdk`](../sdk/) — the recommended entry point. For explicit governance, see [`@manifesto-ai/
|
|
189
|
+
For typical usage, see [`@manifesto-ai/sdk`](../sdk/) — the recommended entry point. For explicit governance, see [`@manifesto-ai/lineage`](../lineage/) and [`@manifesto-ai/governance`](../governance/).
|
|
190
190
|
|
|
191
191
|
---
|
|
192
192
|
|
|
@@ -195,8 +195,9 @@ For typical usage, see [`@manifesto-ai/sdk`](../sdk/) — the recommended entry
|
|
|
195
195
|
| Document | Purpose |
|
|
196
196
|
|----------|---------|
|
|
197
197
|
| [GUIDE.md](docs/GUIDE.md) | Step-by-step usage guide |
|
|
198
|
-
| [SPEC
|
|
199
|
-
| [
|
|
198
|
+
| [core-SPEC.md](docs/core-SPEC.md) | Current living specification |
|
|
199
|
+
| [VERSION-INDEX.md](docs/VERSION-INDEX.md) | Current and historical document map |
|
|
200
|
+
| [FDR-v1.0.0.md](docs/FDR-v1.0.0.md) | Historical design rationale |
|
|
200
201
|
|
|
201
202
|
---
|
|
202
203
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { DomainSchema } from "../schema/domain.js";
|
|
2
|
+
import type { Snapshot } from "../schema/snapshot.js";
|
|
3
|
+
type ActionAvailabilityErrorCode = "UNKNOWN_ACTION" | "INTERNAL_ERROR" | "TYPE_MISMATCH";
|
|
4
|
+
export type ActionAvailabilityEvaluation = {
|
|
5
|
+
kind: "ok";
|
|
6
|
+
available: boolean;
|
|
7
|
+
} | {
|
|
8
|
+
kind: "error";
|
|
9
|
+
code: ActionAvailabilityErrorCode;
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Evaluate an action's availability expression without re-entry semantics.
|
|
14
|
+
*
|
|
15
|
+
* This is the shared evaluator used by compute() initial invocation checks and
|
|
16
|
+
* the public availability query API.
|
|
17
|
+
*/
|
|
18
|
+
export declare function evaluateActionAvailability(schema: DomainSchema, snapshot: Snapshot, actionName: string, timestamp?: number): ActionAvailabilityEvaluation;
|
|
19
|
+
/**
|
|
20
|
+
* Check whether an action is available for a new invocation.
|
|
21
|
+
*/
|
|
22
|
+
export declare function isActionAvailable(schema: DomainSchema, snapshot: Snapshot, actionName: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Return all currently dispatchable actions in schema key order.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getAvailableActions(schema: DomainSchema, snapshot: Snapshot): readonly string[];
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DomainSchema } from "../schema/domain.js";
|
|
2
|
+
import type { Snapshot } from "../schema/snapshot.js";
|
|
3
|
+
import type { Patch } from "../schema/patch.js";
|
|
4
|
+
import type { HostContext } from "../schema/host-context.js";
|
|
5
|
+
/**
|
|
6
|
+
* Apply patches to snapshot.data and recompute computed values.
|
|
7
|
+
*
|
|
8
|
+
* Patch targets are rooted at snapshot.data only.
|
|
9
|
+
* System transitions are handled by applySystemDelta().
|
|
10
|
+
*/
|
|
11
|
+
export declare function apply(schema: DomainSchema, snapshot: Snapshot, patches: readonly Patch[], context: HostContext): Snapshot;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DomainSchema } from "../schema/domain.js";
|
|
2
|
+
import type { Snapshot } from "../schema/snapshot.js";
|
|
3
|
+
import type { Intent } from "../schema/patch.js";
|
|
4
|
+
import type { ComputeResult } from "../schema/result.js";
|
|
5
|
+
import type { HostContext } from "../schema/host-context.js";
|
|
6
|
+
/**
|
|
7
|
+
* Compute the result of dispatching an intent (synchronous).
|
|
8
|
+
*
|
|
9
|
+
* This is the canonical computation path. Each call is independent -
|
|
10
|
+
* there is no suspended context.
|
|
11
|
+
*/
|
|
12
|
+
export declare function computeSync(schema: DomainSchema, snapshot: Snapshot, intent: Intent, context: HostContext): ComputeResult;
|
|
13
|
+
/**
|
|
14
|
+
* Compute the result of dispatching an intent (async wrapper).
|
|
15
|
+
*/
|
|
16
|
+
export declare function compute(schema: DomainSchema, snapshot: Snapshot, intent: Intent, context: HostContext): Promise<ComputeResult>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DomainSchema } from "../schema/domain.js";
|
|
2
|
+
import type { Snapshot } from "../schema/snapshot.js";
|
|
3
|
+
import type { SemanticPath } from "../schema/common.js";
|
|
4
|
+
import type { ExplainResult } from "../schema/result.js";
|
|
5
|
+
/**
|
|
6
|
+
* Explain why a value is what it is
|
|
7
|
+
*
|
|
8
|
+
* @param schema - The domain schema
|
|
9
|
+
* @param snapshot - Current snapshot state
|
|
10
|
+
* @param path - The path to explain
|
|
11
|
+
* @returns ExplainResult with value, trace, and dependencies
|
|
12
|
+
*/
|
|
13
|
+
export declare function explain(schema: DomainSchema, snapshot: Snapshot, path: SemanticPath): ExplainResult;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Snapshot } from "../schema/snapshot.js";
|
|
2
|
+
import type { SystemDelta } from "../schema/result.js";
|
|
3
|
+
/**
|
|
4
|
+
* Apply a declarative system transition to a snapshot.
|
|
5
|
+
*
|
|
6
|
+
* This function is pure, deterministic, and total.
|
|
7
|
+
*/
|
|
8
|
+
export declare function applySystemDelta(snapshot: Snapshot, delta: SystemDelta): Snapshot;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ValidationResult } from "../schema/result.js";
|
|
2
|
+
/**
|
|
3
|
+
* Validate a domain schema
|
|
4
|
+
*
|
|
5
|
+
* Validation rules:
|
|
6
|
+
* - V-001: All paths in ComputedSpec.deps MUST exist
|
|
7
|
+
* - V-002: ComputedSpec dependency graph MUST be acyclic
|
|
8
|
+
* - V-003: All paths in ExprNode.get MUST exist
|
|
9
|
+
* - V-004: All `call` references in FlowSpec MUST exist
|
|
10
|
+
* - V-005: FlowSpec `call` graph MUST be acyclic
|
|
11
|
+
* - V-006: ActionSpec.available expression MUST return boolean (runtime check)
|
|
12
|
+
* - V-007: ActionSpec.input MUST be valid FieldSpec (Zod handles this)
|
|
13
|
+
* - V-008: Schema hash MUST match canonical hash
|
|
14
|
+
*/
|
|
15
|
+
export declare function validate(schema: unknown): ValidationResult;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ExprNode } from "../schema/expr.js";
|
|
2
|
+
import type { FlowNode } from "../schema/flow.js";
|
|
3
|
+
import type { FieldSpec, StateSpec } from "../schema/field.js";
|
|
4
|
+
import type { ComputedSpec } from "../schema/computed.js";
|
|
5
|
+
import type { PatchSegment } from "../schema/patch.js";
|
|
6
|
+
export declare function isValidSchemaId(id: string): boolean;
|
|
7
|
+
export declare function isValidSemver(version: string): boolean;
|
|
8
|
+
export declare function collectGetPathsFromExpr(expr: ExprNode): string[];
|
|
9
|
+
export declare function collectGetPathsFromFlow(flow: FlowNode): string[];
|
|
10
|
+
export declare function pathExistsInStateSpec(state: StateSpec, path: string): boolean;
|
|
11
|
+
export declare function pathExistsInComputedSpec(computed: ComputedSpec, path: string): boolean;
|
|
12
|
+
export declare function pathExistsInFieldSpec(spec: FieldSpec, path: string): boolean;
|
|
13
|
+
export declare function pathExistsInFieldSpecSegments(spec: FieldSpec, segments: readonly PatchSegment[]): boolean;
|
|
14
|
+
export declare function validateValueAgainstFieldSpec(value: unknown, spec: FieldSpec, options?: {
|
|
15
|
+
allowPartial?: boolean;
|
|
16
|
+
allowUndefined?: boolean;
|
|
17
|
+
}): {
|
|
18
|
+
ok: boolean;
|
|
19
|
+
message?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function getFieldSpecAtPath(spec: FieldSpec, path: string): FieldSpec | null;
|
|
22
|
+
export declare function getFieldSpecAtSegments(spec: FieldSpec, segments: readonly PatchSegment[]): FieldSpec | null;
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ErrorValue } from "./schema/snapshot.js";
|
|
3
|
+
/**
|
|
4
|
+
* Core error codes
|
|
5
|
+
*/
|
|
6
|
+
export declare const CoreErrorCode: z.ZodEnum<{
|
|
7
|
+
VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
8
|
+
PATH_NOT_FOUND: "PATH_NOT_FOUND";
|
|
9
|
+
TYPE_MISMATCH: "TYPE_MISMATCH";
|
|
10
|
+
DIVISION_BY_ZERO: "DIVISION_BY_ZERO";
|
|
11
|
+
INDEX_OUT_OF_BOUNDS: "INDEX_OUT_OF_BOUNDS";
|
|
12
|
+
UNKNOWN_ACTION: "UNKNOWN_ACTION";
|
|
13
|
+
ACTION_UNAVAILABLE: "ACTION_UNAVAILABLE";
|
|
14
|
+
INVALID_INPUT: "INVALID_INPUT";
|
|
15
|
+
CYCLIC_DEPENDENCY: "CYCLIC_DEPENDENCY";
|
|
16
|
+
UNKNOWN_FLOW: "UNKNOWN_FLOW";
|
|
17
|
+
CYCLIC_CALL: "CYCLIC_CALL";
|
|
18
|
+
UNKNOWN_EFFECT: "UNKNOWN_EFFECT";
|
|
19
|
+
INTERNAL_ERROR: "INTERNAL_ERROR";
|
|
20
|
+
}>;
|
|
21
|
+
export type CoreErrorCode = z.infer<typeof CoreErrorCode>;
|
|
22
|
+
/**
|
|
23
|
+
* Create an error value (errors are values, not exceptions)
|
|
24
|
+
*/
|
|
25
|
+
export declare function createError(code: CoreErrorCode, message: string, actionId: string, nodePath: string, timestamp: number, context?: Record<string, unknown>): ErrorValue;
|
|
26
|
+
/**
|
|
27
|
+
* Check if a value is an ErrorValue
|
|
28
|
+
*/
|
|
29
|
+
export declare function isErrorValue(value: unknown): value is ErrorValue;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DomainSchema } from "../schema/domain.js";
|
|
2
|
+
import type { Snapshot } from "../schema/snapshot.js";
|
|
3
|
+
import type { SemanticPath, Result } from "../schema/common.js";
|
|
4
|
+
import type { ErrorValue } from "../schema/snapshot.js";
|
|
5
|
+
/**
|
|
6
|
+
* Evaluate all computed values for a snapshot
|
|
7
|
+
* Returns the computed values record or an error
|
|
8
|
+
*/
|
|
9
|
+
export declare function evaluateComputed(schema: DomainSchema, snapshot: Snapshot): Result<Record<SemanticPath, unknown>, ErrorValue>;
|
|
10
|
+
/**
|
|
11
|
+
* Evaluate a single computed value
|
|
12
|
+
*/
|
|
13
|
+
export declare function evaluateSingleComputed(schema: DomainSchema, snapshot: Snapshot, path: SemanticPath): Result<unknown, ErrorValue>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Snapshot } from "../schema/snapshot.js";
|
|
2
|
+
import type { DomainSchema } from "../schema/domain.js";
|
|
3
|
+
import { type TraceContext } from "../schema/trace.js";
|
|
4
|
+
/**
|
|
5
|
+
* Evaluation context for expressions and flows
|
|
6
|
+
*/
|
|
7
|
+
export type EvalContext = {
|
|
8
|
+
/**
|
|
9
|
+
* Current snapshot state
|
|
10
|
+
*/
|
|
11
|
+
readonly snapshot: Snapshot;
|
|
12
|
+
/**
|
|
13
|
+
* Domain schema
|
|
14
|
+
*/
|
|
15
|
+
readonly schema: DomainSchema;
|
|
16
|
+
/**
|
|
17
|
+
* Current action being processed (if any)
|
|
18
|
+
*/
|
|
19
|
+
readonly currentAction: string | null;
|
|
20
|
+
/**
|
|
21
|
+
* Current node path in the flow (for tracing)
|
|
22
|
+
*/
|
|
23
|
+
readonly nodePath: string;
|
|
24
|
+
/**
|
|
25
|
+
* Intent ID for the current intent (for re-entry safety)
|
|
26
|
+
*/
|
|
27
|
+
readonly intentId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* UUID generator counter (for deterministic UUID generation)
|
|
30
|
+
*/
|
|
31
|
+
uuidCounter?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Trace context for deterministic trace ID generation
|
|
34
|
+
*/
|
|
35
|
+
readonly trace: TraceContext;
|
|
36
|
+
/**
|
|
37
|
+
* Collection context variables (for filter, map, find, etc.)
|
|
38
|
+
*/
|
|
39
|
+
readonly $item?: unknown;
|
|
40
|
+
readonly $index?: number;
|
|
41
|
+
readonly $array?: unknown[];
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Create a new evaluation context
|
|
45
|
+
*
|
|
46
|
+
* @param timestampOrTrace - Required timestamp or TraceContext for deterministic tracing.
|
|
47
|
+
* MUST be provided by Host via HostContext.now to ensure determinism.
|
|
48
|
+
*/
|
|
49
|
+
export declare function createContext(snapshot: Snapshot, schema: DomainSchema, currentAction: string | null, nodePath: string, intentId: string | undefined, timestampOrTrace: number | TraceContext): EvalContext;
|
|
50
|
+
/**
|
|
51
|
+
* Create context with collection variables for filter/map/find/etc.
|
|
52
|
+
*/
|
|
53
|
+
export declare function withCollectionContext(ctx: EvalContext, item: unknown, index: number, array: unknown[]): EvalContext;
|
|
54
|
+
/**
|
|
55
|
+
* Update context with new snapshot
|
|
56
|
+
*/
|
|
57
|
+
export declare function withSnapshot(ctx: EvalContext, snapshot: Snapshot): EvalContext;
|
|
58
|
+
/**
|
|
59
|
+
* Update context with new node path
|
|
60
|
+
*/
|
|
61
|
+
export declare function withNodePath(ctx: EvalContext, nodePath: string): EvalContext;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ComputedSpec } from "../schema/computed.js";
|
|
2
|
+
import type { SemanticPath } from "../schema/common.js";
|
|
3
|
+
import type { Result } from "../schema/common.js";
|
|
4
|
+
import type { ValidationError } from "../schema/result.js";
|
|
5
|
+
/**
|
|
6
|
+
* Dependency graph for computed values
|
|
7
|
+
*/
|
|
8
|
+
export type DependencyGraph = {
|
|
9
|
+
readonly nodes: readonly SemanticPath[];
|
|
10
|
+
readonly edges: ReadonlyMap<SemanticPath, readonly SemanticPath[]>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Build a dependency graph from ComputedSpec
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildDependencyGraph(computed: ComputedSpec): DependencyGraph;
|
|
16
|
+
/**
|
|
17
|
+
* Topological sort using Kahn's algorithm
|
|
18
|
+
* Returns sorted order or error if cycles detected
|
|
19
|
+
*/
|
|
20
|
+
export declare function topologicalSort(graph: DependencyGraph): Result<SemanticPath[], ValidationError>;
|
|
21
|
+
/**
|
|
22
|
+
* Detect cycles in the dependency graph
|
|
23
|
+
* Returns array of cycle paths or null if no cycles
|
|
24
|
+
*/
|
|
25
|
+
export declare function detectCycles(graph: DependencyGraph): SemanticPath[][] | null;
|
|
26
|
+
/**
|
|
27
|
+
* Get all dependencies (transitive) for a given node
|
|
28
|
+
*/
|
|
29
|
+
export declare function getTransitiveDeps(graph: DependencyGraph, node: SemanticPath): Set<SemanticPath>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ExprNode } from "../schema/expr.js";
|
|
2
|
+
import type { ErrorValue } from "../schema/snapshot.js";
|
|
3
|
+
import type { Result } from "../schema/common.js";
|
|
4
|
+
import { type EvalContext } from "./context.js";
|
|
5
|
+
export type ExprResult = Result<unknown, ErrorValue>;
|
|
6
|
+
/**
|
|
7
|
+
* Evaluate an expression node
|
|
8
|
+
* All expressions are pure and total (always return a value or error)
|
|
9
|
+
*/
|
|
10
|
+
export declare function evaluateExpr(expr: ExprNode, ctx: EvalContext): ExprResult;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { FlowNode } from "../schema/flow.js";
|
|
2
|
+
import type { Snapshot, Requirement, ErrorValue } from "../schema/snapshot.js";
|
|
3
|
+
import type { Patch } from "../schema/patch.js";
|
|
4
|
+
import type { TraceNode } from "../schema/trace.js";
|
|
5
|
+
import { type EvalContext } from "./context.js";
|
|
6
|
+
/**
|
|
7
|
+
* Flow execution status
|
|
8
|
+
*/
|
|
9
|
+
export type FlowStatus = "running" | "complete" | "pending" | "halted" | "error";
|
|
10
|
+
/**
|
|
11
|
+
* Flow execution state
|
|
12
|
+
*/
|
|
13
|
+
export type FlowState = {
|
|
14
|
+
readonly snapshot: Snapshot;
|
|
15
|
+
readonly status: FlowStatus;
|
|
16
|
+
readonly patches: readonly Patch[];
|
|
17
|
+
readonly requirements: readonly Requirement[];
|
|
18
|
+
readonly error: ErrorValue | null;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Flow evaluation result
|
|
22
|
+
*/
|
|
23
|
+
export type FlowResult = {
|
|
24
|
+
readonly state: FlowState;
|
|
25
|
+
readonly trace: TraceNode;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Create initial flow state
|
|
29
|
+
*/
|
|
30
|
+
export declare function createFlowState(snapshot: Snapshot): FlowState;
|
|
31
|
+
/**
|
|
32
|
+
* Evaluate a flow node
|
|
33
|
+
*/
|
|
34
|
+
export declare function evaluateFlowSync(flow: FlowNode, ctx: EvalContext, state: FlowState, nodePath: string): FlowResult;
|
|
35
|
+
export declare function evaluateFlow(flow: FlowNode, ctx: EvalContext, state: FlowState, nodePath: string): Promise<FlowResult>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Snapshot } from "./schema/snapshot.js";
|
|
2
|
+
import type { Intent } from "./schema/patch.js";
|
|
3
|
+
import type { HostContext } from "./schema/host-context.js";
|
|
4
|
+
/**
|
|
5
|
+
* Create a new snapshot with initial data
|
|
6
|
+
*
|
|
7
|
+
* @param data - Initial domain data
|
|
8
|
+
* @param schemaHash - Hash of the schema this snapshot conforms to
|
|
9
|
+
* @returns New snapshot
|
|
10
|
+
*/
|
|
11
|
+
export declare function createSnapshot<T>(data: T, schemaHash: string, context: HostContext): Snapshot;
|
|
12
|
+
/**
|
|
13
|
+
* Create an intent
|
|
14
|
+
*
|
|
15
|
+
* @param type - Action type
|
|
16
|
+
* @param input - Action input (optional)
|
|
17
|
+
* @param intentId - Unique identifier for this processing attempt (optional, auto-generated if not provided)
|
|
18
|
+
* @returns Intent
|
|
19
|
+
*/
|
|
20
|
+
export declare function createIntent(type: string, intentId: string): Intent;
|
|
21
|
+
export declare function createIntent(type: string, input: unknown, intentId: string): Intent;
|