@ezychat/web 0.1.47 → 0.1.49

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.
@@ -533,6 +533,7 @@ export declare const enResources: {
533
533
  ai_unavailable: string;
534
534
  lookup_failed: string;
535
535
  business_rule: string;
536
+ confidential_leak: string;
536
537
  };
537
538
  resolved: string;
538
539
  reopenedByMessage: string;
@@ -1014,6 +1015,9 @@ export declare const enResources: {
1014
1015
  inboxUpdate: string;
1015
1016
  inboxRemove: string;
1016
1017
  inboxAccessUpdate: string;
1018
+ aiAgentCreate: string;
1019
+ aiAgentDelete: string;
1020
+ aiAgentInboxUpdate: string;
1017
1021
  };
1018
1022
  fields: {
1019
1023
  chat: string;
@@ -1056,6 +1060,9 @@ export declare const enResources: {
1056
1060
  inbox: string;
1057
1061
  inboxes: string;
1058
1062
  members: string;
1063
+ agent: string;
1064
+ preset: string;
1065
+ internal: string;
1059
1066
  };
1060
1067
  reasons: {
1061
1068
  rateLimited: string;
@@ -1401,7 +1408,6 @@ export declare const enResources: {
1401
1408
  settingsTitle: string;
1402
1409
  settingsDescription: string;
1403
1410
  roleBadge: string;
1404
- addMember: string;
1405
1411
  membersDescription: string;
1406
1412
  assistant: string;
1407
1413
  behavior: string;
@@ -1452,6 +1458,10 @@ export declare const enResources: {
1452
1458
  modelsLive: string;
1453
1459
  modelsFallback: string;
1454
1460
  modeApi: string;
1461
+ modeClaude: string;
1462
+ modeChatgptHint: string;
1463
+ modeApiHint: string;
1464
+ modeClaudeHint: string;
1455
1465
  modeChatgpt: string;
1456
1466
  pasteLabel: string;
1457
1467
  pasteHint: string;
@@ -1501,6 +1511,14 @@ export declare const enResources: {
1501
1511
  advanced: string;
1502
1512
  advancedRecommended: string;
1503
1513
  advancedCustomised: string;
1514
+ nextSteps: {
1515
+ title: string;
1516
+ context: string;
1517
+ try: string;
1518
+ turnOn: string;
1519
+ done: string;
1520
+ todo: string;
1521
+ };
1504
1522
  };
1505
1523
  try: {
1506
1524
  label: string;
@@ -1523,6 +1541,12 @@ export declare const enResources: {
1523
1541
  noKnowledge: string;
1524
1542
  model: string;
1525
1543
  failed: string;
1544
+ agentHint: string;
1545
+ safety: string;
1546
+ answeredAs: string;
1547
+ needsConnection: string;
1548
+ noRole: string;
1549
+ confidentialLeak: string;
1526
1550
  };
1527
1551
  voice: {
1528
1552
  title: string;
@@ -1549,6 +1573,8 @@ export declare const enResources: {
1549
1573
  removeConfirm: string;
1550
1574
  saved: string;
1551
1575
  privacy: string;
1576
+ claudeCloudOff: string;
1577
+ privacyClaude: string;
1552
1578
  errors: {
1553
1579
  disk_space: string;
1554
1580
  network: string;
@@ -1606,10 +1632,39 @@ export declare const enResources: {
1606
1632
  confirmText: string;
1607
1633
  deleteFailed: string;
1608
1634
  namesMore: string;
1635
+ internal: string;
1636
+ internalHint: string;
1637
+ internalIntro: string;
1638
+ internalBadgeTitle: string;
1639
+ internalFilterLabel: string;
1640
+ internalFilterAll: string;
1641
+ internalFilterCustomer: string;
1642
+ internalFilterInternal: string;
1643
+ internalFilterEmpty: string;
1644
+ internalAudience: string;
1645
+ internalAudienceCustomer: string;
1646
+ internalAudienceInternal: string;
1647
+ internalTotal: string;
1648
+ addFileTitle: string;
1649
+ fileLabel: string;
1650
+ itemSaved: string;
1651
+ actions: string;
1652
+ markInternal: string;
1653
+ markCustomer: string;
1654
+ markInternalFor: string;
1655
+ markCustomerFor: string;
1656
+ markedInternal: string;
1657
+ markedCustomer: string;
1609
1658
  };
1610
1659
  defaults: {
1611
- instructions: string;
1612
- handoffRules: string;
1660
+ sales: {
1661
+ instructions: string;
1662
+ handoffRules: string;
1663
+ };
1664
+ faq: {
1665
+ instructions: string;
1666
+ handoffRules: string;
1667
+ };
1613
1668
  };
1614
1669
  replaceKey: string;
1615
1670
  keepKey: string;
@@ -1668,14 +1723,129 @@ export declare const enResources: {
1668
1723
  useChatgpt: string;
1669
1724
  keyLabel: string;
1670
1725
  keyHint: string;
1726
+ keyPlaceholder: string;
1671
1727
  testKey: string;
1672
1728
  keyFailedFallback: string;
1673
1729
  keyInvalid: string;
1674
1730
  keyUnreachable: string;
1675
1731
  keyRateLimited: string;
1676
1732
  keyForbidden: string;
1733
+ claudeKey: string;
1677
1734
  saveAnyway: string;
1735
+ keyRejected: string;
1736
+ };
1737
+ claude: {
1738
+ keyLabel: string;
1739
+ keyHint: string;
1740
+ keyPlaceholder: string;
1741
+ keySaved: string;
1742
+ keyMissing: string;
1743
+ getKey: string;
1744
+ model: string;
1745
+ modelHint: string;
1746
+ models: {
1747
+ sonnet: string;
1748
+ opus: string;
1749
+ haiku: string;
1750
+ };
1751
+ voiceNote: string;
1752
+ keyRequired: string;
1753
+ keyInvalid: string;
1754
+ keyUnreachable: string;
1755
+ keyRateLimited: string;
1756
+ keyForbidden: string;
1757
+ openAiKey: string;
1758
+ connected: string;
1759
+ useClaude: string;
1760
+ keyNoCredit: string;
1761
+ keyRejected: string;
1762
+ };
1763
+ agents: {
1764
+ add: string;
1765
+ aiBadge: string;
1766
+ limitHint: string;
1767
+ noInbox: string;
1768
+ answersInbox: string;
1769
+ newTitle: string;
1770
+ newDescription: string;
1771
+ description: string;
1772
+ pickTitle: string;
1773
+ pickHint: string;
1774
+ nameTitle: string;
1775
+ nameLabel: string;
1776
+ nameHint: string;
1777
+ nameRequired: string;
1778
+ inboxLabel: string;
1779
+ inboxHint: string;
1780
+ inboxNone: string;
1781
+ inboxHas: string;
1782
+ inboxMove: string;
1783
+ roleTitle: string;
1784
+ roleLabel: string;
1785
+ roleHint: string;
1786
+ rolePlaceholder: string;
1787
+ handoffTitle: string;
1788
+ handoffHint: string;
1789
+ handoffPlaceholder: string;
1790
+ useTemplate: string;
1791
+ templateTitle: string;
1792
+ templateBody: string;
1793
+ templateConfirm: string;
1794
+ templateApplied: string;
1795
+ customTemplateNote: string;
1796
+ advanced: string;
1797
+ advancedBlank: string;
1798
+ usingTemplate: string;
1799
+ tryTitle: string;
1800
+ deleteTitle: string;
1801
+ deleteHint: string;
1802
+ delete: string;
1803
+ deleteConfirmTitle: string;
1804
+ deleteConfirmBody_one: string;
1805
+ deleteConfirmBody_other: string;
1806
+ deleted: string;
1807
+ created: string;
1808
+ saved: string;
1809
+ save: string;
1810
+ create: string;
1811
+ limitTitle: string;
1812
+ limitBody: string;
1813
+ limitBodyLite: string;
1814
+ backToMembers: string;
1815
+ notFoundTitle: string;
1816
+ notFoundBody: string;
1817
+ on: string;
1818
+ off: string;
1819
+ errors: {
1820
+ agent_limit: string;
1821
+ inbox_has_agent: string;
1822
+ internal_too_large: string;
1823
+ last_agent: string;
1824
+ agent_not_found: string;
1825
+ };
1826
+ noFreeInbox: string;
1827
+ addInbox: string;
1828
+ createNext: string;
1829
+ };
1830
+ presets: {
1831
+ sales: string;
1832
+ faq: string;
1833
+ custom: string;
1834
+ salesDescription: string;
1835
+ faqDescription: string;
1836
+ customDescription: string;
1837
+ badge: string;
1838
+ };
1839
+ guardrails: {
1840
+ title: string;
1841
+ badge: string;
1842
+ intro: string;
1843
+ rule1: string;
1844
+ rule2: string;
1845
+ rule3: string;
1846
+ rule4: string;
1678
1847
  };
1848
+ openAgents: string;
1679
1849
  };
1680
1850
  enrichment: {
1681
1851
  title: string;
@@ -1769,6 +1939,14 @@ export declare const enResources: {
1769
1939
  membersAccessNoInboxes: string;
1770
1940
  membersAccessSave: string;
1771
1941
  membersAccessSaved: string;
1942
+ aiAgent: string;
1943
+ aiAgentNone: string;
1944
+ aiAgentField: string;
1945
+ aiAgentFieldHint: string;
1946
+ aiAgentOption: string;
1947
+ aiAgentMove: string;
1948
+ aiAgentReplace: string;
1949
+ aiAgentRemove: string;
1772
1950
  };
1773
1951
  };
1774
1952
  errors: {
@@ -17,9 +17,12 @@ export interface Directory {
17
17
  me: User | null;
18
18
  isAdmin: boolean;
19
19
  byId: Map<number, DirectoryEntry>;
20
- /** Users that can be picked as assignee (active only). */
20
+ /** Users that can be picked as assignee (active only; never a deleted AI agent). */
21
21
  assignable: DirectoryEntry[];
22
- /** Active users who may open chats of this inbox: the assign dropdown of such a chat. */
22
+ /**
23
+ * The assign dropdown of a chat of this inbox: active people who may open it, and the AI agent
24
+ * that answers this inbox (no other AI agent: the server refuses it).
25
+ */
23
26
  assignableFor(inboxId: number): DirectoryEntry[];
24
27
  /** Display name for a user id ("You" for the current user when `youLabel`). */
25
28
  nameOf(id: number | null | undefined, opts?: {
@@ -29,6 +32,8 @@ export interface Directory {
29
32
  /** Pure builder (exported for tests). */
30
33
  export declare function buildDirectory(me: User | null, isAdmin: boolean, list: readonly DirectoryEntry[] | undefined, opts?: {
31
34
  multiInbox?: boolean;
35
+ /** Inbox id -> the AI agent that answers it (`Inbox.aiAgentId`); unknown = no AI offered. */
36
+ inboxAgents?: ReadonlyMap<number, number | null>;
32
37
  }): Directory;
33
38
  /**
34
39
  * Team member lookup for the inbox. Admins use the full `GET /api/users`; every other role
@@ -3,7 +3,7 @@
3
3
  * without forking Lite or deep-importing its modules.
4
4
  */
5
5
  export { createInboxApp, type CreateInboxAppOptions } from './create-app';
6
- export { EXTENSION_NAME_PATTERN, WEB_EXTENSION_ADMIN_SECTIONS, WebExtensionError, extensionKeyPrefix, extensionPath, useExtensionTranslation, validateWebExtensions, type ExtensionTranslate, type WebExtension, type WebExtensionAdminSection, type WebExtensionAgent, type WebExtensionAgentSection, type WebExtensionCatalogs, type WebExtensionLockScreenProps, type WebExtensionNavBadge, type WebExtensionNavItem, type WebExtensionRoute, type WebExtensionSettingsSection, } from './extensions';
6
+ export { EXTENSION_NAME_PATTERN, WEB_EXTENSION_ADMIN_SECTIONS, WebExtensionError, extensionKeyPrefix, extensionPath, useAgentSection, useExtensionTranslation, validateWebExtensions, type AgentSectionInfo, type ExtensionTranslate, type WebExtension, type WebExtensionAdminSection, type WebExtensionAgent, type WebExtensionAgentSection, type WebExtensionCatalogs, type WebExtensionLockScreenProps, type WebExtensionNavBadge, type WebExtensionNavItem, type WebExtensionRoute, type WebExtensionSettingsSection, } from './extensions';
7
7
  export { useAppLinks } from './lib/app-links';
8
8
  export { LITE_APP_LINKS, type AppLinks } from './lib/links';
9
9
  export { PausedScreen } from './access/AccessGate';
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Setup step 3 (skippable): describe the business, connect the AI, optionally turn it on.
3
- * Finish creates the Sales Agent with the recommended instructions and hand-off rules, saves the
4
- * text as one Business context item and turns the agent on when chosen.
3
+ * Finish saves the default Sales Agent through `PUT /api/ai` (it creates the agent only once, so a
4
+ * retry never makes a second one) with the recommended instructions and hand-off rules, saves the
5
+ * text as one Business context item of that agent and turns the agent on when chosen.
5
6
  */
6
7
  export declare function AiAssistantStep({ businessName, onDone, }: {
7
8
  businessName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ezychat/web",
3
- "version": "0.1.47",
3
+ "version": "0.1.49",
4
4
  "type": "module",
5
5
  "description": "EzyChat core: the team inbox web app (React) as a library, with createInboxApp and its extension API.",
6
6
  "license": "MIT",
@@ -40,7 +40,7 @@
40
40
  "build:lib": "node ../../scripts/build-web-lib.mjs"
41
41
  },
42
42
  "dependencies": {
43
- "@ezychat/shared": "0.1.47",
43
+ "@ezychat/shared": "0.1.49",
44
44
  "@fontsource-variable/inter": "^5.3.0",
45
45
  "@tanstack/react-query": "^5.104.4",
46
46
  "@types/react": "^19.3.0",