@plures/praxis 1.1.3 → 1.2.10

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.
Files changed (74) hide show
  1. package/FRAMEWORK.md +106 -15
  2. package/README.md +194 -119
  3. package/dist/browser/adapter-CIMBGDC7.js +14 -0
  4. package/dist/browser/chunk-K377RW4V.js +230 -0
  5. package/dist/browser/chunk-MBVHLOU2.js +152 -0
  6. package/dist/browser/{chunk-R45WXWKH.js → chunk-VOMLVI6V.js} +1 -149
  7. package/dist/browser/engine-YJZV4SLD.js +8 -0
  8. package/dist/browser/index.d.ts +161 -5
  9. package/dist/browser/index.js +156 -141
  10. package/dist/browser/integrations/svelte.d.ts +2 -2
  11. package/dist/browser/integrations/svelte.js +2 -1
  12. package/dist/browser/{reactive-engine.svelte-C9OpcTHf.d.ts → reactive-engine.svelte-9aS0kTa8.d.ts} +136 -1
  13. package/dist/node/adapter-75ISSMWD.js +15 -0
  14. package/dist/node/chunk-5RH7UAQC.js +486 -0
  15. package/dist/node/chunk-MBVHLOU2.js +152 -0
  16. package/dist/node/chunk-PRPQO6R5.js +85 -0
  17. package/dist/node/chunk-R2PSBPKQ.js +150 -0
  18. package/dist/node/chunk-S54337I5.js +446 -0
  19. package/dist/node/{chunk-R45WXWKH.js → chunk-VOMLVI6V.js} +1 -149
  20. package/dist/node/chunk-WZ6B3LZ6.js +638 -0
  21. package/dist/node/cli/index.cjs +2936 -897
  22. package/dist/node/cli/index.js +27 -0
  23. package/dist/node/components/index.d.cts +3 -2
  24. package/dist/node/components/index.d.ts +3 -2
  25. package/dist/node/docs-JFNYTOJA.js +102 -0
  26. package/dist/node/engine-2DQBKBJC.js +9 -0
  27. package/dist/node/index.cjs +1114 -354
  28. package/dist/node/index.d.cts +388 -5
  29. package/dist/node/index.d.ts +388 -5
  30. package/dist/node/index.js +201 -640
  31. package/dist/node/integrations/svelte.cjs +76 -0
  32. package/dist/node/integrations/svelte.d.cts +2 -2
  33. package/dist/node/integrations/svelte.d.ts +2 -2
  34. package/dist/node/integrations/svelte.js +3 -1
  35. package/dist/node/{reactive-engine.svelte-1M4m_C_v.d.cts → reactive-engine.svelte-BFIZfawz.d.cts} +199 -1
  36. package/dist/node/{reactive-engine.svelte-ChNFn4Hj.d.ts → reactive-engine.svelte-CRNqHlbv.d.ts} +199 -1
  37. package/dist/node/reverse-W7THPV45.js +193 -0
  38. package/dist/node/{terminal-adapter-CWka-yL8.d.ts → terminal-adapter-B-UK_Vdz.d.ts} +28 -3
  39. package/dist/node/{terminal-adapter-CDzxoLKR.d.cts → terminal-adapter-BQSIF5bf.d.cts} +28 -3
  40. package/dist/node/validate-CNHUULQE.js +180 -0
  41. package/docs/core/pluresdb-integration.md +15 -15
  42. package/docs/decision-ledger/BEHAVIOR_LEDGER.md +225 -0
  43. package/docs/decision-ledger/DecisionLedger.tla +180 -0
  44. package/docs/decision-ledger/IMPLEMENTATION_SUMMARY.md +217 -0
  45. package/docs/decision-ledger/LATEST.md +166 -0
  46. package/docs/guides/cicd-pipeline.md +142 -0
  47. package/package.json +2 -2
  48. package/src/__tests__/cli-validate.test.ts +197 -0
  49. package/src/__tests__/decision-ledger.test.ts +485 -0
  50. package/src/__tests__/reverse-generator.test.ts +189 -0
  51. package/src/__tests__/scanner.test.ts +215 -0
  52. package/src/cli/commands/docs.ts +147 -0
  53. package/src/cli/commands/reverse.ts +289 -0
  54. package/src/cli/commands/validate.ts +264 -0
  55. package/src/cli/index.ts +68 -0
  56. package/src/core/pluresdb/adapter.ts +46 -3
  57. package/src/core/reactive-engine.svelte.ts +6 -1
  58. package/src/core/reactive-engine.ts +1 -1
  59. package/src/core/rules.ts +133 -0
  60. package/src/decision-ledger/README.md +400 -0
  61. package/src/decision-ledger/REVERSE_ENGINEERING.md +484 -0
  62. package/src/decision-ledger/facts-events.ts +121 -0
  63. package/src/decision-ledger/index.ts +70 -0
  64. package/src/decision-ledger/ledger.ts +246 -0
  65. package/src/decision-ledger/logic-ledger.ts +158 -0
  66. package/src/decision-ledger/reverse-generator.ts +426 -0
  67. package/src/decision-ledger/scanner.ts +506 -0
  68. package/src/decision-ledger/types.ts +247 -0
  69. package/src/decision-ledger/validation.ts +336 -0
  70. package/src/dsl/index.ts +13 -2
  71. package/src/index.browser.ts +6 -0
  72. package/src/index.ts +40 -0
  73. package/src/integrations/pluresdb.ts +14 -2
  74. package/src/integrations/unified.ts +350 -0
