@ezychat/web 0.1.47 → 0.1.48

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;
@@ -1501,6 +1507,14 @@ export declare const enResources: {
1501
1507
  advanced: string;
1502
1508
  advancedRecommended: string;
1503
1509
  advancedCustomised: string;
1510
+ nextSteps: {
1511
+ title: string;
1512
+ context: string;
1513
+ try: string;
1514
+ turnOn: string;
1515
+ done: string;
1516
+ todo: string;
1517
+ };
1504
1518
  };
1505
1519
  try: {
1506
1520
  label: string;
@@ -1523,6 +1537,12 @@ export declare const enResources: {
1523
1537
  noKnowledge: string;
1524
1538
  model: string;
1525
1539
  failed: string;
1540
+ agentHint: string;
1541
+ safety: string;
1542
+ answeredAs: string;
1543
+ needsConnection: string;
1544
+ noRole: string;
1545
+ confidentialLeak: string;
1526
1546
  };
1527
1547
  voice: {
1528
1548
  title: string;
@@ -1606,10 +1626,39 @@ export declare const enResources: {
1606
1626
  confirmText: string;
1607
1627
  deleteFailed: string;
1608
1628
  namesMore: string;
1629
+ internal: string;
1630
+ internalHint: string;
1631
+ internalIntro: string;
1632
+ internalBadgeTitle: string;
1633
+ internalFilterLabel: string;
1634
+ internalFilterAll: string;
1635
+ internalFilterCustomer: string;
1636
+ internalFilterInternal: string;
1637
+ internalFilterEmpty: string;
1638
+ internalAudience: string;
1639
+ internalAudienceCustomer: string;
1640
+ internalAudienceInternal: string;
1641
+ internalTotal: string;
1642
+ addFileTitle: string;
1643
+ fileLabel: string;
1644
+ itemSaved: string;
1645
+ actions: string;
1646
+ markInternal: string;
1647
+ markCustomer: string;
1648
+ markInternalFor: string;
1649
+ markCustomerFor: string;
1650
+ markedInternal: string;
1651
+ markedCustomer: string;
1609
1652
  };
1610
1653
  defaults: {
1611
- instructions: string;
1612
- handoffRules: string;
1654
+ sales: {
1655
+ instructions: string;
1656
+ handoffRules: string;
1657
+ };
1658
+ faq: {
1659
+ instructions: string;
1660
+ handoffRules: string;
1661
+ };
1613
1662
  };
1614
1663
  replaceKey: string;
1615
1664
  keepKey: string;
@@ -1676,6 +1725,92 @@ export declare const enResources: {
1676
1725
  keyForbidden: string;
1677
1726
  saveAnyway: string;
1678
1727
  };
1728
+ agents: {
1729
+ add: string;
1730
+ aiBadge: string;
1731
+ limitHint: string;
1732
+ noInbox: string;
1733
+ answersInbox: string;
1734
+ newTitle: string;
1735
+ newDescription: string;
1736
+ description: string;
1737
+ pickTitle: string;
1738
+ pickHint: string;
1739
+ nameTitle: string;
1740
+ nameLabel: string;
1741
+ nameHint: string;
1742
+ nameRequired: string;
1743
+ inboxLabel: string;
1744
+ inboxHint: string;
1745
+ inboxNone: string;
1746
+ inboxHas: string;
1747
+ inboxMove: string;
1748
+ roleTitle: string;
1749
+ roleLabel: string;
1750
+ roleHint: string;
1751
+ rolePlaceholder: string;
1752
+ handoffTitle: string;
1753
+ handoffHint: string;
1754
+ handoffPlaceholder: string;
1755
+ useTemplate: string;
1756
+ templateTitle: string;
1757
+ templateBody: string;
1758
+ templateConfirm: string;
1759
+ templateApplied: string;
1760
+ customTemplateNote: string;
1761
+ advanced: string;
1762
+ advancedBlank: string;
1763
+ usingTemplate: string;
1764
+ tryTitle: string;
1765
+ deleteTitle: string;
1766
+ deleteHint: string;
1767
+ delete: string;
1768
+ deleteConfirmTitle: string;
1769
+ deleteConfirmBody_one: string;
1770
+ deleteConfirmBody_other: string;
1771
+ deleted: string;
1772
+ created: string;
1773
+ saved: string;
1774
+ save: string;
1775
+ create: string;
1776
+ limitTitle: string;
1777
+ limitBody: string;
1778
+ limitBodyLite: string;
1779
+ backToMembers: string;
1780
+ notFoundTitle: string;
1781
+ notFoundBody: string;
1782
+ on: string;
1783
+ off: string;
1784
+ errors: {
1785
+ agent_limit: string;
1786
+ inbox_has_agent: string;
1787
+ internal_too_large: string;
1788
+ last_agent: string;
1789
+ agent_not_found: string;
1790
+ };
1791
+ noFreeInbox: string;
1792
+ addInbox: string;
1793
+ createNext: string;
1794
+ };
1795
+ presets: {
1796
+ sales: string;
1797
+ faq: string;
1798
+ custom: string;
1799
+ salesDescription: string;
1800
+ faqDescription: string;
1801
+ customDescription: string;
1802
+ badge: string;
1803
+ };
1804
+ guardrails: {
1805
+ title: string;
1806
+ badge: string;
1807
+ intro: string;
1808
+ rule1: string;
1809
+ rule2: string;
1810
+ rule3: string;
1811
+ rule4: string;
1812
+ };
1813
+ openAgents: string;
1679
1814
  };
1680
1815
  enrichment: {
1681
1816
  title: string;
@@ -1769,6 +1904,14 @@ export declare const enResources: {
1769
1904
  membersAccessNoInboxes: string;
1770
1905
  membersAccessSave: string;
1771
1906
  membersAccessSaved: string;
1907
+ aiAgent: string;
1908
+ aiAgentNone: string;
1909
+ aiAgentField: string;
1910
+ aiAgentFieldHint: string;
1911
+ aiAgentOption: string;
1912
+ aiAgentMove: string;
1913
+ aiAgentReplace: string;
1914
+ aiAgentRemove: string;
1772
1915
  };
1773
1916
  };
1774
1917
  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.48",
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.48",
44
44
  "@fontsource-variable/inter": "^5.3.0",
45
45
  "@tanstack/react-query": "^5.104.4",
46
46
  "@types/react": "^19.3.0",