@plures/praxis 1.1.0 → 1.1.2
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/LICENSE +21 -21
- package/README.md +4 -4
- package/core/codegen/ts-generator.ts +15 -15
- package/dist/node/cli/index.cjs +3 -2282
- package/dist/node/cli/index.js +1 -1
- package/dist/node/{verify-YBZ7W24H.js → verify-QRYKRIDU.js} +3 -2282
- package/docs/REACTIVE_REDESIGN.md +132 -132
- package/docs/SVELTE_INTEGRATION_STRATEGY.md +68 -68
- package/package.json +132 -132
- package/src/components/TerminalNode.svelte +457 -457
- package/src/core/reactive-engine.svelte.ts +65 -65
- package/src/core/reactive-engine.ts +58 -67
- package/src/core/schema/loader.common.ts +150 -150
- package/src/examples/advanced-todo/App.svelte +506 -506
- package/src/index.browser.ts +204 -204
package/src/index.browser.ts
CHANGED
|
@@ -1,204 +1,204 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Praxis - Practical, Provable Application Logic (Browser Build)
|
|
3
|
-
*
|
|
4
|
-
* A typed, functional application logic engine built on strong types.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Core protocol (language-neutral types)
|
|
8
|
-
export type {
|
|
9
|
-
PraxisFact,
|
|
10
|
-
PraxisEvent,
|
|
11
|
-
PraxisState,
|
|
12
|
-
PraxisDiagnostics,
|
|
13
|
-
PraxisStepConfig,
|
|
14
|
-
PraxisStepResult,
|
|
15
|
-
PraxisStepFn,
|
|
16
|
-
} from './core/protocol.js';
|
|
17
|
-
export { PRAXIS_PROTOCOL_VERSION } from './core/protocol.js';
|
|
18
|
-
|
|
19
|
-
// Rules and constraints
|
|
20
|
-
export type {
|
|
21
|
-
RuleId,
|
|
22
|
-
ConstraintId,
|
|
23
|
-
RuleFn,
|
|
24
|
-
ConstraintFn,
|
|
25
|
-
RuleDescriptor,
|
|
26
|
-
ConstraintDescriptor,
|
|
27
|
-
PraxisModule,
|
|
28
|
-
} from './core/rules.js';
|
|
29
|
-
export { PraxisRegistry } from './core/rules.js';
|
|
30
|
-
|
|
31
|
-
// Engine
|
|
32
|
-
export type { PraxisEngineOptions } from './core/engine.js';
|
|
33
|
-
export { LogicEngine, createPraxisEngine } from './core/engine.js';
|
|
34
|
-
export * from './core/reactive-engine.svelte.js';
|
|
35
|
-
|
|
36
|
-
// Actors
|
|
37
|
-
export type { Actor } from './core/actors.js';
|
|
38
|
-
export { ActorManager, createTimerActor } from './core/actors.js';
|
|
39
|
-
|
|
40
|
-
// Introspection
|
|
41
|
-
export type {
|
|
42
|
-
RuleNode,
|
|
43
|
-
ConstraintNode,
|
|
44
|
-
GraphEdge,
|
|
45
|
-
RegistryGraph,
|
|
46
|
-
RuleSchema,
|
|
47
|
-
ConstraintSchema,
|
|
48
|
-
RegistrySchema,
|
|
49
|
-
RegistryStats,
|
|
50
|
-
} from './core/introspection.js';
|
|
51
|
-
export { RegistryIntrospector, createIntrospector } from './core/introspection.js';
|
|
52
|
-
|
|
53
|
-
// DSL helpers
|
|
54
|
-
export {
|
|
55
|
-
defineFact,
|
|
56
|
-
defineEvent,
|
|
57
|
-
defineRule,
|
|
58
|
-
defineConstraint,
|
|
59
|
-
defineModule,
|
|
60
|
-
filterEvents,
|
|
61
|
-
filterFacts,
|
|
62
|
-
findEvent,
|
|
63
|
-
findFact,
|
|
64
|
-
} from './dsl/index.js';
|
|
65
|
-
export type {
|
|
66
|
-
FactDefinition,
|
|
67
|
-
EventDefinition,
|
|
68
|
-
DefineRuleOptions,
|
|
69
|
-
DefineConstraintOptions,
|
|
70
|
-
DefineModuleOptions,
|
|
71
|
-
} from './dsl/index.js';
|
|
72
|
-
|
|
73
|
-
// Terminal Node Runtime - EXCLUDED FOR BROWSER (uses child_process)
|
|
74
|
-
// export type { ... } from './runtime/terminal-adapter.js';
|
|
75
|
-
// export { ... } from './runtime/terminal-adapter.js';
|
|
76
|
-
|
|
77
|
-
// Schema Types (including Terminal Node types)
|
|
78
|
-
export type {
|
|
79
|
-
PraxisSchema,
|
|
80
|
-
NodeDefinition,
|
|
81
|
-
NodeBindings,
|
|
82
|
-
TerminalNodeProps,
|
|
83
|
-
OrchestrationDefinition,
|
|
84
|
-
ValidationResult,
|
|
85
|
-
ValidationError,
|
|
86
|
-
ModelDefinition,
|
|
87
|
-
ComponentDefinition,
|
|
88
|
-
LogicDefinition,
|
|
89
|
-
} from './core/schema/types.js';
|
|
90
|
-
export { validateSchema, createSchemaTemplate } from './core/schema/types.js';
|
|
91
|
-
|
|
92
|
-
// Schema Loader (supports JSON, YAML, and TS)
|
|
93
|
-
export type { LoaderOptions, LoaderResult } from './core/schema/loader.common.js';
|
|
94
|
-
export {
|
|
95
|
-
createSchema,
|
|
96
|
-
loadSchemaFromJson,
|
|
97
|
-
loadSchemaFromYaml,
|
|
98
|
-
validateForGeneration,
|
|
99
|
-
} from './core/schema/loader.common.js';
|
|
100
|
-
|
|
101
|
-
// PluresDB Integration
|
|
102
|
-
export type {
|
|
103
|
-
PraxisDB,
|
|
104
|
-
UnsubscribeFn,
|
|
105
|
-
EventStreamEntry,
|
|
106
|
-
PraxisDBStoreOptions,
|
|
107
|
-
StoredSchema,
|
|
108
|
-
PluresDBGeneratorOptions,
|
|
109
|
-
GeneratedPluresDBFile,
|
|
110
|
-
PluresDBAdapter,
|
|
111
|
-
PluresDBAdapterOptions,
|
|
112
|
-
} from './integrations/pluresdb.js';
|
|
113
|
-
export {
|
|
114
|
-
InMemoryPraxisDB,
|
|
115
|
-
createInMemoryDB,
|
|
116
|
-
PraxisDBStore,
|
|
117
|
-
createPraxisDBStore,
|
|
118
|
-
PRAXIS_PATHS,
|
|
119
|
-
getFactPath,
|
|
120
|
-
getEventPath,
|
|
121
|
-
generateId,
|
|
122
|
-
PraxisSchemaRegistry,
|
|
123
|
-
createSchemaRegistry,
|
|
124
|
-
registerSchema,
|
|
125
|
-
getSchemaPath,
|
|
126
|
-
PluresDBGenerator,
|
|
127
|
-
createPluresDBGenerator,
|
|
128
|
-
createPluresDBAdapter,
|
|
129
|
-
attachToEngine,
|
|
130
|
-
} from './integrations/pluresdb.js';
|
|
131
|
-
|
|
132
|
-
// Unum Integration (Identity & Channels)
|
|
133
|
-
export type {
|
|
134
|
-
UnumStore,
|
|
135
|
-
UnumChannel,
|
|
136
|
-
UnumMessage,
|
|
137
|
-
UnumIdentity,
|
|
138
|
-
UnumAdapterConfig,
|
|
139
|
-
UnumAdapter,
|
|
140
|
-
} from './integrations/unum.js';
|
|
141
|
-
export { createUnumAdapter, attachUnumToEngine } from './integrations/unum.js';
|
|
142
|
-
|
|
143
|
-
// CodeCanvas Integration (Visual Schema Editor)
|
|
144
|
-
export type {
|
|
145
|
-
CanvasNode,
|
|
146
|
-
CanvasEdge,
|
|
147
|
-
CanvasNodeStyle,
|
|
148
|
-
CanvasEdgeStyle,
|
|
149
|
-
CanvasDocument,
|
|
150
|
-
LifecycleState,
|
|
151
|
-
ActivityState,
|
|
152
|
-
CanvasEditorConfig,
|
|
153
|
-
GuardianResult,
|
|
154
|
-
GuardianError,
|
|
155
|
-
GuardianWarning,
|
|
156
|
-
} from './integrations/code-canvas.js';
|
|
157
|
-
export {
|
|
158
|
-
schemaToCanvas,
|
|
159
|
-
canvasToSchema,
|
|
160
|
-
canvasToYaml,
|
|
161
|
-
canvasToMermaid,
|
|
162
|
-
validateWithGuardian,
|
|
163
|
-
createCanvasEditor,
|
|
164
|
-
} from './integrations/code-canvas.js';
|
|
165
|
-
|
|
166
|
-
// State-Docs Integration (Documentation Generation)
|
|
167
|
-
export type {
|
|
168
|
-
StateDocsConfig,
|
|
169
|
-
GeneratedDoc,
|
|
170
|
-
StateMachineDoc,
|
|
171
|
-
StateDoc,
|
|
172
|
-
TransitionDoc,
|
|
173
|
-
} from './integrations/state-docs.js';
|
|
174
|
-
export {
|
|
175
|
-
StateDocsGenerator,
|
|
176
|
-
createStateDocsGenerator,
|
|
177
|
-
generateDocs,
|
|
178
|
-
} from './integrations/state-docs.js';
|
|
179
|
-
|
|
180
|
-
// Tauri Integration (Desktop Apps)
|
|
181
|
-
export type {
|
|
182
|
-
TauriAppConfig,
|
|
183
|
-
TauriWindowConfig,
|
|
184
|
-
TauriSecurityConfig,
|
|
185
|
-
TauriUpdateConfig,
|
|
186
|
-
TauriPlugin,
|
|
187
|
-
TauriCommand,
|
|
188
|
-
TauriEvent,
|
|
189
|
-
TauriFS,
|
|
190
|
-
TauriFileEntry,
|
|
191
|
-
TauriTray,
|
|
192
|
-
TauriMenuItem,
|
|
193
|
-
TauriNotification,
|
|
194
|
-
TauriNotificationOptions,
|
|
195
|
-
TauriBridge,
|
|
196
|
-
TauriUpdateInfo,
|
|
197
|
-
TauriPraxisAdapter,
|
|
198
|
-
} from './integrations/tauri.js';
|
|
199
|
-
export {
|
|
200
|
-
createMockTauriBridge,
|
|
201
|
-
createTauriPraxisAdapter,
|
|
202
|
-
attachTauriToEngine,
|
|
203
|
-
generateTauriConfig,
|
|
204
|
-
} from './integrations/tauri.js';
|
|
1
|
+
/**
|
|
2
|
+
* Praxis - Practical, Provable Application Logic (Browser Build)
|
|
3
|
+
*
|
|
4
|
+
* A typed, functional application logic engine built on strong types.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Core protocol (language-neutral types)
|
|
8
|
+
export type {
|
|
9
|
+
PraxisFact,
|
|
10
|
+
PraxisEvent,
|
|
11
|
+
PraxisState,
|
|
12
|
+
PraxisDiagnostics,
|
|
13
|
+
PraxisStepConfig,
|
|
14
|
+
PraxisStepResult,
|
|
15
|
+
PraxisStepFn,
|
|
16
|
+
} from './core/protocol.js';
|
|
17
|
+
export { PRAXIS_PROTOCOL_VERSION } from './core/protocol.js';
|
|
18
|
+
|
|
19
|
+
// Rules and constraints
|
|
20
|
+
export type {
|
|
21
|
+
RuleId,
|
|
22
|
+
ConstraintId,
|
|
23
|
+
RuleFn,
|
|
24
|
+
ConstraintFn,
|
|
25
|
+
RuleDescriptor,
|
|
26
|
+
ConstraintDescriptor,
|
|
27
|
+
PraxisModule,
|
|
28
|
+
} from './core/rules.js';
|
|
29
|
+
export { PraxisRegistry } from './core/rules.js';
|
|
30
|
+
|
|
31
|
+
// Engine
|
|
32
|
+
export type { PraxisEngineOptions } from './core/engine.js';
|
|
33
|
+
export { LogicEngine, createPraxisEngine } from './core/engine.js';
|
|
34
|
+
export * from './core/reactive-engine.svelte.js';
|
|
35
|
+
|
|
36
|
+
// Actors
|
|
37
|
+
export type { Actor } from './core/actors.js';
|
|
38
|
+
export { ActorManager, createTimerActor } from './core/actors.js';
|
|
39
|
+
|
|
40
|
+
// Introspection
|
|
41
|
+
export type {
|
|
42
|
+
RuleNode,
|
|
43
|
+
ConstraintNode,
|
|
44
|
+
GraphEdge,
|
|
45
|
+
RegistryGraph,
|
|
46
|
+
RuleSchema,
|
|
47
|
+
ConstraintSchema,
|
|
48
|
+
RegistrySchema,
|
|
49
|
+
RegistryStats,
|
|
50
|
+
} from './core/introspection.js';
|
|
51
|
+
export { RegistryIntrospector, createIntrospector } from './core/introspection.js';
|
|
52
|
+
|
|
53
|
+
// DSL helpers
|
|
54
|
+
export {
|
|
55
|
+
defineFact,
|
|
56
|
+
defineEvent,
|
|
57
|
+
defineRule,
|
|
58
|
+
defineConstraint,
|
|
59
|
+
defineModule,
|
|
60
|
+
filterEvents,
|
|
61
|
+
filterFacts,
|
|
62
|
+
findEvent,
|
|
63
|
+
findFact,
|
|
64
|
+
} from './dsl/index.js';
|
|
65
|
+
export type {
|
|
66
|
+
FactDefinition,
|
|
67
|
+
EventDefinition,
|
|
68
|
+
DefineRuleOptions,
|
|
69
|
+
DefineConstraintOptions,
|
|
70
|
+
DefineModuleOptions,
|
|
71
|
+
} from './dsl/index.js';
|
|
72
|
+
|
|
73
|
+
// Terminal Node Runtime - EXCLUDED FOR BROWSER (uses child_process)
|
|
74
|
+
// export type { ... } from './runtime/terminal-adapter.js';
|
|
75
|
+
// export { ... } from './runtime/terminal-adapter.js';
|
|
76
|
+
|
|
77
|
+
// Schema Types (including Terminal Node types)
|
|
78
|
+
export type {
|
|
79
|
+
PraxisSchema,
|
|
80
|
+
NodeDefinition,
|
|
81
|
+
NodeBindings,
|
|
82
|
+
TerminalNodeProps,
|
|
83
|
+
OrchestrationDefinition,
|
|
84
|
+
ValidationResult,
|
|
85
|
+
ValidationError,
|
|
86
|
+
ModelDefinition,
|
|
87
|
+
ComponentDefinition,
|
|
88
|
+
LogicDefinition,
|
|
89
|
+
} from './core/schema/types.js';
|
|
90
|
+
export { validateSchema, createSchemaTemplate } from './core/schema/types.js';
|
|
91
|
+
|
|
92
|
+
// Schema Loader (supports JSON, YAML, and TS)
|
|
93
|
+
export type { LoaderOptions, LoaderResult } from './core/schema/loader.common.js';
|
|
94
|
+
export {
|
|
95
|
+
createSchema,
|
|
96
|
+
loadSchemaFromJson,
|
|
97
|
+
loadSchemaFromYaml,
|
|
98
|
+
validateForGeneration,
|
|
99
|
+
} from './core/schema/loader.common.js';
|
|
100
|
+
|
|
101
|
+
// PluresDB Integration
|
|
102
|
+
export type {
|
|
103
|
+
PraxisDB,
|
|
104
|
+
UnsubscribeFn,
|
|
105
|
+
EventStreamEntry,
|
|
106
|
+
PraxisDBStoreOptions,
|
|
107
|
+
StoredSchema,
|
|
108
|
+
PluresDBGeneratorOptions,
|
|
109
|
+
GeneratedPluresDBFile,
|
|
110
|
+
PluresDBAdapter,
|
|
111
|
+
PluresDBAdapterOptions,
|
|
112
|
+
} from './integrations/pluresdb.js';
|
|
113
|
+
export {
|
|
114
|
+
InMemoryPraxisDB,
|
|
115
|
+
createInMemoryDB,
|
|
116
|
+
PraxisDBStore,
|
|
117
|
+
createPraxisDBStore,
|
|
118
|
+
PRAXIS_PATHS,
|
|
119
|
+
getFactPath,
|
|
120
|
+
getEventPath,
|
|
121
|
+
generateId,
|
|
122
|
+
PraxisSchemaRegistry,
|
|
123
|
+
createSchemaRegistry,
|
|
124
|
+
registerSchema,
|
|
125
|
+
getSchemaPath,
|
|
126
|
+
PluresDBGenerator,
|
|
127
|
+
createPluresDBGenerator,
|
|
128
|
+
createPluresDBAdapter,
|
|
129
|
+
attachToEngine,
|
|
130
|
+
} from './integrations/pluresdb.js';
|
|
131
|
+
|
|
132
|
+
// Unum Integration (Identity & Channels)
|
|
133
|
+
export type {
|
|
134
|
+
UnumStore,
|
|
135
|
+
UnumChannel,
|
|
136
|
+
UnumMessage,
|
|
137
|
+
UnumIdentity,
|
|
138
|
+
UnumAdapterConfig,
|
|
139
|
+
UnumAdapter,
|
|
140
|
+
} from './integrations/unum.js';
|
|
141
|
+
export { createUnumAdapter, attachUnumToEngine } from './integrations/unum.js';
|
|
142
|
+
|
|
143
|
+
// CodeCanvas Integration (Visual Schema Editor)
|
|
144
|
+
export type {
|
|
145
|
+
CanvasNode,
|
|
146
|
+
CanvasEdge,
|
|
147
|
+
CanvasNodeStyle,
|
|
148
|
+
CanvasEdgeStyle,
|
|
149
|
+
CanvasDocument,
|
|
150
|
+
LifecycleState,
|
|
151
|
+
ActivityState,
|
|
152
|
+
CanvasEditorConfig,
|
|
153
|
+
GuardianResult,
|
|
154
|
+
GuardianError,
|
|
155
|
+
GuardianWarning,
|
|
156
|
+
} from './integrations/code-canvas.js';
|
|
157
|
+
export {
|
|
158
|
+
schemaToCanvas,
|
|
159
|
+
canvasToSchema,
|
|
160
|
+
canvasToYaml,
|
|
161
|
+
canvasToMermaid,
|
|
162
|
+
validateWithGuardian,
|
|
163
|
+
createCanvasEditor,
|
|
164
|
+
} from './integrations/code-canvas.js';
|
|
165
|
+
|
|
166
|
+
// State-Docs Integration (Documentation Generation)
|
|
167
|
+
export type {
|
|
168
|
+
StateDocsConfig,
|
|
169
|
+
GeneratedDoc,
|
|
170
|
+
StateMachineDoc,
|
|
171
|
+
StateDoc,
|
|
172
|
+
TransitionDoc,
|
|
173
|
+
} from './integrations/state-docs.js';
|
|
174
|
+
export {
|
|
175
|
+
StateDocsGenerator,
|
|
176
|
+
createStateDocsGenerator,
|
|
177
|
+
generateDocs,
|
|
178
|
+
} from './integrations/state-docs.js';
|
|
179
|
+
|
|
180
|
+
// Tauri Integration (Desktop Apps)
|
|
181
|
+
export type {
|
|
182
|
+
TauriAppConfig,
|
|
183
|
+
TauriWindowConfig,
|
|
184
|
+
TauriSecurityConfig,
|
|
185
|
+
TauriUpdateConfig,
|
|
186
|
+
TauriPlugin,
|
|
187
|
+
TauriCommand,
|
|
188
|
+
TauriEvent,
|
|
189
|
+
TauriFS,
|
|
190
|
+
TauriFileEntry,
|
|
191
|
+
TauriTray,
|
|
192
|
+
TauriMenuItem,
|
|
193
|
+
TauriNotification,
|
|
194
|
+
TauriNotificationOptions,
|
|
195
|
+
TauriBridge,
|
|
196
|
+
TauriUpdateInfo,
|
|
197
|
+
TauriPraxisAdapter,
|
|
198
|
+
} from './integrations/tauri.js';
|
|
199
|
+
export {
|
|
200
|
+
createMockTauriBridge,
|
|
201
|
+
createTauriPraxisAdapter,
|
|
202
|
+
attachTauriToEngine,
|
|
203
|
+
generateTauriConfig,
|
|
204
|
+
} from './integrations/tauri.js';
|