@almadar/std 3.13.0 → 3.13.1

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 (86) hide show
  1. package/behaviors/exports/atoms/std-agent-activity-log.orb +559 -0
  2. package/behaviors/exports/atoms/std-agent-chat-thread.orb +774 -0
  3. package/behaviors/exports/atoms/std-agent-classifier.orb +606 -137
  4. package/behaviors/exports/atoms/std-agent-completion.orb +646 -182
  5. package/behaviors/exports/atoms/std-agent-context-window.orb +1762 -258
  6. package/behaviors/exports/atoms/std-agent-conversation.orb +652 -369
  7. package/behaviors/exports/atoms/std-agent-memory.orb +574 -322
  8. package/behaviors/exports/atoms/std-agent-provider.orb +632 -136
  9. package/behaviors/exports/atoms/std-agent-search.orb +228 -198
  10. package/behaviors/exports/atoms/std-agent-session.orb +569 -559
  11. package/behaviors/exports/atoms/std-agent-step-progress.orb +850 -0
  12. package/behaviors/exports/atoms/std-agent-token-gauge.orb +1616 -0
  13. package/behaviors/exports/atoms/std-agent-tool-call.orb +983 -126
  14. package/behaviors/exports/molecules/std-agent-fix-loop.orb +1985 -21
  15. package/behaviors/exports/molecules/std-agent-learner.orb +1830 -23
  16. package/behaviors/exports/molecules/std-agent-planner.orb +1776 -19
  17. package/behaviors/exports/molecules/std-agent-rag.orb +1150 -15
  18. package/behaviors/exports/molecules/std-agent-tool-loop.orb +3643 -23
  19. package/behaviors/exports/organisms/std-agent-assistant.orb +5308 -1156
  20. package/behaviors/exports/organisms/std-agent-builder.orb +13525 -1326
  21. package/behaviors/exports/organisms/std-agent-pipeline.orb +10731 -1088
  22. package/behaviors/exports/organisms/std-agent-reviewer.orb +4187 -525
  23. package/behaviors/exports/organisms/std-agent-tutor.orb +3126 -322
  24. package/behaviors/exports/validation-report.json +1 -1426
  25. package/dist/behaviors/exports/atoms/std-agent-activity-log.orb +559 -0
  26. package/dist/behaviors/exports/atoms/std-agent-chat-thread.orb +774 -0
  27. package/dist/behaviors/exports/atoms/std-agent-classifier.orb +606 -137
  28. package/dist/behaviors/exports/atoms/std-agent-completion.orb +646 -182
  29. package/dist/behaviors/exports/atoms/std-agent-context-window.orb +1762 -258
  30. package/dist/behaviors/exports/atoms/std-agent-conversation.orb +652 -369
  31. package/dist/behaviors/exports/atoms/std-agent-memory.orb +574 -322
  32. package/dist/behaviors/exports/atoms/std-agent-provider.orb +632 -136
  33. package/dist/behaviors/exports/atoms/std-agent-search.orb +228 -198
  34. package/dist/behaviors/exports/atoms/std-agent-session.orb +569 -559
  35. package/dist/behaviors/exports/atoms/std-agent-step-progress.orb +850 -0
  36. package/dist/behaviors/exports/atoms/std-agent-token-gauge.orb +1616 -0
  37. package/dist/behaviors/exports/atoms/std-agent-tool-call.orb +983 -126
  38. package/dist/behaviors/exports/molecules/std-agent-fix-loop.orb +1985 -21
  39. package/dist/behaviors/exports/molecules/std-agent-learner.orb +1830 -23
  40. package/dist/behaviors/exports/molecules/std-agent-planner.orb +1776 -19
  41. package/dist/behaviors/exports/molecules/std-agent-rag.orb +1150 -15
  42. package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +3643 -23
  43. package/dist/behaviors/exports/organisms/std-agent-assistant.orb +5308 -1156
  44. package/dist/behaviors/exports/organisms/std-agent-builder.orb +13525 -1326
  45. package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +10731 -1088
  46. package/dist/behaviors/exports/organisms/std-agent-reviewer.orb +4187 -525
  47. package/dist/behaviors/exports/organisms/std-agent-tutor.orb +3126 -322
  48. package/dist/behaviors/exports/validation-report.json +1 -1426
  49. package/dist/behaviors/exports-reader.js +4860 -4176
  50. package/dist/behaviors/exports-reader.js.map +1 -1
  51. package/dist/behaviors/functions/index.d.ts +259 -98
  52. package/dist/behaviors/functions/index.js +4845 -4177
  53. package/dist/behaviors/functions/index.js.map +1 -1
  54. package/dist/behaviors/index.d.ts +1 -1
  55. package/dist/behaviors/index.js +4863 -4179
  56. package/dist/behaviors/index.js.map +1 -1
  57. package/dist/behaviors/query.js +4862 -4178
  58. package/dist/behaviors/query.js.map +1 -1
  59. package/dist/exports/atoms/std-agent-activity-log.orb +559 -0
  60. package/dist/exports/atoms/std-agent-chat-thread.orb +774 -0
  61. package/dist/exports/atoms/std-agent-classifier.orb +606 -137
  62. package/dist/exports/atoms/std-agent-completion.orb +646 -182
  63. package/dist/exports/atoms/std-agent-context-window.orb +1762 -258
  64. package/dist/exports/atoms/std-agent-conversation.orb +652 -369
  65. package/dist/exports/atoms/std-agent-memory.orb +574 -322
  66. package/dist/exports/atoms/std-agent-provider.orb +632 -136
  67. package/dist/exports/atoms/std-agent-search.orb +228 -198
  68. package/dist/exports/atoms/std-agent-session.orb +569 -559
  69. package/dist/exports/atoms/std-agent-step-progress.orb +850 -0
  70. package/dist/exports/atoms/std-agent-token-gauge.orb +1616 -0
  71. package/dist/exports/atoms/std-agent-tool-call.orb +983 -126
  72. package/dist/exports/molecules/std-agent-fix-loop.orb +1985 -21
  73. package/dist/exports/molecules/std-agent-learner.orb +1830 -23
  74. package/dist/exports/molecules/std-agent-planner.orb +1776 -19
  75. package/dist/exports/molecules/std-agent-rag.orb +1150 -15
  76. package/dist/exports/molecules/std-agent-tool-loop.orb +3643 -23
  77. package/dist/exports/organisms/std-agent-assistant.orb +5308 -1156
  78. package/dist/exports/organisms/std-agent-builder.orb +13525 -1326
  79. package/dist/exports/organisms/std-agent-pipeline.orb +10731 -1088
  80. package/dist/exports/organisms/std-agent-reviewer.orb +4187 -525
  81. package/dist/exports/organisms/std-agent-tutor.orb +3126 -322
  82. package/dist/exports/validation-report.json +1 -1426
  83. package/dist/index.d.ts +1 -1
  84. package/dist/index.js +4864 -4180
  85. package/dist/index.js.map +1 -1
  86. package/package.json +1 -1
@@ -59,11 +59,23 @@
59
59
  {
60
60
  "event": "ASSESSMENT_DONE",
61
61
  "description": "Student level assessed",
62
- "scope": "internal"
62
+ "scope": "internal",
63
+ "payload": [
64
+ {
65
+ "name": "level",
66
+ "type": "string"
67
+ }
68
+ ]
63
69
  },
64
70
  {
65
71
  "event": "ASSESSMENT_DONE",
66
72
  "description": "Student assessed, generate quiz",
73
+ "payload": [
74
+ {
75
+ "name": "level",
76
+ "type": "string"
77
+ }
78
+ ],
67
79
  "scope": "external"
68
80
  }
69
81
  ],
@@ -899,11 +911,23 @@
899
911
  {
900
912
  "event": "QUIZ_GRADED",
901
913
  "description": "Answer graded, reinforce or decay concept",
902
- "scope": "internal"
914
+ "scope": "internal",
915
+ "payload": [
916
+ {
917
+ "name": "correct",
918
+ "type": "boolean"
919
+ }
920
+ ]
903
921
  },
904
922
  {
905
923
  "event": "QUIZ_GRADED",
906
924
  "description": "Reinforce or decay concept based on answer",
925
+ "payload": [
926
+ {
927
+ "name": "correct",
928
+ "type": "boolean"
929
+ }
930
+ ],
907
931
  "scope": "external"
908
932
  }
909
933
  ],
@@ -1572,11 +1596,10 @@
1572
1596
  ]
1573
1597
  },
