@fayz-ai/admin 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CommandPalette-GQ6SPITD.js +297 -0
- package/dist/CommandPalette-GQ6SPITD.js.map +1 -0
- package/dist/{ScheduleEditor-63TVSCJC.js → ScheduleEditor-YZPOCBTW.js} +6 -6
- package/dist/{ScheduleEditor-63TVSCJC.js.map → ScheduleEditor-YZPOCBTW.js.map} +1 -1
- package/dist/SubscriptionPage-JXJ56OOH.js +8 -0
- package/dist/{SubscriptionPage-5PJ25YAD.js.map → SubscriptionPage-JXJ56OOH.js.map} +1 -1
- package/dist/access/headless.d.ts +2 -2
- package/dist/access/limits-registry.d.ts +6 -3
- package/dist/access/limits-registry.d.ts.map +1 -1
- package/dist/app/AdminShell.d.ts.map +1 -1
- package/dist/app/admin-app.d.ts.map +1 -1
- package/dist/app/settings-tabs.store.d.ts +21 -0
- package/dist/app/settings-tabs.store.d.ts.map +1 -0
- package/dist/billing/index.js +2 -2
- package/dist/{chunk-7DFJEXCR.js → chunk-5GWUM4SM.js} +3 -3
- package/dist/{chunk-7DFJEXCR.js.map → chunk-5GWUM4SM.js.map} +1 -1
- package/dist/{chunk-ERDS4OJS.js → chunk-HYDNIBN6.js} +3 -3
- package/dist/{chunk-ERDS4OJS.js.map → chunk-HYDNIBN6.js.map} +1 -1
- package/dist/{chunk-WN6PGQSG.js → chunk-NB6X5O5L.js} +81 -10
- package/dist/chunk-NB6X5O5L.js.map +1 -0
- package/dist/{chunk-LZRLWKJ2.js → chunk-UHHEPU4A.js} +379 -88
- package/dist/chunk-UHHEPU4A.js.map +1 -0
- package/dist/{chunk-VTEP2AQX.js → chunk-WJ3H3RJN.js} +5 -3
- package/dist/chunk-WJ3H3RJN.js.map +1 -0
- package/dist/{chunk-G5PBC5OB.js → chunk-ZNV7Q2TO.js} +8 -8
- package/dist/chunk-ZNV7Q2TO.js.map +1 -0
- package/dist/components/GetStarted.d.ts +45 -0
- package/dist/components/GetStarted.d.ts.map +1 -0
- package/dist/components/RightRail.d.ts.map +1 -1
- package/dist/components/TeachMe.d.ts +83 -0
- package/dist/components/TeachMe.d.ts.map +1 -0
- package/dist/components/auth/SplitLogin.d.ts.map +1 -1
- package/dist/components/billing/SoftLimitProbes.d.ts +5 -0
- package/dist/components/billing/SoftLimitProbes.d.ts.map +1 -0
- package/dist/components/billing/SoftLimitWidget.d.ts +3 -0
- package/dist/components/billing/SoftLimitWidget.d.ts.map +1 -0
- package/dist/components/billing/index.d.ts +3 -1
- package/dist/components/billing/index.d.ts.map +1 -1
- package/dist/components/billing/soft-limit.store.d.ts +23 -0
- package/dist/components/billing/soft-limit.store.d.ts.map +1 -0
- package/dist/components/chat/ChatConversation.d.ts.map +1 -1
- package/dist/components/chat/ChatHistory.d.ts.map +1 -1
- package/dist/components/chat/ChatMessages.d.ts.map +1 -1
- package/dist/components/chat/ConfirmActionCard.d.ts +5 -1
- package/dist/components/chat/ConfirmActionCard.d.ts.map +1 -1
- package/dist/components/chat/index.d.ts +0 -1
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/connect/ConnectorRuns.d.ts +1 -1
- package/dist/components/connect/ConnectorsPanel.d.ts.map +1 -1
- package/dist/components/connect/ConnectorsTab.d.ts.map +1 -1
- package/dist/components/connect/connector-status.d.ts +1 -1
- package/dist/components/connect/model.d.ts +1 -1
- package/dist/components/layout/CommandPalette.d.ts.map +1 -1
- package/dist/components/organization/PermissionProfilesTab.d.ts.map +1 -1
- package/dist/components/settings/LocationsCrudPage.d.ts.map +1 -1
- package/dist/components/settings/SettingsPage.d.ts.map +1 -1
- package/dist/components/shared/RecordPickerModal.d.ts +24 -1
- package/dist/components/shared/RecordPickerModal.d.ts.map +1 -1
- package/dist/components/survey/PublicSurveyPage.d.ts +8 -0
- package/dist/components/survey/PublicSurveyPage.d.ts.map +1 -0
- package/dist/crud/CrudDetailPage.d.ts.map +1 -1
- package/dist/crud/CrudFormPage.d.ts.map +1 -1
- package/dist/crud/CrudListView.d.ts +3 -1
- package/dist/crud/CrudListView.d.ts.map +1 -1
- package/dist/crud/CrudPage.d.ts.map +1 -1
- package/dist/crud/CrudRecordModal.d.ts.map +1 -1
- package/dist/crud/LookupCreateInline.d.ts.map +1 -1
- package/dist/crud/RelatedListTab.d.ts +10 -0
- package/dist/crud/RelatedListTab.d.ts.map +1 -0
- package/dist/crud/archetypes/BookableToggle.d.ts +12 -0
- package/dist/crud/archetypes/BookableToggle.d.ts.map +1 -0
- package/dist/crud/archetypes/DetailTabHeader.d.ts +23 -0
- package/dist/crud/archetypes/DetailTabHeader.d.ts.map +1 -0
- package/dist/crud/archetypes/KanbanBoard.d.ts +89 -0
- package/dist/crud/archetypes/KanbanBoard.d.ts.map +1 -0
- package/dist/crud/archetypes/OrderAmount.d.ts +25 -0
- package/dist/crud/archetypes/OrderAmount.d.ts.map +1 -0
- package/dist/crud/archetypes/OrderBoardView.d.ts +61 -0
- package/dist/crud/archetypes/OrderBoardView.d.ts.map +1 -0
- package/dist/crud/archetypes/OrderCreateScreen.d.ts +116 -0
- package/dist/crud/archetypes/OrderCreateScreen.d.ts.map +1 -0
- package/dist/crud/archetypes/OrderDetailPage.d.ts +35 -0
- package/dist/crud/archetypes/OrderDetailPage.d.ts.map +1 -0
- package/dist/crud/archetypes/OrderDetailRail.d.ts +97 -0
- package/dist/crud/archetypes/OrderDetailRail.d.ts.map +1 -0
- package/dist/crud/archetypes/OrderDetailView.d.ts.map +1 -1
- package/dist/crud/archetypes/OrderFormView.d.ts +20 -1
- package/dist/crud/archetypes/OrderFormView.d.ts.map +1 -1
- package/dist/crud/archetypes/OrderListView.d.ts +59 -1
- package/dist/crud/archetypes/OrderListView.d.ts.map +1 -1
- package/dist/crud/archetypes/OrderPaymentChip.d.ts +8 -0
- package/dist/crud/archetypes/OrderPaymentChip.d.ts.map +1 -0
- package/dist/crud/archetypes/PaymentStatusBadge.d.ts +47 -0
- package/dist/crud/archetypes/PaymentStatusBadge.d.ts.map +1 -0
- package/dist/crud/archetypes/PersonDetailTabs.d.ts.map +1 -1
- package/dist/crud/archetypes/orderVocabulary.d.ts +19 -0
- package/dist/crud/archetypes/orderVocabulary.d.ts.map +1 -0
- package/dist/crud/archetypes/useOrderEditor.d.ts +20 -0
- package/dist/crud/archetypes/useOrderEditor.d.ts.map +1 -0
- package/dist/crud/archetypes/useOrderReceivable.d.ts +46 -0
- package/dist/crud/archetypes/useOrderReceivable.d.ts.map +1 -0
- package/dist/crud/archetypes/useOrdersPaymentStatus.d.ts +15 -0
- package/dist/crud/archetypes/useOrdersPaymentStatus.d.ts.map +1 -0
- package/dist/crud/createCrudPage.d.ts +3 -0
- package/dist/crud/createCrudPage.d.ts.map +1 -1
- package/dist/crud/relation-field.d.ts.map +1 -1
- package/dist/directory/AppSwitcher.d.ts +48 -0
- package/dist/directory/AppSwitcher.d.ts.map +1 -0
- package/dist/directory/FamilyWordmark.d.ts +20 -0
- package/dist/directory/FamilyWordmark.d.ts.map +1 -0
- package/dist/directory/app-id.d.ts +21 -0
- package/dist/directory/app-id.d.ts.map +1 -0
- package/dist/directory/directory.store.d.ts +20 -0
- package/dist/directory/directory.store.d.ts.map +1 -0
- package/dist/directory/index.d.ts +7 -0
- package/dist/directory/index.d.ts.map +1 -0
- package/dist/directory/types.d.ts +43 -0
- package/dist/directory/types.d.ts.map +1 -0
- package/dist/directory/useAppDirectory.d.ts +14 -0
- package/dist/directory/useAppDirectory.d.ts.map +1 -0
- package/dist/hooks/useAITools.d.ts +7 -0
- package/dist/hooks/useAITools.d.ts.map +1 -1
- package/dist/hooks/useAppConfig.d.ts.map +1 -1
- package/dist/hooks/useChat.d.ts +4 -0
- package/dist/hooks/useChat.d.ts.map +1 -1
- package/dist/hooks/useTenant.d.ts +12 -12
- package/dist/hooks/useTenant.d.ts.map +1 -1
- package/dist/index.d.ts +43 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25069 -21491
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-staff.d.ts +46 -96
- package/dist/lib/agent-staff.d.ts.map +1 -1
- package/dist/lib/ai-tool-handlers.d.ts +24 -7
- package/dist/lib/ai-tool-handlers.d.ts.map +1 -1
- package/dist/lib/assistant-invite.d.ts.map +1 -1
- package/dist/lib/bookable-service.d.ts +7 -0
- package/dist/lib/bookable-service.d.ts.map +1 -0
- package/dist/lib/core-ai-tools.d.ts +0 -17
- package/dist/lib/core-ai-tools.d.ts.map +1 -1
- package/dist/lib/fayz-agent.d.ts +2 -0
- package/dist/lib/fayz-agent.d.ts.map +1 -1
- package/dist/lib/product-name.d.ts +38 -0
- package/dist/lib/product-name.d.ts.map +1 -0
- package/dist/lib/tool-search.d.ts +82 -0
- package/dist/lib/tool-search.d.ts.map +1 -0
- package/dist/onboarding/ActivationAgentSurface.d.ts.map +1 -1
- package/dist/onboarding/ActivationChecklistCard.d.ts +11 -1
- package/dist/onboarding/ActivationChecklistCard.d.ts.map +1 -1
- package/dist/onboarding/ActivationProvider.d.ts.map +1 -1
- package/dist/onboarding/WorkspaceSetupFlow.d.ts.map +1 -1
- package/dist/onboarding/business-profile.d.ts +67 -0
- package/dist/onboarding/business-profile.d.ts.map +1 -0
- package/dist/onboarding/checklist.d.ts +10 -0
- package/dist/onboarding/checklist.d.ts.map +1 -1
- package/dist/onboarding/decide.d.ts +23 -0
- package/dist/onboarding/decide.d.ts.map +1 -1
- package/dist/onboarding/guided-runner.d.ts +11 -0
- package/dist/onboarding/guided-runner.d.ts.map +1 -1
- package/dist/onboarding/guided.d.ts +21 -1
- package/dist/onboarding/guided.d.ts.map +1 -1
- package/dist/onboarding/index.d.ts +4 -2
- package/dist/onboarding/index.d.ts.map +1 -1
- package/dist/onboarding/packs/retail.d.ts.map +1 -1
- package/dist/onboarding/programs.d.ts +25 -1
- package/dist/onboarding/programs.d.ts.map +1 -1
- package/dist/onboarding/useWorkspaceSetupGate.d.ts.map +1 -1
- package/dist/onboarding/welcome.d.ts +27 -0
- package/dist/onboarding/welcome.d.ts.map +1 -0
- package/dist/org/WorkspaceChooser.d.ts +20 -0
- package/dist/org/WorkspaceChooser.d.ts.map +1 -0
- package/dist/org/WorkspaceChooserGate.d.ts +21 -0
- package/dist/org/WorkspaceChooserGate.d.ts.map +1 -0
- package/dist/org/WorkspaceSwitching.d.ts +25 -0
- package/dist/org/WorkspaceSwitching.d.ts.map +1 -0
- package/dist/org/WorkspaceSwitchingHost.d.ts +11 -0
- package/dist/org/WorkspaceSwitchingHost.d.ts.map +1 -0
- package/dist/org/adapters/supabase.d.ts +1 -1
- package/dist/org/adapters/supabase.d.ts.map +1 -1
- package/dist/org/choice.d.ts +41 -0
- package/dist/org/choice.d.ts.map +1 -0
- package/dist/org/context.d.ts +8 -0
- package/dist/org/context.d.ts.map +1 -1
- package/dist/org/index.d.ts +12 -1
- package/dist/org/index.d.ts.map +1 -1
- package/dist/org/index.js +4 -4
- package/dist/org/self.d.ts.map +1 -1
- package/dist/org/store.d.ts +2 -1
- package/dist/org/store.d.ts.map +1 -1
- package/dist/org/switching.store.d.ts +27 -0
- package/dist/org/switching.store.d.ts.map +1 -0
- package/dist/permissions/context.d.ts +26 -0
- package/dist/permissions/context.d.ts.map +1 -1
- package/dist/permissions/index.js +1 -1
- package/dist/projects/SeuSiteWidget.d.ts.map +1 -1
- package/dist/setup/SetupAgentSurface.d.ts +2 -0
- package/dist/setup/SetupAgentSurface.d.ts.map +1 -0
- package/dist/setup/format.d.ts +21 -0
- package/dist/setup/format.d.ts.map +1 -0
- package/dist/setup/registry.d.ts +29 -0
- package/dist/setup/registry.d.ts.map +1 -0
- package/dist/setup/validate.d.ts +26 -0
- package/dist/setup/validate.d.ts.map +1 -0
- package/dist/stores/chat.store.d.ts +15 -18
- package/dist/stores/chat.store.d.ts.map +1 -1
- package/dist/stores/createCrudStore.d.ts +2 -0
- package/dist/stores/createCrudStore.d.ts.map +1 -1
- package/dist/tasks/components/TaskDetail.d.ts.map +1 -1
- package/dist/units/UnitMenuSection.d.ts.map +1 -1
- package/dist/units/UnitSwitcher.d.ts.map +1 -1
- package/dist/units/UnitSwitching.d.ts +24 -0
- package/dist/units/UnitSwitching.d.ts.map +1 -0
- package/dist/units/UnitSwitchingHost.d.ts +11 -0
- package/dist/units/UnitSwitchingHost.d.ts.map +1 -0
- package/dist/units/data.d.ts +30 -4
- package/dist/units/data.d.ts.map +1 -1
- package/dist/units/index.d.ts +2 -0
- package/dist/units/index.d.ts.map +1 -1
- package/dist/units/switching.store.d.ts +31 -0
- package/dist/units/switching.store.d.ts.map +1 -0
- package/package.json +6 -6
- package/dist/CommandPalette-XY3VOEAV.js +0 -291
- package/dist/CommandPalette-XY3VOEAV.js.map +0 -1
- package/dist/SubscriptionPage-5PJ25YAD.js +0 -8
- package/dist/chunk-G5PBC5OB.js.map +0 -1
- package/dist/chunk-LZRLWKJ2.js.map +0 -1
- package/dist/chunk-VTEP2AQX.js.map +0 -1
- package/dist/chunk-WN6PGQSG.js.map +0 -1
- package/dist/components/billing/SoftLimitBanner.d.ts +0 -5
- package/dist/components/billing/SoftLimitBanner.d.ts.map +0 -1
- package/dist/components/chat/StaffHireView.d.ts +0 -21
- package/dist/components/chat/StaffHireView.d.ts.map +0 -1
- package/dist/components/chat/StaffPitchCard.d.ts +0 -15
- package/dist/components/chat/StaffPitchCard.d.ts.map +0 -1
- package/dist/components/chat/StaffSwitcher.d.ts +0 -23
- package/dist/components/chat/StaffSwitcher.d.ts.map +0 -1
- package/dist/lib/staff-cards.d.ts +0 -11
- package/dist/lib/staff-cards.d.ts.map +0 -1
|
@@ -1,117 +1,67 @@
|
|
|
1
1
|
import type { AgentRole, AgentStaffDef } from '@fayz-ai/core';
|
|
2
|
-
import { type ChatMessage } from '../stores/chat.store';
|
|
3
2
|
/**
|
|
4
|
-
* The app's
|
|
5
|
-
*
|
|
3
|
+
* The app's agent: one person, with a name, who carries everything the app can
|
|
4
|
+
* do.
|
|
6
5
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* This started as a cast of two to four — a specialist per area, each with its
|
|
7
|
+
* own toolset and its own thread. What that bought in legibility it paid for
|
|
8
|
+
* twice: the owner had to know WHO to ask before asking, and every capability
|
|
9
|
+
* the app gained had to be assigned to somebody before it could be used. A
|
|
10
|
+
* request that fell between two of them fell to a hand-off, and a hand-off is a
|
|
11
|
+
* conversation the user did not want to have.
|
|
9
12
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* So the split moved. The PERSON is one; what used to separate colleagues —
|
|
14
|
+
* which tools they carried — now separates what ships with the turn from what
|
|
15
|
+
* the agent asks for when it needs it (see lib/tool-search.ts). `AgentRole`
|
|
16
|
+
* survives as the AREA a capability belongs to, which is exactly what the
|
|
17
|
+
* search indexes; a plugin still declares it, and no app has to re-map a tool
|
|
18
|
+
* to a person.
|
|
16
19
|
*
|
|
17
|
-
* An app
|
|
18
|
-
* comes back empty and every consumer falls through to the single assistant.
|
|
20
|
+
* An app that casts nobody keeps the generic assistant it always had.
|
|
19
21
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
roster: AgentStaffDef[];
|
|
25
|
-
/** Role of the agent currently answering. Null before a cast is registered. */
|
|
26
|
-
activeRole: AgentRole | null;
|
|
27
|
-
/** The team picker is open. Shared because the control and the thing it
|
|
28
|
-
* opens live on opposite sides of the shell: the chevron is on the rail's
|
|
29
|
-
* tab, the list is inside the panel. */
|
|
30
|
-
pickerOpen: boolean;
|
|
31
|
-
setRoster: (roster: AgentStaffDef[]) => void;
|
|
32
|
-
setActiveRole: (role: AgentRole | null) => void;
|
|
33
|
-
setPickerOpen: (open: boolean) => void;
|
|
22
|
+
interface AgentState {
|
|
23
|
+
/** The app's agent. Null until the shell registers one. */
|
|
24
|
+
agent: AgentStaffDef | null;
|
|
25
|
+
setAgent: (agent: AgentStaffDef | null) => void;
|
|
34
26
|
}
|
|
35
|
-
export declare const
|
|
36
|
-
/** Who receives what belongs to nobody. Falls back to `setup`, then the first
|
|
37
|
-
* member — an app that forgets to flag a host still has someone answering. */
|
|
38
|
-
export declare function hostOf(roster: AgentStaffDef[]): AgentStaffDef | undefined;
|
|
39
|
-
export declare function getRoster(): AgentStaffDef[];
|
|
40
|
-
export declare function getHost(): AgentStaffDef | undefined;
|
|
41
|
-
export declare function agentForRole(role: AgentRole): AgentStaffDef | undefined;
|
|
42
|
-
/** The agent answering right now, or the host before anyone has been picked. */
|
|
43
|
-
export declare function getActiveAgent(): AgentStaffDef | undefined;
|
|
27
|
+
export declare const useAgentStore: import("zustand").UseBoundStore<import("zustand").StoreApi<AgentState>>;
|
|
44
28
|
/**
|
|
45
|
-
*
|
|
29
|
+
* Which member of a legacy cast becomes THE agent.
|
|
46
30
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* seat: every paid agent would ship free. So hiring is opt-in — the plan has to
|
|
51
|
-
* say `true`.
|
|
31
|
+
* Apps still ship `chat.staff` arrays: the host is the one that was already
|
|
32
|
+
* free, already included and already the first face of the app, so collapsing
|
|
33
|
+
* to it never turns a paid seat into the default.
|
|
52
34
|
*/
|
|
53
|
-
export declare function
|
|
54
|
-
|
|
55
|
-
|
|
35
|
+
export declare function soleAgent(staff: AgentStaffDef[] | undefined): AgentStaffDef | null;
|
|
36
|
+
export declare function getAgent(): AgentStaffDef | undefined;
|
|
37
|
+
/** @deprecated One agent per app — use {@link getAgent}. */
|
|
38
|
+
export declare const getActiveAgent: typeof getAgent;
|
|
39
|
+
/** @deprecated One agent per app — use {@link getAgent}. */
|
|
40
|
+
export declare const getHost: typeof getAgent;
|
|
56
41
|
/**
|
|
57
|
-
*
|
|
42
|
+
* Open the assistant with the tools of `area` already in hand.
|
|
58
43
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
export declare function switchToAgent(role: AgentRole, notice?: ChatMessage['notice']): void;
|
|
65
|
-
/**
|
|
66
|
-
* Raise the panel with `role` on duty, and say whether the caller may proceed.
|
|
67
|
-
*
|
|
68
|
-
* This is what turns a button on a page into a colleague picking up: pressing
|
|
69
|
-
* "gravar o atendimento" on a client record does not start a recording behind a
|
|
70
|
-
* generic assistant, it opens the Auxiliar's thread and starts it there — same
|
|
71
|
-
* identity, same tools, same transcript afterwards.
|
|
72
|
-
*
|
|
73
|
-
* Returns `false` for exactly one case: the role IS cast and nobody hired them.
|
|
74
|
-
* The pitch is up, and the caller must not do the work — starting anyway would
|
|
75
|
-
* hand out the paid job while the panel is still selling it. An app that never
|
|
76
|
-
* cast the role gets `true` and the plain assistant, unchanged.
|
|
77
|
-
*/
|
|
78
|
-
export declare function openAssistantAs(role: AgentRole): boolean;
|
|
79
|
-
/**
|
|
80
|
-
* The colleague being introduced right now.
|
|
44
|
+
* This is what turns a button on a page into the agent picking up: pressing
|
|
45
|
+
* "gravar o atendimento" on a client record opens the panel with the
|
|
46
|
+
* `encounter` tools loaded, so the first thing the agent does is the work
|
|
47
|
+
* rather than a search for how to do it.
|
|
81
48
|
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* itself renders mid-conversation when it hits work it has no tools for. Both
|
|
85
|
-
* mean the same thing, so both land here and the panel answers once.
|
|
49
|
+
* Returns true — the paywall it used to answer belonged to per-agent hiring,
|
|
50
|
+
* and there is one agent now, gated (or not) like the chat itself.
|
|
86
51
|
*/
|
|
87
|
-
|
|
88
|
-
meeting: AgentStaffDef | null;
|
|
89
|
-
meet: (member: AgentStaffDef) => void;
|
|
90
|
-
dismissMeeting: () => void;
|
|
91
|
-
}
|
|
92
|
-
export declare const useMeetAgentStore: import("zustand").UseBoundStore<import("zustand").StoreApi<MeetState>>;
|
|
52
|
+
export declare function openAssistantAs(area: AgentRole): boolean;
|
|
93
53
|
/**
|
|
94
|
-
* Who the model is this turn
|
|
95
|
-
*
|
|
96
|
-
* The colleagues matter as much as the persona: without them the agent either
|
|
97
|
-
* refuses what isn't its job or improvises past its toolset. Un-hired ones are
|
|
98
|
-
* listed too, deliberately — recognising "that's Nina's work" and offering her
|
|
99
|
-
* is the only honest thing to say when the tools to do it are absent.
|
|
54
|
+
* Who the model is this turn.
|
|
100
55
|
*
|
|
101
|
-
*
|
|
56
|
+
* No colleague list any more: there is nobody to hand off to, and the agent's
|
|
57
|
+
* reach is a question of tools it can ask for rather than a person it must
|
|
58
|
+
* call. Empty when the app named nobody, so the guidance is unchanged.
|
|
102
59
|
*/
|
|
103
60
|
export declare function buildPersonaGuidance(): string;
|
|
104
|
-
/** Publishes the app's
|
|
61
|
+
/** Publishes the app's agent for the lifetime of the shell. */
|
|
105
62
|
export declare function useRegisterStaff(staff: AgentStaffDef[] | undefined): void;
|
|
106
|
-
export declare function
|
|
107
|
-
/**
|
|
108
|
-
export declare
|
|
109
|
-
/** Reactive counterpart of {@link isAgentHired}. */
|
|
110
|
-
export declare function useAgentHired(member: AgentStaffDef | undefined): boolean;
|
|
111
|
-
/** The cast split by payroll, so the switcher can show both in one pass. */
|
|
112
|
-
export declare function useStaffRoster(): {
|
|
113
|
-
hired: AgentStaffDef[];
|
|
114
|
-
open: AgentStaffDef[];
|
|
115
|
-
};
|
|
63
|
+
export declare function useAgent(): AgentStaffDef | undefined;
|
|
64
|
+
/** @deprecated One agent per app — use {@link useAgent}. */
|
|
65
|
+
export declare const useActiveAgent: typeof useAgent;
|
|
116
66
|
export {};
|
|
117
67
|
//# sourceMappingURL=agent-staff.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-staff.d.ts","sourceRoot":"","sources":["../../src/lib/agent-staff.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"agent-staff.d.ts","sourceRoot":"","sources":["../../src/lib/agent-staff.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAI7D;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,UAAU,UAAU;IAClB,2DAA2D;IAC3D,KAAK,EAAE,aAAa,GAAG,IAAI,CAAA;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAA;CAChD;AAED,eAAO,MAAM,aAAa,yEAGvB,CAAA;AAEH;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,SAAS,GAAG,aAAa,GAAG,IAAI,CAGlF;AAED,wBAAgB,QAAQ,IAAI,aAAa,GAAG,SAAS,CAEpD;AAED,4DAA4D;AAC5D,eAAO,MAAM,cAAc,iBAAW,CAAA;AACtC,4DAA4D;AAC5D,eAAO,MAAM,OAAO,iBAAW,CAAA;AAE/B;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAIxD;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAa7C;AAMD,+DAA+D;AAC/D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,SAAS,GAAG,IAAI,CAWzE;AAED,wBAAgB,QAAQ,IAAI,aAAa,GAAG,SAAS,CAEpD;AAED,4DAA4D;AAC5D,eAAO,MAAM,cAAc,iBAAW,CAAA"}
|
|
@@ -75,6 +75,12 @@ export interface AIToolExecutionContext {
|
|
|
75
75
|
* catalog rather than answering it with an empty app.
|
|
76
76
|
*/
|
|
77
77
|
loadConnectors?: () => Promise<ConnectorIndex>;
|
|
78
|
+
/**
|
|
79
|
+
* The half of the catalog that does NOT ship this turn — what `findTools`
|
|
80
|
+
* searches. Absent when everything already ships, which is also what
|
|
81
|
+
* withdraws the search tool itself.
|
|
82
|
+
*/
|
|
83
|
+
searchableTools?: PluginAITool[];
|
|
78
84
|
/**
|
|
79
85
|
* Org-management writes the agent can perform — today only access profiles.
|
|
80
86
|
* Narrowed to what is actually called: handing the executor the whole adapter
|
|
@@ -139,21 +145,32 @@ export interface BuildToolsetOptions {
|
|
|
139
145
|
dataTools: Map<string, DataToolTarget>;
|
|
140
146
|
/** Plugin owning the current route; its tools rank ahead of the rest. */
|
|
141
147
|
activePluginId?: string | null;
|
|
148
|
+
/** Tool names this turn carries whatever the question is: the primitives and
|
|
149
|
+
* whatever the open screen published. */
|
|
150
|
+
pinned?: ReadonlySet<string>;
|
|
151
|
+
/** Tool names the agent asked for with `findTools`, earlier in this
|
|
152
|
+
* conversation. Ranked above route context — an explicit ask must not lose
|
|
153
|
+
* its place to the screen the user happens to be on. */
|
|
154
|
+
loaded?: ReadonlySet<string>;
|
|
142
155
|
maxTools?: number;
|
|
143
156
|
}
|
|
144
157
|
/**
|
|
145
|
-
* Shape the declared catalog into the toolset sent to the agent.
|
|
158
|
+
* Shape the declared catalog into the toolset sent to the agent THIS round.
|
|
146
159
|
*
|
|
147
|
-
*
|
|
160
|
+
* Three filters, all load-bearing:
|
|
148
161
|
*
|
|
149
162
|
* 1. *Executable only.* An advertised tool with no executor is worse than a
|
|
150
163
|
* missing one — the model spends rounds on it and then apologises.
|
|
151
|
-
* 2. *
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
164
|
+
* 2. *Carried or asked for.* One agent owns everything the app does, so the
|
|
165
|
+
* catalog is now the whole app (~40 tools, ~55k characters in a mature
|
|
166
|
+
* one). What ships is the primitives, what the open screen published, what
|
|
167
|
+
* `findTools` was asked for, and the current route's plugin — the rest stays
|
|
168
|
+
* reachable rather than resident. Without a `pinned` set this degrades to
|
|
169
|
+
* the old behaviour: everything, ranked by route.
|
|
170
|
+
* 3. *Capped.* A last ceiling, in the order above, so a runaway index cannot
|
|
171
|
+
* silently undo the point of the exercise.
|
|
155
172
|
*/
|
|
156
|
-
export declare function buildAgentToolset(tools: PluginAITool[], { dataTools, activePluginId, maxTools }: BuildToolsetOptions): AgentTool[];
|
|
173
|
+
export declare function buildAgentToolset(tools: PluginAITool[], { dataTools, activePluginId, pinned, loaded, maxTools }: BuildToolsetOptions): AgentTool[];
|
|
157
174
|
/**
|
|
158
175
|
* Client-plane execution of an RPC-bound tool (`execution: {kind:'rpc'}`):
|
|
159
176
|
* calls the pool function as the signed-in user. The actor is the SESSION
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-tool-handlers.d.ts","sourceRoot":"","sources":["../../src/lib/ai-tool-handlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ai-tool-handlers.d.ts","sourceRoot":"","sources":["../../src/lib/ai-tool-handlers.ts"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAA;AAC7E,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,YAAY,EAEZ,iBAAiB,EACjB,UAAU,EACX,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEvE;;;;;;;;;;;;;;;;;GAiBG;AAEH,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,SAAS,CAAA;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAChC,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,YAAY,GAAG,IAAI,CAAA;IAC/B,OAAO,EAAE,SAAS,EAAE,CAAA;IACpB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,sEAAsE;IACtE,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAA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,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACnE,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IACzC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,eAAO,MAAM,uBAAuB,mFA0CjC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the flag. Answers `null` on a pool that never got the column, so the
|
|
3
|
+
* caller hides the switch instead of showing one that cannot be saved.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getPersonBookable(personId: string): Promise<boolean | null>;
|
|
6
|
+
export declare function setPersonBookable(personId: string, isBookable: boolean): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=bookable-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookable-service.d.ts","sourceRoot":"","sources":["../../src/lib/bookable-service.ts"],"names":[],"mappings":"AAeA;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAajF;AAED,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAO5F"}
|
|
@@ -46,21 +46,4 @@ export declare const PROFILE_ACTIONS: readonly ["read", "create", "edit", "delet
|
|
|
46
46
|
*/
|
|
47
47
|
export declare function buildPermissionTools(features: FeatureDeclaration[], profiles?: PermissionProfile[]): PluginAITool[];
|
|
48
48
|
export declare function generateEntityTools(entities?: RegisteredEntity[]): PluginAITool[];
|
|
49
|
-
/**
|
|
50
|
-
* `callColleague` — the one way an agent reaches another.
|
|
51
|
-
*
|
|
52
|
-
* Built per turn rather than declared statically because its whole value is the
|
|
53
|
-
* enum: naming the colleagues by role lets the model pick one instead of
|
|
54
|
-
* inventing a name, and an app with nobody else on staff never sees the tool at
|
|
55
|
-
* all. Un-hired colleagues are listed too — offering them is the honest answer
|
|
56
|
-
* when the tools for that job are absent, and the executor renders the offer
|
|
57
|
-
* rather than the hand-off.
|
|
58
|
-
*/
|
|
59
|
-
export declare function buildColleagueTool(colleagues: Array<{
|
|
60
|
-
role: string;
|
|
61
|
-
name: string;
|
|
62
|
-
title: string;
|
|
63
|
-
goal: string;
|
|
64
|
-
hired: boolean;
|
|
65
|
-
}>): PluginAITool[];
|
|
66
49
|
//# sourceMappingURL=core-ai-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-ai-tools.d.ts","sourceRoot":"","sources":["../../src/lib/core-ai-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACrF,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAGrE;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,YAAY,EA+FrC,CAAA;AA0BD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAK7E;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,YAAY,EAAE,CAoBvG;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAO9D;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAExD;
|
|
1
|
+
{"version":3,"file":"core-ai-tools.d.ts","sourceRoot":"","sources":["../../src/lib/core-ai-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,i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ts
CHANGED
|
@@ -27,6 +27,8 @@ export interface ResolvedFayzAgentConnection {
|
|
|
27
27
|
* for most of the fleet.
|
|
28
28
|
*/
|
|
29
29
|
export declare function resolveFayzApiBaseUrl(override?: string): string | undefined;
|
|
30
|
+
/** The other half of the address: which project on that platform this app is. */
|
|
31
|
+
export declare function resolveFayzProjectId(override?: string): string | undefined;
|
|
30
32
|
export declare function resolveFayzAgentConnection(override?: FayzAgentConnectionConfig | false): ResolvedFayzAgentConnection | null;
|
|
31
33
|
export declare function getFayzAgentClient(connection: ResolvedFayzAgentConnection): FayzAgentClient;
|
|
32
34
|
//# sourceMappingURL=fayz-agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fayz-agent.d.ts","sourceRoot":"","sources":["../../src/lib/fayz-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEhF;;;;;;;;GAQG;AAEH,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,MAAM,CAAA;CACvB;AAOD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE3E;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,CAAC,EAAE,yBAAyB,GAAG,KAAK,GAC3C,2BAA2B,GAAG,IAAI,CASpC;AAID,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,2BAA2B,GAAG,eAAe,CAW3F"}
|
|
1
|
+
{"version":3,"file":"fayz-agent.d.ts","sourceRoot":"","sources":["../../src/lib/fayz-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEhF;;;;;;;;GAQG;AAEH,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,MAAM,CAAA;CACvB;AAOD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE3E;AAED,iFAAiF;AACjF,wBAAgB,oBAAoB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE1E;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,CAAC,EAAE,yBAAyB,GAAG,KAAK,GAC3C,2BAA2B,GAAG,IAAI,CASpC;AAID,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,2BAA2B,GAAG,eAAe,CAW3F"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** The half every product in the family shares. */
|
|
3
|
+
declare const FAMILY_SUFFIX = "Control";
|
|
4
|
+
/**
|
|
5
|
+
* A product name in two weights, with the weight on the vertical.
|
|
6
|
+
*
|
|
7
|
+
* `Chef`/`Store` is the door the user chose; `Control` is the family every row
|
|
8
|
+
* in the menu repeats. What repeats steps back half a tone, what distinguishes
|
|
9
|
+
* carries the emphasis — same treatment as the login lockups.
|
|
10
|
+
*
|
|
11
|
+
* Only for places where the name stands alone as a wordmark; a name
|
|
12
|
+
* interpolated into a sentence stays plain text.
|
|
13
|
+
*
|
|
14
|
+
* A name outside the family, or the bare family name, renders whole.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ProductName({ name }: {
|
|
17
|
+
name: string;
|
|
18
|
+
}): React.JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Just the vertical — for surfaces where the family is already written once
|
|
21
|
+
* (the switcher menu sits under a "Control.Apps" label, so every row ending in
|
|
22
|
+
* "Control" would say it a fourth time).
|
|
23
|
+
*/
|
|
24
|
+
export declare function shortProductName(name: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* The name split where the family begins — `['Store', 'Control']`.
|
|
27
|
+
*
|
|
28
|
+
* `null` for a name outside the family, and that null is load-bearing: the
|
|
29
|
+
* switcher's whole treatment hangs the launcher off the word "Control", so a
|
|
30
|
+
* product that is not in the family has nothing to hang it from and must fall
|
|
31
|
+
* back to the plain lockup rather than dissolving a word it does not have.
|
|
32
|
+
*/
|
|
33
|
+
export declare function splitProductName(name: string): {
|
|
34
|
+
vertical: string;
|
|
35
|
+
family: string;
|
|
36
|
+
} | null;
|
|
37
|
+
export { FAMILY_SUFFIX };
|
|
38
|
+
//# sourceMappingURL=product-name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-name.d.ts","sourceRoot":"","sources":["../../src/lib/product-name.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,mDAAmD;AACnD,QAAA,MAAM,aAAa,YAAY,CAAA;AAE/B;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,qBAQrD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAG1F;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { PluginAITool } from '../types/plugins';
|
|
2
|
+
/**
|
|
3
|
+
* On-demand tools: the agent carries a few, and reaches the rest by asking.
|
|
4
|
+
*
|
|
5
|
+
* One agent per app means one agent owns every capability the app has — a
|
|
6
|
+
* mature app declares ~40 tools, and beauty-saas' catalog alone serializes to
|
|
7
|
+
* ~55k characters. Shipping all of it on every round is paid twice: in input
|
|
8
|
+
* tokens on each request of each turn, and in the model's own choice, which
|
|
9
|
+
* gets worse as the list grows.
|
|
10
|
+
*
|
|
11
|
+
* So the turn carries three kinds of tool: the PRIMITIVES that answer anything
|
|
12
|
+
* (search, navigate, read, write), whatever the OPEN SCREEN and its plugin
|
|
13
|
+
* publish, and whatever the agent has ASKED for. `findTools` is the ask: the
|
|
14
|
+
* index of what exists travels in one short description, and the schemas only
|
|
15
|
+
* arrive for the areas the conversation actually reached.
|
|
16
|
+
*
|
|
17
|
+
* Loaded tools are sticky for the conversation on purpose. Dropping them again
|
|
18
|
+
* would re-cost the same round trip on the next question about the same
|
|
19
|
+
* subject, and every change to the tool list invalidates the prompt cache from
|
|
20
|
+
* that point on — growing once per area is the cheap direction to be wrong in.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* The tools that ship on every turn, whatever the conversation is about.
|
|
24
|
+
*
|
|
25
|
+
* Deliberately the generic ones: they take their target as a parameter, so
|
|
26
|
+
* they cover every entity the app has without a name per feature. A tool that
|
|
27
|
+
* only makes sense inside one area (import, connectors, permissions, units)
|
|
28
|
+
* belongs behind the search.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ALWAYS_ON_TOOLS: ReadonlySet<string>;
|
|
31
|
+
export declare function loadedToolNames(): ReadonlySet<string>;
|
|
32
|
+
export declare function getLoadedToolsVersion(): number;
|
|
33
|
+
export declare function subscribeLoadedTools(fn: () => void): () => void;
|
|
34
|
+
/** Put tools in the agent's hands from the next round on. Returns what was new. */
|
|
35
|
+
export declare function loadTools(names: string[]): string[];
|
|
36
|
+
/** Hand over a whole area at once — what a screen means by "ask X about this".
|
|
37
|
+
* Resolved against the catalog rather than stored as names, so it also covers
|
|
38
|
+
* tools a plugin mounted after the request. */
|
|
39
|
+
export declare function loadArea(area: string): void;
|
|
40
|
+
/** A new conversation starts with the carry-on set again. */
|
|
41
|
+
export declare function resetLoadedTools(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Every tool the agent has asked for, by name — the two ways of asking
|
|
44
|
+
* (`findTools`, an area handed over by a screen) resolved against the live
|
|
45
|
+
* catalog. Read fresh on each round of a turn: a search only pays off if its
|
|
46
|
+
* result is in the very next request.
|
|
47
|
+
*/
|
|
48
|
+
export declare function resolveLoadedNames(catalog: PluginAITool[]): Set<string>;
|
|
49
|
+
/** Tools that are not carried by default — the searchable half of the catalog. */
|
|
50
|
+
export declare function searchableTools(catalog: PluginAITool[], pinned: ReadonlySet<string>): PluginAITool[];
|
|
51
|
+
/**
|
|
52
|
+
* The index the model reads instead of the schemas: area, then the tool names
|
|
53
|
+
* in it. Names and nothing else — a name plus its area is enough to recognise
|
|
54
|
+
* "this is where I ask", and it costs ~2% of what the schemas cost.
|
|
55
|
+
*/
|
|
56
|
+
export declare function buildToolIndex(tools: PluginAITool[]): string;
|
|
57
|
+
/**
|
|
58
|
+
* The one tool that reaches the other ones.
|
|
59
|
+
*
|
|
60
|
+
* Absent when everything already ships this turn — a search that can only
|
|
61
|
+
* return what the model is holding is a wasted round.
|
|
62
|
+
*/
|
|
63
|
+
export declare function buildToolSearchTool(searchable: PluginAITool[]): PluginAITool[];
|
|
64
|
+
export interface ToolSearchResult {
|
|
65
|
+
loaded: Array<{
|
|
66
|
+
name: string;
|
|
67
|
+
signature: string;
|
|
68
|
+
description: string;
|
|
69
|
+
}>;
|
|
70
|
+
available?: string;
|
|
71
|
+
note?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Resolve a request for tools against the searchable catalog and hand them
|
|
75
|
+
* over. Unknown names fall back to the query path rather than erroring — the
|
|
76
|
+
* model paraphrasing a name it saw once must not cost a whole round.
|
|
77
|
+
*/
|
|
78
|
+
export declare function resolveToolSearch(args: {
|
|
79
|
+
tools?: unknown;
|
|
80
|
+
query?: unknown;
|
|
81
|
+
}, searchable: PluginAITool[]): ToolSearchResult;
|
|
82
|
+
//# sourceMappingURL=tool-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-search.d.ts","sourceRoot":"","sources":["../../src/lib/tool-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAGpD;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAW9C,CAAA;AAaF,wBAAgB,eAAe,IAAI,WAAW,CAAC,MAAM,CAAC,CAErD;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAG/D;AAED,mFAAmF;AACnF,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAMnD;AAED;;gDAEgD;AAChD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAI3C;AAED,6DAA6D;AAC7D,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAQvE;AAOD,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,YAAY,EAAE,CAEpG;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,MAAM,CAW5D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CA6B9E;AAoBD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACvE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,EAC1C,UAAU,EAAE,YAAY,EAAE,GACzB,gBAAgB,CAqClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivationAgentSurface.d.ts","sourceRoot":"","sources":["../../src/onboarding/ActivationAgentSurface.tsx"],"names":[],"mappings":"AACA,OAAO,EAAM,KAAK,yBAAyB,EAAgB,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"ActivationAgentSurface.d.ts","sourceRoot":"","sources":["../../src/onboarding/ActivationAgentSurface.tsx"],"names":[],"mappings":"AACA,OAAO,EAAM,KAAK,yBAAyB,EAAgB,MAAM,eAAe,CAAA;AAmLhF,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,yBAAyB,EAAE,CAAA;CACtC;AAaD,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE,2BAA2B,QA8K/E"}
|
|
@@ -2,6 +2,16 @@ import * as React from 'react';
|
|
|
2
2
|
export interface ActivationChecklistCardProps {
|
|
3
3
|
title?: string;
|
|
4
4
|
subtitle?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Hide the card once every step is done. Default: true.
|
|
7
|
+
*
|
|
8
|
+
* The rail wants the default — a finished checklist gives the menu its space
|
|
9
|
+
* back. A dashboard GRID does not: the card vanishing at 6/6 leaves a hole
|
|
10
|
+
* where it used to sit, and on an already-configured store it flashed its
|
|
11
|
+
* skeleton and then disappeared. A card in a grid should keep its slot and
|
|
12
|
+
* say it is done.
|
|
13
|
+
*/
|
|
14
|
+
hideWhenComplete?: boolean;
|
|
5
15
|
className?: string;
|
|
6
16
|
}
|
|
7
17
|
/**
|
|
@@ -19,5 +29,5 @@ export interface ActivationChecklistCardProps {
|
|
|
19
29
|
* those steps into the owning plugin's program (see `OnboardingProgramDef`) and
|
|
20
30
|
* renders this instead.
|
|
21
31
|
*/
|
|
22
|
-
export declare function ActivationChecklistCard({ title, subtitle, className }: ActivationChecklistCardProps): React.JSX.Element | null;
|
|
32
|
+
export declare function ActivationChecklistCard({ title, subtitle, hideWhenComplete, className, }: ActivationChecklistCardProps): React.JSX.Element | null;
|
|
23
33
|
//# sourceMappingURL=ActivationChecklistCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivationChecklistCard.d.ts","sourceRoot":"","sources":["../../src/onboarding/ActivationChecklistCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,MAAM,WAAW,4BAA4B;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CAAC,
|
|
1
|
+
{"version":3,"file":"ActivationChecklistCard.d.ts","sourceRoot":"","sources":["../../src/onboarding/ActivationChecklistCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,MAAM,WAAW,4BAA4B;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,GAC7C,EAAE,4BAA4B,4BAqC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivationProvider.d.ts","sourceRoot":"","sources":["../../src/onboarding/ActivationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ActivationProvider.d.ts","sourceRoot":"","sources":["../../src/onboarding/ActivationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAoB9B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,sBA+KjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceSetupFlow.d.ts","sourceRoot":"","sources":["../../src/onboarding/WorkspaceSetupFlow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAU,KAAK,WAAW,EAAyC,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"WorkspaceSetupFlow.d.ts","sourceRoot":"","sources":["../../src/onboarding/WorkspaceSetupFlow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAU,KAAK,WAAW,EAAyC,MAAM,aAAa,CAAA;AAW7F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,WAAW,CAAA;IACnB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACnC,qFAAqF;IACrF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAID;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAC1F,EAAE,uBAAuB,qBA4GzB"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { WizardStepDef, WizardValues } from '@fayz-ai/ui';
|
|
2
|
+
/**
|
|
3
|
+
* What the business told us, as something the assistant always knows.
|
|
4
|
+
*
|
|
5
|
+
* The wizard's answers were reachable only through a tool (`readSetupAnswers`),
|
|
6
|
+
* which means the model knew them only when it thought to ask. That is the
|
|
7
|
+
* wrong default: this is not a lookup, it is who the person on the other side
|
|
8
|
+
* IS — the same standing to a conversation that the handbook outline has. A
|
|
9
|
+
* model that has to fetch the customer's identity will sometimes not bother,
|
|
10
|
+
* and then it opens with the one question the form already answered.
|
|
11
|
+
*
|
|
12
|
+
* So the profile is resolved once per workspace and rides in EVERY turn, in the
|
|
13
|
+
* wizard's own words. The tool stays, because the raw option ids
|
|
14
|
+
* (`retail.segments: ['cosmetics','pet']`) are a better input to a decision than
|
|
15
|
+
* a sentence — but nothing depends on it being called any more.
|
|
16
|
+
*/
|
|
17
|
+
export interface BusinessFact {
|
|
18
|
+
/** The question, as the wizard asked it. */
|
|
19
|
+
label: string;
|
|
20
|
+
/** The answer, in the option labels a person would recognise. */
|
|
21
|
+
value: string;
|
|
22
|
+
}
|
|
23
|
+
export interface BusinessProfile {
|
|
24
|
+
tenantId: string;
|
|
25
|
+
businessName?: string;
|
|
26
|
+
verticalId?: string;
|
|
27
|
+
facts: BusinessFact[];
|
|
28
|
+
/** Raw answers, option ids intact — what `readSetupAnswers` returns. */
|
|
29
|
+
answers: Record<string, unknown>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Stored answers → the questions and answers a person would recognise.
|
|
33
|
+
*
|
|
34
|
+
* Rebuilt from the SAME pack functions the wizard renders, rather than a map of
|
|
35
|
+
* field ids kept in step with them by hand. A pack is a pure function of
|
|
36
|
+
* context, so asking it for its steps a month later costs nothing and rewording
|
|
37
|
+
* a question updates this for free. A field id that no longer exists simply
|
|
38
|
+
* drops out — which is the only failure mode worth having.
|
|
39
|
+
*/
|
|
40
|
+
export declare function describeAnswers(steps: ReadonlyArray<WizardStepDef>, values: WizardValues): BusinessFact[];
|
|
41
|
+
export declare function buildBusinessProfile(input: {
|
|
42
|
+
tenantId: string;
|
|
43
|
+
businessName?: string;
|
|
44
|
+
verticalId?: string;
|
|
45
|
+
answers: Record<string, unknown>;
|
|
46
|
+
}): BusinessProfile;
|
|
47
|
+
/**
|
|
48
|
+
* The block that goes into the prompt.
|
|
49
|
+
*
|
|
50
|
+
* Ends with the instruction rather than opening with it: the model reads the
|
|
51
|
+
* facts, then is told what they oblige. The obligation is the whole point —
|
|
52
|
+
* knowing the answers and asking anyway is worse than not knowing, because the
|
|
53
|
+
* person can tell they already said it.
|
|
54
|
+
*/
|
|
55
|
+
export declare function businessProfileBlock(profile: BusinessProfile | null): string | undefined;
|
|
56
|
+
interface BusinessProfileState {
|
|
57
|
+
profile: BusinessProfile | null;
|
|
58
|
+
/** The load settled — distinguishes "no questionnaire" from "not asked yet". */
|
|
59
|
+
loaded: boolean;
|
|
60
|
+
load: (tenantId: string, businessName?: string) => Promise<void>;
|
|
61
|
+
clear: () => void;
|
|
62
|
+
}
|
|
63
|
+
export declare const useBusinessProfileStore: import("zustand").UseBoundStore<import("zustand").StoreApi<BusinessProfileState>>;
|
|
64
|
+
/** The prompt block for whatever workspace is loaded. Read at send time. */
|
|
65
|
+
export declare function currentBusinessProfileBlock(): string | undefined;
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=business-profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business-profile.d.ts","sourceRoot":"","sources":["../../src/onboarding/business-profile.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoB,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAKhF;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAA;IACb,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,YAAY,EAAE,CAAA;IACrB,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC;AAmCD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,YAAY,GAAG,YAAY,EAAE,CA4BzG;AAaD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjC,GAAG,eAAe,CASlB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAwBxF;AAMD,UAAU,oBAAoB;IAC5B,OAAO,EAAE,eAAe,GAAG,IAAI,CAAA;IAC/B,gFAAgF;IAChF,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAChE,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAKD,eAAO,MAAM,uBAAuB,mFA2CjC,CAAA;AAEH,4EAA4E;AAC5E,wBAAgB,2BAA2B,IAAI,MAAM,GAAG,SAAS,CAEhE"}
|
|
@@ -20,6 +20,11 @@ export interface OnboardingTaskSeed {
|
|
|
20
20
|
icon?: string;
|
|
21
21
|
/** Where the step's action goes. Never stored. */
|
|
22
22
|
route?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The step IS its screen: drop it when the app cannot serve the route. See
|
|
25
|
+
* `OnboardingStepDef.requiresRoute`.
|
|
26
|
+
*/
|
|
27
|
+
requiresRoute?: boolean;
|
|
23
28
|
/** A guided pass over the screen for this step. Never stored. */
|
|
24
29
|
tour?: TourDef;
|
|
25
30
|
/** The walkthrough as data — see {@link OnboardingMove}. Never stored. */
|
|
@@ -27,6 +32,11 @@ export interface OnboardingTaskSeed {
|
|
|
27
32
|
/** One line when the step closes. Never stored. */
|
|
28
33
|
celebrate?: string;
|
|
29
34
|
priority?: TaskPriority;
|
|
35
|
+
/**
|
|
36
|
+
* Same lever module steps have: hide this one when the setup answers rule it
|
|
37
|
+
* out. See `OnboardingStepDef.appliesWhen` — absent answers keep the step.
|
|
38
|
+
*/
|
|
39
|
+
appliesWhen?: (answers: Record<string, unknown>) => boolean;
|
|
30
40
|
/**
|
|
31
41
|
* Deadline, in days from the seeding.
|
|
32
42
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist.d.ts","sourceRoot":"","sources":["../../src/onboarding/checklist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,OA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