@plures/praxis 1.2.12 → 1.2.41
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 +63 -0
- package/dist/browser/{chunk-VOMLVI6V.js → chunk-BBP2F7TT.js} +70 -1
- package/dist/browser/{chunk-K377RW4V.js → chunk-FCEH7WMH.js} +1 -1
- package/dist/browser/{engine-YJZV4SLD.js → engine-65QDGCAN.js} +1 -1
- package/dist/browser/index.d.ts +104 -2
- package/dist/browser/index.js +181 -5
- package/dist/browser/integrations/svelte.d.ts +2 -2
- package/dist/browser/integrations/svelte.js +2 -2
- package/dist/browser/{reactive-engine.svelte-9aS0kTa8.d.ts → reactive-engine.svelte-Cqd8Mod2.d.ts} +56 -1
- package/dist/node/{chunk-PRPQO6R5.js → chunk-32YFEEML.js} +1 -1
- package/dist/node/{chunk-VOMLVI6V.js → chunk-BBP2F7TT.js} +70 -1
- package/dist/node/{chunk-5RH7UAQC.js → chunk-PTH6MD6P.js} +1 -0
- package/dist/node/cli/index.cjs +1553 -839
- package/dist/node/cli/index.js +39 -2
- package/dist/node/cloud/index.d.cts +1 -1
- package/dist/node/cloud/index.d.ts +1 -1
- package/dist/node/components/index.d.cts +2 -2
- package/dist/node/components/index.d.ts +2 -2
- package/dist/node/conversations-KQBXTP3N.js +596 -0
- package/dist/node/{engine-2DQBKBJC.js → engine-7CXQV6RC.js} +1 -1
- package/dist/node/index.cjs +408 -3
- package/dist/node/index.d.cts +308 -7
- package/dist/node/index.d.ts +308 -7
- package/dist/node/index.js +336 -6
- package/dist/node/integrations/svelte.cjs +70 -1
- package/dist/node/integrations/svelte.d.cts +3 -3
- package/dist/node/integrations/svelte.d.ts +3 -3
- package/dist/node/integrations/svelte.js +2 -2
- package/dist/node/{protocol-Qek7ebBl.d.ts → protocol-BocKczNv.d.cts} +1 -1
- package/dist/node/{protocol-Qek7ebBl.d.cts → protocol-BocKczNv.d.ts} +1 -1
- package/dist/node/{reactive-engine.svelte-CRNqHlbv.d.ts → reactive-engine.svelte-CGe8SpVE.d.cts} +57 -2
- package/dist/node/{reactive-engine.svelte-BFIZfawz.d.cts → reactive-engine.svelte-D-xTDxT5.d.ts} +57 -2
- package/dist/node/{terminal-adapter-B-UK_Vdz.d.ts → terminal-adapter-CvIvgTo4.d.ts} +1 -1
- package/dist/node/{terminal-adapter-BQSIF5bf.d.cts → terminal-adapter-Db-snPJ3.d.cts} +1 -1
- package/dist/node/{validate-CNHUULQE.js → validate-EN3M4FUR.js} +1 -1
- package/dist/node/{verify-KLJRXVJS.js → verify-7VZRP2WS.js} +2 -2
- package/docs/BOT_UPDATE_POLICY.md +125 -0
- package/docs/DOGFOODING_CHECKLIST.md +254 -0
- package/docs/DOGFOODING_INDEX.md +169 -0
- package/docs/DOGFOODING_QUICK_START.md +140 -0
- package/docs/KNO_ENG_EXTRACTION_PLAN.md +577 -0
- package/docs/PLURES_TOOLS_INVENTORY.md +170 -0
- package/docs/README.md +12 -0
- package/docs/TESTING_BOT_WORKFLOWS.md +154 -0
- package/docs/conversations/INTEGRATION_POINTS.md +719 -0
- package/docs/conversations/README.md +168 -0
- package/docs/core/extending-praxis-core.md +604 -0
- package/docs/core/praxis-core-api.md +385 -0
- package/docs/decision-ledger/contract-index.json +2 -2
- package/docs/decision-ledger/decisions/2026-02-01-monorepo-organization.md +130 -0
- package/docs/examples/DOGFOODING_WORKFLOW_EXAMPLE.md +295 -0
- package/docs/examples/README.md +41 -0
- package/docs/workflows/pr-overlap-guard.md +50 -0
- package/package.json +7 -2
- package/src/__tests__/chronicle.test.ts +512 -0
- package/src/__tests__/conversations.test.ts +312 -0
- package/src/__tests__/edge-cases.test.ts +1 -1
- package/src/__tests__/engine-dx.test.ts +355 -0
- package/src/cli/commands/conversations.ts +252 -0
- package/src/cli/index.ts +73 -0
- package/src/conversations/README.md +230 -0
- package/src/conversations/candidate.schema.json +123 -0
- package/src/conversations/candidates.ts +114 -0
- package/src/conversations/capture.ts +56 -0
- package/src/conversations/classify.ts +110 -0
- package/src/conversations/conversation.schema.json +106 -0
- package/src/conversations/emitters/fs.ts +65 -0
- package/src/conversations/emitters/github.ts +115 -0
- package/src/conversations/gate.ts +102 -0
- package/src/conversations/index.ts +28 -0
- package/src/conversations/normalize.ts +51 -0
- package/src/conversations/redact.ts +57 -0
- package/src/conversations/types.ts +96 -0
- package/src/core/chronicle/chronicle.ts +227 -0
- package/src/core/chronicle/context.ts +80 -0
- package/src/core/chronicle/index.ts +53 -0
- package/src/core/chronicle/mcp.ts +135 -0
- package/src/core/chronicle/types.ts +61 -0
- package/src/core/engine.ts +99 -1
- package/src/core/pluresdb/index.ts +22 -0
- package/src/core/pluresdb/store.ts +162 -5
- package/src/core/rules.ts +12 -0
- package/src/dsl/index.ts +6 -0
- package/src/index.ts +18 -0
- package/src/integrations/pluresdb.ts +22 -0
package/dist/node/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { P as PraxisState, a as PraxisEvent, b as PraxisFact } from './protocol-
|
|
2
|
-
export {
|
|
3
|
-
import { L as LogicEngine, P as PraxisRegistry, b as RuleDescriptor, C as ConstraintDescriptor, d as
|
|
4
|
-
export {
|
|
5
|
-
import { P as PraxisDB, U as UnsubscribeFn$1 } from './terminal-adapter-
|
|
6
|
-
export { C as CommandExecutor, I as InMemoryPraxisDB,
|
|
1
|
+
import { P as PraxisState, a as PraxisEvent, b as PraxisFact } from './protocol-BocKczNv.js';
|
|
2
|
+
export { f as PRAXIS_PROTOCOL_VERSION, e as PraxisDiagnostics, d as PraxisStepConfig, g as PraxisStepFn, c as PraxisStepResult } from './protocol-BocKczNv.js';
|
|
3
|
+
import { L as LogicEngine, P as PraxisRegistry, b as RuleDescriptor, C as ConstraintDescriptor, d as ConstraintFn, e as Contract, f as RuleFn, g as PraxisModule, M as MissingArtifact, S as Severity, V as ValidationReport, A as Assumption } from './reactive-engine.svelte-D-xTDxT5.js';
|
|
4
|
+
export { h as ConstraintId, i as ContractGap, D as DefineContractOptions, E as Example, j as PraxisEngineOptions, R as ReactiveEngineOptions, a as ReactiveLogicEngine, k as Reference, l as RuleId, m as createPraxisEngine, c as createReactiveEngine, n as defineContract, o as getContract, p as isContract } from './reactive-engine.svelte-D-xTDxT5.js';
|
|
5
|
+
import { P as PraxisDB, U as UnsubscribeFn$1 } from './terminal-adapter-CvIvgTo4.js';
|
|
6
|
+
export { C as CommandExecutor, I as InMemoryPraxisDB, a as PluresDBAdapterConfig, b as PluresDBInstance, d as PluresDBPraxisAdapter, e as PraxisLocalFirstOptions, T as TerminalAdapter, f as TerminalAdapterOptions, g as TerminalExecutionResult, h as TerminalNodeState, i as createInMemoryDB, j as createMockExecutor, k as createPluresDB, l as createPraxisLocalFirst, c as createTerminalAdapter, r as runTerminalCommand } from './terminal-adapter-CvIvgTo4.js';
|
|
7
7
|
import { PraxisSchema, ValidationResult, ModelDefinition, FieldDefinition, ComponentDefinition, LogicDefinition } from './schema.js';
|
|
8
8
|
export { NodeBindings, NodeDefinition, OrchestrationDefinition, TerminalNodeProps, ValidationError, createSchemaTemplate, validateSchema } from './schema.js';
|
|
9
9
|
import '@plures/pluresdb/local-first';
|
|
@@ -441,6 +441,11 @@ interface DefineRuleOptions<TContext = unknown> {
|
|
|
441
441
|
id: string;
|
|
442
442
|
description: string;
|
|
443
443
|
impl: RuleFn<TContext>;
|
|
444
|
+
/**
|
|
445
|
+
* Optional event type filter — only evaluate this rule when at least one
|
|
446
|
+
* event in the batch has a matching `tag`. Accepts a single tag or array.
|
|
447
|
+
*/
|
|
448
|
+
eventTypes?: string | string[];
|
|
444
449
|
contract?: Contract;
|
|
445
450
|
meta?: Record<string, unknown>;
|
|
446
451
|
}
|
|
@@ -838,6 +843,154 @@ declare function loadSchema(filePath: string, options?: LoaderOptions): Promise<
|
|
|
838
843
|
*/
|
|
839
844
|
declare function loadSchemaFromFile(filePath: string, options?: LoaderOptions): Promise<LoaderResult>;
|
|
840
845
|
|
|
846
|
+
/**
|
|
847
|
+
* Chronicle Types
|
|
848
|
+
*
|
|
849
|
+
* Core types for the Chronicle causal tracking system.
|
|
850
|
+
* Records state transitions as a causal graph stored in PluresDB.
|
|
851
|
+
*/
|
|
852
|
+
/**
|
|
853
|
+
* Direction for traversing causal chains.
|
|
854
|
+
*/
|
|
855
|
+
type TraceDirection = 'backward' | 'forward' | 'both';
|
|
856
|
+
/**
|
|
857
|
+
* Causal relationship type between Chronicle nodes.
|
|
858
|
+
* - `causes`: node A caused node B (explicit causal link)
|
|
859
|
+
* - `context`: node B belongs to the same session/request as node A
|
|
860
|
+
* - `follows`: node B happened after node A in the same context
|
|
861
|
+
*/
|
|
862
|
+
type EdgeType = 'causes' | 'context' | 'follows';
|
|
863
|
+
/**
|
|
864
|
+
* A recorded state transition event passed to Chronicle.
|
|
865
|
+
*/
|
|
866
|
+
interface ChronicleEvent {
|
|
867
|
+
/** Path to the changed value (fact or event stream path) */
|
|
868
|
+
path: string;
|
|
869
|
+
/** Value before the change (undefined for creates) */
|
|
870
|
+
before?: unknown;
|
|
871
|
+
/** Value after the change */
|
|
872
|
+
after?: unknown;
|
|
873
|
+
/** Parent span/node ID that caused this change */
|
|
874
|
+
cause?: string;
|
|
875
|
+
/** Session or request ID grouping related changes */
|
|
876
|
+
context?: string;
|
|
877
|
+
/** Additional metadata key-value pairs */
|
|
878
|
+
metadata: Record<string, string>;
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* A Chronicle node representing a single recorded state transition.
|
|
882
|
+
*/
|
|
883
|
+
interface ChronicleNode {
|
|
884
|
+
/** Unique node ID: `chronos:{timestamp}-{counter}` */
|
|
885
|
+
id: string;
|
|
886
|
+
/** Timestamp (ms since epoch) when this node was recorded */
|
|
887
|
+
timestamp: number;
|
|
888
|
+
/** The recorded state transition */
|
|
889
|
+
event: ChronicleEvent;
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* A directed edge in the causal graph connecting two Chronicle nodes.
|
|
893
|
+
*/
|
|
894
|
+
interface ChronicleEdge {
|
|
895
|
+
/** Source node ID */
|
|
896
|
+
from: string;
|
|
897
|
+
/** Target node ID */
|
|
898
|
+
to: string;
|
|
899
|
+
/** Type of causal relationship */
|
|
900
|
+
type: EdgeType;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Chronicle Interface and PluresDbChronicle Implementation
|
|
905
|
+
*
|
|
906
|
+
* Records state transitions as a causal graph in PluresDB.
|
|
907
|
+
* Attached to PraxisDBStore via `.withChronicle()` for zero-effort observability.
|
|
908
|
+
*/
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* Storage path constants for Chronicle data in PluresDB.
|
|
912
|
+
*
|
|
913
|
+
* Layout:
|
|
914
|
+
* - `/_praxis/chronos/nodes/{nodeId}` — ChronicleNode documents
|
|
915
|
+
* - `/_praxis/chronos/edges/out/{nodeId}` — outgoing ChronicleEdge arrays
|
|
916
|
+
* - `/_praxis/chronos/edges/in/{nodeId}` — incoming ChronicleEdge arrays
|
|
917
|
+
* - `/_praxis/chronos/context/{contextId}` — ordered nodeId arrays per context
|
|
918
|
+
* - `/_praxis/chronos/index` — global ordered nodeId array (for range queries)
|
|
919
|
+
*/
|
|
920
|
+
declare const CHRONICLE_PATHS: {
|
|
921
|
+
readonly BASE: "/_praxis/chronos";
|
|
922
|
+
readonly NODES: "/_praxis/chronos/nodes";
|
|
923
|
+
readonly EDGES_OUT: "/_praxis/chronos/edges/out";
|
|
924
|
+
readonly EDGES_IN: "/_praxis/chronos/edges/in";
|
|
925
|
+
readonly CONTEXT: "/_praxis/chronos/context";
|
|
926
|
+
readonly INDEX: "/_praxis/chronos/index";
|
|
927
|
+
};
|
|
928
|
+
/**
|
|
929
|
+
* Chronicle interface — records state transitions as a causal graph.
|
|
930
|
+
*
|
|
931
|
+
* Automatically attached to any PraxisDBStore at runtime via `.withChronicle()`.
|
|
932
|
+
* Records state diffs as graph nodes with causal edges.
|
|
933
|
+
*/
|
|
934
|
+
interface Chronicle {
|
|
935
|
+
/**
|
|
936
|
+
* Record a state transition and return the created node.
|
|
937
|
+
*/
|
|
938
|
+
record(event: ChronicleEvent): Promise<ChronicleNode>;
|
|
939
|
+
/**
|
|
940
|
+
* Trace causality backward or forward from a node.
|
|
941
|
+
*
|
|
942
|
+
* @param nodeId Starting node ID
|
|
943
|
+
* @param direction `'backward'` follows incoming edges, `'forward'` follows outgoing edges
|
|
944
|
+
* @param maxDepth Maximum traversal depth (prevents cycles / infinite loops)
|
|
945
|
+
*/
|
|
946
|
+
trace(nodeId: string, direction: TraceDirection, maxDepth: number): Promise<ChronicleNode[]>;
|
|
947
|
+
/**
|
|
948
|
+
* Return all Chronicle nodes recorded within a timestamp range.
|
|
949
|
+
*
|
|
950
|
+
* @param start Inclusive start timestamp (ms)
|
|
951
|
+
* @param end Inclusive end timestamp (ms)
|
|
952
|
+
*/
|
|
953
|
+
range(start: number, end: number): Promise<ChronicleNode[]>;
|
|
954
|
+
/**
|
|
955
|
+
* Return all Chronicle nodes belonging to a context (session/request).
|
|
956
|
+
*
|
|
957
|
+
* @param contextId The context identifier
|
|
958
|
+
*/
|
|
959
|
+
subgraph(contextId: string): Promise<ChronicleNode[]>;
|
|
960
|
+
}
|
|
961
|
+
/**
|
|
962
|
+
* PluresDB-backed implementation of the Chronicle interface.
|
|
963
|
+
*
|
|
964
|
+
* Stores causal graph nodes and edges in PluresDB under `/_praxis/chronos/`.
|
|
965
|
+
* Shares the same PluresDB instance as PraxisDBStore so the JS Chronos UI
|
|
966
|
+
* can read from the same data layer.
|
|
967
|
+
*
|
|
968
|
+
* @example
|
|
969
|
+
* ```typescript
|
|
970
|
+
* const db = createInMemoryDB();
|
|
971
|
+
* const chronicle = new PluresDbChronicle(db);
|
|
972
|
+
*
|
|
973
|
+
* const store = createPraxisDBStore(db, registry).withChronicle(chronicle);
|
|
974
|
+
* // All storeFact / appendEvent calls are now recorded automatically.
|
|
975
|
+
* ```
|
|
976
|
+
*/
|
|
977
|
+
declare class PluresDbChronicle implements Chronicle {
|
|
978
|
+
private readonly db;
|
|
979
|
+
constructor(db: PraxisDB);
|
|
980
|
+
record(event: ChronicleEvent): Promise<ChronicleNode>;
|
|
981
|
+
trace(nodeId: string, direction: TraceDirection, maxDepth: number): Promise<ChronicleNode[]>;
|
|
982
|
+
range(start: number, end: number): Promise<ChronicleNode[]>;
|
|
983
|
+
subgraph(contextId: string): Promise<ChronicleNode[]>;
|
|
984
|
+
private addEdge;
|
|
985
|
+
private _traceRecursive;
|
|
986
|
+
}
|
|
987
|
+
/**
|
|
988
|
+
* Create a PluresDB-backed Chronicle instance.
|
|
989
|
+
*
|
|
990
|
+
* @param db The PraxisDB instance to store causal graph data in
|
|
991
|
+
*/
|
|
992
|
+
declare function createChronicle(db: PraxisDB): PluresDbChronicle;
|
|
993
|
+
|
|
841
994
|
/**
|
|
842
995
|
* PraxisDB Store
|
|
843
996
|
*
|
|
@@ -917,9 +1070,26 @@ declare class PraxisDBStore<TContext = unknown> {
|
|
|
917
1070
|
private subscriptions;
|
|
918
1071
|
private factWatchers;
|
|
919
1072
|
private onRuleError;
|
|
1073
|
+
private chronicle?;
|
|
920
1074
|
constructor(options: PraxisDBStoreOptions<TContext> & {
|
|
921
1075
|
onRuleError?: RuleErrorHandler;
|
|
922
1076
|
});
|
|
1077
|
+
/**
|
|
1078
|
+
* Attach a Chronicle observer to this store.
|
|
1079
|
+
*
|
|
1080
|
+
* Every subsequent `storeFact` and `appendEvent` call will be recorded as a
|
|
1081
|
+
* causal graph node in PluresDB, enabling full observability for free.
|
|
1082
|
+
*
|
|
1083
|
+
* @param chronicle Chronicle implementation to attach
|
|
1084
|
+
* @returns `this` for fluent chaining
|
|
1085
|
+
*
|
|
1086
|
+
* @example
|
|
1087
|
+
* ```typescript
|
|
1088
|
+
* const store = createPraxisDBStore(db, registry)
|
|
1089
|
+
* .withChronicle(createChronicle(db));
|
|
1090
|
+
* ```
|
|
1091
|
+
*/
|
|
1092
|
+
withChronicle(chronicle: Chronicle): this;
|
|
923
1093
|
/**
|
|
924
1094
|
* Store a fact in PluresDB
|
|
925
1095
|
*
|
|
@@ -1241,6 +1411,137 @@ declare class PluresDBGenerator {
|
|
|
1241
1411
|
*/
|
|
1242
1412
|
declare function createPluresDBGenerator(outputDir: string, options?: Partial<PluresDBGeneratorOptions>): PluresDBGenerator;
|
|
1243
1413
|
|
|
1414
|
+
/**
|
|
1415
|
+
* Chronicle Context
|
|
1416
|
+
*
|
|
1417
|
+
* Synchronous causal context propagation for Chronicle span tracking.
|
|
1418
|
+
* Equivalent to Rust's `tracing` crate span context, adapted for TypeScript.
|
|
1419
|
+
*
|
|
1420
|
+
* @example
|
|
1421
|
+
* ```typescript
|
|
1422
|
+
* // Run code attributed to a specific span/session
|
|
1423
|
+
* await ChronicleContext.runAsync(
|
|
1424
|
+
* { spanId: 'route-decision-1', contextId: 'session-abc' },
|
|
1425
|
+
* async () => {
|
|
1426
|
+
* await store.storeFact(fact); // attributed to route-decision-1 / session-abc
|
|
1427
|
+
* }
|
|
1428
|
+
* );
|
|
1429
|
+
* ```
|
|
1430
|
+
*/
|
|
1431
|
+
interface ChronicleSpan {
|
|
1432
|
+
/** The span/operation ID (becomes the `cause` field on Chronicle nodes) */
|
|
1433
|
+
spanId?: string;
|
|
1434
|
+
/** Session or request ID grouping related spans */
|
|
1435
|
+
contextId?: string;
|
|
1436
|
+
}
|
|
1437
|
+
/**
|
|
1438
|
+
* Stack-based synchronous causal context propagation.
|
|
1439
|
+
*
|
|
1440
|
+
* Uses a call-stack approach for environments without AsyncLocalStorage.
|
|
1441
|
+
* Works correctly for synchronous and sequentially-awaited async code.
|
|
1442
|
+
* For concurrent async flows, use `runAsync` per logical operation.
|
|
1443
|
+
*/
|
|
1444
|
+
declare class ChronicleContext {
|
|
1445
|
+
private static readonly _stack;
|
|
1446
|
+
/**
|
|
1447
|
+
* Get the current active span, if any.
|
|
1448
|
+
*/
|
|
1449
|
+
static get current(): ChronicleSpan | undefined;
|
|
1450
|
+
/**
|
|
1451
|
+
* Run a synchronous function within a causal span.
|
|
1452
|
+
* The span is automatically popped when the function returns.
|
|
1453
|
+
*/
|
|
1454
|
+
static run<T>(span: ChronicleSpan, fn: () => T): T;
|
|
1455
|
+
/**
|
|
1456
|
+
* Run an async function within a causal span.
|
|
1457
|
+
* The span is popped after the promise settles.
|
|
1458
|
+
*/
|
|
1459
|
+
static runAsync<T>(span: ChronicleSpan, fn: () => Promise<T>): Promise<T>;
|
|
1460
|
+
/**
|
|
1461
|
+
* Create a child span that inherits the current contextId.
|
|
1462
|
+
*
|
|
1463
|
+
* @param spanId ID for the new span
|
|
1464
|
+
* @returns A new ChronicleSpan with the current contextId
|
|
1465
|
+
*/
|
|
1466
|
+
static childSpan(spanId: string): ChronicleSpan;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
/**
|
|
1470
|
+
* Chronicle MCP Tools
|
|
1471
|
+
*
|
|
1472
|
+
* Exposes Chronicle query functionality as MCP-compatible tool handlers.
|
|
1473
|
+
* Register these tools with any MCP server to surface Chronos querying
|
|
1474
|
+
* capabilities for troubleshooting, auditing, and AI training data extraction.
|
|
1475
|
+
*
|
|
1476
|
+
* @example
|
|
1477
|
+
* ```typescript
|
|
1478
|
+
* const chronicle = createChronicle(db);
|
|
1479
|
+
* const tools = createChronosMcpTools(chronicle);
|
|
1480
|
+
*
|
|
1481
|
+
* // MCP server registration (framework-agnostic)
|
|
1482
|
+
* server.registerTool('chronos.trace', tools.trace);
|
|
1483
|
+
* server.registerTool('chronos.search', tools.search);
|
|
1484
|
+
* ```
|
|
1485
|
+
*/
|
|
1486
|
+
|
|
1487
|
+
/**
|
|
1488
|
+
* Parameters for the `chronos.trace` MCP tool.
|
|
1489
|
+
*/
|
|
1490
|
+
interface ChronosTraceParams {
|
|
1491
|
+
/** ID of the Chronicle node to start tracing from */
|
|
1492
|
+
nodeId: string;
|
|
1493
|
+
/** Direction to traverse the causal graph (default: `'backward'`) */
|
|
1494
|
+
direction?: TraceDirection;
|
|
1495
|
+
/** Maximum traversal depth (default: 10) */
|
|
1496
|
+
maxDepth?: number;
|
|
1497
|
+
}
|
|
1498
|
+
/**
|
|
1499
|
+
* Parameters for the `chronos.search` MCP tool.
|
|
1500
|
+
*/
|
|
1501
|
+
interface ChronosSearchParams {
|
|
1502
|
+
/** Search query matched against node paths, metadata, and serialised payloads */
|
|
1503
|
+
query: string;
|
|
1504
|
+
/** Optional context ID — restricts search to a single session/request subgraph */
|
|
1505
|
+
contextId?: string;
|
|
1506
|
+
/** Inclusive start timestamp in ms (default: 0) */
|
|
1507
|
+
since?: number;
|
|
1508
|
+
/** Inclusive end timestamp in ms (default: now) */
|
|
1509
|
+
until?: number;
|
|
1510
|
+
/** Maximum number of results (default: no limit) */
|
|
1511
|
+
limit?: number;
|
|
1512
|
+
}
|
|
1513
|
+
/**
|
|
1514
|
+
* Uniform result envelope for MCP tool calls.
|
|
1515
|
+
*/
|
|
1516
|
+
interface McpToolResult<T> {
|
|
1517
|
+
/** Whether the tool call succeeded */
|
|
1518
|
+
success: boolean;
|
|
1519
|
+
/** Returned data (present on success) */
|
|
1520
|
+
data?: T;
|
|
1521
|
+
/** Error message (present on failure) */
|
|
1522
|
+
error?: string;
|
|
1523
|
+
}
|
|
1524
|
+
/**
|
|
1525
|
+
* Chronos MCP tools bound to a Chronicle instance.
|
|
1526
|
+
*/
|
|
1527
|
+
interface ChronosMcpTools {
|
|
1528
|
+
/**
|
|
1529
|
+
* `chronos.trace` — trace causality backward/forward from a Chronicle node.
|
|
1530
|
+
*/
|
|
1531
|
+
trace(params: ChronosTraceParams): Promise<McpToolResult<ChronicleNode[]>>;
|
|
1532
|
+
/**
|
|
1533
|
+
* `chronos.search` — search Chronicle nodes by path, metadata, or payload content.
|
|
1534
|
+
*/
|
|
1535
|
+
search(params: ChronosSearchParams): Promise<McpToolResult<ChronicleNode[]>>;
|
|
1536
|
+
}
|
|
1537
|
+
/**
|
|
1538
|
+
* Create Chronos MCP tools bound to a Chronicle instance.
|
|
1539
|
+
*
|
|
1540
|
+
* @param chronicle Chronicle instance to query
|
|
1541
|
+
* @returns Object with `trace` and `search` tool handlers
|
|
1542
|
+
*/
|
|
1543
|
+
declare function createChronosMcpTools(chronicle: Chronicle): ChronosMcpTools;
|
|
1544
|
+
|
|
1244
1545
|
/**
|
|
1245
1546
|
* PluresDB Integration
|
|
1246
1547
|
*
|
|
@@ -3052,4 +3353,4 @@ declare function attachAllIntegrations<TContext = unknown>(engine: LogicEngine<T
|
|
|
3052
3353
|
dispose: () => void;
|
|
3053
3354
|
}>;
|
|
3054
3355
|
|
|
3055
|
-
export { AcknowledgeContractGap, type ActivityState, type Actor, ActorManager, Assumption, BehaviorLedger, type CanvasDocument, type CanvasEdge, type CanvasEdgeStyle, type CanvasEditorConfig, type CanvasNode, type CanvasNodeStyle, ComponentDefinition, ConstraintDescriptor, ConstraintFn, type ConstraintNode, type ConstraintSchema, Contract, ContractAdded, ContractGapAcknowledged, ContractMissing, ContractUpdated, ContractValidated, type DefineConstraintOptions, type DefineModuleOptions, type DefineRuleOptions, type EventDefinition, type EventStreamEntry, type FactDefinition, ReactiveLogicEngine as FrameworkAgnosticReactiveEngine, type ReactiveEngineOptions as FrameworkAgnosticReactiveEngineOptions, type GeneratedDoc, type GeneratedPluresDBFile, type GraphEdge, type GuardianError, type GuardianResult, type GuardianWarning, type LedgerEntry, type LedgerEntryStatus, type LifecycleState, type LoaderOptions, type LoaderResult, LogicDefinition, LogicEngine, MissingArtifact, ModelDefinition, PRAXIS_PATHS, type PluresDBAdapter, type PluresDBAdapterOptions, PluresDBGenerator, type PluresDBGeneratorOptions, PraxisDB, PraxisDBStore, type PraxisDBStoreOptions, PraxisEvent, PraxisFact, PraxisModule, PraxisRegistry, PraxisSchema, PraxisSchemaRegistry, PraxisState, type RegistryGraph, RegistryIntrospector, type RegistrySchema, type RegistryStats, RuleDescriptor, RuleFn, type RuleNode, type RuleSchema, Severity, type StateChangeCallback, type StateDoc, type StateDocsConfig, StateDocsGenerator, type StateMachineDoc, type StoredSchema, type TauriAppConfig, type TauriBridge, type TauriCommand, type TauriEvent, type TauriFS, type TauriFileEntry, type TauriMenuItem, type TauriNotification, type TauriNotificationOptions, type TauriPlugin, type TauriPraxisAdapter, type TauriSecurityConfig, type TauriTray, type TauriUpdateConfig, type TauriUpdateInfo, type TauriWindowConfig, type TransitionDoc, type UnifiedApp, type UnifiedAppConfig, UnsubscribeFn$1 as UnsubscribeFn, type UnumAdapter, type UnumAdapterConfig, type UnumChannel, type UnumIdentity, type UnumMessage, type UnumStore, ValidateContracts, type ValidateOptions, ValidationReport, ValidationResult, attachAllIntegrations, attachTauriToEngine, attachToEngine, attachUnumToEngine, canvasToMermaid, canvasToSchema, canvasToYaml, createBehaviorLedger, createCanvasEditor, createReactiveEngine as createFrameworkAgnosticReactiveEngine, createIntrospector, createMockTauriBridge, createPluresDBAdapter, createPluresDBGenerator, createPraxisDBStore, createSchemaRegistry, createStateDocsGenerator, createTauriPraxisAdapter, createTimerActor, createUnifiedApp, createUnumAdapter, defineConstraint, defineEvent, defineFact, defineModule, defineRule, filterEvents, filterFacts, findEvent, findFact, formatValidationReport, formatValidationReportJSON, formatValidationReportSARIF, generateDocs, generateId, generateTauriConfig, getEventPath, getFactPath, getSchemaPath, loadSchema, loadSchemaFromFile, loadSchemaFromJson, loadSchemaFromYaml, registerSchema, schemaToCanvas, validateContracts, validateForGeneration, validateWithGuardian };
|
|
3356
|
+
export { AcknowledgeContractGap, type ActivityState, type Actor, ActorManager, Assumption, BehaviorLedger, CHRONICLE_PATHS, type CanvasDocument, type CanvasEdge, type CanvasEdgeStyle, type CanvasEditorConfig, type CanvasNode, type CanvasNodeStyle, type Chronicle, ChronicleContext, type ChronicleEdge, type ChronicleEvent, type ChronicleNode, type ChronicleSpan, type ChronosMcpTools, type ChronosSearchParams, type ChronosTraceParams, ComponentDefinition, ConstraintDescriptor, ConstraintFn, type ConstraintNode, type ConstraintSchema, Contract, ContractAdded, ContractGapAcknowledged, ContractMissing, ContractUpdated, ContractValidated, type DefineConstraintOptions, type DefineModuleOptions, type DefineRuleOptions, type EdgeType, type EventDefinition, type EventStreamEntry, type FactDefinition, ReactiveLogicEngine as FrameworkAgnosticReactiveEngine, type ReactiveEngineOptions as FrameworkAgnosticReactiveEngineOptions, type GeneratedDoc, type GeneratedPluresDBFile, type GraphEdge, type GuardianError, type GuardianResult, type GuardianWarning, type LedgerEntry, type LedgerEntryStatus, type LifecycleState, type LoaderOptions, type LoaderResult, LogicDefinition, LogicEngine, type McpToolResult, MissingArtifact, ModelDefinition, PRAXIS_PATHS, type PluresDBAdapter, type PluresDBAdapterOptions, PluresDBGenerator, type PluresDBGeneratorOptions, PluresDbChronicle, PraxisDB, PraxisDBStore, type PraxisDBStoreOptions, PraxisEvent, PraxisFact, PraxisModule, PraxisRegistry, PraxisSchema, PraxisSchemaRegistry, PraxisState, type RegistryGraph, RegistryIntrospector, type RegistrySchema, type RegistryStats, RuleDescriptor, RuleFn, type RuleNode, type RuleSchema, Severity, type StateChangeCallback, type StateDoc, type StateDocsConfig, StateDocsGenerator, type StateMachineDoc, type StoredSchema, type TauriAppConfig, type TauriBridge, type TauriCommand, type TauriEvent, type TauriFS, type TauriFileEntry, type TauriMenuItem, type TauriNotification, type TauriNotificationOptions, type TauriPlugin, type TauriPraxisAdapter, type TauriSecurityConfig, type TauriTray, type TauriUpdateConfig, type TauriUpdateInfo, type TauriWindowConfig, type TraceDirection, type TransitionDoc, type UnifiedApp, type UnifiedAppConfig, UnsubscribeFn$1 as UnsubscribeFn, type UnumAdapter, type UnumAdapterConfig, type UnumChannel, type UnumIdentity, type UnumMessage, type UnumStore, ValidateContracts, type ValidateOptions, ValidationReport, ValidationResult, attachAllIntegrations, attachTauriToEngine, attachToEngine, attachUnumToEngine, canvasToMermaid, canvasToSchema, canvasToYaml, createBehaviorLedger, createCanvasEditor, createChronicle, createChronosMcpTools, createReactiveEngine as createFrameworkAgnosticReactiveEngine, createIntrospector, createMockTauriBridge, createPluresDBAdapter, createPluresDBGenerator, createPraxisDBStore, createSchemaRegistry, createStateDocsGenerator, createTauriPraxisAdapter, createTimerActor, createUnifiedApp, createUnumAdapter, defineConstraint, defineEvent, defineFact, defineModule, defineRule, filterEvents, filterFacts, findEvent, findFact, formatValidationReport, formatValidationReportJSON, formatValidationReportSARIF, generateDocs, generateId, generateTauriConfig, getEventPath, getFactPath, getSchemaPath, loadSchema, loadSchemaFromFile, loadSchemaFromJson, loadSchemaFromYaml, registerSchema, schemaToCanvas, validateContracts, validateForGeneration, validateWithGuardian };
|