neoagent 3.2.1-beta.11 → 3.2.1-beta.13
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/flutter_app/lib/main_app_shell.dart +178 -34
- package/flutter_app/lib/main_chat.dart +542 -80
- package/flutter_app/lib/main_controller.dart +13 -0
- package/flutter_app/lib/main_models.dart +167 -20
- package/package.json +1 -1
- package/server/public/.last_build_id +1 -1
- package/server/public/assets/fonts/MaterialIcons-Regular.otf +0 -0
- package/server/public/flutter_bootstrap.js +1 -1
- package/server/public/main.dart.js +76649 -76021
- package/server/services/ai/loop/agent_engine_core.js +58 -25
- package/server/services/ai/model_failure_cache.js +7 -0
- package/server/services/ai/systemPrompt.js +1 -1
- package/server/services/behavior/defaults.js +1 -1
- package/server/services/behavior/modules/persona.js +124 -0
- package/server/services/behavior/modules/persona_prompt.js +222 -17
- package/server/services/behavior/modules/theory_of_mind.js +15 -7
- package/server/services/behavior/modules/turn_taking.js +15 -14
- package/server/services/behavior/pipeline.js +66 -10
- package/server/services/messaging/access_policy.js +264 -73
- package/server/services/messaging/automation.js +1 -1
- package/server/services/messaging/http_platforms.js +69 -25
- package/server/services/messaging/manager.js +39 -5
|
@@ -1673,53 +1673,112 @@ class _HomeViewState extends State<HomeView> {
|
|
|
1673
1673
|
builder: (dialogContext) {
|
|
1674
1674
|
return AlertDialog(
|
|
1675
1675
|
backgroundColor: _bgCard,
|
|
1676
|
-
|
|
1676
|
+
shape: RoundedRectangleBorder(
|
|
1677
|
+
borderRadius: BorderRadius.circular(24),
|
|
1678
|
+
),
|
|
1679
|
+
titlePadding: const EdgeInsets.fromLTRB(24, 24, 24, 0),
|
|
1680
|
+
title: Row(
|
|
1681
|
+
children: <Widget>[
|
|
1682
|
+
Container(
|
|
1683
|
+
width: 44,
|
|
1684
|
+
height: 44,
|
|
1685
|
+
decoration: BoxDecoration(
|
|
1686
|
+
color: _accent.withValues(alpha: 0.12),
|
|
1687
|
+
borderRadius: BorderRadius.circular(14),
|
|
1688
|
+
),
|
|
1689
|
+
child: Icon(Icons.shield_outlined, color: _accent),
|
|
1690
|
+
),
|
|
1691
|
+
const SizedBox(width: 14),
|
|
1692
|
+
Expanded(
|
|
1693
|
+
child: Column(
|
|
1694
|
+
crossAxisAlignment: CrossAxisAlignment.start,
|
|
1695
|
+
children: <Widget>[
|
|
1696
|
+
Text(
|
|
1697
|
+
'Message needs access',
|
|
1698
|
+
style: TextStyle(fontWeight: FontWeight.w800),
|
|
1699
|
+
),
|
|
1700
|
+
const SizedBox(height: 2),
|
|
1701
|
+
Text(
|
|
1702
|
+
notice.platform.toUpperCase(),
|
|
1703
|
+
style: TextStyle(
|
|
1704
|
+
color: _textMuted,
|
|
1705
|
+
fontSize: 12,
|
|
1706
|
+
fontWeight: FontWeight.w700,
|
|
1707
|
+
letterSpacing: 0.8,
|
|
1708
|
+
),
|
|
1709
|
+
),
|
|
1710
|
+
],
|
|
1711
|
+
),
|
|
1712
|
+
),
|
|
1713
|
+
],
|
|
1714
|
+
),
|
|
1677
1715
|
content: SizedBox(
|
|
1678
|
-
width:
|
|
1716
|
+
width: 560,
|
|
1679
1717
|
child: SingleChildScrollView(
|
|
1680
1718
|
child: Column(
|
|
1681
1719
|
mainAxisSize: MainAxisSize.min,
|
|
1682
1720
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
1683
1721
|
children: <Widget>[
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1722
|
+
Container(
|
|
1723
|
+
width: double.infinity,
|
|
1724
|
+
padding: const EdgeInsets.all(14),
|
|
1725
|
+
decoration: BoxDecoration(
|
|
1726
|
+
color: _bgSecondary,
|
|
1727
|
+
borderRadius: BorderRadius.circular(16),
|
|
1728
|
+
border: Border.all(color: _borderLight),
|
|
1689
1729
|
),
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1730
|
+
child: Row(
|
|
1731
|
+
children: <Widget>[
|
|
1732
|
+
CircleAvatar(
|
|
1733
|
+
backgroundColor: _accent.withValues(alpha: 0.12),
|
|
1734
|
+
foregroundColor: _accent,
|
|
1735
|
+
child: Icon(Icons.person_outline_rounded),
|
|
1736
|
+
),
|
|
1737
|
+
const SizedBox(width: 12),
|
|
1738
|
+
Expanded(
|
|
1739
|
+
child: Column(
|
|
1740
|
+
crossAxisAlignment: CrossAxisAlignment.start,
|
|
1741
|
+
children: <Widget>[
|
|
1742
|
+
Text(
|
|
1743
|
+
notice.senderLabel,
|
|
1744
|
+
style: TextStyle(
|
|
1745
|
+
fontSize: 16,
|
|
1746
|
+
fontWeight: FontWeight.w700,
|
|
1747
|
+
),
|
|
1748
|
+
),
|
|
1749
|
+
if (notice.meta.isNotEmpty) ...<Widget>[
|
|
1750
|
+
const SizedBox(height: 3),
|
|
1751
|
+
Text(
|
|
1752
|
+
notice.meta,
|
|
1753
|
+
style: TextStyle(color: _textSecondary),
|
|
1754
|
+
),
|
|
1755
|
+
],
|
|
1756
|
+
],
|
|
1757
|
+
),
|
|
1758
|
+
),
|
|
1759
|
+
],
|
|
1696
1760
|
),
|
|
1697
|
-
|
|
1761
|
+
),
|
|
1698
1762
|
const SizedBox(height: 12),
|
|
1699
1763
|
Text(
|
|
1700
|
-
'
|
|
1764
|
+
'Choose exactly where this sender should be allowed. You can change or remove the rule later in Messaging.',
|
|
1701
1765
|
style: TextStyle(color: _textSecondary, height: 1.45),
|
|
1702
1766
|
),
|
|
1703
1767
|
if (notice.suggestions.isNotEmpty) ...<Widget>[
|
|
1704
|
-
const SizedBox(height:
|
|
1768
|
+
const SizedBox(height: 16),
|
|
1705
1769
|
...notice.suggestions.map(
|
|
1706
1770
|
(suggestion) => Padding(
|
|
1707
1771
|
padding: const EdgeInsets.only(bottom: 10),
|
|
1708
|
-
child:
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
);
|
|
1719
|
-
},
|
|
1720
|
-
icon: Icon(Icons.verified_user_outlined),
|
|
1721
|
-
label: Text(suggestion.label),
|
|
1722
|
-
),
|
|
1772
|
+
child: _BlockedAccessChoice(
|
|
1773
|
+
suggestion: suggestion,
|
|
1774
|
+
onPressed: () async {
|
|
1775
|
+
Navigator.of(dialogContext).pop();
|
|
1776
|
+
await widget.controller.allowMessagingSuggestion(
|
|
1777
|
+
notice.platform,
|
|
1778
|
+
suggestion,
|
|
1779
|
+
chatId: notice.chatId,
|
|
1780
|
+
);
|
|
1781
|
+
},
|
|
1723
1782
|
),
|
|
1724
1783
|
),
|
|
1725
1784
|
),
|
|
@@ -1734,18 +1793,18 @@ class _HomeViewState extends State<HomeView> {
|
|
|
1734
1793
|
widget.controller.setSelectedSection(AppSection.messaging);
|
|
1735
1794
|
Navigator.of(dialogContext).pop();
|
|
1736
1795
|
},
|
|
1737
|
-
child: Text('
|
|
1796
|
+
child: Text('Review all access'),
|
|
1738
1797
|
),
|
|
1739
1798
|
TextButton(
|
|
1740
1799
|
onPressed: () async {
|
|
1741
1800
|
Navigator.of(dialogContext).pop();
|
|
1742
1801
|
await widget.controller.ignoreBlockedSender(notice);
|
|
1743
1802
|
},
|
|
1744
|
-
child: Text('Ignore'),
|
|
1803
|
+
child: Text('Ignore this chat'),
|
|
1745
1804
|
),
|
|
1746
1805
|
TextButton(
|
|
1747
1806
|
onPressed: () => Navigator.of(dialogContext).pop(),
|
|
1748
|
-
child: Text('
|
|
1807
|
+
child: Text('Not now'),
|
|
1749
1808
|
),
|
|
1750
1809
|
],
|
|
1751
1810
|
);
|
|
@@ -1762,6 +1821,91 @@ class _HomeViewState extends State<HomeView> {
|
|
|
1762
1821
|
}
|
|
1763
1822
|
}
|
|
1764
1823
|
|
|
1824
|
+
class _BlockedAccessChoice extends StatelessWidget {
|
|
1825
|
+
const _BlockedAccessChoice({
|
|
1826
|
+
required this.suggestion,
|
|
1827
|
+
required this.onPressed,
|
|
1828
|
+
});
|
|
1829
|
+
|
|
1830
|
+
final QuickAllowSuggestion suggestion;
|
|
1831
|
+
final VoidCallback onPressed;
|
|
1832
|
+
|
|
1833
|
+
@override
|
|
1834
|
+
Widget build(BuildContext context) {
|
|
1835
|
+
final (icon, title, description) = switch (suggestion.bucket) {
|
|
1836
|
+
'sharedMemberRules' => (
|
|
1837
|
+
Icons.person_pin_circle_outlined,
|
|
1838
|
+
'Only in this group',
|
|
1839
|
+
'Allow this sender here, without granting access in DMs or other groups.',
|
|
1840
|
+
),
|
|
1841
|
+
'sharedActorRules' => (
|
|
1842
|
+
Icons.person_add_alt_1_rounded,
|
|
1843
|
+
'This sender everywhere',
|
|
1844
|
+
'Allow this person in DMs and in every group or shared space.',
|
|
1845
|
+
),
|
|
1846
|
+
'sharedSpaceRules' => (
|
|
1847
|
+
Icons.groups_2_outlined,
|
|
1848
|
+
'Everyone in this group',
|
|
1849
|
+
'Allow messages from every participant in this group or shared space.',
|
|
1850
|
+
),
|
|
1851
|
+
_ => (
|
|
1852
|
+
Icons.person_outline_rounded,
|
|
1853
|
+
'Allow this sender',
|
|
1854
|
+
'Allow this person to message the agent directly.',
|
|
1855
|
+
),
|
|
1856
|
+
};
|
|
1857
|
+
return Material(
|
|
1858
|
+
color: _bgSecondary,
|
|
1859
|
+
borderRadius: BorderRadius.circular(16),
|
|
1860
|
+
child: InkWell(
|
|
1861
|
+
borderRadius: BorderRadius.circular(16),
|
|
1862
|
+
onTap: onPressed,
|
|
1863
|
+
child: Container(
|
|
1864
|
+
width: double.infinity,
|
|
1865
|
+
padding: const EdgeInsets.all(14),
|
|
1866
|
+
decoration: BoxDecoration(
|
|
1867
|
+
borderRadius: BorderRadius.circular(16),
|
|
1868
|
+
border: Border.all(color: _borderLight),
|
|
1869
|
+
),
|
|
1870
|
+
child: Row(
|
|
1871
|
+
children: <Widget>[
|
|
1872
|
+
Container(
|
|
1873
|
+
width: 42,
|
|
1874
|
+
height: 42,
|
|
1875
|
+
decoration: BoxDecoration(
|
|
1876
|
+
color: _accent.withValues(alpha: 0.1),
|
|
1877
|
+
borderRadius: BorderRadius.circular(13),
|
|
1878
|
+
),
|
|
1879
|
+
child: Icon(icon, color: _accent),
|
|
1880
|
+
),
|
|
1881
|
+
const SizedBox(width: 12),
|
|
1882
|
+
Expanded(
|
|
1883
|
+
child: Column(
|
|
1884
|
+
crossAxisAlignment: CrossAxisAlignment.start,
|
|
1885
|
+
children: <Widget>[
|
|
1886
|
+
Text(title, style: TextStyle(fontWeight: FontWeight.w700)),
|
|
1887
|
+
const SizedBox(height: 3),
|
|
1888
|
+
Text(
|
|
1889
|
+
description,
|
|
1890
|
+
style: TextStyle(
|
|
1891
|
+
color: _textSecondary,
|
|
1892
|
+
fontSize: 13,
|
|
1893
|
+
height: 1.3,
|
|
1894
|
+
),
|
|
1895
|
+
),
|
|
1896
|
+
],
|
|
1897
|
+
),
|
|
1898
|
+
),
|
|
1899
|
+
const SizedBox(width: 8),
|
|
1900
|
+
Icon(Icons.arrow_forward_rounded, color: _textMuted),
|
|
1901
|
+
],
|
|
1902
|
+
),
|
|
1903
|
+
),
|
|
1904
|
+
),
|
|
1905
|
+
);
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1765
1909
|
class _Sidebar extends StatelessWidget {
|
|
1766
1910
|
const _Sidebar({
|
|
1767
1911
|
required this.controller,
|