xcomponent-ai 0.2.1 → 0.2.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/dist/cli.js CHANGED
@@ -61,7 +61,7 @@ const program = new commander_1.Command();
61
61
  program
62
62
  .name('xcomponent-ai')
63
63
  .description('Agentic FSM tool for fintech workflows')
64
- .version('0.2.1');
64
+ .version('0.2.2');
65
65
  /**
66
66
  * Initialize new project
67
67
  */
@@ -9,7 +9,7 @@ function generateSwaggerSpec(component, port) {
9
9
  openapi: '3.0.0',
10
10
  info: {
11
11
  title: 'xcomponent-ai REST API',
12
- version: '0.2.1',
12
+ version: '0.2.2',
13
13
  description: `REST API for ${component.name} FSM runtime.
14
14
 
15
15
  Manage state machine instances, send events, and monitor execution in real-time.`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xcomponent-ai",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "LLM-first framework for AI agents (Claude, GPT) to build apps with sanctuarized business logic. Event-driven FSM runtime with multi-instance state machines, cross-component communication, event sourcing, and production-ready persistence (PostgreSQL, MongoDB)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -249,8 +249,8 @@
249
249
  });
250
250
 
251
251
  socket.on('component_data', (data) => {
252
- componentData = data;
253
- document.getElementById('component-name').textContent = data.name;
252
+ componentData = data.component;
253
+ document.getElementById('component-name').textContent = componentData.name;
254
254
  populateSelectors();
255
255
  });
256
256
 
@@ -384,8 +384,8 @@
384
384
  function renderDiagram() {
385
385
  const machineName = document.getElementById('diagram-machine').value;
386
386
  if (!machineName || !componentData) return;
387
-
388
- const machine = componentData.machines.find(m => m.name === machineName);
387
+
388
+ const machine = componentData.stateMachines.find(m => m.name === machineName);
389
389
  if (!machine) return;
390
390
 
391
391
  // Generate Mermaid diagram
@@ -423,8 +423,8 @@
423
423
  function updateCreateForm() {
424
424
  const machineName = document.getElementById('create-machine').value;
425
425
  if (!machineName || !componentData) return;
426
-
427
- const machine = componentData.machines.find(m => m.name === machineName);
426
+
427
+ const machine = componentData.stateMachines.find(m => m.name === machineName);
428
428
  if (!machine || !machine.contextSchema) {
429
429
  document.getElementById('create-form-fields').innerHTML = '<div class="form-group"><label>Context (JSON)</label><textarea id="context-json" rows="4"></textarea></div>';
430
430
  return;
@@ -451,8 +451,8 @@
451
451
  async function createInstance() {
452
452
  const machineName = document.getElementById('create-machine').value;
453
453
  if (!machineName) return alert('Please select a state machine');
454
-
455
- const machine = componentData?.machines.find(m => m.name === machineName);
454
+
455
+ const machine = componentData?.stateMachines.find(m => m.name === machineName);
456
456
  let context = {};
457
457
 
458
458
  if (machine?.contextSchema) {
@@ -486,9 +486,9 @@
486
486
  }
487
487
 
488
488
  function populateSelectors() {
489
- if (!componentData) return;
490
-
491
- const machines = componentData.machines.map(m => `<option value="${m.name}">${m.name}</option>`).join('');
489
+ if (!componentData || !componentData.stateMachines) return;
490
+
491
+ const machines = componentData.stateMachines.map(m => `<option value="${m.name}">${m.name}</option>`).join('');
492
492
  document.getElementById('filter-machine').innerHTML = '<option value="">All Machines</option>' + machines;
493
493
  document.getElementById('diagram-machine').innerHTML = '<option value="">Select...</option>' + machines;
494
494
  document.getElementById('create-machine').innerHTML = '<option value="">Select...</option>' + machines;