1574
1598
  {
1575
- "name": "ConceptOrbital",
1599
+ "name": "TutorChatOrbital",
1576
1600
  "entity": {
1577
- "name": "Concept",
1578
- "persistence": "persistent",
1579
- "collection": "concepts",
1601
+ "name": "TutorChat",
1602
+ "persistence": "runtime",
1580
1603
  "fields": [
1581
1604
  {
1582
1605
  "name": "id",
@@ -1584,47 +1607,69 @@
1584
1607
  "required": true
1585
1608
  },
1586
1609
  {
1587
- "name": "content",
1588
- "type": "string",
1589
- "default": ""
1610
+ "name": "messages",
1611
+ "type": "array",
1612
+ "default": []
1590
1613
  },
1591
1614
  {
1592
- "name": "category",
1615
+ "name": "turnCount",
1616
+ "type": "number",
1617
+ "default": 0
1618
+ },
1619
+ {
1620
+ "name": "lastMessage",
1593
1621
  "type": "string",
1594
- "default": "general"
1622
+ "default": ""
1595
1623
  },
1596
1624
  {
1597
- "name": "strength",
1625
+ "name": "tokenCount",
1598
1626
  "type": "number",
1599
- "default": 1
1627
+ "default": 0
1600
1628
  },
1601
1629
  {
1602
- "name": "pinned",
1603
- "type": "boolean",
1604
- "default": false
1630
+ "name": "role",
1631
+ "type": "string",
1632
+ "default": "user"
1605
1633
  },
1606
1634
  {
1607
- "name": "scope",
1635
+ "name": "content",
1608
1636
  "type": "string",
1609
- "default": "session"
1637
+ "default": ""
1610
1638
  },
1611
1639
  {
1612
- "name": "lastAccessedAt",
1640
+ "name": "timestamp",
1613
1641
  "type": "string",
1614
1642
  "default": ""
1615
1643
  },
1616
1644
  {
1617
- "name": "createdAt",
1645
+ "name": "toolName",
1618
1646
  "type": "string",
1619
1647
  "default": ""
1648
+ },
1649
+ {
1650
+ "name": "status",
1651
+ "type": "string",
1652
+ "default": "sent"
1620
1653
  }
1621
1654
  ]
1622
1655
  },
1623
1656
  "traits": [
1624
1657
  {
1625
- "name": "ConceptLifecycle",
1626
- "linkedEntity": "Concept",
1658
+ "name": "TutorConversation",
1659
+ "linkedEntity": "TutorChat",
1627
1660
  "category": "interaction",
1661
+ "emits": [
1662
+ {
1663
+ "event": "SEND_MESSAGE",
1664
+ "scope": "internal",
1665
+ "payload": [
1666
+ {
1667
+ "name": "content",
1668
+ "type": "string"
1669
+ }
1670
+ ]
1671
+ }
1672
+ ],
1628
1673
  "stateMachine": {
1629
1674
  "states": [
1630
1675
  {
@@ -1632,7 +1677,7 @@
1632
1677
  "isInitial": true
1633
1678
  },
1634
1679
  {
1635
- "name": "active"
1680
+ "name": "composing"
1636
1681
  }
1637
1682
  ],
1638
1683
  "events": [
@@ -1641,68 +1686,23 @@
1641
1686
  "name": "Initialize"
1642
1687
  },
1643
1688
  {
1644
- "key": "MEMORIZE",
1645
- "name": "Memorize",
1646
- "payload": [
1647
- {
1648
- "name": "content",
1649
- "type": "string",
1650
- "required": true
1651
- },
1652
- {
1653
- "name": "category",
1654
- "type": "string",
1655
- "required": false
1656
- }
1657
- ]
1658
- },
1659
- {
1660
- "key": "RECALL",
1661
- "name": "Recall",
1662
- "payload": [
1663
- {
1664
- "name": "query",
1665
- "type": "string",
1666
- "required": true
1667
- }
1668
- ]
1669
- },
1670
- {
1671
- "key": "PIN",
1672
- "name": "Pin",
1673
- "payload": [
1674
- {
1675
- "name": "id",
1676
- "type": "string",
1677
- "required": true
1678
- }
1679
- ]
1680
- },
1681
- {
1682
- "key": "FORGET",
1683
- "name": "Forget",
1684
- "payload": [
1685
- {
1686
- "name": "id",
1687
- "type": "string",
1688
- "required": true
1689
- }
1690
- ]
1689
+ "key": "COMPOSE",
1690
+ "name": "Compose Message"
1691
1691
  },
1692
1692
  {
1693
- "key": "REINFORCE",
1694
- "name": "Reinforce",
1693
+ "key": "SEND",
1694
+ "name": "Send Message",
1695
1695
  "payload": [
1696
1696
  {
1697
- "name": "id",
1697
+ "name": "content",
1698
1698
  "type": "string",
1699
1699
  "required": true
1700
1700
  }
1701
1701
  ]
1702
1702
  },
1703
1703
  {
1704
- "key": "DECAY",
1705
- "name": "Decay"
1704
+ "key": "CLEAR",
1705
+ "name": "Clear Thread"
1706
1706
  }
1707
1707
  ],
1708
1708
  "transitions": [
@@ -1713,7 +1713,7 @@
1713
1713
  "effects": [
1714
1714
  [
1715
1715
  "fetch",
1716
- "Concept"
1716
+ "TutorChat"
1717
1717
  ],
1718
1718
  [
1719
1719
  "render-ui",
@@ -1748,17 +1748,33 @@
1748
1748
  "type": "stack",
1749
1749
  "direction": "horizontal",
1750
1750
  "gap": "sm",
1751
+ "justify": "space-between",
1751
1752
  "align": "center",
1752
1753
  "children": [
1753
1754
  {
1754
- "type": "icon",
1755
- "name": "brain",
1756
- "size": "lg"
1755
+ "type": "stack",
1756
+ "direction": "horizontal",
1757
+ "gap": "sm",
1758
+ "align": "center",
1759
+ "children": [
1760
+ {
1761
+ "type": "icon",
1762
+ "name": "message-circle",
1763
+ "size": "lg"
1764
+ },
1765
+ {
1766
+ "type": "typography",
1767
+ "content": "TutorChat Thread",
1768
+ "variant": "h2"
1769
+ }
1770
+ ]
1757
1771
  },
1758
1772
  {
1759
- "type": "typography",
1760
- "content": "Concept Manager",
1761
- "variant": "h2"
1773
+ "type": "button",
1774
+ "label": "New Message",
1775
+ "event": "COMPOSE",
1776
+ "variant": "primary",
1777
+ "icon": "plus"
1762
1778
  }
1763
1779
  ]
1764
1780
  },
@@ -1766,30 +1782,48 @@
1766
1782
  "type": "divider"
1767
1783
  },
1768
1784
  {
1769
- "type": "stack",
1770
- "direction": "horizontal",
1771
- "gap": "sm",
1772
- "children": [
1773
- {
1774
- "type": "button",
1775
- "label": "Memorize",
1776
- "event": "MEMORIZE",
1777
- "variant": "primary",
1778
- "icon": "plus"
1779
- },
1780
- {
1781
- "type": "button",
1782
- "label": "Recall",
1783
- "event": "RECALL",
1784
- "variant": "secondary",
1785
- "icon": "search"
1786
- },
1785
+ "type": "data-list",
1786
+ "entity": "TutorChat",
1787
+ "emptyIcon": "message-circle",
1788
+ "emptyTitle": "No messages yet",
1789
+ "emptyDescription": "Start a conversation by sending a message.",
1790
+ "renderItem": [
1791
+ "fn",
1792
+ "item",
1787
1793
  {
1788
- "type": "button",
1789
- "label": "Decay All",
1790
- "event": "DECAY",
1791
- "variant": "ghost",
1792
- "icon": "clock"
1794
+ "type": "stack",
1795
+ "direction": "vertical",
1796
+ "gap": "xs",
1797
+ "children": [
1798
+ {
1799
+ "type": "stack",
1800
+ "direction": "horizontal",
1801
+ "gap": "sm",
1802
+ "align": "center",
1803
+ "children": [
1804
+ {
1805
+ "type": "badge",
1806
+ "label": "@item.role"
1807
+ },
1808
+ {
1809
+ "type": "badge",
1810
+ "label": "@item.status",
1811
+ "variant": "outline"
1812
+ },
1813
+ {
1814
+ "type": "typography",
1815
+ "variant": "caption",
1816
+ "color": "muted",
1817
+ "content": "@item.timestamp"
1818
+ }
1819
+ ]
1820
+ },
1821
+ {
1822
+ "type": "typography",
1823
+ "variant": "body",
1824
+ "content": "@item.content"
1825
+ }
1826
+ ]
1793
1827
  }
1794
1828
  ]
1795
1829
  }
@@ -1802,29 +1836,9 @@
1802
1836
  },
1803
1837
  {
1804
1838
  "from": "idle",
1805
- "to": "active",
1806
- "event": "MEMORIZE",
1839
+ "to": "composing",
1840
+ "event": "COMPOSE",
1807
1841
  "effects": [
1808
- [
1809
- "agent/memorize",
1810
- "@payload.content",
1811
- "@payload.category"
1812
- ],
1813
- [
1814
- "set",
1815
- "@entity.content",
1816
- "@payload.content"
1817
- ],
1818
- [
1819
- "set",
1820
- "@entity.category",
1821
- "@payload.category"
1822
- ],
1823
- [
1824
- "set",
1825
- "@entity.createdAt",
1826
- "@now"
1827
- ],
1828
1842
  [
1829
1843
  "render-ui",
1830
1844
  "main",
@@ -1858,17 +1872,34 @@
1858
1872
  "type": "stack",
1859
1873
  "direction": "horizontal",
1860
1874
  "gap": "sm",
1875
+ "justify": "space-between",
1861
1876
  "align": "center",
1862
1877
  "children": [
1863
1878
  {
1864
- "type": "icon",
1865
- "name": "brain",
1866
- "size": "lg"
1879
+ "type": "stack",
1880
+ "direction": "horizontal",
1881
+ "gap": "sm",
1882
+ "align": "center",
1883
+ "children": [
1884
+ {
1885
+ "type": "icon",
1886
+ "name": "message-circle",
1887
+ "size": "lg"
1888
+ },
1889
+ {
1890
+ "type": "typography",
1891
+ "content": "TutorChat Thread",
1892
+ "variant": "h2"
1893
+ }
1894
+ ]
1867
1895
  },
1868
1896
  {
1869
- "type": "typography",
1870
- "content": "Concept Active",
1871
- "variant": "h2"
1897
+ "type": "button",
1898
+ "label": "New Message",
1899
+ "event": "COMPOSE",
1900
+ "variant": "primary",
1901
+ "icon": "plus",
1902
+ "disabled": true
1872
1903
  }
1873
1904
  ]
1874
1905
  },
@@ -1876,50 +1907,74 @@
1876
1907
  "type": "divider"
1877
1908
  },
1878
1909
  {
1879
- "type": "typography",
1880
- "variant": "body",
1881
- "content": "@entity.content"
1882
- },
1883
- {
1884
- "type": "stack",
1885
- "direction": "horizontal",
1886
- "gap": "sm",
1887
- "children": [
1888
- {
1889
- "type": "badge",
1890
- "label": "@entity.category"
1891
- },
1910
+ "type": "data-list",
1911
+ "entity": "TutorChat",
1912
+ "emptyIcon": "message-circle",
1913
+ "emptyTitle": "No messages yet",
1914
+ "emptyDescription": "Start a conversation by sending a message.",
1915
+ "renderItem": [
1916
+ "fn",
1917
+ "item",
1892
1918
  {
1893
- "type": "badge",
1894
- "label": "@entity.strength"
1919
+ "type": "stack",
1920
+ "direction": "vertical",
1921
+ "gap": "xs",
1922
+ "children": [
1923
+ {
1924
+ "type": "stack",
1925
+ "direction": "horizontal",
1926
+ "gap": "sm",
1927
+ "align": "center",
1928
+ "children": [
1929
+ {
1930
+ "type": "badge",
1931
+ "label": "@item.role"
1932
+ },
1933
+ {
1934
+ "type": "badge",
1935
+ "label": "@item.status",
1936
+ "variant": "outline"
1937
+ },
1938
+ {
1939
+ "type": "typography",
1940
+ "variant": "caption",
1941
+ "color": "muted",
1942
+ "content": "@item.timestamp"
1943
+ }
1944
+ ]
1945
+ },
1946
+ {
1947
+ "type": "typography",
1948
+ "variant": "body",
1949
+ "content": "@item.content"
1950
+ }
1951
+ ]
1895
1952
  }
1896
1953
  ]
1897
1954
  },
1898
1955
  {
1899
- "type": "stack",
1900
- "direction": "horizontal",
1901
- "gap": "sm",
1956
+ "type": "form-section",
1957
+ "title": "Compose Message",
1902
1958
  "children": [
1903
1959
  {
1904
- "type": "button",
1905
- "label": "Pin",
1906
- "event": "PIN",
1907
- "variant": "secondary",
1908
- "icon": "pin"
1909
- },
1910
- {
1911
- "type": "button",
1912
- "label": "Reinforce",
1913
- "event": "REINFORCE",
1914
- "variant": "secondary",
1915
- "icon": "zap"
1960
+ "type": "textarea",
1961
+ "label": "Message",
1962
+ "bind": "@entity.content",
1963
+ "placeholder": "Type your message..."
1916
1964
  },
1917
1965
  {
1918
- "type": "button",
1919
- "label": "Forget",
1920
- "event": "FORGET",
1921
- "variant": "destructive",
1922
- "icon": "trash"
1966
+ "type": "stack",
1967
+ "direction": "horizontal",
1968
+ "gap": "sm",
1969
+ "children": [
1970
+ {
1971
+ "type": "button",
1972
+ "label": "Send",
1973
+ "event": "SEND",
1974
+ "variant": "primary",
1975
+ "icon": "send"
1976
+ }
1977
+ ]
1923
1978
  }
1924
1979
  ]
1925
1980
  }
@@ -1929,15 +1984,2670 @@
1929
1984
  }
1930
1985
  ]
1931
1986
  ]
1932
- },
1987
+ },
1988
+ {
1989
+ "from": "composing",
1990
+ "to": "idle",
1991
+ "event": "SEND",
1992
+ "effects": [
1993
+ [
1994
+ "set",
1995
+ "@entity.content",
1996
+ "@payload.content"
1997
+ ],
1998
+ [
1999
+ "set",
2000
+ "@entity.role",
2001
+ "user"
2002
+ ],
2003
+ [
2004
+ "set",
2005
+ "@entity.timestamp",
2006
+ "@now"
2007
+ ],
2008
+ [
2009
+ "set",
2010
+ "@entity.status",
2011
+ "sent"
2012
+ ],
2013
+ [
2014
+ "persist",
2015
+ "create",
2016
+ "TutorChat",
2017
+ {
2018
+ "role": "user",
2019
+ "content": "@payload.content",
2020
+ "timestamp": "@now",
2021
+ "status": "sent"
2022
+ }
2023
+ ],
2024
+ [
2025
+ "emit",
2026
+ "SEND_MESSAGE"
2027
+ ],
2028
+ [
2029
+ "fetch",
2030
+ "TutorChat"
2031
+ ],
2032
+ [
2033
+ "render-ui",
2034
+ "main",
2035
+ {
2036
+ "type": "dashboard-layout",
2037
+ "appName": "AI Tutor",
2038
+ "navItems": [
2039
+ {
2040
+ "label": "Teach",
2041
+ "href": "/teach",
2042
+ "icon": "book-open"
2043
+ },
2044
+ {
2045
+ "label": "Quiz",
2046
+ "href": "/quiz",
2047
+ "icon": "help-circle"
2048
+ },
2049
+ {
2050
+ "label": "Concepts",
2051
+ "href": "/concepts",
2052
+ "icon": "brain"
2053
+ }
2054
+ ],
2055
+ "children": [
2056
+ {
2057
+ "type": "stack",
2058
+ "direction": "vertical",
2059
+ "gap": "lg",
2060
+ "children": [
2061
+ {
2062
+ "type": "stack",
2063
+ "direction": "horizontal",
2064
+ "gap": "sm",
2065
+ "justify": "space-between",
2066
+ "align": "center",
2067
+ "children": [
2068
+ {
2069
+ "type": "stack",
2070
+ "direction": "horizontal",
2071
+ "gap": "sm",
2072
+ "align": "center",
2073
+ "children": [
2074
+ {
2075
+ "type": "icon",
2076
+ "name": "message-circle",
2077
+ "size": "lg"
2078
+ },
2079
+ {
2080
+ "type": "typography",
2081
+ "content": "TutorChat Thread",
2082
+ "variant": "h2"
2083
+ }
2084
+ ]
2085
+ },
2086
+ {
2087
+ "type": "button",
2088
+ "label": "New Message",
2089
+ "event": "COMPOSE",
2090
+ "variant": "primary",
2091
+ "icon": "plus"
2092
+ }
2093
+ ]
2094
+ },
2095
+ {
2096
+ "type": "divider"
2097
+ },
2098
+ {
2099
+ "type": "data-list",
2100
+ "entity": "TutorChat",
2101
+ "emptyIcon": "message-circle",
2102
+ "emptyTitle": "No messages yet",
2103
+ "emptyDescription": "Start a conversation by sending a message.",
2104
+ "renderItem": [
2105
+ "fn",
2106
+ "item",
2107
+ {
2108
+ "type": "stack",
2109
+ "direction": "vertical",
2110
+ "gap": "xs",
2111
+ "children": [
2112
+ {
2113
+ "type": "stack",
2114
+ "direction": "horizontal",
2115
+ "gap": "sm",
2116
+ "align": "center",
2117
+ "children": [
2118
+ {
2119
+ "type": "badge",
2120
+ "label": "@item.role"
2121
+ },
2122
+ {
2123
+ "type": "badge",
2124
+ "label": "@item.status",
2125
+ "variant": "outline"
2126
+ },
2127
+ {
2128
+ "type": "typography",
2129
+ "variant": "caption",
2130
+ "color": "muted",
2131
+ "content": "@item.timestamp"
2132
+ }
2133
+ ]
2134
+ },
2135
+ {
2136
+ "type": "typography",
2137
+ "variant": "body",
2138
+ "content": "@item.content"
2139
+ }
2140
+ ]
2141
+ }
2142
+ ]
2143
+ }
2144
+ ]
2145
+ }
2146
+ ]
2147
+ }
2148
+ ],
2149
+ [
2150
+ "notify",
2151
+ "TutorChat created successfully"
2152
+ ]
2153
+ ]
2154
+ },
2155
+ {
2156
+ "from": "idle",
2157
+ "to": "idle",
2158
+ "event": "CLEAR",
2159
+ "effects": [
2160
+ [
2161
+ "persist",
2162
+ "delete",
2163
+ "TutorChat"
2164
+ ],
2165
+ [
2166
+ "fetch",
2167
+ "TutorChat"
2168
+ ],
2169
+ [
2170
+ "render-ui",
2171
+ "main",
2172
+ {
2173
+ "type": "dashboard-layout",
2174
+ "appName": "AI Tutor",
2175
+ "navItems": [
2176
+ {
2177
+ "label": "Teach",
2178
+ "href": "/teach",
2179
+ "icon": "book-open"
2180
+ },
2181
+ {
2182
+ "label": "Quiz",
2183
+ "href": "/quiz",
2184
+ "icon": "help-circle"
2185
+ },
2186
+ {
2187
+ "label": "Concepts",
2188
+ "href": "/concepts",
2189
+ "icon": "brain"
2190
+ }
2191
+ ],
2192
+ "children": [
2193
+ {
2194
+ "type": "stack",
2195
+ "direction": "vertical",
2196
+ "gap": "lg",
2197
+ "children": [
2198
+ {
2199
+ "type": "stack",
2200
+ "direction": "horizontal",
2201
+ "gap": "sm",
2202
+ "justify": "space-between",
2203
+ "align": "center",
2204
+ "children": [
2205
+ {
2206
+ "type": "stack",
2207
+ "direction": "horizontal",
2208
+ "gap": "sm",
2209
+ "align": "center",
2210
+ "children": [
2211
+ {
2212
+ "type": "icon",
2213
+ "name": "message-circle",
2214
+ "size": "lg"
2215
+ },
2216
+ {
2217
+ "type": "typography",
2218
+ "content": "TutorChat Thread",
2219
+ "variant": "h2"
2220
+ }
2221
+ ]
2222
+ },
2223
+ {
2224
+ "type": "button",
2225
+ "label": "New Message",
2226
+ "event": "COMPOSE",
2227
+ "variant": "primary",
2228
+ "icon": "plus"
2229
+ }
2230
+ ]
2231
+ },
2232
+ {
2233
+ "type": "divider"
2234
+ },
2235
+ {
2236
+ "type": "data-list",
2237
+ "entity": "TutorChat",
2238
+ "emptyIcon": "message-circle",
2239
+ "emptyTitle": "No messages yet",
2240
+ "emptyDescription": "Start a conversation by sending a message.",
2241
+ "renderItem": [
2242
+ "fn",
2243
+ "item",
2244
+ {
2245
+ "type": "stack",
2246
+ "direction": "vertical",
2247
+ "gap": "xs",
2248
+ "children": [
2249
+ {
2250
+ "type": "stack",
2251
+ "direction": "horizontal",
2252
+ "gap": "sm",
2253
+ "align": "center",
2254
+ "children": [
2255
+ {
2256
+ "type": "badge",
2257
+ "label": "@item.role"
2258
+ },
2259
+ {
2260
+ "type": "badge",
2261
+ "label": "@item.status",
2262
+ "variant": "outline"
2263
+ },
2264
+ {
2265
+ "type": "typography",
2266
+ "variant": "caption",
2267
+ "color": "muted",
2268
+ "content": "@item.timestamp"
2269
+ }
2270
+ ]
2271
+ },
2272
+ {
2273
+ "type": "typography",
2274
+ "variant": "body",
2275
+ "content": "@item.content"
2276
+ }
2277
+ ]
2278
+ }
2279
+ ]
2280
+ }
2281
+ ]
2282
+ }
2283
+ ]
2284
+ }
2285
+ ],
2286
+ [
2287
+ "notify",
2288
+ "TutorChat deleted successfully"
2289
+ ]
2290
+ ]
2291
+ },
2292
+ {
2293
+ "from": "composing",
2294
+ "to": "idle",
2295
+ "event": "CLEAR",
2296
+ "effects": [
2297
+ [
2298
+ "persist",
2299
+ "delete",
2300
+ "TutorChat"
2301
+ ],
2302
+ [
2303
+ "fetch",
2304
+ "TutorChat"
2305
+ ],
2306
+ [
2307
+ "render-ui",
2308
+ "main",
2309
+ {
2310
+ "type": "dashboard-layout",
2311
+ "appName": "AI Tutor",
2312
+ "navItems": [
2313
+ {
2314
+ "label": "Teach",
2315
+ "href": "/teach",
2316
+ "icon": "book-open"
2317
+ },
2318
+ {
2319
+ "label": "Quiz",
2320
+ "href": "/quiz",
2321
+ "icon": "help-circle"
2322
+ },
2323
+ {
2324
+ "label": "Concepts",
2325
+ "href": "/concepts",
2326
+ "icon": "brain"
2327
+ }
2328
+ ],
2329
+ "children": [
2330
+ {
2331
+ "type": "stack",
2332
+ "direction": "vertical",
2333
+ "gap": "lg",
2334
+ "children": [
2335
+ {
2336
+ "type": "stack",
2337
+ "direction": "horizontal",
2338
+ "gap": "sm",
2339
+ "justify": "space-between",
2340
+ "align": "center",
2341
+ "children": [
2342
+ {
2343
+ "type": "stack",
2344
+ "direction": "horizontal",
2345
+ "gap": "sm",
2346
+ "align": "center",
2347
+ "children": [
2348
+ {
2349
+ "type": "icon",
2350
+ "name": "message-circle",
2351
+ "size": "lg"
2352
+ },
2353
+ {
2354
+ "type": "typography",
2355
+ "content": "TutorChat Thread",
2356
+ "variant": "h2"
2357
+ }
2358
+ ]
2359
+ },
2360
+ {
2361
+ "type": "button",
2362
+ "label": "New Message",
2363
+ "event": "COMPOSE",
2364
+ "variant": "primary",
2365
+ "icon": "plus"
2366
+ }
2367
+ ]
2368
+ },
2369
+ {
2370
+ "type": "divider"
2371
+ },
2372
+ {
2373
+ "type": "data-list",
2374
+ "entity": "TutorChat",
2375
+ "emptyIcon": "message-circle",
2376
+ "emptyTitle": "No messages yet",
2377
+ "emptyDescription": "Start a conversation by sending a message.",
2378
+ "renderItem": [
2379
+ "fn",
2380
+ "item",
2381
+ {
2382
+ "type": "stack",
2383
+ "direction": "vertical",
2384
+ "gap": "xs",
2385
+ "children": [
2386
+ {
2387
+ "type": "stack",
2388
+ "direction": "horizontal",
2389
+ "gap": "sm",
2390
+ "align": "center",
2391
+ "children": [
2392
+ {
2393
+ "type": "badge",
2394
+ "label": "@item.role"
2395
+ },
2396
+ {
2397
+ "type": "badge",
2398
+ "label": "@item.status",
2399
+ "variant": "outline"
2400
+ },
2401
+ {
2402
+ "type": "typography",
2403
+ "variant": "caption",
2404
+ "color": "muted",
2405
+ "content": "@item.timestamp"
2406
+ }
2407
+ ]
2408
+ },
2409
+ {
2410
+ "type": "typography",
2411
+ "variant": "body",
2412
+ "content": "@item.content"
2413
+ }
2414
+ ]
2415
+ }
2416
+ ]
2417
+ }
2418
+ ]
2419
+ }
2420
+ ]
2421
+ }
2422
+ ],
2423
+ [
2424
+ "notify",
2425
+ "TutorChat deleted successfully"
2426
+ ]
2427
+ ]
2428
+ }
2429
+ ]
2430
+ }
2431
+ },
2432
+ {
2433
+ "name": "TutorChatAgent",
2434
+ "linkedEntity": "TutorChat",
2435
+ "category": "interaction",
2436
+ "emits": [
2437
+ {
2438
+ "event": "TOKEN_UPDATE",
2439
+ "scope": "internal",
2440
+ "payload": [
2441
+ {
2442
+ "name": "tokenCount",
2443
+ "type": "number"
2444
+ }
2445
+ ]
2446
+ }
2447
+ ],
2448
+ "stateMachine": {
2449
+ "states": [
2450
+ {
2451
+ "name": "idle",
2452
+ "isInitial": true
2453
+ },
2454
+ {
2455
+ "name": "active"
2456
+ },
2457
+ {
2458
+ "name": "paused"
2459
+ }
2460
+ ],
2461
+ "events": [
2462
+ {
2463
+ "key": "INIT",
2464
+ "name": "Initialize"
2465
+ },
2466
+ {
2467
+ "key": "SEND_MESSAGE",
2468
+ "name": "Send Message",
2469
+ "payload": [
2470
+ {
2471
+ "name": "content",
2472
+ "type": "string",
2473
+ "required": true
2474
+ }
2475
+ ]
2476
+ },
2477
+ {
2478
+ "key": "PAUSE",
2479
+ "name": "Pause"
2480
+ },
2481
+ {
2482
+ "key": "RESUME",
2483
+ "name": "Resume"
2484
+ },
2485
+ {
2486
+ "key": "CLEAR",
2487
+ "name": "Clear"
2488
+ }
2489
+ ],
2490
+ "transitions": [
2491
+ {
2492
+ "from": "idle",
2493
+ "to": "idle",
2494
+ "event": "INIT",
2495
+ "effects": [
2496
+ [
2497
+ "fetch",
2498
+ "TutorChat"
2499
+ ],
2500
+ [
2501
+ "render-ui",
2502
+ "main",
2503
+ {
2504
+ "type": "dashboard-layout",
2505
+ "appName": "AI Tutor",
2506
+ "navItems": [
2507
+ {
2508
+ "label": "Teach",
2509
+ "href": "/teach",
2510
+ "icon": "book-open"
2511
+ },
2512
+ {
2513
+ "label": "Quiz",
2514
+ "href": "/quiz",
2515
+ "icon": "help-circle"
2516
+ },
2517
+ {
2518
+ "label": "Concepts",
2519
+ "href": "/concepts",
2520
+ "icon": "brain"
2521
+ }
2522
+ ],
2523
+ "children": [
2524
+ {
2525
+ "type": "empty-state",
2526
+ "icon": "message-circle",
2527
+ "title": "Conversation",
2528
+ "description": "Conversation is ready"
2529
+ }
2530
+ ]
2531
+ }
2532
+ ]
2533
+ ]
2534
+ },
2535
+ {
2536
+ "from": "idle",
2537
+ "to": "active",
2538
+ "event": "SEND_MESSAGE",
2539
+ "effects": [
2540
+ [
2541
+ "set",
2542
+ "@entity.lastMessage",
2543
+ "@payload.content"
2544
+ ],
2545
+ [
2546
+ "set",
2547
+ "@entity.turnCount",
2548
+ [
2549
+ "+",
2550
+ "@entity.turnCount",
2551
+ 1
2552
+ ]
2553
+ ],
2554
+ [
2555
+ "agent/generate",
2556
+ "@payload.content"
2557
+ ],
2558
+ [
2559
+ "emit",
2560
+ "TOKEN_UPDATE"
2561
+ ]
2562
+ ]
2563
+ },
2564
+ {
2565
+ "from": "active",
2566
+ "to": "active",
2567
+ "event": "SEND_MESSAGE",
2568
+ "effects": [
2569
+ [
2570
+ "set",
2571
+ "@entity.lastMessage",
2572
+ "@payload.content"
2573
+ ],
2574
+ [
2575
+ "set",
2576
+ "@entity.turnCount",
2577
+ [
2578
+ "+",
2579
+ "@entity.turnCount",
2580
+ 1
2581
+ ]
2582
+ ],
2583
+ [
2584
+ "agent/generate",
2585
+ "@payload.content"
2586
+ ],
2587
+ [
2588
+ "emit",
2589
+ "TOKEN_UPDATE"
2590
+ ]
2591
+ ]
2592
+ },
2593
+ {
2594
+ "from": "active",
2595
+ "to": "paused",
2596
+ "event": "PAUSE",
2597
+ "effects": []
2598
+ },
2599
+ {
2600
+ "from": "paused",
2601
+ "to": "active",
2602
+ "event": "RESUME",
2603
+ "effects": []
2604
+ },
2605
+ {
2606
+ "from": "active",
2607
+ "to": "idle",
2608
+ "event": "CLEAR",
2609
+ "effects": [
2610
+ [
2611
+ "set",
2612
+ "@entity.messages",
2613
+ []
2614
+ ],
2615
+ [
2616
+ "set",
2617
+ "@entity.turnCount",
2618
+ 0
2619
+ ],
2620
+ [
2621
+ "set",
2622
+ "@entity.lastMessage",
2623
+ ""
2624
+ ],
2625
+ [
2626
+ "set",
2627
+ "@entity.tokenCount",
2628
+ 0
2629
+ ]
2630
+ ]
2631
+ },
2632
+ {
2633
+ "from": "paused",
2634
+ "to": "idle",
2635
+ "event": "CLEAR",
2636
+ "effects": [
2637
+ [
2638
+ "set",
2639
+ "@entity.messages",
2640
+ []
2641
+ ],
2642
+ [
2643
+ "set",
2644
+ "@entity.turnCount",
2645
+ 0
2646
+ ],
2647
+ [
2648
+ "set",
2649
+ "@entity.lastMessage",
2650
+ ""
2651
+ ],
2652
+ [
2653
+ "set",
2654
+ "@entity.tokenCount",
2655
+ 0
2656
+ ]
2657
+ ]
2658
+ }
2659
+ ]
2660
+ }
2661
+ }
2662
+ ],
2663
+ "pages": [
2664
+ {
2665
+ "name": "ChatPage",
2666
+ "path": "/chat",
2667
+ "traits": [
2668
+ {
2669
+ "ref": "TutorConversation"
2670
+ }
2671
+ ]
2672
+ }
2673
+ ]
2674
+ },
2675
+ {
2676
+ "name": "ConceptOrbital",
2677
+ "entity": {
2678
+ "name": "Concept",
2679
+ "persistence": "persistent",
2680
+ "collection": "concepts",
2681
+ "fields": [
2682
+ {
2683
+ "name": "id",
2684
+ "type": "string",
2685
+ "required": true
2686
+ },
2687
+ {
2688
+ "name": "content",
2689
+ "type": "string",
2690
+ "default": ""
2691
+ },
2692
+ {
2693
+ "name": "category",
2694
+ "type": "string",
2695
+ "default": "general"
2696
+ },
2697
+ {
2698
+ "name": "strength",
2699
+ "type": "number",
2700
+ "default": 1
2701
+ },
2702
+ {
2703
+ "name": "pinned",
2704
+ "type": "boolean",
2705
+ "default": false
2706
+ },
2707
+ {
2708
+ "name": "scope",
2709
+ "type": "string",
2710
+ "default": "session"
2711
+ },
2712
+ {
2713
+ "name": "lastAccessedAt",
2714
+ "type": "string",
2715
+ "default": ""
2716
+ },
2717
+ {
2718
+ "name": "createdAt",
2719
+ "type": "string",
2720
+ "default": ""
2721
+ }
2722
+ ]
2723
+ },
2724
+ "traits": [
2725
+ {
2726
+ "name": "ConceptBrowse",
2727
+ "linkedEntity": "Concept",
2728
+ "category": "interaction",
2729
+ "listens": [
2730
+ {
2731
+ "event": "MEMORIZED",
2732
+ "triggers": "MEMORIZED"
2733
+ },
2734
+ {
2735
+ "event": "PINNED",
2736
+ "triggers": "PINNED"
2737
+ },
2738
+ {
2739
+ "event": "FORGOT",
2740
+ "triggers": "FORGOT"
2741
+ },
2742
+ {
2743
+ "event": "REINFORCED",
2744
+ "triggers": "REINFORCED"
2745
+ },
2746
+ {
2747
+ "event": "DECAYED",
2748
+ "triggers": "DECAYED"
2749
+ }
2750
+ ],
2751
+ "stateMachine": {
2752
+ "states": [
2753
+ {
2754
+ "name": "browsing",
2755
+ "isInitial": true
2756
+ }
2757
+ ],
2758
+ "events": [
2759
+ {
2760
+ "key": "INIT",
2761
+ "name": "Initialize"
2762
+ },
2763
+ {
2764
+ "key": "MEMORIZE",
2765
+ "name": "MEMORIZE"
2766
+ },
2767
+ {
2768
+ "key": "RECALL",
2769
+ "name": "RECALL"
2770
+ },
2771
+ {
2772
+ "key": "DECAY",
2773
+ "name": "DECAY"
2774
+ },
2775
+ {
2776
+ "key": "PIN",
2777
+ "name": "PIN",
2778
+ "payload": [
2779
+ {
2780
+ "name": "id",
2781
+ "type": "string",
2782
+ "required": true
2783
+ },
2784
+ {
2785
+ "name": "row",
2786
+ "type": "object"
2787
+ }
2788
+ ]
2789
+ },
2790
+ {
2791
+ "key": "REINFORCE",
2792
+ "name": "REINFORCE",
2793
+ "payload": [
2794
+ {
2795
+ "name": "id",
2796
+ "type": "string",
2797
+ "required": true
2798
+ },
2799
+ {
2800
+ "name": "row",
2801
+ "type": "object"
2802
+ }
2803
+ ]
2804
+ },
2805
+ {
2806
+ "key": "FORGET",
2807
+ "name": "FORGET",
2808
+ "payload": [
2809
+ {
2810
+ "name": "id",
2811
+ "type": "string",
2812
+ "required": true
2813
+ },
2814
+ {
2815
+ "name": "row",
2816
+ "type": "object"
2817
+ }
2818
+ ]
2819
+ },
2820
+ {
2821
+ "key": "MEMORIZED",
2822
+ "name": "MEMORIZED",
2823
+ "payload": [
2824
+ {
2825
+ "name": "data",
2826
+ "type": "object",
2827
+ "required": true
2828
+ }
2829
+ ]
2830
+ },
2831
+ {
2832
+ "key": "PINNED",
2833
+ "name": "PINNED",
2834
+ "payload": [
2835
+ {
2836
+ "name": "data",
2837
+ "type": "object",
2838
+ "required": true
2839
+ }
2840
+ ]
2841
+ },
2842
+ {
2843
+ "key": "FORGOT",
2844
+ "name": "FORGOT",
2845
+ "payload": [
2846
+ {
2847
+ "name": "data",
2848
+ "type": "object",
2849
+ "required": true
2850
+ }
2851
+ ]
2852
+ },
2853
+ {
2854
+ "key": "REINFORCED",
2855
+ "name": "REINFORCED",
2856
+ "payload": [
2857
+ {
2858
+ "name": "data",
2859
+ "type": "object",
2860
+ "required": true
2861
+ }
2862
+ ]
2863
+ },
2864
+ {
2865
+ "key": "DECAYED",
2866
+ "name": "DECAYED",
2867
+ "payload": [
2868
+ {
2869
+ "name": "data",
2870
+ "type": "object",
2871
+ "required": true
2872
+ }
2873
+ ]
2874
+ }
2875
+ ],
2876
+ "transitions": [
2877
+ {
2878
+ "from": "browsing",
2879
+ "to": "browsing",
2880
+ "event": "INIT",
2881
+ "effects": [
2882
+ [
2883
+ "ref",
2884
+ "Concept"
2885
+ ],
2886
+ [
2887
+ "render-ui",
2888
+ "main",
2889
+ {
2890
+ "type": "dashboard-layout",
2891
+ "appName": "AI Tutor",
2892
+ "navItems": [
2893
+ {
2894
+ "label": "Teach",
2895
+ "href": "/teach",
2896
+ "icon": "book-open"
2897
+ },
2898
+ {
2899
+ "label": "Quiz",
2900
+ "href": "/quiz",
2901
+ "icon": "help-circle"
2902
+ },
2903
+ {
2904
+ "label": "Concepts",
2905
+ "href": "/concepts",
2906
+ "icon": "brain"
2907
+ }
2908
+ ],
2909
+ "children": [
2910
+ {
2911
+ "type": "stack",
2912
+ "direction": "vertical",
2913
+ "gap": "lg",
2914
+ "className": "max-w-5xl mx-auto w-full",
2915
+ "children": [
2916
+ {
2917
+ "type": "stack",
2918
+ "direction": "horizontal",
2919
+ "gap": "md",
2920
+ "justify": "space-between",
2921
+ "align": "center",
2922
+ "children": [
2923
+ {
2924
+ "type": "stack",
2925
+ "direction": "horizontal",
2926
+ "gap": "sm",
2927
+ "align": "center",
2928
+ "children": [
2929
+ {
2930
+ "type": "icon",
2931
+ "name": "brain",
2932
+ "size": "lg"
2933
+ },
2934
+ {
2935
+ "type": "typography",
2936
+ "content": "Concept Manager",
2937
+ "variant": "h2"
2938
+ }
2939
+ ]
2940
+ },
2941
+ {
2942
+ "type": "stack",
2943
+ "direction": "horizontal",
2944
+ "gap": "sm",
2945
+ "children": [
2946
+ {
2947
+ "type": "button",
2948
+ "label": "Memorize",
2949
+ "event": "MEMORIZE",
2950
+ "variant": "primary",
2951
+ "icon": "plus"
2952
+ },
2953
+ {
2954
+ "type": "button",
2955
+ "label": "Recall",
2956
+ "event": "RECALL",
2957
+ "variant": "secondary",
2958
+ "icon": "search"
2959
+ },
2960
+ {
2961
+ "type": "button",
2962
+ "label": "Decay All",
2963
+ "event": "DECAY",
2964
+ "variant": "ghost",
2965
+ "icon": "clock"
2966
+ }
2967
+ ]
2968
+ }
2969
+ ]
2970
+ },
2971
+ {
2972
+ "type": "divider"
2973
+ },
2974
+ {
2975
+ "type": "data-grid",
2976
+ "entity": "Concept",
2977
+ "emptyIcon": "inbox",
2978
+ "emptyTitle": "No memories yet",
2979
+ "emptyDescription": "Create your first memory to get started.",
2980
+ "itemActions": [
2981
+ {
2982
+ "label": "Pin",
2983
+ "event": "PIN",
2984
+ "variant": "ghost",
2985
+ "size": "sm"
2986
+ },
2987
+ {
2988
+ "label": "Reinforce",
2989
+ "event": "REINFORCE",
2990
+ "variant": "ghost",
2991
+ "size": "sm"
2992
+ },
2993
+ {
2994
+ "label": "Forget",
2995
+ "event": "FORGET",
2996
+ "variant": "danger",
2997
+ "size": "sm"
2998
+ }
2999
+ ],
3000
+ "columns": [
3001
+ {
3002
+ "name": "content",
3003
+ "label": "Content",
3004
+ "variant": "h4",
3005
+ "icon": "brain"
3006
+ },
3007
+ {
3008
+ "name": "category",
3009
+ "label": "Category",
3010
+ "variant": "badge",
3011
+ "colorMap": {
3012
+ "active": "success",
3013
+ "completed": "success",
3014
+ "done": "success",
3015
+ "pending": "warning",
3016
+ "draft": "warning",
3017
+ "scheduled": "warning",
3018
+ "inactive": "neutral",
3019
+ "archived": "neutral",
3020
+ "disabled": "neutral",
3021
+ "error": "destructive",
3022
+ "cancelled": "destructive",
3023
+ "failed": "destructive"
3024
+ }
3025
+ },
3026
+ {
3027
+ "name": "strength",
3028
+ "label": "Strength",
3029
+ "variant": "caption"
3030
+ }
3031
+ ]
3032
+ }
3033
+ ]
3034
+ }
3035
+ ]
3036
+ }
3037
+ ]
3038
+ ]
3039
+ },
3040
+ {
3041
+ "from": "browsing",
3042
+ "to": "browsing",
3043
+ "event": "MEMORIZED",
3044
+ "effects": [
3045
+ [
3046
+ "ref",
3047
+ "Concept"
3048
+ ]
3049
+ ]
3050
+ },
3051
+ {
3052
+ "from": "browsing",
3053
+ "to": "browsing",
3054
+ "event": "PINNED",
3055
+ "effects": [
3056
+ [
3057
+ "ref",
3058
+ "Concept"
3059
+ ]
3060
+ ]
3061
+ },
3062
+ {
3063
+ "from": "browsing",
3064
+ "to": "browsing",
3065
+ "event": "FORGOT",
3066
+ "effects": [
3067
+ [
3068
+ "ref",
3069
+ "Concept"
3070
+ ]
3071
+ ]
3072
+ },
3073
+ {
3074
+ "from": "browsing",
3075
+ "to": "browsing",
3076
+ "event": "REINFORCED",
3077
+ "effects": [
3078
+ [
3079
+ "ref",
3080
+ "Concept"
3081
+ ]
3082
+ ]
3083
+ },
3084
+ {
3085
+ "from": "browsing",
3086
+ "to": "browsing",
3087
+ "event": "DECAYED",
3088
+ "effects": [
3089
+ [
3090
+ "ref",
3091
+ "Concept"
3092
+ ]
3093
+ ]
3094
+ }
3095
+ ]
3096
+ }
3097
+ },
3098
+ {
3099
+ "name": "ConceptCreate",
3100
+ "linkedEntity": "Concept",
3101
+ "category": "interaction",
3102
+ "emits": [
3103
+ {
3104
+ "event": "MEMORIZED"
3105
+ }
3106
+ ],
3107
+ "stateMachine": {
3108
+ "states": [
3109
+ {
3110
+ "name": "closed",
3111
+ "isInitial": true
3112
+ },
3113
+ {
3114
+ "name": "open"
3115
+ }
3116
+ ],
3117
+ "events": [
3118
+ {
3119
+ "key": "INIT",
3120
+ "name": "Initialize"
3121
+ },
3122
+ {
3123
+ "key": "MEMORIZE",
3124
+ "name": "Open"
3125
+ },
3126
+ {
3127
+ "key": "CLOSE",
3128
+ "name": "Close"
3129
+ },
3130
+ {
3131
+ "key": "SAVE",
3132
+ "name": "Save",
3133
+ "payload": [
3134
+ {
3135
+ "name": "data",
3136
+ "type": "object",
3137
+ "required": true
3138
+ }
3139
+ ]
3140
+ }
3141
+ ],
3142
+ "transitions": [
3143
+ {
3144
+ "from": "closed",
3145
+ "to": "closed",
3146
+ "event": "INIT",
3147
+ "effects": [
3148
+ [
3149
+ "ref",
3150
+ "Concept"
3151
+ ]
3152
+ ]
3153
+ },
3154
+ {
3155
+ "from": "closed",
3156
+ "to": "open",
3157
+ "event": "MEMORIZE",
3158
+ "effects": [
3159
+ [
3160
+ "render-ui",
3161
+ "modal",
3162
+ {
3163
+ "type": "stack",
3164
+ "direction": "vertical",
3165
+ "gap": "md",
3166
+ "children": [
3167
+ {
3168
+ "type": "stack",
3169
+ "direction": "horizontal",
3170
+ "gap": "sm",
3171
+ "children": [
3172
+ {
3173
+ "type": "icon",
3174
+ "name": "plus-circle",
3175
+ "size": "md"
3176
+ },
3177
+ {
3178
+ "type": "typography",
3179
+ "content": "Memorize",
3180
+ "variant": "h3"
3181
+ }
3182
+ ]
3183
+ },
3184
+ {
3185
+ "type": "divider"
3186
+ },
3187
+ {
3188
+ "type": "form-section",
3189
+ "entity": "Concept",
3190
+ "mode": "create",
3191
+ "submitEvent": "SAVE",
3192
+ "cancelEvent": "CLOSE",
3193
+ "fields": [
3194
+ "content",
3195
+ "category",
3196
+ "scope"
3197
+ ]
3198
+ }
3199
+ ]
3200
+ }
3201
+ ]
3202
+ ]
3203
+ },
3204
+ {
3205
+ "from": "open",
3206
+ "to": "closed",
3207
+ "event": "CLOSE",
3208
+ "effects": [
3209
+ [
3210
+ "render-ui",
3211
+ "modal",
3212
+ null
3213
+ ],
3214
+ [
3215
+ "notify",
3216
+ "Cancelled",
3217
+ "info"
3218
+ ]
3219
+ ]
3220
+ },
3221
+ {
3222
+ "from": "open",
3223
+ "to": "closed",
3224
+ "event": "SAVE",
3225
+ "effects": [
3226
+ [
3227
+ "persist",
3228
+ "create",
3229
+ "Concept",
3230
+ "@payload.data"
3231
+ ],
3232
+ [
3233
+ "render-ui",
3234
+ "modal",
3235
+ null
3236
+ ],
3237
+ [
3238
+ "emit",
3239
+ "MEMORIZED"
3240
+ ],
3241
+ [
3242
+ "notify",
3243
+ "Concept created successfully"
3244
+ ]
3245
+ ]
3246
+ }
3247
+ ]
3248
+ }
3249
+ },
3250
+ {
3251
+ "name": "ConceptAgent",
3252
+ "linkedEntity": "Concept",
3253
+ "category": "interaction",
3254
+ "emits": [
3255
+ {
3256
+ "event": "FORGOT",
3257
+ "scope": "external",
3258
+ "payload": [
3259
+ {
3260
+ "name": "id",
3261
+ "type": "string"
3262
+ }
3263
+ ]
3264
+ },
3265
+ {
3266
+ "event": "REINFORCED",
3267
+ "scope": "external",
3268
+ "payload": [
3269
+ {
3270
+ "name": "id",
3271
+ "type": "string"
3272
+ }
3273
+ ]
3274
+ },
3275
+ {
3276
+ "event": "DECAYED",
3277
+ "scope": "external",
3278
+ "payload": [
3279
+ {
3280
+ "name": "id",
3281
+ "type": "string"
3282
+ }
3283
+ ]
3284
+ },
3285
+ {
3286
+ "event": "PINNED",
3287
+ "scope": "external",
3288
+ "payload": [
3289
+ {
3290
+ "name": "id",
3291
+ "type": "string"
3292
+ }
3293
+ ]
3294
+ }
3295
+ ],
3296
+ "stateMachine": {
3297
+ "states": [
3298
+ {
3299
+ "name": "idle",
3300
+ "isInitial": true
3301
+ },
3302
+ {
3303
+ "name": "active"
3304
+ }
3305
+ ],
3306
+ "events": [
3307
+ {
3308
+ "key": "INIT",
3309
+ "name": "Initialize"
3310
+ },
3311
+ {
3312
+ "key": "DO_MEMORIZE",
3313
+ "name": "Do Memorize",
3314
+ "payload": [
3315
+ {
3316
+ "name": "data",
3317
+ "type": "object",
3318
+ "required": true
3319
+ }
3320
+ ]
3321
+ },
3322
+ {
3323
+ "key": "RECALL",
3324
+ "name": "Recall",
3325
+ "payload": [
3326
+ {
3327
+ "name": "query",
3328
+ "type": "string",
3329
+ "required": true
3330
+ }
3331
+ ]
3332
+ },
3333
+ {
3334
+ "key": "PIN",
3335
+ "name": "Pin",
3336
+ "payload": [
3337
+ {
3338
+ "name": "id",
3339
+ "type": "string",
3340
+ "required": true
3341
+ }
3342
+ ]
3343
+ },
3344
+ {
3345
+ "key": "FORGET",
3346
+ "name": "Forget",
3347
+ "payload": [
3348
+ {
3349
+ "name": "id",
3350
+ "type": "string",
3351
+ "required": true
3352
+ }
3353
+ ]
3354
+ },
3355
+ {
3356
+ "key": "REINFORCE",
3357
+ "name": "Reinforce",
3358
+ "payload": [
3359
+ {
3360
+ "name": "id",
3361
+ "type": "string",
3362
+ "required": true
3363
+ }
3364
+ ]
3365
+ },
3366
+ {
3367
+ "key": "DECAY",
3368
+ "name": "Decay"
3369
+ },
3370
+ {
3371
+ "key": "MEMORIZED",
3372
+ "name": "Memorized",
3373
+ "payload": [
3374
+ {
3375
+ "name": "data",
3376
+ "type": "object",
3377
+ "required": true
3378
+ }
3379
+ ]
3380
+ }
3381
+ ],
3382
+ "transitions": [
3383
+ {
3384
+ "from": "idle",
3385
+ "to": "idle",
3386
+ "event": "INIT",
3387
+ "effects": [
3388
+ [
3389
+ "fetch",
3390
+ "Concept"
3391
+ ],
3392
+ [
3393
+ "render-ui",
3394
+ "main",
3395
+ {
3396
+ "type": "dashboard-layout",
3397
+ "appName": "AI Tutor",
3398
+ "navItems": [
3399
+ {
3400
+ "label": "Teach",
3401
+ "href": "/teach",
3402
+ "icon": "book-open"
3403
+ },
3404
+ {
3405
+ "label": "Quiz",
3406
+ "href": "/quiz",
3407
+ "icon": "help-circle"
3408
+ },
3409
+ {
3410
+ "label": "Concepts",
3411
+ "href": "/concepts",
3412
+ "icon": "brain"
3413
+ }
3414
+ ],
3415
+ "children": [
3416
+ {
3417
+ "type": "empty-state",
3418
+ "icon": "brain",
3419
+ "title": "Memory",
3420
+ "description": "Memory is ready"
3421
+ }
3422
+ ]
3423
+ }
3424
+ ]
3425
+ ]
3426
+ },
3427
+ {
3428
+ "from": "idle",
3429
+ "to": "active",
3430
+ "event": "DO_MEMORIZE",
3431
+ "effects": [
3432
+ [
3433
+ "agent/memorize",
3434
+ "@payload.data.content",
3435
+ "@payload.data.category"
3436
+ ],
3437
+ [
3438
+ "persist",
3439
+ "create",
3440
+ "Concept",
3441
+ "@payload.data"
3442
+ ],
3443
+ [
3444
+ "notify",
3445
+ "Concept created successfully"
3446
+ ]
3447
+ ]
3448
+ },
3449
+ {
3450
+ "from": "active",
3451
+ "to": "active",
3452
+ "event": "RECALL",
3453
+ "effects": [
3454
+ [
3455
+ "agent/recall",
3456
+ "@payload.query"
3457
+ ]
3458
+ ]
3459
+ },
3460
+ {
3461
+ "from": "active",
3462
+ "to": "active",
3463
+ "event": "PIN",
3464
+ "guard": [
3465
+ "not",
3466
+ [
3467
+ "agent/is-pinned",
3468
+ "@payload.id"
3469
+ ]
3470
+ ],
3471
+ "effects": [
3472
+ [
3473
+ "agent/pin",
3474
+ "@payload.id"
3475
+ ],
3476
+ [
3477
+ "set",
3478
+ "@entity.pinned",
3479
+ true
3480
+ ],
3481
+ [
3482
+ "emit",
3483
+ "PINNED"
3484
+ ]
3485
+ ]
3486
+ },
3487
+ {
3488
+ "from": "active",
3489
+ "to": "idle",
3490
+ "event": "FORGET",
3491
+ "effects": [
3492
+ [
3493
+ "agent/forget",
3494
+ "@payload.id"
3495
+ ],
3496
+ [
3497
+ "emit",
3498
+ "FORGOT"
3499
+ ]
3500
+ ]
3501
+ },
3502
+ {
3503
+ "from": "active",
3504
+ "to": "active",
3505
+ "event": "REINFORCE",
3506
+ "effects": [
3507
+ [
3508
+ "agent/reinforce",
3509
+ "@payload.id"
3510
+ ],
3511
+ [
3512
+ "emit",
3513
+ "REINFORCED"
3514
+ ]
3515
+ ]
3516
+ },
3517
+ {
3518
+ "from": "idle",
3519
+ "to": "idle",
3520
+ "event": "DECAY",
3521
+ "effects": [
3522
+ [
3523
+ "agent/decay"
3524
+ ],
3525
+ [
3526
+ "emit",
3527
+ "DECAYED"
3528
+ ]
3529
+ ]
3530
+ },
3531
+ {
3532
+ "from": "active",
3533
+ "to": "active",
3534
+ "event": "DECAY",
3535
+ "effects": [
3536
+ [
3537
+ "agent/decay"
3538
+ ],
3539
+ [
3540
+ "emit",
3541
+ "DECAYED"
3542
+ ]
3543
+ ]
3544
+ },
3545
+ {
3546
+ "from": "idle",
3547
+ "to": "active",
3548
+ "event": "MEMORIZED",
3549
+ "effects": [
3550
+ [
3551
+ "fetch",
3552
+ "Concept"
3553
+ ]
3554
+ ]
3555
+ }
3556
+ ]
3557
+ },
3558
+ "listens": [
3559
+ {
3560
+ "event": "QUIZ_GRADED",
3561
+ "triggers": "REINFORCE",
3562
+ "scope": "external"
3563
+ }
3564
+ ]
3565
+ }
3566
+ ],
3567
+ "pages": [
3568
+ {
3569
+ "name": "ConceptsPage",
3570
+ "path": "/concepts",
3571
+ "traits": [
3572
+ {
3573
+ "ref": "ConceptBrowse"
3574
+ },
3575
+ {
3576
+ "ref": "ConceptCreate"
3577
+ },
3578
+ {
3579
+ "ref": "ConceptAgent"
3580
+ }
3581
+ ]
3582
+ }
3583
+ ]
3584
+ },
3585
+ {
3586
+ "name": "StudentAssessmentOrbital",
3587
+ "entity": {
3588
+ "name": "StudentAssessment",
3589
+ "persistence": "runtime",
3590
+ "fields": [
3591
+ {
3592
+ "name": "id",
3593
+ "type": "string",
3594
+ "required": true
3595
+ },
3596
+ {
3597
+ "name": "input",
3598
+ "type": "string",
3599
+ "default": ""
3600
+ },
3601
+ {
3602
+ "name": "category",
3603
+ "type": "string",
3604
+ "default": ""
3605
+ },
3606
+ {
3607
+ "name": "confidence",
3608
+ "type": "number",
3609
+ "default": 0
3610
+ },
3611
+ {
3612
+ "name": "model",
3613
+ "type": "string",
3614
+ "default": "claude-sonnet-4-20250514"
3615
+ },
3616
+ {
3617
+ "name": "message",
3618
+ "type": "string",
3619
+ "default": ""
3620
+ },
3621
+ {
3622
+ "name": "notificationType",
3623
+ "type": "string",
3624
+ "default": "info"
3625
+ }
3626
+ ]
3627
+ },
3628
+ "traits": [
3629
+ {
3630
+ "name": "LevelClassifier",
3631
+ "linkedEntity": "StudentAssessment",
3632
+ "category": "interaction",
3633
+ "emits": [
3634
+ {
3635
+ "event": "CLASSIFIED"
3636
+ }
3637
+ ],
3638
+ "stateMachine": {
3639
+ "states": [
3640
+ {
3641
+ "name": "closed",
3642
+ "isInitial": true
3643
+ },
3644
+ {
3645
+ "name": "open"
3646
+ }
3647
+ ],
3648
+ "events": [
3649
+ {
3650
+ "key": "INIT",
3651
+ "name": "Initialize"
3652
+ },
3653
+ {
3654
+ "key": "CLASSIFY",
3655
+ "name": "Open"
3656
+ },
3657
+ {
3658
+ "key": "CLOSE",
3659
+ "name": "Close"
3660
+ },
3661
+ {
3662
+ "key": "SAVE",
3663
+ "name": "Save",
3664
+ "payload": [
3665
+ {
3666
+ "name": "data",
3667
+ "type": "object",
3668
+ "required": true
3669
+ }
3670
+ ]
3671
+ }
3672
+ ],
3673
+ "transitions": [
3674
+ {
3675
+ "from": "closed",
3676
+ "to": "closed",
3677
+ "event": "INIT",
3678
+ "effects": [
3679
+ [
3680
+ "ref",
3681
+ "StudentAssessment"
3682
+ ],
3683
+ [
3684
+ "render-ui",
3685
+ "main",
3686
+ {
3687
+ "type": "dashboard-layout",
3688
+ "appName": "AI Tutor",
3689
+ "navItems": [
3690
+ {
3691
+ "label": "Teach",
3692
+ "href": "/teach",
3693
+ "icon": "book-open"
3694
+ },
3695
+ {
3696
+ "label": "Quiz",
3697
+ "href": "/quiz",
3698
+ "icon": "help-circle"
3699
+ },
3700
+ {
3701
+ "label": "Concepts",
3702
+ "href": "/concepts",
3703
+ "icon": "brain"
3704
+ }
3705
+ ],
3706
+ "children": [
3707
+ {
3708
+ "type": "stack",
3709
+ "direction": "vertical",
3710
+ "gap": "lg",
3711
+ "children": [
3712
+ {
3713
+ "type": "stack",
3714
+ "direction": "horizontal",
3715
+ "gap": "md",
3716
+ "justify": "space-between",
3717
+ "children": [
3718
+ {
3719
+ "type": "stack",
3720
+ "direction": "horizontal",
3721
+ "gap": "md",
3722
+ "children": [
3723
+ {
3724
+ "type": "icon",
3725
+ "name": "tag",
3726
+ "size": "lg"
3727
+ },
3728
+ {
3729
+ "type": "typography",
3730
+ "content": "StudentAssessment",
3731
+ "variant": "h2"
3732
+ }
3733
+ ]
3734
+ },
3735
+ {
3736
+ "type": "button",
3737
+ "label": "Open",
3738
+ "event": "CLASSIFY",
3739
+ "variant": "primary",
3740
+ "icon": "tag"
3741
+ }
3742
+ ]
3743
+ },
3744
+ {
3745
+ "type": "divider"
3746
+ },
3747
+ {
3748
+ "type": "empty-state",
3749
+ "icon": "tag",
3750
+ "title": "Nothing open",
3751
+ "description": "Click Open to view details in a modal overlay."
3752
+ }
3753
+ ]
3754
+ }
3755
+ ]
3756
+ }
3757
+ ]
3758
+ ]
3759
+ },
3760
+ {
3761
+ "from": "closed",
3762
+ "to": "open",
3763
+ "event": "CLASSIFY",
3764
+ "effects": [
3765
+ [
3766
+ "render-ui",
3767
+ "modal",
3768
+ {
3769
+ "type": "stack",
3770
+ "direction": "vertical",
3771
+ "gap": "md",
3772
+ "children": [
3773
+ {
3774
+ "type": "stack",
3775
+ "direction": "horizontal",
3776
+ "gap": "sm",
3777
+ "children": [
3778
+ {
3779
+ "type": "icon",
3780
+ "name": "tag",
3781
+ "size": "md"
3782
+ },
3783
+ {
3784
+ "type": "typography",
3785
+ "content": "StudentAssessment",
3786
+ "variant": "h3"
3787
+ }
3788
+ ]
3789
+ },
3790
+ {
3791
+ "type": "divider"
3792
+ },
3793
+ {
3794
+ "type": "stack",
3795
+ "direction": "horizontal",
3796
+ "gap": "sm",
3797
+ "children": [
3798
+ {
3799
+ "type": "typography",
3800
+ "variant": "caption",
3801
+ "content": "Categories:"
3802
+ },
3803
+ {
3804
+ "type": "badge",
3805
+ "label": "beginner",
3806
+ "variant": "secondary"
3807
+ },
3808
+ {
3809
+ "type": "badge",
3810
+ "label": "intermediate",
3811
+ "variant": "secondary"
3812
+ },
3813
+ {
3814
+ "type": "badge",
3815
+ "label": "advanced",
3816
+ "variant": "secondary"
3817
+ },
3818
+ {
3819
+ "type": "badge",
3820
+ "label": "expert",
3821
+ "variant": "secondary"
3822
+ }
3823
+ ]
3824
+ },
3825
+ {
3826
+ "type": "form-section",
3827
+ "entity": "StudentAssessment",
3828
+ "mode": "create",
3829
+ "submitEvent": "SAVE",
3830
+ "cancelEvent": "CLOSE",
3831
+ "fields": [
3832
+ "input"
3833
+ ]
3834
+ }
3835
+ ]
3836
+ }
3837
+ ]
3838
+ ]
3839
+ },
3840
+ {
3841
+ "from": "open",
3842
+ "to": "closed",
3843
+ "event": "CLOSE",
3844
+ "effects": [
3845
+ [
3846
+ "render-ui",
3847
+ "modal",
3848
+ null
3849
+ ],
3850
+ [
3851
+ "notify",
3852
+ "Cancelled",
3853
+ "info"
3854
+ ],
3855
+ [
3856
+ "ref",
3857
+ "StudentAssessment"
3858
+ ],
3859
+ [
3860
+ "render-ui",
3861
+ "main",
3862
+ {
3863
+ "type": "dashboard-layout",
3864
+ "appName": "AI Tutor",
3865
+ "navItems": [
3866
+ {
3867
+ "label": "Teach",
3868
+ "href": "/teach",
3869
+ "icon": "book-open"
3870
+ },
3871
+ {
3872
+ "label": "Quiz",
3873
+ "href": "/quiz",
3874
+ "icon": "help-circle"
3875
+ },
3876
+ {
3877
+ "label": "Concepts",
3878
+ "href": "/concepts",
3879
+ "icon": "brain"
3880
+ }
3881
+ ],
3882
+ "children": [
3883
+ {
3884
+ "type": "stack",
3885
+ "direction": "vertical",
3886
+ "gap": "lg",
3887
+ "children": [
3888
+ {
3889
+ "type": "stack",
3890
+ "direction": "horizontal",
3891
+ "gap": "md",
3892
+ "justify": "space-between",
3893
+ "children": [
3894
+ {
3895
+ "type": "stack",
3896
+ "direction": "horizontal",
3897
+ "gap": "md",
3898
+ "children": [
3899
+ {
3900
+ "type": "icon",
3901
+ "name": "tag",
3902
+ "size": "lg"
3903
+ },
3904
+ {
3905
+ "type": "typography",
3906
+ "content": "StudentAssessment",
3907
+ "variant": "h2"
3908
+ }
3909
+ ]
3910
+ },
3911
+ {
3912
+ "type": "button",
3913
+ "label": "Open",
3914
+ "event": "CLASSIFY",
3915
+ "variant": "primary",
3916
+ "icon": "tag"
3917
+ }
3918
+ ]
3919
+ },
3920
+ {
3921
+ "type": "divider"
3922
+ },
3923
+ {
3924
+ "type": "empty-state",
3925
+ "icon": "tag",
3926
+ "title": "Nothing open",
3927
+ "description": "Click Open to view details in a modal overlay."
3928
+ }
3929
+ ]
3930
+ }
3931
+ ]
3932
+ }
3933
+ ]
3934
+ ]
3935
+ },
3936
+ {
3937
+ "from": "open",
3938
+ "to": "closed",
3939
+ "event": "SAVE",
3940
+ "effects": [
3941
+ [
3942
+ "persist",
3943
+ "create",
3944
+ "StudentAssessment",
3945
+ "@payload.data"
3946
+ ],
3947
+ [
3948
+ "render-ui",
3949
+ "modal",
3950
+ null
3951
+ ],
3952
+ [
3953
+ "emit",
3954
+ "CLASSIFIED"
3955
+ ],
3956
+ [
3957
+ "ref",
3958
+ "StudentAssessment"
3959
+ ],
3960
+ [
3961
+ "render-ui",
3962
+ "main",
3963
+ {
3964
+ "type": "dashboard-layout",
3965
+ "appName": "AI Tutor",
3966
+ "navItems": [
3967
+ {
3968
+ "label": "Teach",
3969
+ "href": "/teach",
3970
+ "icon": "book-open"
3971
+ },
3972
+ {
3973
+ "label": "Quiz",
3974
+ "href": "/quiz",
3975
+ "icon": "help-circle"
3976
+ },
3977
+ {
3978
+ "label": "Concepts",
3979
+ "href": "/concepts",
3980
+ "icon": "brain"
3981
+ }
3982
+ ],
3983
+ "children": [
3984
+ {
3985
+ "type": "stack",
3986
+ "direction": "vertical",
3987
+ "gap": "lg",
3988
+ "children": [
3989
+ {
3990
+ "type": "stack",
3991
+ "direction": "horizontal",
3992
+ "gap": "md",
3993
+ "justify": "space-between",
3994
+ "children": [
3995
+ {
3996
+ "type": "stack",
3997
+ "direction": "horizontal",
3998
+ "gap": "md",
3999
+ "children": [
4000
+ {
4001
+ "type": "icon",
4002
+ "name": "tag",
4003
+ "size": "lg"
4004
+ },
4005
+ {
4006
+ "type": "typography",
4007
+ "content": "StudentAssessment",
4008
+ "variant": "h2"
4009
+ }
4010
+ ]
4011
+ },
4012
+ {
4013
+ "type": "button",
4014
+ "label": "Open",
4015
+ "event": "CLASSIFY",
4016
+ "variant": "primary",
4017
+ "icon": "tag"
4018
+ }
4019
+ ]
4020
+ },
4021
+ {
4022
+ "type": "divider"
4023
+ },
4024
+ {
4025
+ "type": "empty-state",
4026
+ "icon": "tag",
4027
+ "title": "Nothing open",
4028
+ "description": "Click Open to view details in a modal overlay."
4029
+ }
4030
+ ]
4031
+ }
4032
+ ]
4033
+ }
4034
+ ],
4035
+ [
4036
+ "notify",
4037
+ "StudentAssessment created successfully"
4038
+ ]
4039
+ ]
4040
+ }
4041
+ ]
4042
+ }
4043
+ },
4044
+ {
4045
+ "name": "StudentAssessmentNotification",
4046
+ "linkedEntity": "StudentAssessment",
4047
+ "category": "interaction",
4048
+ "stateMachine": {
4049
+ "states": [
4050
+ {
4051
+ "name": "hidden",
4052
+ "isInitial": true
4053
+ },
4054
+ {
4055
+ "name": "visible"
4056
+ }
4057
+ ],
4058
+ "events": [
4059
+ {
4060
+ "key": "INIT",
4061
+ "name": "Initialize"
4062
+ },
4063
+ {
4064
+ "key": "SHOW",
4065
+ "name": "Show Notification",
4066
+ "payload": [
4067
+ {
4068
+ "name": "message",
4069
+ "type": "string",
4070
+ "required": true
4071
+ },
4072
+ {
4073
+ "name": "notificationType",
4074
+ "type": "string"
4075
+ }
4076
+ ]
4077
+ },
4078
+ {
4079
+ "key": "HIDE",
4080
+ "name": "Hide Notification"
4081
+ }
4082
+ ],
4083
+ "transitions": [
4084
+ {
4085
+ "from": "hidden",
4086
+ "to": "hidden",
4087
+ "event": "INIT",
4088
+ "effects": [
4089
+ [
4090
+ "fetch",
4091
+ "StudentAssessment"
4092
+ ]
4093
+ ]
4094
+ },
4095
+ {
4096
+ "from": "hidden",
4097
+ "to": "visible",
4098
+ "event": "SHOW",
4099
+ "effects": [
4100
+ [
4101
+ "set",
4102
+ "@entity.message",
4103
+ "@payload.message"
4104
+ ],
4105
+ [
4106
+ "set",
4107
+ "@entity.notificationType",
4108
+ "@payload.notificationType"
4109
+ ],
4110
+ [
4111
+ "render-ui",
4112
+ "main",
4113
+ {
4114
+ "type": "dashboard-layout",
4115
+ "appName": "AI Tutor",
4116
+ "navItems": [
4117
+ {
4118
+ "label": "Teach",
4119
+ "href": "/teach",
4120
+ "icon": "book-open"
4121
+ },
4122
+ {
4123
+ "label": "Quiz",
4124
+ "href": "/quiz",
4125
+ "icon": "help-circle"
4126
+ },
4127
+ {
4128
+ "label": "Concepts",
4129
+ "href": "/concepts",
4130
+ "icon": "brain"
4131
+ }
4132
+ ],
4133
+ "children": [
4134
+ {
4135
+ "type": "stack",
4136
+ "direction": "vertical",
4137
+ "gap": "lg",
4138
+ "children": [
4139
+ {
4140
+ "type": "stack",
4141
+ "direction": "horizontal",
4142
+ "gap": "md",
4143
+ "justify": "space-between",
4144
+ "align": "center",
4145
+ "children": [
4146
+ {
4147
+ "type": "stack",
4148
+ "direction": "horizontal",
4149
+ "gap": "md",
4150
+ "align": "center",
4151
+ "children": [
4152
+ {
4153
+ "type": "icon",
4154
+ "name": "tag",
4155
+ "size": "lg"
4156
+ },
4157
+ {
4158
+ "type": "typography",
4159
+ "content": "StudentAssessment Result",
4160
+ "variant": "h2"
4161
+ }
4162
+ ]
4163
+ },
4164
+ {
4165
+ "type": "button",
4166
+ "label": "Dismiss",
4167
+ "event": "HIDE",
4168
+ "variant": "ghost",
4169
+ "icon": "x"
4170
+ }
4171
+ ]
4172
+ },
4173
+ {
4174
+ "type": "divider"
4175
+ },
4176
+ {
4177
+ "type": "alert",
4178
+ "variant": [
4179
+ "object/get",
4180
+ [
4181
+ "array/first",
4182
+ "@entity"
4183
+ ],
4184
+ "notificationType"
4185
+ ],
4186
+ "message": [
4187
+ "object/get",
4188
+ [
4189
+ "array/first",
4190
+ "@entity"
4191
+ ],
4192
+ "message"
4193
+ ]
4194
+ },
4195
+ {
4196
+ "type": "toast-slot",
4197
+ "position": "top-right"
4198
+ },
4199
+ {
4200
+ "type": "violation-alert",
4201
+ "severity": "warning",
4202
+ "message": [
4203
+ "object/get",
4204
+ [
4205
+ "array/first",
4206
+ "@entity"
4207
+ ],
4208
+ "message"
4209
+ ],
4210
+ "category": "compliance"
4211
+ }
4212
+ ]
4213
+ }
4214
+ ]
4215
+ }
4216
+ ]
4217
+ ]
4218
+ },
4219
+ {
4220
+ "from": "visible",
4221
+ "to": "visible",
4222
+ "event": "SHOW",
4223
+ "effects": [
4224
+ [
4225
+ "set",
4226
+ "@entity.message",
4227
+ "@payload.message"
4228
+ ],
4229
+ [
4230
+ "set",
4231
+ "@entity.notificationType",
4232
+ "@payload.notificationType"
4233
+ ],
4234
+ [
4235
+ "render-ui",
4236
+ "main",
4237
+ {
4238
+ "type": "dashboard-layout",
4239
+ "appName": "AI Tutor",
4240
+ "navItems": [
4241
+ {
4242
+ "label": "Teach",
4243
+ "href": "/teach",
4244
+ "icon": "book-open"
4245
+ },
4246
+ {
4247
+ "label": "Quiz",
4248
+ "href": "/quiz",
4249
+ "icon": "help-circle"
4250
+ },
4251
+ {
4252
+ "label": "Concepts",
4253
+ "href": "/concepts",
4254
+ "icon": "brain"
4255
+ }
4256
+ ],
4257
+ "children": [
4258
+ {
4259
+ "type": "stack",
4260
+ "direction": "vertical",
4261
+ "gap": "lg",
4262
+ "children": [
4263
+ {
4264
+ "type": "stack",
4265
+ "direction": "horizontal",
4266
+ "gap": "md",
4267
+ "justify": "space-between",
4268
+ "align": "center",
4269
+ "children": [
4270
+ {
4271
+ "type": "stack",
4272
+ "direction": "horizontal",
4273
+ "gap": "md",
4274
+ "align": "center",
4275
+ "children": [
4276
+ {
4277
+ "type": "icon",
4278
+ "name": "tag",
4279
+ "size": "lg"
4280
+ },
4281
+ {
4282
+ "type": "typography",
4283
+ "content": "StudentAssessment Result",
4284
+ "variant": "h2"
4285
+ }
4286
+ ]
4287
+ },
4288
+ {
4289
+ "type": "button",
4290
+ "label": "Dismiss",
4291
+ "event": "HIDE",
4292
+ "variant": "ghost",
4293
+ "icon": "x"
4294
+ }
4295
+ ]
4296
+ },
4297
+ {
4298
+ "type": "divider"
4299
+ },
4300
+ {
4301
+ "type": "alert",
4302
+ "variant": [
4303
+ "object/get",
4304
+ [
4305
+ "array/first",
4306
+ "@entity"
4307
+ ],
4308
+ "notificationType"
4309
+ ],
4310
+ "message": [
4311
+ "object/get",
4312
+ [
4313
+ "array/first",
4314
+ "@entity"
4315
+ ],
4316
+ "message"
4317
+ ]
4318
+ },
4319
+ {
4320
+ "type": "toast-slot",
4321
+ "position": "top-right"
4322
+ },
4323
+ {
4324
+ "type": "violation-alert",
4325
+ "severity": "warning",
4326
+ "message": [
4327
+ "object/get",
4328
+ [
4329
+ "array/first",
4330
+ "@entity"
4331
+ ],
4332
+ "message"
4333
+ ],
4334
+ "category": "compliance"
4335
+ }
4336
+ ]
4337
+ }
4338
+ ]
4339
+ }
4340
+ ]
4341
+ ]
4342
+ },
4343
+ {
4344
+ "from": "visible",
4345
+ "to": "hidden",
4346
+ "event": "HIDE",
4347
+ "effects": [
4348
+ [
4349
+ "set",
4350
+ "@entity.message",
4351
+ ""
4352
+ ]
4353
+ ]
4354
+ }
4355
+ ]
4356
+ }
4357
+ },
4358
+ {
4359
+ "name": "StudentAssessmentAgent",
4360
+ "linkedEntity": "StudentAssessment",
4361
+ "category": "interaction",
4362
+ "emits": [
4363
+ {
4364
+ "event": "SHOW",
4365
+ "scope": "internal",
4366
+ "payload": [
4367
+ {
4368
+ "name": "category",
4369
+ "type": "string"
4370
+ },
4371
+ {
4372
+ "name": "confidence",
4373
+ "type": "number"
4374
+ }
4375
+ ]
4376
+ }
4377
+ ],
4378
+ "listens": [
4379
+ {
4380
+ "event": "CLASSIFIED",
4381
+ "triggers": "CLASSIFIED",
4382
+ "scope": "external"
4383
+ }
4384
+ ],
4385
+ "stateMachine": {
4386
+ "states": [
4387
+ {
4388
+ "name": "idle",
4389
+ "isInitial": true
4390
+ },
4391
+ {
4392
+ "name": "classifying"
4393
+ },
4394
+ {
4395
+ "name": "classified"
4396
+ }
4397
+ ],
4398
+ "events": [
4399
+ {
4400
+ "key": "INIT",
4401
+ "name": "Initialize"
4402
+ },
4403
+ {
4404
+ "key": "DO_CLASSIFY",
4405
+ "name": "Do Classify",
4406
+ "payload": [
4407
+ {
4408
+ "name": "data",
4409
+ "type": "object",
4410
+ "required": true
4411
+ }
4412
+ ]
4413
+ },
4414
+ {
4415
+ "key": "RESET",
4416
+ "name": "Reset"
4417
+ },
4418
+ {
4419
+ "key": "CLASSIFIED",
4420
+ "name": "Classified",
4421
+ "payload": [
4422
+ {
4423
+ "name": "data",
4424
+ "type": "object",
4425
+ "required": true
4426
+ }
4427
+ ]
4428
+ }
4429
+ ],
4430
+ "transitions": [
4431
+ {
4432
+ "from": "idle",
4433
+ "to": "idle",
4434
+ "event": "INIT",
4435
+ "effects": [
4436
+ [
4437
+ "fetch",
4438
+ "StudentAssessment"
4439
+ ],
4440
+ [
4441
+ "render-ui",
4442
+ "main",
4443
+ {
4444
+ "type": "dashboard-layout",
4445
+ "appName": "AI Tutor",
4446
+ "navItems": [
4447
+ {
4448
+ "label": "Teach",
4449
+ "href": "/teach",
4450
+ "icon": "book-open"
4451
+ },
4452
+ {
4453
+ "label": "Quiz",
4454
+ "href": "/quiz",
4455
+ "icon": "help-circle"
4456
+ },
4457
+ {
4458
+ "label": "Concepts",
4459
+ "href": "/concepts",
4460
+ "icon": "brain"
4461
+ }
4462
+ ],
4463
+ "children": [
4464
+ {
4465
+ "type": "empty-state",
4466
+ "icon": "tag",
4467
+ "title": "Classifier",
4468
+ "description": "Classifier is ready"
4469
+ }
4470
+ ]
4471
+ }
4472
+ ]
4473
+ ]
4474
+ },
4475
+ {
4476
+ "from": "idle",
4477
+ "to": "classifying",
4478
+ "event": "DO_CLASSIFY",
4479
+ "effects": [
4480
+ [
4481
+ "agent/generate",
4482
+ [
4483
+ "str/concat",
4484
+ "Classify the following text into one of these categories: ",
4485
+ "beginner, intermediate, advanced, expert",
4486
+ ". Text: ",
4487
+ "@entity.input",
4488
+ ". Respond with JSON: {\"category\": \"...\", \"confidence\": 0.0-1.0}"
4489
+ ]
4490
+ ]
4491
+ ]
4492
+ },
4493
+ {
4494
+ "from": "idle",
4495
+ "to": "classifying",
4496
+ "event": "CLASSIFIED",
4497
+ "effects": [
4498
+ [
4499
+ "agent/generate",
4500
+ [
4501
+ "str/concat",
4502
+ "Classify the following text into one of these categories: ",
4503
+ "beginner, intermediate, advanced, expert",
4504
+ ". Text: ",
4505
+ "@entity.input",
4506
+ ". Respond with JSON: {\"category\": \"...\", \"confidence\": 0.0-1.0}"
4507
+ ]
4508
+ ]
4509
+ ]
4510
+ },
4511
+ {
4512
+ "from": "classifying",
4513
+ "to": "classified",
4514
+ "event": "DO_CLASSIFY",
4515
+ "effects": [
4516
+ [
4517
+ "set",
4518
+ "@entity.category",
4519
+ "@payload.data.input"
4520
+ ],
4521
+ [
4522
+ "emit",
4523
+ "SHOW"
4524
+ ]
4525
+ ]
4526
+ },
4527
+ {
4528
+ "from": "classified",
4529
+ "to": "idle",
4530
+ "event": "RESET",
4531
+ "effects": [
4532
+ [
4533
+ "set",
4534
+ "@entity.input",
4535
+ ""
4536
+ ],
4537
+ [
4538
+ "set",
4539
+ "@entity.category",
4540
+ ""
4541
+ ],
4542
+ [
4543
+ "set",
4544
+ "@entity.confidence",
4545
+ 0
4546
+ ]
4547
+ ]
4548
+ }
4549
+ ]
4550
+ }
4551
+ }
4552
+ ],
4553
+ "pages": [
4554
+ {
4555
+ "name": "AssessmentPage",
4556
+ "path": "/assessment",
4557
+ "traits": [
4558
+ {
4559
+ "ref": "LevelClassifier"
4560
+ }
4561
+ ]
4562
+ }
4563
+ ]
4564
+ },
4565
+ {
4566
+ "name": "TutorNavOrbital",
4567
+ "entity": {
4568
+ "name": "TutorNav",
4569
+ "persistence": "runtime",
4570
+ "fields": [
4571
+ {
4572
+ "name": "id",
4573
+ "type": "string",
4574
+ "required": true
4575
+ },
4576
+ {
4577
+ "name": "topic",
4578
+ "type": "string",
4579
+ "default": ""
4580
+ },
4581
+ {
4582
+ "name": "studentLevel",
4583
+ "type": "string",
4584
+ "default": "unknown"
4585
+ },
4586
+ {
4587
+ "name": "explanation",
4588
+ "type": "string",
4589
+ "default": ""
4590
+ },
4591
+ {
4592
+ "name": "questionsAsked",
4593
+ "type": "number",
4594
+ "default": 0
4595
+ },
4596
+ {
4597
+ "name": "correctAnswers",
4598
+ "type": "number",
4599
+ "default": 0
4600
+ },
4601
+ {
4602
+ "name": "sessionStatus",
4603
+ "type": "string",
4604
+ "default": "idle"
4605
+ },
4606
+ {
4607
+ "name": "error",
4608
+ "type": "string",
4609
+ "default": ""
4610
+ }
4611
+ ]
4612
+ },
4613
+ "traits": [
4614
+ {
4615
+ "name": "TutorTabs",
4616
+ "linkedEntity": "TutorSession",
4617
+ "category": "interaction",
4618
+ "stateMachine": {
4619
+ "states": [
4620
+ {
4621
+ "name": "idle",
4622
+ "isInitial": true
4623
+ }
4624
+ ],
4625
+ "events": [
4626
+ {
4627
+ "key": "INIT",
4628
+ "name": "Initialize"
4629
+ },
4630
+ {
4631
+ "key": "SELECT_TAB",
4632
+ "name": "Select Tab",
4633
+ "payload": [
4634
+ {
4635
+ "name": "tab",
4636
+ "type": "string",
4637
+ "required": true
4638
+ }
4639
+ ]
4640
+ }
4641
+ ],
4642
+ "transitions": [
1933
4643
  {
1934
4644
  "from": "idle",
1935
- "to": "active",
1936
- "event": "RECALL",
4645
+ "to": "idle",
4646
+ "event": "INIT",
1937
4647
  "effects": [
1938
4648
  [
1939
- "agent/recall",
1940
- "@payload.query"
4649
+ "fetch",
4650
+ "TutorSession"
1941
4651
  ],
1942
4652
  [
1943
4653
  "render-ui",
@@ -1976,12 +4686,12 @@
1976
4686
  "children": [
1977
4687
  {
1978
4688
  "type": "icon",
1979
- "name": "brain",
4689
+ "name": "graduation-cap",
1980
4690
  "size": "lg"
1981
4691
  },
1982
4692
  {
1983
4693
  "type": "typography",
1984
- "content": "Concept Active",
4694
+ "content": "AI Tutor",
1985
4695
  "variant": "h2"
1986
4696
  }
1987
4697
  ]
@@ -1990,50 +4700,54 @@
1990
4700
  "type": "divider"
1991
4701
  },
1992
4702
  {
1993
- "type": "typography",
1994
- "variant": "body",
1995
- "content": "@entity.content"
1996
- },
1997
- {
1998
- "type": "stack",
1999
- "direction": "horizontal",
2000
- "gap": "sm",
2001
- "children": [
4703
+ "type": "tabs",
4704
+ "tabs": [
2002
4705
  {
2003
- "type": "badge",
2004
- "label": "@entity.category"
4706
+ "label": "Teach",
4707
+ "value": "teach"
2005
4708
  },
2006
4709
  {
2007
- "type": "badge",
2008
- "label": "@entity.strength"
4710
+ "label": "Quiz",
4711
+ "value": "quiz"
4712
+ },
4713
+ {
4714
+ "label": "Progress",
4715
+ "value": "progress"
2009
4716
  }
2010
- ]
4717
+ ],
4718
+ "defaultActiveTab": "teach",
4719
+ "onTabChange": "SELECT_TAB"
2011
4720
  },
2012
4721
  {
2013
- "type": "stack",
2014
- "direction": "horizontal",
2015
- "gap": "sm",
2016
- "children": [
2017
- {
2018
- "type": "button",
2019
- "label": "Pin",
2020
- "event": "PIN",
2021
- "variant": "secondary",
2022
- "icon": "pin"
2023
- },
2024
- {
2025
- "type": "button",
2026
- "label": "Reinforce",
2027
- "event": "REINFORCE",
2028
- "variant": "secondary",
2029
- "icon": "zap"
2030
- },
4722
+ "type": "divider"
4723
+ },
4724
+ {
4725
+ "type": "data-grid",
4726
+ "entity": "TutorSession",
4727
+ "emptyIcon": "inbox",
4728
+ "emptyTitle": "No tutorsessions yet",
4729
+ "emptyDescription": "Add tutorsessions to see them here.",
4730
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
4731
+ "renderItem": [
4732
+ "fn",
4733
+ "item",
2031
4734
  {
2032
- "type": "button",
2033
- "label": "Forget",
2034
- "event": "FORGET",
2035
- "variant": "destructive",
2036
- "icon": "trash"
4735
+ "type": "stack",
4736
+ "direction": "vertical",
4737
+ "gap": "sm",
4738
+ "children": [
4739
+ {
4740
+ "type": "typography",
4741
+ "variant": "h4",
4742
+ "content": "@item.topic"
4743
+ },
4744
+ {
4745
+ "type": "typography",
4746
+ "variant": "caption",
4747
+ "color": "muted",
4748
+ "content": "@item.teach"
4749
+ }
4750
+ ]
2037
4751
  }
2038
4752
  ]
2039
4753
  }
@@ -2045,36 +4759,13 @@
2045
4759
  ]
2046
4760
  },
2047
4761
  {
2048
- "from": "active",
2049
- "to": "active",
2050
- "event": "PIN",
2051
- "guard": [
2052
- "not",
2053
- [
2054
- "agent/is-pinned",
2055
- "@payload.id"
2056
- ]
2057
- ],
2058
- "effects": [
2059
- [
2060
- "agent/pin",
2061
- "@payload.id"
2062
- ],
2063
- [
2064
- "set",
2065
- "@entity.pinned",
2066
- true
2067
- ]
2068
- ]
2069
- },
2070
- {
2071
- "from": "active",
4762
+ "from": "idle",
2072
4763
  "to": "idle",
2073
- "event": "FORGET",
4764
+ "event": "SELECT_TAB",
2074
4765
  "effects": [
2075
4766
  [
2076
- "agent/forget",
2077
- "@payload.id"
4767
+ "fetch",
4768
+ "TutorSession"
2078
4769
  ],
2079
4770
  [
2080
4771
  "render-ui",
@@ -2113,12 +4804,12 @@
2113
4804
  "children": [
2114
4805
  {
2115
4806
  "type": "icon",
2116
- "name": "brain",
4807
+ "name": "graduation-cap",
2117
4808
  "size": "lg"
2118
4809
  },
2119
4810
  {
2120
4811
  "type": "typography",
2121
- "content": "Concept Manager",
4812
+ "content": "AI Tutor",
2122
4813
  "variant": "h2"
2123
4814
  }
2124
4815
  ]
@@ -2127,30 +4818,55 @@
2127
4818
  "type": "divider"
2128
4819
  },
2129
4820
  {
2130
- "type": "stack",
2131
- "direction": "horizontal",
2132
- "gap": "sm",
2133
- "children": [
4821
+ "type": "tabs",
4822
+ "tabs": [
2134
4823
  {
2135
- "type": "button",
2136
- "label": "Memorize",
2137
- "event": "MEMORIZE",
2138
- "variant": "primary",
2139
- "icon": "plus"
4824
+ "label": "Teach",
4825
+ "value": "teach"
2140
4826
  },
2141
4827
  {
2142
- "type": "button",
2143
- "label": "Recall",
2144
- "event": "RECALL",
2145
- "variant": "secondary",
2146
- "icon": "search"
4828
+ "label": "Quiz",
4829
+ "value": "quiz"
2147
4830
  },
2148
4831
  {
2149
- "type": "button",
2150
- "label": "Decay All",
2151
- "event": "DECAY",
2152
- "variant": "ghost",
2153
- "icon": "clock"
4832
+ "label": "Progress",
4833
+ "value": "progress"
4834
+ }
4835
+ ],
4836
+ "defaultActiveTab": "teach",
4837
+ "activeTab": "@payload.tab",
4838
+ "onTabChange": "SELECT_TAB"
4839
+ },
4840
+ {
4841
+ "type": "divider"
4842
+ },
4843
+ {
4844
+ "type": "data-grid",
4845
+ "entity": "TutorSession",
4846
+ "emptyIcon": "inbox",
4847
+ "emptyTitle": "No tutorsessions yet",
4848
+ "emptyDescription": "Add tutorsessions to see them here.",
4849
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
4850
+ "renderItem": [
4851
+ "fn",
4852
+ "item",
4853
+ {
4854
+ "type": "stack",
4855
+ "direction": "vertical",
4856
+ "gap": "sm",
4857
+ "children": [
4858
+ {
4859
+ "type": "typography",
4860
+ "variant": "h4",
4861
+ "content": "@item.topic"
4862
+ },
4863
+ {
4864
+ "type": "typography",
4865
+ "variant": "caption",
4866
+ "color": "muted",
4867
+ "content": "@item.teach"
4868
+ }
4869
+ ]
2154
4870
  }
2155
4871
  ]
2156
4872
  }
@@ -2160,35 +4876,94 @@
2160
4876
  }
2161
4877
  ]
2162
4878
  ]
2163
- },
4879
+ }
4880
+ ]
4881
+ }
4882
+ }
4883
+ ],
4884
+ "pages": [
4885
+ {
4886
+ "name": "TutorNavPage",
4887
+ "path": "/tutor/nav",
4888
+ "traits": [
4889
+ {
4890
+ "ref": "TutorTabs"
4891
+ }
4892
+ ]
4893
+ }
4894
+ ]
4895
+ },
4896
+ {
4897
+ "name": "ConceptViewOrbital",
4898
+ "entity": {
4899
+ "name": "ConceptView",
4900
+ "persistence": "persistent",
4901
+ "collection": "conceptviews",
4902
+ "fields": [
4903
+ {
4904
+ "name": "id",
4905
+ "type": "string",
4906
+ "required": true
4907
+ },
4908
+ {
4909
+ "name": "content",
4910
+ "type": "string",
4911
+ "default": ""
4912
+ },
4913
+ {
4914
+ "name": "category",
4915
+ "type": "string",
4916
+ "default": ""
4917
+ },
4918
+ {
4919
+ "name": "strength",
4920
+ "type": "number",
4921
+ "default": 0
4922
+ }
4923
+ ]
4924
+ },
4925
+ "traits": [
4926
+ {
4927
+ "name": "ConceptsBrowse",
4928
+ "linkedEntity": "Concept",
4929
+ "category": "interaction",
4930
+ "stateMachine": {
4931
+ "states": [
2164
4932
  {
2165
- "from": "active",
2166
- "to": "active",
2167
- "event": "REINFORCE",
2168
- "effects": [
2169
- [
2170
- "agent/reinforce",
2171
- "@payload.id"
2172
- ]
2173
- ]
4933
+ "name": "browsing",
4934
+ "isInitial": true
4935
+ }
4936
+ ],
4937
+ "events": [
4938
+ {
4939
+ "key": "INIT",
4940
+ "name": "Initialize"
2174
4941
  },
2175
4942
  {
2176
- "from": "idle",
2177
- "to": "idle",
2178
- "event": "DECAY",
2179
- "effects": [
2180
- [
2181
- "agent/decay"
2182
- ]
4943
+ "key": "VIEW",
4944
+ "name": "VIEW",
4945
+ "payload": [
4946
+ {
4947
+ "name": "id",
4948
+ "type": "string",
4949
+ "required": true
4950
+ },
4951
+ {
4952
+ "name": "row",
4953
+ "type": "object"
4954
+ }
2183
4955
  ]
2184
- },
4956
+ }
4957
+ ],
4958
+ "transitions": [
2185
4959
  {
2186
- "from": "active",
2187
- "to": "idle",
2188
- "event": "DECAY",
4960
+ "from": "browsing",
4961
+ "to": "browsing",
4962
+ "event": "INIT",
2189
4963
  "effects": [
2190
4964
  [
2191
- "agent/decay"
4965
+ "ref",
4966
+ "Concept"
2192
4967
  ],
2193
4968
  [
2194
4969
  "render-ui",
@@ -2218,22 +4993,32 @@
2218
4993
  "type": "stack",
2219
4994
  "direction": "vertical",
2220
4995
  "gap": "lg",
4996
+ "className": "max-w-5xl mx-auto w-full",
2221
4997
  "children": [
2222
4998
  {
2223
4999
  "type": "stack",
2224
5000
  "direction": "horizontal",
2225
- "gap": "sm",
5001
+ "gap": "md",
5002
+ "justify": "space-between",
2226
5003
  "align": "center",
2227
5004
  "children": [
2228
5005
  {
2229
- "type": "icon",
2230
- "name": "brain",
2231
- "size": "lg"
2232
- },
2233
- {
2234
- "type": "typography",
2235
- "content": "Concept Manager",
2236
- "variant": "h2"
5006
+ "type": "stack",
5007
+ "direction": "horizontal",
5008
+ "gap": "sm",
5009
+ "align": "center",
5010
+ "children": [
5011
+ {
5012
+ "type": "icon",
5013
+ "name": "brain",
5014
+ "size": "lg"
5015
+ },
5016
+ {
5017
+ "type": "typography",
5018
+ "content": "Learned Concepts",
5019
+ "variant": "h2"
5020
+ }
5021
+ ]
2237
5022
  }
2238
5023
  ]
2239
5024
  },
@@ -2241,32 +5026,58 @@
2241
5026
  "type": "divider"
2242
5027
  },
2243
5028
  {
2244
- "type": "stack",
2245
- "direction": "horizontal",
2246
- "gap": "sm",
2247
- "children": [
5029
+ "type": "data-grid",
5030
+ "entity": "Concept",
5031
+ "emptyIcon": "inbox",
5032
+ "emptyTitle": "No concepts yet",
5033
+ "emptyDescription": "Complete lessons and quizzes to build your concept library.",
5034
+ "itemActions": [
2248
5035
  {
2249
- "type": "button",
2250
- "label": "Memorize",
2251
- "event": "MEMORIZE",
2252
- "variant": "primary",
2253
- "icon": "plus"
5036
+ "label": "View",
5037
+ "event": "VIEW",
5038
+ "variant": "ghost",
5039
+ "size": "sm"
5040
+ }
5041
+ ],
5042
+ "columns": [
5043
+ {
5044
+ "name": "content",
5045
+ "label": "Content",
5046
+ "variant": "h4",
5047
+ "icon": "brain"
2254
5048
  },
2255
5049
  {
2256
- "type": "button",
2257
- "label": "Recall",
2258
- "event": "RECALL",
2259
- "variant": "secondary",
2260
- "icon": "search"
5050
+ "name": "category",
5051
+ "label": "Category",
5052
+ "variant": "badge",
5053
+ "colorMap": {
5054
+ "active": "success",
5055
+ "completed": "success",
5056
+ "done": "success",
5057
+ "pending": "warning",
5058
+ "draft": "warning",
5059
+ "scheduled": "warning",
5060
+ "inactive": "neutral",
5061
+ "archived": "neutral",
5062
+ "disabled": "neutral",
5063
+ "error": "destructive",
5064
+ "cancelled": "destructive",
5065
+ "failed": "destructive"
5066
+ }
2261
5067
  },
2262
5068
  {
2263
- "type": "button",
2264
- "label": "Decay All",
2265
- "event": "DECAY",
2266
- "variant": "ghost",
2267
- "icon": "clock"
5069
+ "name": "strength",
5070
+ "label": "Strength",
5071
+ "variant": "caption"
2268
5072
  }
2269
5073
  ]
5074
+ },
5075
+ {
5076
+ "type": "floating-action-button",
5077
+ "icon": "plus",
5078
+ "event": "INIT",
5079
+ "label": "Create",
5080
+ "tooltip": "Create"
2270
5081
  }
2271
5082
  ]
2272
5083
  }
@@ -2276,28 +5087,21 @@
2276
5087
  ]
2277
5088
  }
2278
5089
  ]
2279
- },
2280
- "listens": [
2281
- {
2282
- "event": "QUIZ_GRADED",
2283
- "triggers": "REINFORCE",
2284
- "scope": "external"
2285
- }
2286
- ]
5090
+ }
2287
5091
  }
2288
5092
  ],