package/FRAMEWORK.md CHANGED
@@ -143,28 +143,104 @@ PluresDB provides the data storage and synchronization layer.
143
143
  - Logic engine fact/event storage
144
144
  - Component data binding
145
145
  - Distributed state management
146
+ - CRDT-based synchronization
147
+ - Event sourcing and replay
146
148
 
147
- ### 5. Visual IDE (CodeCanvas Integration)
149
+ **Status**: Fully implemented with comprehensive test coverage
148
150
 
149
- CodeCanvas provides visual development capabilities.
151
+ ### 5. Identity & Channels (Unum Integration)
152
+
153
+ Unum provides identity management and channel-based communication for distributed systems.
150
154
 
151
155
  **Features:**
152
156
 
153
- - Visual schema editor
154
- - Logic flow designer
155
- - Component preview
156
- - Orchestrator visualization
157
- - Documentation navigation
157
+ - Identity creation and management
158
+ - Channel-based messaging
159
+ - Event and fact broadcasting
160
+ - Member management
161
+ - Real-time synchronization with PluresDB
162
+
163
+ **Use Cases:**
164
+
165
+ - Multi-user collaboration
166
+ - Distributed event streaming
167
+ - Node-to-node communication
168
+ - Identity-based access control
169
+ - Real-time state synchronization
170
+
171
+ **Integration Points:**
172
+
173
+ - Praxis event broadcasting to channels
174
+ - Fact synchronization across nodes
175
+ - PluresDB backend for persistence
176
+ - Engine attachment for automatic distribution
177
+
178
+ **Status**: ✅ Fully implemented with comprehensive API
179
+
180
+ ### 6. Documentation (State-Docs Integration)
181
+
182
+ State-Docs generates living documentation from Praxis schemas and logic definitions.
183
+
184
+ **Features:**
185
+
186
+ - Auto-generated Markdown documentation
187
+ - Mermaid and DOT diagram generation
188
+ - Model and component catalogs
189
+ - Logic flow visualization
190
+ - Event → Rule → Fact diagrams
191
+ - Customizable templates
192
+
193
+ **Use Cases:**
194
+
195
+ - API documentation
196
+ - Architecture diagrams
197
+ - Onboarding documentation
198
+ - Design reviews
199
+ - GitHub Pages integration
200
+
201
+ **Integration Points:**
202
+
203
+ - Schema documentation generation
204
+ - Registry introspection
205
+ - Automatic ToC and index generation
206
+ - Diagram export (Mermaid, DOT)
207
+
208
+ **Status**: ✅ Fully implemented with CLI support (`praxis docs`)
209
+
210
+ ### 7. Visual IDE (CodeCanvas Integration)
211
+
212
+ CodeCanvas provides visual development capabilities for schemas and logic flows.
213
+
214
+ **Features:**
215
+
216
+ - Visual schema editor with node-based UI
217
+ - Schema ↔ Canvas bi-directional sync
218
+ - Mermaid and YAML export
219
+ - Obsidian Canvas compatibility
220
+ - FSM visualization
221
+ - Guardian pre-commit validation
222
+ - Activity lifecycle tracking
158
223
 
159
224
  **Use Cases:**
160
225
 
161
226
  - Design schemas visually
162
- - Build logic flows with drag-and-drop
163
- - Preview generated components
164
- - Visualize distributed orchestration
165
- - Navigate living documentation
227
+ - Build logic flows with visual tools
228
+ - Export schemas to diagrams
229
+ - Integrate with Obsidian workflows
230
+ - Visualize state machines
231
+ - Enforce development lifecycle
166
232
 
167
- ### 6. Orchestration (DSC/MCP Support)
233
+ **Integration Points:**
234
+
235
+ - Schema conversion (`schemaToCanvas`)
236
+ - Canvas export (YAML, Mermaid, JSON)
237
+ - Visual editor API
238
+ - FSM lifecycle management
239
+ - Guardian validation hooks
240
+
241
+ **Status**: ✅ Fully implemented with CLI support (`praxis canvas`)
242
+
243
+ ### 8. Orchestration (DSC/MCP Support)
168
244
 
169
245
  Support for distributed system coordination.
170
246
 
@@ -213,17 +289,32 @@ Generate code from schemas.
213
289
 
214
290
  Options:
215
291
 
216
- - `--target`: Generation target (components, models, docs, all)
292
+ - `--target`: Generation target (components, models, pluresdb, docs, all)
217
293
  - `--watch`: Watch for schema changes
294
+ - `--auto-index`: Auto-indexing strategy for PluresDB
295
+
296
+ #### `praxis docs [schema]`
297
+
298
+ Generate documentation from schemas or registries.
299
+
300
+ Options:
301
+
302
+ - `--output`: Output directory (default: ./docs)
303
+ - `--title`: Documentation title
304
+ - `--format`: Diagram format (mermaid, dot)
305
+ - `--no-toc`: Disable table of contents
306
+ - `--from-registry`: Generate from registry instead of schema
218
307
 
219
308
  #### `praxis canvas [schema]`
220
309
 
221
- Open CodeCanvas for visual editing.
310
+ Open CodeCanvas for visual editing or export schemas to canvas formats.
222
311
 
223
312
  Options:
224
313
 
225
- - `--port`: Port for Canvas server
314
+ - `--port`: Port for Canvas server (default: 3000)
226
315
  - `--mode`: Mode (edit, view, present)
316
+ - `--export`: Export format (yaml, mermaid, json)
317
+ - `--output`: Output file for export
227
318
 
228
319
  #### `praxis orchestrate`
229
320
 
package/README.md CHANGED
@@ -1,5 +1,3 @@
1
- dotnet build
2
- dotnet test
3
1
  # Praxis
4
2
 
5
3
  **Typed, visual-first application logic for Svelte, Node, and the browser.**