2289
5093
  "pages": [
2290
5094
  {
2291
- "name": "ConceptsPage",
2292
- "path": "/concepts",
5095
+ "name": "ConceptsViewPage",
5096
+ "path": "/tutor/concepts",
2293
5097
  "traits": [
2294
5098
  {
2295
- "ref": "ConceptLifecycle"
5099
+ "ref": "ConceptsBrowse"
2296
5100
  }
2297
5101
  ]
2298
5102
  }
2299
5103
  ]
2300
5104
  }
2301
5105
  ],
2302
- "description": "Teaching assistant organism. Classifies student level, recalls prior learning from memory, generates explanations with context-aware difficulty, and tracks concept strength via memory reinforcement. Composed from: - inline TeachingTrait: assessment, teaching, quizzing flow - inline QuizTrait: generates and evaluates quiz questions - stdAgentMemory: tracks concept strength per student topic Cross-trait events: - ASSESSMENT_DONE (Teaching -> Quiz): student assessed, generate quiz - QUIZ_GRADED (Quiz -> Memory): reinforce or decay concept based on answer - CONCEPT_RECALLED (Memory -> Teaching): prior learning loaded for context Pages: /teach (initial), /quiz, /concepts"
5106
+ "description": "Teaching assistant organism. Composes conversation + memory + classifier atoms with tabbed views and a concept browse list. Classifies student level, recalls prior learning from memory, generates explanations with context-aware difficulty, and tracks concept strength. Composed from: - stdAgentConversation: multi-turn teaching interaction - stdAgentMemory: tracks concept strength per student topic - stdAgentClassifier: classifies student level - stdTabs: Teach / Quiz / Progress tab navigation - stdBrowse: browsable concepts list with strength tracking Cross-trait events: - ASSESSMENT_DONE (Teaching -> Quiz): student assessed, generate quiz - QUIZ_GRADED (Quiz -> Memory): reinforce or decay concept based on answer Pages: /teach (initial), /quiz, /concepts"
2303
5107
  }