@@ -10,25 +8,10 @@ dotnet test
10
8
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org/)
11
9
  [![Deno Compatible](https://img.shields.io/badge/deno-compatible-brightgreen)](https://deno.land/)
12
10
 
13
- Praxis is a schema-driven, rule-based engine with first-class Svelte 5 integration, component generation, and optional cloud sync. The library delivers a unified ESM/CJS build, curated subpath exports, Svelte runes support, and a slimmer, publish-ready package for npm and JSR.
11
+ Praxis is a unified solution for declarative application development. The framework combines typed logic modeling (facts, events, rules, constraints), component generation (Svelte 5), and local-first data persistence (PluresDB). It includes visual tools (CodeCanvas, State-Docs), distributed system support (Unum), optional cloud relay, and a CLI for scaffolding and generation.
14
12
 
15
- ---
13
+ The library delivers unified ESM/CJS builds with curated subpath exports (`./`, `./svelte`, `./schema`, `./component`, `./cloud`, `./components`), Svelte 5 runes support, and publish-ready packages for npm and JSR.
16
14
 
17
- ## What’s new
18
- - **Unified builds & exports**: `./`, `./svelte`, `./schema`, `./component`, `./cloud`, `./components`, and CLI all ship with ESM, CJS, and type definitions.
19
- - **Svelte 5 runes native**: Runes-friendly stores and helpers; server+client builds for integrations.
20
- - **Framework-agnostic reactivity**: Proxy-based reactive engine for use without Svelte, enabling reactive state management in Node.js, browsers, and any JavaScript environment.
21
- - **Logic engine refinements**: Typed registry, step diagnostics, and trace-friendly rule execution.
22
- - **Cloud relay & local-first**: Polished cloud connector alongside PluresDB-first workflows.
23
- - **Publish-ready**: npm public access + JSR exports aligned to source.
24
-
25
- ## Capabilities at a glance
26
- - **Logic Engine**: Facts, events, rules, constraints, registry, introspection, and reactive engine variants (Svelte 5 + framework-agnostic).
27
- - **Schema & Codegen**: PSF-style schema types plus component generator for Svelte UIs.
28
- - **Svelte Integration**: Typed helpers, runes-ready builds, and Svelte component typings.
29
- - **Local-First Data**: PluresDB integrations for offline-first, reactive state.
30
- - **Cloud Relay**: Optional sync layer (GitHub-auth friendly) for distributed teams.
31
- - **CLI**: Scaffolding, generation, canvas helpers, and cloud commands.
32
15
 
33
16
  ## Install
34
17
  Node 18+ recommended.
@@ -43,7 +26,7 @@ pnpm add @plures/praxis
43
26
 
44
27
  JSR (Deno):
45
28
  ```bash
46
- const result = engine.step([Login.create({ username: 'alice' })]);
29
+ deno add @plures/praxis
47
30
  # or via import map pointing to npm:
48
31
  # {
49
32
  # "imports": { "@plures/praxis": "npm:@plures/praxis@^1.1.2" }
@@ -81,6 +64,64 @@ const engine = createPraxisEngine({ initialContext: { currentUser: null }, regis
81
64
  engine.step([Login.create({ username: 'alex' })]);
82
65
  ```
83
66
 
67
+ ## Unified workflow example
68
+
69
+ See all Praxis integrations working together - from schema definition to persistence, documentation, and distributed communication:
70
+
71
+ ```ts
72
+ import {
73
+ createPraxisEngine,
74
+ PraxisRegistry,
75
+ defineRule,
76
+ createInMemoryDB,
77
+ createPluresDBAdapter,
78
+ createUnumAdapter,
79
+ createStateDocsGenerator,
80
+ schemaToCanvas,
81
+ } from '@plures/praxis';
82
+
83
+ // 1. Define logic with Praxis engine
84
+ const registry = new PraxisRegistry();
85
+ registry.registerRule(/* your rules */);
86
+ const engine = createPraxisEngine({ initialContext: {}, registry });
87
+
88
+ // 2. Add PluresDB for local-first persistence
89
+ const db = createInMemoryDB();
90
+ const pluresAdapter = createPluresDBAdapter({ db, registry });
91
+ pluresAdapter.attachEngine(engine);
92
+
93
+ // 3. Add Unum for distributed communication
94
+ const unum = await createUnumAdapter({
95
+ db,
96
+ identity: { name: 'node-1' },
97
+ realtime: true,
98
+ });
99
+ const channel = await unum.createChannel('app-sync');
100
+
101
+ // Subscribe to distribute events across nodes
102
+ unum.subscribeToEvents(channel.id, (event) => {
103
+ engine.step([event]);
104
+ });
105
+
106
+ // 4. Generate documentation with State-Docs
107
+ const docsGenerator = createStateDocsGenerator({
108
+ projectTitle: 'My App',
109
+ target: './docs',
110
+ });
111
+ const docs = docsGenerator.generateFromModule(registry.module);
112
+
113
+ // 5. Export schema to CodeCanvas for visual editing
114
+ const canvas = schemaToCanvas(mySchema);
115
+ // Canvas can be edited visually and converted back to schema
116
+
117
+ // Now you have:
118
+ // ✅ Logic engine running
119
+ // ✅ Auto-persisting to PluresDB
120
+ // ✅ Distributing events across nodes via Unum
121
+ // ✅ Auto-generated documentation
122
+ // ✅ Visual schema representation
123
+ ```
124
+
84
125
  ## Svelte integration (runes-ready)
85
126
  ```svelte
86
127
  <script lang="ts">
@@ -468,7 +509,7 @@ Demonstrates the terminal node feature for command execution:
468
509
  - Terminal adapter creation and configuration
469
510
  - Command execution and history tracking
470
511
  - YAML schema loading with terminal nodes
471
- - PluresDB binding configuration (ready for integration)
512
+ - PluresDB binding configuration
472
513
  - Both text and widget input modes
473
514
 
474
515
  ```bash
@@ -603,7 +644,7 @@ Praxis integrates with the full Plures ecosystem:
603
644
 
604
645
  ### PluresDB Integration
605
646
 
606
- Local-first reactive datastore for offline-capable applications. **Now fully implemented** with 32 tests covering all features.
647
+ Local-first reactive datastore for offline-capable applications. Fully implemented with 32 tests covering all features.
607
648
 
608
649
  ```typescript
609
650
  import {
@@ -652,116 +693,174 @@ adapter.subscribeToEvents((events) => {
652
693
 
653
694
  ### Unum Integration
654
695
 
655
- Identity and channels for distributed systems.
696
+ Identity and channels for distributed systems. Fully implemented with comprehensive channel and identity management.
656
697
 
657
698
  ```typescript
658
- import { createUnumIdentity, createChannel } from '@plures/unum';
699
+ import {
700
+ createUnumAdapter,
701
+ attachUnumToEngine,
702
+ } from '@plures/praxis';
659
703
 
660
- // Create identity
661
- const identity = await createUnumIdentity({
662
- name: 'my-app-node',
663
- keys: await generateKeys(),
704
+ // Create Unum adapter with identity
705
+ const unum = await createUnumAdapter({
706
+ db: pluresDB,
707
+ identity: {
708
+ name: 'my-app-node',
709
+ metadata: { role: 'coordinator' },
710
+ },
711
+ realtime: true,
664
712
  });
665
713
 
666
- // Create channel for messaging
667
- const channel = await createChannel({
668
- name: 'app-events',
669
- participants: [identity.id],
714
+ // Create a channel for messaging
715
+ const channel = await unum.createChannel('app-events', ['member-1', 'member-2']);
716
+
717
+ // Broadcast Praxis events to channel
718
+ await unum.broadcastEvent(channel.id, {
719
+ tag: 'USER_JOINED',
720
+ payload: { userId: 'alice' },
670
721
  });
671
722
 
672
- // Integrate with Praxis actors
673
- const unumActor = createActor('unum-bridge', identity, async (event) => {
674
- // Bridge Praxis events to Unum channels
675
- await channel.publish(event);
723
+ // Subscribe to events from channel
724
+ const unsubscribe = unum.subscribeToEvents(channel.id, (event) => {
725
+ console.log('Received event:', event);
726
+ // Feed into local Praxis engine
727
+ engine.step([event]);
676
728
  });
729
+
730
+ // Attach to engine for automatic event broadcasting
731
+ attachUnumToEngine(engine, unum, channel.id);
677
732
  ```
678
733
 
679
- **Status**: Planned
680
- **Use Cases**: Distributed messaging, identity management, authentication
734
+ **Features:**
735
+
736
+ - **Identity Management**: Create and manage user/node identities
737
+ - **Channel Communication**: Real-time messaging between distributed nodes
738
+ - **Event Broadcasting**: Share Praxis events across channels
739
+ - **Fact Synchronization**: Distribute facts to connected participants
740
+ - **PluresDB Integration**: Persists identities and messages
741
+
742
+ **Status**: ✅ Available (`src/integrations/unum.ts`)
743
+ **Tests**: Comprehensive integration tests
744
+ **Use Cases**: Distributed messaging, identity management, multi-user collaboration
681
745
 
682
- ### ADP Integration
683
746
 
684
- Architectural Decision Protocol for guardrails and governance.
747
+ ### State-Docs Integration
748
+
749
+ Living documentation generated from Praxis schemas. Fully implemented with Markdown and Mermaid diagram generation.
685
750
 
686
751
  ```typescript
687
- import { createADP } from '@plures/adp';
752
+ import {
753
+ createStateDocsGenerator,
754
+ generateDocs,
755
+ } from '@plures/praxis';
688
756
 
689
- // Track architectural decisions from schemas
690
- const adp = createADP({
691
- source: 'praxis-schema',
692
- decisions: [
693
- {
694
- id: 'ADR-001',
695
- title: 'Use PluresDB for local-first storage',
696
- context: 'Need offline-capable data storage',
697
- decision: 'Adopt PluresDB',
698
- consequences: ['Offline support', 'Sync complexity'],
699
- },
700
- ],
757
+ // Create generator
758
+ const generator = createStateDocsGenerator({
759
+ projectTitle: 'My Praxis App',
760
+ target: './docs',
761
+ visualization: {
762
+ format: 'mermaid',
763
+ theme: 'default',
764
+ },
765
+ template: {
766
+ toc: true,
767
+ timestamp: true,
768
+ },
701
769
  });
702
770
 
703
- // Enforce guardrails
704
- adp.enforce({
705
- rule: 'no-direct-database-access',
706
- check: (code) => !code.includes('direct-sql'),
771
+ // Generate docs from schema
772
+ const docs = generator.generateFromSchema(appSchema);
773
+
774
+ // Or from registry
775
+ const registryDocs = generator.generateFromModule(myModule);
776
+
777
+ // Write generated docs
778
+ for (const doc of docs) {
779
+ await writeFile(doc.path, doc.content);
780
+ }
781
+
782
+ // Quick helper
783
+ const allDocs = generateDocs(appSchema, {
784
+ projectTitle: 'My App',
785
+ target: './docs',
707
786
  });
708
787
  ```
709
788
 
710
- **Status**: Planned
711
- **Use Cases**: Architecture documentation, compliance checking, guardrails
789
+ **Features:**
790
+
791
+ - **Schema Documentation**: Auto-generate docs from Praxis schemas
792
+ - **Mermaid Diagrams**: Visual state machine and flow diagrams
793
+ - **Markdown Output**: GitHub-ready documentation
794
+ - **Model & Component Docs**: Detailed API documentation
795
+ - **Logic Flow Visualization**: Event → Rule → Fact diagrams
796
+ - **Table of Contents**: Automatic ToC generation
712
797
 
713
- ### State-Docs Integration
798
+ **Status**: ✅ Available (`src/integrations/state-docs.ts`)
799
+ **Documentation**: Auto-generates README, models.md, logic diagrams
714
800
 
715
- Living documentation generated from Praxis schemas.
801
+ ### CodeCanvas Integration
802
+
803
+ Visual IDE for schema and logic editing. Fully implemented with schema visualization and canvas export.
716
804
 
717
805
  ```typescript
718
- import { generateStateDocs } from '@plures/state-docs';
719
-
720
- // Generate documentation from schema
721
- const docs = await generateStateDocs({
722
- schema: appSchema,
723
- logic: logicDefinitions,
724
- components: componentDefinitions,
725
- output: './docs',
726
- format: 'markdown', // or 'html', 'pdf'
727
- });
806
+ import {
807
+ schemaToCanvas,
808
+ canvasToSchema,
809
+ canvasToMermaid,
810
+ createCanvasEditor,
811
+ } from '@plures/praxis';
728
812
 
729
- // Documentation includes:
730
- // - Data model diagrams
731
- // - Logic flow diagrams
732
- // - Component catalog
733
- // - API reference
734
- // - Usage examples
735
- ```
813
+ // Convert schema to canvas document
814
+ const canvas = schemaToCanvas(mySchema, {
815
+ layout: 'hierarchical',
816
+ });
736
817
 
737
- **Status**: Planned
738
- **Documentation**: See examples for State-Docs integration patterns
818
+ // Export to YAML (Obsidian Canvas compatible)
819
+ const yaml = canvasToYaml(canvas);
820
+ await writeFile('./schema.canvas.yaml', yaml);
739
821
 
740
- ### CodeCanvas Integration
822
+ // Export to Mermaid diagram
823
+ const mermaid = canvasToMermaid(canvas);
741
824
 
742
- Visual IDE for schema and logic editing.
825
+ // Create canvas editor instance
826
+ const editor = createCanvasEditor({
827
+ schema: mySchema,
828
+ enableFSM: true,
829
+ layout: 'hierarchical',
830
+ });
743
831
 
744
- ```bash
745
- # Open Canvas for visual editing
746
- praxis canvas src/schemas/app.schema.ts
832
+ // Add nodes programmatically
833
+ editor.addNode({
834
+ type: 'model',
835
+ label: 'User',
836
+ x: 100,
837
+ y: 100,
838
+ width: 150,
839
+ height: 60,
840
+ data: userModel,
841
+ });
747
842
 
748
- # Features:
749
- # - Visual schema design
750
- # - Logic flow editor
751
- # - Component preview
752
- # - Real-time collaboration
753
- # - Export to code
843
+ // Convert back to schema
844
+ const updatedSchema = editor.toSchema();
754
845
  ```
755
846
 
756
- **Status**: Planned
847
+ **Features:**
848
+
849
+ - **Visual Schema Design**: Node-based schema editor
850
+ - **Canvas Export**: YAML and Mermaid diagram formats
851
+ - **Obsidian Compatible**: Works with Obsidian Canvas format
852
+ - **FSM Visualization**: State machine and flow diagrams
853
+ - **Bi-directional Sync**: Canvas ↔ Schema round-tripping
854
+ - **Guardian Validation**: Pre-commit lifecycle checks
855
+
856
+ **Status**: ✅ Available (`src/integrations/code-canvas.ts`)
757
857
  **Documentation**: [docs/guides/canvas.md](./docs/guides/canvas.md)
758
858
 
759
- ### Svelte + Tauri Runtime
859
+ ### Svelte Integration
760
860
 
761
- Cross-platform runtime for web, desktop, and mobile.
861
+ Svelte v5 integration with reactive stores.
762
862
 
763
863
  ```typescript
764
- // Svelte v5 integration (available now)
765
864
  import { createPraxisStore } from '@plures/praxis/svelte';
766
865
 
767
866
  const stateStore = createPraxisStore(engine);
@@ -769,15 +868,8 @@ const userStore = createDerivedStore(engine, (ctx) => ctx.currentUser);
769
868
 
770
869
  // In Svelte component:
771
870
  // $: currentUser = $userStore;
772
-
773
- // Desktop app with Tauri
774
- npm run tauri:dev // Development
775
- npm run tauri:build // Production
776
871
  ```
777
872
 
778
- **Status**: Svelte integration available, Tauri templates planned
779
- **Platform Support**: Web (now), Desktop (planned), Mobile (future)
780
-
781
873
  ## Cross-Language Usage
782
874
 
783
875
  ### PowerShell
@@ -851,23 +943,6 @@ Console.WriteLine($"Facts: {result.State.Facts.Count}"); // Facts: 1
851
943
 
852
944
  See [csharp/Praxis/README.md](./csharp/Praxis/README.md) for complete documentation.
853
945
 
854
- ## Roadmap
855
-
856
- ### Current Focus
857
-
858
- - Full CodeCanvas integration
859
- - Enhanced Unum identity support
860
- - Advanced State-Docs generation
861
- - Multi-language schema support
862
- - Real PluresDB sync with CRDT/offline-first capabilities
863
-
864
- ### Long Term
865
-
866
- - Mobile templates (iOS, Android)
867
- - Enterprise features
868
- - Advanced orchestration
869
- - Performance optimizations
870
- - Plugin ecosystem
871
946
 
872
947
  ## Cross-Language Support
873
948
 
@@ -0,0 +1,14 @@
1
+ import {
2
+ InMemoryPraxisDB,
3
+ PluresDBPraxisAdapter,
4
+ createInMemoryDB,
5
+ createPluresDB,
6
+ createPraxisLocalFirst
7
+ } from "./chunk-MBVHLOU2.js";
8
+ export {
9
+ InMemoryPraxisDB,
10
+ PluresDBPraxisAdapter,
11
+ createInMemoryDB,
12
+ createPluresDB,
13
+ createPraxisLocalFirst
14
+ };