@fayz-ai/admin 0.15.0 → 0.17.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-U7MMA2WH.js → CommandPalette-XY3VOEAV.js} +23 -13
- package/dist/CommandPalette-XY3VOEAV.js.map +1 -0
- package/dist/{ScheduleEditor-57AYL7B6.js → ScheduleEditor-63TVSCJC.js} +5 -4
- package/dist/ScheduleEditor-63TVSCJC.js.map +1 -0
- package/dist/SubscriptionPage-5PJ25YAD.js +8 -0
- package/dist/{SubscriptionPage-FE2B5ZXF.js.map → SubscriptionPage-5PJ25YAD.js.map} +1 -1
- package/dist/access/context.d.ts +3 -1
- package/dist/access/context.d.ts.map +1 -1
- package/dist/app/AdminShell.d.ts +6 -0
- package/dist/app/AdminShell.d.ts.map +1 -1
- package/dist/app/admin-app.d.ts.map +1 -1
- package/dist/app/bottom-nav.d.ts +24 -0
- package/dist/app/bottom-nav.d.ts.map +1 -0
- package/dist/app/config.d.ts +16 -0
- package/dist/app/config.d.ts.map +1 -1
- package/dist/app/scaffold.d.ts.map +1 -1
- package/dist/billing/TrialWidget.d.ts +25 -0
- package/dist/billing/TrialWidget.d.ts.map +1 -0
- package/dist/billing/index.d.ts +2 -0
- package/dist/billing/index.d.ts.map +1 -1
- package/dist/billing/index.js +2 -1
- package/dist/billing/trial.d.ts +48 -0
- package/dist/billing/trial.d.ts.map +1 -0
- package/dist/chunk-7DFJEXCR.js +48 -0
- package/dist/chunk-7DFJEXCR.js.map +1 -0
- package/dist/chunk-ERDS4OJS.js +194 -0
- package/dist/chunk-ERDS4OJS.js.map +1 -0
- package/dist/{chunk-IPWXA46H.js → chunk-G5PBC5OB.js} +10 -9
- package/dist/chunk-G5PBC5OB.js.map +1 -0
- package/dist/{chunk-45EZQW4M.js → chunk-LZRLWKJ2.js} +17 -5
- package/dist/chunk-LZRLWKJ2.js.map +1 -0
- package/dist/{chunk-OB7ZSTQD.js → chunk-WN6PGQSG.js} +9 -51
- package/dist/chunk-WN6PGQSG.js.map +1 -0
- package/dist/components/RightRail.d.ts.map +1 -1
- package/dist/components/billing/SoftLimitBanner.d.ts.map +1 -1
- package/dist/components/chat/ChatComposer.d.ts +5 -1
- package/dist/components/chat/ChatComposer.d.ts.map +1 -1
- package/dist/components/chat/ChatConversation.d.ts.map +1 -1
- package/dist/components/chat/ChatFab.d.ts +1 -5
- package/dist/components/chat/ChatFab.d.ts.map +1 -1
- package/dist/components/chat/ChatMessages.d.ts.map +1 -1
- package/dist/components/chat/ChoiceCard.d.ts +23 -0
- package/dist/components/chat/ChoiceCard.d.ts.map +1 -0
- package/dist/components/chat/ConnectorSuggestionCard.d.ts.map +1 -1
- package/dist/components/chat/RecordChip.d.ts.map +1 -1
- package/dist/components/connect/ConnectorDetail.d.ts.map +1 -1
- package/dist/components/connect/ConnectorsTab.d.ts.map +1 -1
- package/dist/components/connect/connector-map.generated.d.ts.map +1 -1
- package/dist/components/connect/useConnectors.d.ts.map +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/organization/TeamTab.d.ts.map +1 -1
- package/dist/components/settings/SettingsPage.d.ts +9 -1
- package/dist/components/settings/SettingsPage.d.ts.map +1 -1
- package/dist/components/shared/RecordPickerModal.d.ts.map +1 -1
- package/dist/crud/CrudAgentSurface.d.ts +24 -2
- package/dist/crud/CrudAgentSurface.d.ts.map +1 -1
- package/dist/crud/CrudDetailPage.d.ts.map +1 -1
- package/dist/crud/CrudFormPage.d.ts +20 -1
- package/dist/crud/CrudFormPage.d.ts.map +1 -1
- package/dist/crud/CrudListView.d.ts +18 -5
- package/dist/crud/CrudListView.d.ts.map +1 -1
- package/dist/crud/CrudPage.d.ts +2 -7
- package/dist/crud/CrudPage.d.ts.map +1 -1
- package/dist/crud/CrudRecordModal.d.ts +9 -1
- package/dist/crud/CrudRecordModal.d.ts.map +1 -1
- package/dist/crud/CrudSkeletons.d.ts +7 -3
- package/dist/crud/CrudSkeletons.d.ts.map +1 -1
- package/dist/crud/archetypes/AddressesTab.d.ts.map +1 -1
- package/dist/crud/archetypes/OrderDetailView.d.ts +9 -0
- package/dist/crud/archetypes/OrderDetailView.d.ts.map +1 -1
- package/dist/crud/archetypes/OrderFormView.d.ts.map +1 -1
- package/dist/crud/archetypes/PersonFormLayout.d.ts.map +1 -1
- package/dist/crud/createCrudPage.d.ts +2 -7
- package/dist/crud/createCrudPage.d.ts.map +1 -1
- package/dist/crud/index.d.ts +2 -0
- package/dist/crud/index.d.ts.map +1 -1
- package/dist/crud/write-errors.d.ts +24 -0
- package/dist/crud/write-errors.d.ts.map +1 -0
- package/dist/data/client.d.ts +10 -0
- package/dist/data/client.d.ts.map +1 -1
- package/dist/handbook/HandbookAgentSurface.d.ts +2 -0
- package/dist/handbook/HandbookAgentSurface.d.ts.map +1 -0
- package/dist/handbook/HandbookProvider.d.ts +7 -0
- package/dist/handbook/HandbookProvider.d.ts.map +1 -0
- package/dist/handbook/NotebookPanel.d.ts +5 -0
- package/dist/handbook/NotebookPanel.d.ts.map +1 -0
- package/dist/handbook/backend.d.ts +42 -0
- package/dist/handbook/backend.d.ts.map +1 -0
- package/dist/handbook/index.d.ts +10 -0
- package/dist/handbook/index.d.ts.map +1 -0
- package/dist/handbook/store.d.ts +36 -0
- package/dist/handbook/store.d.ts.map +1 -0
- package/dist/handbook/types.d.ts +124 -0
- package/dist/handbook/types.d.ts.map +1 -0
- package/dist/hooks/useAppConfig.d.ts +20 -0
- package/dist/hooks/useAppConfig.d.ts.map +1 -0
- package/dist/hooks/useChat.d.ts.map +1 -1
- package/dist/hooks/useLayout.d.ts +1 -0
- package/dist/hooks/useLayout.d.ts.map +1 -1
- package/dist/hooks/useTenantPlugins.d.ts.map +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6734 -4097
- package/dist/index.js.map +1 -1
- package/dist/lib/ai-tool-handlers.d.ts.map +1 -1
- package/dist/lib/attachments.d.ts +34 -0
- package/dist/lib/attachments.d.ts.map +1 -1
- package/dist/lib/choice-cards.d.ts +16 -0
- package/dist/lib/choice-cards.d.ts.map +1 -0
- package/dist/lib/fayz-events.d.ts.map +1 -1
- package/dist/lib/reveal-page.d.ts +19 -0
- package/dist/lib/reveal-page.d.ts.map +1 -0
- package/dist/onboarding/ActivationAgentSurface.d.ts +6 -0
- package/dist/onboarding/ActivationAgentSurface.d.ts.map +1 -0
- package/dist/onboarding/ActivationChecklistCard.d.ts +23 -0
- package/dist/onboarding/ActivationChecklistCard.d.ts.map +1 -0
- package/dist/onboarding/ActivationProvider.d.ts +17 -0
- package/dist/onboarding/ActivationProvider.d.ts.map +1 -0
- package/dist/onboarding/GettingStartedWidget.d.ts +5 -5
- package/dist/onboarding/activation.store.d.ts +53 -0
- package/dist/onboarding/activation.store.d.ts.map +1 -0
- package/dist/onboarding/backend.d.ts +14 -0
- package/dist/onboarding/backend.d.ts.map +1 -1
- package/dist/onboarding/checklist.d.ts +23 -0
- package/dist/onboarding/checklist.d.ts.map +1 -1
- package/dist/onboarding/guided-runner.d.ts +87 -0
- package/dist/onboarding/guided-runner.d.ts.map +1 -0
- package/dist/onboarding/guided.d.ts +27 -0
- package/dist/onboarding/guided.d.ts.map +1 -0
- package/dist/onboarding/handbook-seed.d.ts +70 -0
- package/dist/onboarding/handbook-seed.d.ts.map +1 -0
- package/dist/onboarding/index.d.ts +12 -3
- package/dist/onboarding/index.d.ts.map +1 -1
- package/dist/onboarding/programs.d.ts +78 -0
- package/dist/onboarding/programs.d.ts.map +1 -0
- package/dist/onboarding/submit.d.ts +7 -2
- package/dist/onboarding/submit.d.ts.map +1 -1
- package/dist/onboarding/tasks.d.ts +7 -0
- package/dist/onboarding/tasks.d.ts.map +1 -1
- package/dist/onboarding/useActivationWatch.d.ts +2 -0
- package/dist/onboarding/useActivationWatch.d.ts.map +1 -0
- package/dist/org/adapters/supabase.d.ts.map +1 -1
- package/dist/org/index.js +3 -2
- package/dist/plugins/ModuleActionBar.d.ts +16 -9
- package/dist/plugins/ModuleActionBar.d.ts.map +1 -1
- package/dist/plugins/PageActions.d.ts +16 -0
- package/dist/plugins/PageActions.d.ts.map +1 -0
- package/dist/plugins/header-actions.d.ts +11 -0
- package/dist/plugins/header-actions.d.ts.map +1 -0
- package/dist/stores/app-config.store.d.ts +27 -0
- package/dist/stores/app-config.store.d.ts.map +1 -0
- package/dist/stores/chat.store.d.ts +47 -4
- package/dist/stores/chat.store.d.ts.map +1 -1
- package/dist/tasks/components/TaskCard.d.ts.map +1 -1
- package/dist/tasks/components/TaskDetail.d.ts.map +1 -1
- package/dist/tasks/data/supabase.d.ts.map +1 -1
- package/dist/timeline/PersonTimeline.d.ts.map +1 -1
- package/dist/types/crud.d.ts +10 -0
- package/dist/types/crud.d.ts.map +1 -1
- package/dist/units/data.d.ts +14 -7
- package/dist/units/data.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/CommandPalette-U7MMA2WH.js.map +0 -1
- package/dist/ScheduleEditor-57AYL7B6.js.map +0 -1
- package/dist/SubscriptionPage-FE2B5ZXF.js +0 -7
- package/dist/chunk-45EZQW4M.js.map +0 -1
- package/dist/chunk-IPWXA46H.js.map +0 -1
- package/dist/chunk-OB7ZSTQD.js.map +0 -1
- package/dist/chunk-VN5NTK26.js +0 -36
- package/dist/chunk-VN5NTK26.js.map +0 -1
- package/dist/components/notes/NotesPanel.d.ts +0 -13
- package/dist/components/notes/NotesPanel.d.ts.map +0 -1
|
@@ -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":"AAyFA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAA;AAC7E,OAAO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MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,OAAO,CAAC,qBAAqB,CAAC,CAehC"}
|
|
@@ -91,5 +91,39 @@ export declare function parseDelimited(text: string, delimiter: string): {
|
|
|
91
91
|
count: number;
|
|
92
92
|
};
|
|
93
93
|
export declare function inferColumn(name: string, values: string[], sheetName?: string, warnings?: string[]): AttachmentColumn;
|
|
94
|
+
/**
|
|
95
|
+
* The bytes of a registered attachment, base64 for the wire.
|
|
96
|
+
*
|
|
97
|
+
* The registry already holds them — `parseAttachment` keeps the File so a CSV
|
|
98
|
+
* can be re-read in full for an import — so nothing new is stored here. What is
|
|
99
|
+
* new is that the caller can now ship them, and that is deliberately a separate
|
|
100
|
+
* function from the digest path: reading a file to the model is an act someone
|
|
101
|
+
* has to WRITE, not a flag that can drift onto a digest.
|
|
102
|
+
*
|
|
103
|
+
* Returns null when the id is unknown (a resumed thread, a cleared registry).
|
|
104
|
+
*/
|
|
105
|
+
export declare function readAttachmentBytes(id: string): Promise<InlineFileBytes | null>;
|
|
106
|
+
/**
|
|
107
|
+
* Encolhe uma foto até o que o modelo realmente consome, ANTES de virar base64.
|
|
108
|
+
*
|
|
109
|
+
* Sem isso um recibo fotografado sai do celular com 3–5MB, vira ~4–7MB em
|
|
110
|
+
* base64 e o turno morre antes de chegar ao modelo — foi exatamente o
|
|
111
|
+
* `PayloadTooLargeError` que a primeira leitura de recibo produziu. Reduzir
|
|
112
|
+
* aqui é a única correção que serve os dois lados: menos bytes na rede de quem
|
|
113
|
+
* está no 4G, e um corpo de request que cabe.
|
|
114
|
+
*
|
|
115
|
+
* Devolve o arquivo original quando não há o que ganhar (não é imagem, já é
|
|
116
|
+
* pequena) ou quando o ambiente não tem canvas — um teste em node não pode
|
|
117
|
+
* quebrar por causa de uma otimização.
|
|
118
|
+
*/
|
|
119
|
+
export declare function shrinkForVision(file: File, maxEdge?: number): Promise<File>;
|
|
120
|
+
export interface InlineFileBytes {
|
|
121
|
+
name: string;
|
|
122
|
+
mime: string;
|
|
123
|
+
/** Base64, no `data:` prefix. */
|
|
124
|
+
data: string;
|
|
125
|
+
}
|
|
126
|
+
/** Same, for a File the caller already holds (an upload the assistant asked for). */
|
|
127
|
+
export declare function toInlineFile(file: File): Promise<InlineFileBytes>;
|
|
94
128
|
export declare function formatBytes(bytes: number): string;
|
|
95
129
|
//# sourceMappingURL=attachments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../../src/lib/attachments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;AAExF,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,QAAQ,GACR,MAAM,GACN,SAAS,GACT,OAAO,GACP,OAAO,CAAA;AAEX,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,oBAAoB,CAAA;IAC1B,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAA;IAClB,WAAW,EAAE,gBAAgB,EAAE,CAAA;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,cAAc,CAAA;IACpB,iFAAiF;IACjF,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wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA8BxF;AAqID;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAuCnG;AAoCD,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,SAAK,EACd,QAAQ,GAAE,MAAM,EAAO,GACtB,gBAAgB,CA+ClB;AA4FD;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACvC,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAIjC;AASD;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,SAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8B1F;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;CACb;AAED,qFAAqF;AACrF,wBAAsB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,CAMvE;AA2BD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIjD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ChatChoiceCard, ChatMessage } from '../stores/chat.store';
|
|
2
|
+
export declare function extractChoiceCards(content: string): ChatChoiceCard[];
|
|
3
|
+
/**
|
|
4
|
+
* Qual opção já foi escolhida — lida da PRÓPRIA conversa.
|
|
5
|
+
*
|
|
6
|
+
* Guardar isso no componente não funciona: a resposta faz a lista de mensagens
|
|
7
|
+
* re-renderizar, o cartão remonta zerado e volta a aceitar cliques, respondendo
|
|
8
|
+
* a mesma pergunta uma segunda vez. Numa conversa retomada seria pior — ele
|
|
9
|
+
* nasceria clicável, oferecendo uma escolha que já tinha sido feita ontem.
|
|
10
|
+
*
|
|
11
|
+
* A resposta foi mandada como "Rótulo (id)", então uma mensagem do USUÁRIO que
|
|
12
|
+
* carrega o id de uma opção é a prova de que a pergunta está fechada. Derivado
|
|
13
|
+
* do transcript, sobrevive ao remount e à retomada de graça.
|
|
14
|
+
*/
|
|
15
|
+
export declare function answeredOptionId(messages: Pick<ChatMessage, 'role' | 'content'>[], options: ChatChoiceCard['options']): string | null;
|
|
16
|
+
//# sourceMappingURL=choice-cards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choice-cards.d.ts","sourceRoot":"","sources":["../../src/lib/choice-cards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAiBvE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,EAAE,CAoCpE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE,EACjD,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,GACjC,MAAM,GAAG,IAAI,CAOf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fayz-events.d.ts","sourceRoot":"","sources":["../../src/lib/fayz-events.ts"],"names":[],"mappings":"AAEA,OAAO,EAA8B,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"fayz-events.d.ts","sourceRoot":"","sources":["../../src/lib/fayz-events.ts"],"names":[],"mappings":"AAEA,OAAO,EAA8B,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAazF,wBAAgB,oBAAoB,CAAC,QAAQ,CAAC,EAAE,yBAAyB,GAAG,KAAK,GAAG,MAAM,IAAI,CAgC7F;AAED,wBAAgB,mBAAmB,IAAI,IAAI,CAK1C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sai da frente da página.
|
|
3
|
+
*
|
|
4
|
+
* Uma ferramenta que NAVEGA deixa a pessoa num beco no celular: a coluna do
|
|
5
|
+
* assistente é uma folha de tela inteira, então o formulário que ela acabou de
|
|
6
|
+
* pedir abre atrás dele e o que se vê é a frase dizendo que abriu. No desktop a
|
|
7
|
+
* coluna fica ao LADO do conteúdo — ali não há nada de que sair.
|
|
8
|
+
*
|
|
9
|
+
* Mora aqui e não na store do chat porque quem cobre a tela é o RAIL, e a store
|
|
10
|
+
* da conversa não conhece a coluna que a hospeda: `setOpen(false)` desmarca a
|
|
11
|
+
* aba e deixa a folha aberta do mesmo jeito. Foi exatamente o que aconteceu na
|
|
12
|
+
* primeira versão.
|
|
13
|
+
*
|
|
14
|
+
* Espera o turno terminar antes de fechar: fechar no meio some com a resposta
|
|
15
|
+
* enquanto ela ainda está sendo escrita, e a pessoa fica sem o formulário e sem
|
|
16
|
+
* a frase. Fechar não aborta nada — o turno não vive no componente.
|
|
17
|
+
*/
|
|
18
|
+
export declare function revealPage(delayMs?: number): void;
|
|
19
|
+
//# sourceMappingURL=reveal-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reveal-page.d.ts","sourceRoot":"","sources":["../../src/lib/reveal-page.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,OAAO,SAAO,GAAG,IAAI,CAwB/C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ResolvedOnboardingProgram } from '@fayz-ai/core';
|
|
2
|
+
export interface ActivationAgentSurfaceProps {
|
|
3
|
+
programs: ResolvedOnboardingProgram[];
|
|
4
|
+
}
|
|
5
|
+
export declare function ActivationAgentSurface({ programs }: ActivationAgentSurfaceProps): null;
|
|
6
|
+
//# sourceMappingURL=ActivationAgentSurface.d.ts.map
|
|
@@ -0,0 +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;AA4IhF,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,yBAAyB,EAAE,CAAA;CACtC;AAaD,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE,2BAA2B,QAuI/E"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ActivationChecklistCardProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The activation checklist as a dashboard card.
|
|
9
|
+
*
|
|
10
|
+
* Exists because apps were writing their own. marketplace-saas had five steps
|
|
11
|
+
* in `config/first-steps.ts` rendered in two places, next to the shell's own
|
|
12
|
+
* checklist in the rail — two lists both titled "Primeiros passos", both about
|
|
13
|
+
* the same store, disagreeing about what was left to do. There is no way for a
|
|
14
|
+
* reader to know which one counts, and there was never a version of this where
|
|
15
|
+
* both stayed in step.
|
|
16
|
+
*
|
|
17
|
+
* So the same rows the rail shows, the Tasks panel lists and the assistant
|
|
18
|
+
* ticks are also what the dashboard draws. An app that had its own list moves
|
|
19
|
+
* those steps into the owning plugin's program (see `OnboardingProgramDef`) and
|
|
20
|
+
* renders this instead.
|
|
21
|
+
*/
|
|
22
|
+
export declare function ActivationChecklistCard({ title, subtitle, className }: ActivationChecklistCardProps): React.JSX.Element | null;
|
|
23
|
+
//# sourceMappingURL=ActivationChecklistCard.d.ts.map
|
|
@@ -0,0 +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,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,4BAA4B,4BAoCnG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Everything the activation journey needs mounted once, inside the shell.
|
|
4
|
+
*
|
|
5
|
+
* Three jobs, and they belong together because they all key off the same pair
|
|
6
|
+
* (tenant, active plugins):
|
|
7
|
+
*
|
|
8
|
+
* 1. Build the catalog — base steps plus every active module's program.
|
|
9
|
+
* 2. Reconcile it with what is in the database. The wizard seeds at signup,
|
|
10
|
+
* but a module enabled in month two never went through the wizard, so the
|
|
11
|
+
* rows are topped up here. The upsert is idempotent, so this is a no-op on
|
|
12
|
+
* every boot after the first.
|
|
13
|
+
* 3. Put the agent and the spotlight in the room: the surface publishes the
|
|
14
|
+
* checklist to the assistant, and the overlay is what "show me" looks like.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ActivationProvider(): React.JSX.Element;
|
|
17
|
+
//# sourceMappingURL=ActivationProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivationProvider.d.ts","sourceRoot":"","sources":["../../src/onboarding/ActivationProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAgB9B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,sBA0HjC"}
|
|
@@ -2,12 +2,12 @@ import * as React from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* The getting-started checklist in the rail's foot.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* Reads the shared activation store rather than loading its own rows: the
|
|
6
|
+
* assistant ticks steps as it closes them, and two independent loads meant the
|
|
7
|
+
* rail kept showing yesterday's count while the agent said otherwise.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* A step that carries a tour starts it instead of just navigating — the same
|
|
10
|
+
* "show me" the agent gives, available without asking for it.
|
|
11
11
|
*/
|
|
12
12
|
export declare function GettingStartedWidget(): React.JSX.Element | null;
|
|
13
13
|
//# sourceMappingURL=GettingStartedWidget.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { OnboardingStepInput } from '@fayz-ai/ui';
|
|
2
|
+
import type { Task } from '../tasks/types';
|
|
3
|
+
import type { ActivationStep } from './programs';
|
|
4
|
+
/**
|
|
5
|
+
* The activation checklist, once, for everybody who touches it.
|
|
6
|
+
*
|
|
7
|
+
* It used to load inside the sidebar widget, which was fine while the sidebar
|
|
8
|
+
* was the only reader. It is not: the assistant now ticks steps as it finishes
|
|
9
|
+
* them, and a checklist that only refetches on mount would keep showing "2 de 6"
|
|
10
|
+
* for the rest of the session while the agent insisted it had done three. One
|
|
11
|
+
* store, one set of rows, and the tick lands everywhere at once.
|
|
12
|
+
*
|
|
13
|
+
* Writes are optimistic and one-way — a step goes closed and stays closed. The
|
|
14
|
+
* database call is fire-and-forget for the same reason the seeding is: a lost
|
|
15
|
+
* checklist write is not worth an error dialog on top of somebody's first hour.
|
|
16
|
+
*/
|
|
17
|
+
export interface ActivationState {
|
|
18
|
+
tenantId?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The assistant is walking somebody through the checklist right now.
|
|
21
|
+
*
|
|
22
|
+
* Session state, not a stored fact: it starts when a workspace is created (or
|
|
23
|
+
* when somebody asks for help from the checklist) and ends when the list is
|
|
24
|
+
* done or they close it. It is what turns a completed step from a silent tick
|
|
25
|
+
* into "boa — agora vamos para o próximo": outside guided mode the same tick
|
|
26
|
+
* must NOT ping the assistant, or every product a store creates six months
|
|
27
|
+
* from now interrupts whatever conversation is open.
|
|
28
|
+
*/
|
|
29
|
+
guided: boolean;
|
|
30
|
+
/** null = never loaded for this tenant (render nothing, not "0 de 0"). */
|
|
31
|
+
rows: Task[] | null;
|
|
32
|
+
catalog: ActivationStep[];
|
|
33
|
+
loading: boolean;
|
|
34
|
+
setCatalog: (catalog: ActivationStep[]) => void;
|
|
35
|
+
setGuided: (guided: boolean) => void;
|
|
36
|
+
load: (tenantId: string) => Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Tick a step. Safe to call for a key that is already closed or unknown.
|
|
39
|
+
*
|
|
40
|
+
* `by` says who noticed: 'sensor' is the data itself saying the work landed,
|
|
41
|
+
* which is what the guided run congratulates on. A tick nobody watched
|
|
42
|
+
* (a re-seed, a manual close) passes through quietly.
|
|
43
|
+
*/
|
|
44
|
+
complete: (key: string, by?: 'user' | 'agent' | 'sensor') => Promise<void>;
|
|
45
|
+
/** Set by the provider — how a finished step reaches the assistant. */
|
|
46
|
+
onStepCompleted?: (step: ActivationStep, by: 'user' | 'agent' | 'sensor') => void;
|
|
47
|
+
}
|
|
48
|
+
export declare const useActivationStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ActivationState>>;
|
|
49
|
+
/** Steps as the checklist UI wants them, sensors and all. */
|
|
50
|
+
export declare function selectSteps(state: ActivationState): OnboardingStepInput[];
|
|
51
|
+
/** `source_key`s of every step still open — what the agent is here to close. */
|
|
52
|
+
export declare function openStepKeys(state: ActivationState): Set<string>;
|
|
53
|
+
//# sourceMappingURL=activation.store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activation.store.d.ts","sourceRoot":"","sources":["../../src/onboarding/activation.store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAE1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAGhD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;;;;OASG;IACH,MAAM,EAAE,OAAO,CAAA;IACf,0EAA0E;IAC1E,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;IACnB,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,CAAA;IAC/C,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IACpC,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC;;;;;;OAMG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1E,uEAAuE;IACvE,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,KAAK,IAAI,CAAA;CAClF;AAED,eAAO,MAAM,kBAAkB,8EAkC5B,CAAA;AAEH,6DAA6D;AAC7D,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,mBAAmB,EAAE,CAKzE;AAED,gFAAgF;AAChF,wBAAgB,YAAY,CAAC,KAAK,EAAE,eAAe,GAAG,GAAG,CAAC,MAAM,CAAC,CAKhE"}
|
|
@@ -41,4 +41,18 @@ export interface RecordResponseInput {
|
|
|
41
41
|
* to tell someone their business was not created.
|
|
42
42
|
*/
|
|
43
43
|
export declare function recordOnboardingResponse(input: RecordResponseInput): Promise<boolean>;
|
|
44
|
+
/**
|
|
45
|
+
* The wizard's answers, as they were stored.
|
|
46
|
+
*
|
|
47
|
+
* The handbook's first page renders these as prose, which is what a person
|
|
48
|
+
* wants. The assistant sometimes wants the other thing: the raw values, with
|
|
49
|
+
* the option ids intact — "retail.segments: ['cosmetics','pet']" is a list it
|
|
50
|
+
* can reason over, where "Cosméticos, Pet" is a sentence it has to parse back.
|
|
51
|
+
* Both come from one write; this is the second reader.
|
|
52
|
+
*/
|
|
53
|
+
export declare function readSetupAnswers(tenantId: string): Promise<{
|
|
54
|
+
verticalId: string | null;
|
|
55
|
+
source: string | null;
|
|
56
|
+
answers: Record<string, unknown>;
|
|
57
|
+
} | null>;
|
|
44
58
|
//# sourceMappingURL=backend.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../src/onboarding/backend.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyD,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AACjG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAM/C;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAgBlF;AAKD;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAwB3F;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAMvE;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,WAAW,CAAA;I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;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,IAAI,CAAC,CAsBxG"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type OnboardingMove, type TourDef } from '@fayz-ai/core';
|
|
1
2
|
import type { OnboardingStepInput } from '@fayz-ai/ui';
|
|
2
3
|
import type { Task, TaskPriority } from '../tasks/types';
|
|
3
4
|
/**
|
|
@@ -19,8 +20,30 @@ export interface OnboardingTaskSeed {
|
|
|
19
20
|
icon?: string;
|
|
20
21
|
/** Where the step's action goes. Never stored. */
|
|
21
22
|
route?: string;
|
|
23
|
+
/** A guided pass over the screen for this step. Never stored. */
|
|
24
|
+
tour?: TourDef;
|
|
25
|
+
/** The walkthrough as data — see {@link OnboardingMove}. Never stored. */
|
|
26
|
+
script?: OnboardingMove[];
|
|
27
|
+
/** One line when the step closes. Never stored. */
|
|
28
|
+
celebrate?: string;
|
|
22
29
|
priority?: TaskPriority;
|
|
30
|
+
/**
|
|
31
|
+
* Deadline, in days from the seeding.
|
|
32
|
+
*
|
|
33
|
+
* NOT set by the base list, and that is the decision rather than an
|
|
34
|
+
* oversight: a checklist is an invitation, and a due date stamped on somebody
|
|
35
|
+
* the day they signed up turns "cadastre um produto" into an overdue task by
|
|
36
|
+
* Thursday — the app nagging about work it invented. Priority already says
|
|
37
|
+
* what matters first. A program is free to set one where a real date exists
|
|
38
|
+
* (a fiscal deadline, a migration window).
|
|
39
|
+
*/
|
|
23
40
|
dueInDays?: number;
|
|
41
|
+
/**
|
|
42
|
+
* How it is done in this system, in a person's words. Seeded onto the task
|
|
43
|
+
* row (so the Tasks panel carries the instructions) and read by the agent
|
|
44
|
+
* before it walks anybody through the step. See `OnboardingStepDef.howTo`.
|
|
45
|
+
*/
|
|
46
|
+
howTo?: string;
|
|
24
47
|
/**
|
|
25
48
|
* Optional sensor: "is this already true of the data?". Must be cheap — it
|
|
26
49
|
* runs once per open step per shell mount. Absent means the only way to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checklist.d.ts","sourceRoot":"","sources":["../../src/onboarding/checklist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"checklist.d.ts","sourceRoot":"","sources":["../../src/onboarding/checklist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAA;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAGtD,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAExD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iEAAiE;IACjE,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,0EAA0E;IAC1E,MAAM,CAAC,EAAE,cAAc,EAAE,CAAA;IACzB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;CAC/B;AAwGD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAI7E;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,IAAI,EAAE,kBAAkB,EAAE,IAAI,OAAa,GAAG,MAAM,GAAG,IAAI,CAKrF;AAED,MAAM,WAAW,YAAY;IAC3B,oEAAoE;IACpE,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CACzC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,kBAAkB,EAAE,EAC7B,IAAI,EAAE,IAAI,EAAE,EACZ,GAAG,GAAE,YAAiB,GACrB,mBAAmB,EAAE,CA4BvB"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { OnboardingMove, TourDef } from '@fayz-ai/core';
|
|
2
|
+
import { type ChatCard } from '../stores/chat.store';
|
|
3
|
+
import type { ActivationStep } from './programs';
|
|
4
|
+
/**
|
|
5
|
+
* Plays a step's script — the walkthrough with no model in the loop.
|
|
6
|
+
*
|
|
7
|
+
* The expensive version of this was: one turn to say "abra Produtos", another
|
|
8
|
+
* to say "clique em Adicionar", another to say "agora digite o nome". Three
|
|
9
|
+
* round trips for choreography that never varies, and a different wording every
|
|
10
|
+
* time. The script is data, so the runtime performs it: navigate, spotlight,
|
|
11
|
+
* speak, wait. The model is handed the turn only where the script says `ask` —
|
|
12
|
+
* or the moment the person types something of their own, which was always the
|
|
13
|
+
* part worth paying for.
|
|
14
|
+
*
|
|
15
|
+
* Split in two on purpose. `planScript` is pure: moves in, a plan out, and it
|
|
16
|
+
* is where the interesting decisions live (consecutive points become ONE tour,
|
|
17
|
+
* a handover ends the run). `playScript` is the side effects, in order.
|
|
18
|
+
*/
|
|
19
|
+
export interface ScriptedTour {
|
|
20
|
+
kind: 'tour';
|
|
21
|
+
tour: TourDef;
|
|
22
|
+
}
|
|
23
|
+
export type ScriptAct = {
|
|
24
|
+
kind: 'goto';
|
|
25
|
+
route: string;
|
|
26
|
+
} | {
|
|
27
|
+
kind: 'say';
|
|
28
|
+
text: string;
|
|
29
|
+
} | ScriptedTour | {
|
|
30
|
+
kind: 'await';
|
|
31
|
+
text?: string;
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'ask';
|
|
34
|
+
text: string;
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'choose';
|
|
37
|
+
id: string;
|
|
38
|
+
question: string;
|
|
39
|
+
options: Array<{
|
|
40
|
+
id: string;
|
|
41
|
+
label: string;
|
|
42
|
+
meta?: string;
|
|
43
|
+
}>;
|
|
44
|
+
};
|
|
45
|
+
export interface ScriptPlan {
|
|
46
|
+
acts: ScriptAct[];
|
|
47
|
+
/**
|
|
48
|
+
* The run stops here and waits for the sensor. True when the script ends in
|
|
49
|
+
* `await`, or in a tour whose last stop is a handover — both mean "the person
|
|
50
|
+
* is doing it now", and anything printed after that talks over them.
|
|
51
|
+
*/
|
|
52
|
+
waits: boolean;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Moves → acts. Consecutive `point`s collapse into one tour because they are
|
|
56
|
+
* one gesture: three separate overlays for three controls on the same screen is
|
|
57
|
+
* three dismissals for one explanation.
|
|
58
|
+
*/
|
|
59
|
+
export declare function planScript(moves: OnboardingMove[], tourId: string): ScriptPlan;
|
|
60
|
+
/** Claim the floor for `key`, superseding whatever was playing. */
|
|
61
|
+
export declare function beginRun(key: string): number;
|
|
62
|
+
/** Still the current run? False means somebody else took the floor. */
|
|
63
|
+
export declare function isRunAlive(token: number): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* The step being walked through right now — including one that has already
|
|
66
|
+
* spoken and is waiting on the person. Kept after the script ends on purpose:
|
|
67
|
+
* "which step are we on" outlives the playing of it.
|
|
68
|
+
*/
|
|
69
|
+
export declare function currentRunKey(): string | null;
|
|
70
|
+
/** Nothing is being walked through. */
|
|
71
|
+
export declare function clearRun(): void;
|
|
72
|
+
/** A line from the assistant, straight into the thread. No turn, no bill. */
|
|
73
|
+
export declare function say(text: string, cards?: ChatCard[]): void;
|
|
74
|
+
export interface PlayOptions {
|
|
75
|
+
/** Overridden in tests; the real one is `setTimeout`. */
|
|
76
|
+
wait?: (ms: number) => Promise<void>;
|
|
77
|
+
/** From {@link beginRun}. The play stops the moment it is not current. */
|
|
78
|
+
token?: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Perform the plan. Returns when the script is done or when it hands over to
|
|
82
|
+
* somebody else — the person (a handover/await) or the model (`ask`).
|
|
83
|
+
*/
|
|
84
|
+
export declare function playScript(plan: ScriptPlan, options?: PlayOptions): Promise<void>;
|
|
85
|
+
/** Play a step's script when it has one. `false` means "no script — improvise". */
|
|
86
|
+
export declare function runStepScript(step: ActivationStep, options?: PlayOptions): Promise<boolean>;
|
|
87
|
+
//# sourceMappingURL=guided-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guided-runner.d.ts","sourceRoot":"","sources":["../../src/onboarding/guided-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAe,MAAM,eAAe,CAAA;AAGzE,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAA;CACd;AAED,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC7B,YAAY,GACZ;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC7B;IACE,IAAI,EAAE,QAAQ,CAAA;IACd,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAA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
|
+
import type { ActivationStep } from './programs';
|
|
2
|
+
/**
|
|
3
|
+
* Start the guided run — the assistant walking somebody through the checklist.
|
|
4
|
+
*
|
|
5
|
+
* It starts by itself once, right after a workspace is created. This is the
|
|
6
|
+
* OTHER way in, and it has to exist: the automatic one fires a single time per
|
|
7
|
+
* tenant, so anybody who closed the panel that day, or who inherited a
|
|
8
|
+
* workspace somebody else set up, had no way back to it. A mode with no button
|
|
9
|
+
* is a mode most people never see.
|
|
10
|
+
*
|
|
11
|
+
* Three things happen together, and the order matters: the mode goes on (so a
|
|
12
|
+
* finished step reports back instead of ticking silently), the screen moves to
|
|
13
|
+
* the step, and only then the assistant is asked to take over — arriving at a
|
|
14
|
+
* page that is already open reads as company, arriving before it reads as a
|
|
15
|
+
* chatbot describing a menu.
|
|
16
|
+
*/
|
|
17
|
+
export declare function startGuidedRun(stepKey?: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* One step of the run: play its script, or hand the model the job when it has
|
|
20
|
+
* none. Everything that advances the run — the button, the auto-start, a step
|
|
21
|
+
* closing — goes through here, so a scripted step and an improvised one behave
|
|
22
|
+
* the same from the outside.
|
|
23
|
+
*/
|
|
24
|
+
export declare function runStep(step: ActivationStep | undefined): Promise<void>;
|
|
25
|
+
/** Said when a step closes, before the next one starts. Local; no model call. */
|
|
26
|
+
export declare function celebrate(step: ActivationStep, remaining: number): void;
|
|
27
|
+
//# sourceMappingURL=guided.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guided.d.ts","sourceRoot":"","sources":["../../src/onboarding/guided.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAOrD;AAED;;;;;GAKG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAqC7E;AAED,iFAAiF;AACjF,wBAAgB,SAAS,CAAC,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAOvE"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { WizardStepDef, WizardValues } from '@fayz-ai/ui';
|
|
2
|
+
import type { WriteHandbookInput } from '../handbook/types';
|
|
3
|
+
/**
|
|
4
|
+
* The wizard's answers, as the handbook's first page.
|
|
5
|
+
*
|
|
6
|
+
* The flow already asks the eight questions a new business is most often asked
|
|
7
|
+
* again later — what it sells, where it sells, how it gets paid, how it
|
|
8
|
+
* delivers. Those answers went into `plg_onboarding_responses`, which is an
|
|
9
|
+
* analytics table nobody reads back, and then the assistant asked them a second
|
|
10
|
+
* time in the first conversation.
|
|
11
|
+
*
|
|
12
|
+
* So the setup writes page one before anybody types anything, and the manual is
|
|
13
|
+
* never empty. It is also the shape every later page copies: a heading per
|
|
14
|
+
* question, in the words the wizard used.
|
|
15
|
+
*
|
|
16
|
+
* Rendered from the STEP DEFINITIONS rather than a hand-kept map of field ids:
|
|
17
|
+
* the labels and option names already exist there, so rewording a question or
|
|
18
|
+
* adding one to a pack updates this page for free. A per-vertical mapping here
|
|
19
|
+
* would be a second copy of the questionnaire, and it would go stale.
|
|
20
|
+
*/
|
|
21
|
+
export declare const SETUP_PAGE_PATH = "negocio/visao-geral";
|
|
22
|
+
/**
|
|
23
|
+
* The starter manual: page one, plus a few short drafts to write over.
|
|
24
|
+
*
|
|
25
|
+
* WHY DRAFTS AND NOT AN EMPTY MANUAL. "Nada anotado ainda" with a + button is a
|
|
26
|
+
* blank page, and a blank page is where documentation goes to not happen. Three
|
|
27
|
+
* half-written pages with the headings already there turn writing into
|
|
28
|
+
* finishing, which people do.
|
|
29
|
+
*
|
|
30
|
+
* WHY THEY ARE THIN. Every line we invent is a line somebody has to read and
|
|
31
|
+
* decide about. A page that arrives already written gets skimmed and believed;
|
|
32
|
+
* one that arrives with **blanks in it** gets filled in. So the seed brings the
|
|
33
|
+
* QUESTIONS this business will be asked later, the answers it already gave the
|
|
34
|
+
* wizard, and nothing else.
|
|
35
|
+
*/
|
|
36
|
+
export interface SopSection {
|
|
37
|
+
heading: string;
|
|
38
|
+
/** Answers from the wizard that belong under this heading, when they exist. */
|
|
39
|
+
from?: string[];
|
|
40
|
+
/** What is still missing, in the owner's words. Rendered as **blanks**. */
|
|
41
|
+
blanks: string[];
|
|
42
|
+
}
|
|
43
|
+
export interface SopSeed {
|
|
44
|
+
path: string;
|
|
45
|
+
title: string;
|
|
46
|
+
summary: string;
|
|
47
|
+
sections: SopSection[];
|
|
48
|
+
}
|
|
49
|
+
export interface SetupHandbookInput {
|
|
50
|
+
steps: ReadonlyArray<WizardStepDef>;
|
|
51
|
+
values: WizardValues;
|
|
52
|
+
businessName: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* `null` when the answers carry nothing worth a page — a wizard somebody
|
|
56
|
+
* clicked through leaves no document rather than an empty one.
|
|
57
|
+
*/
|
|
58
|
+
export declare function setupHandbookPage({ steps, values, businessName }: SetupHandbookInput): WriteHandbookInput | null;
|
|
59
|
+
/**
|
|
60
|
+
* All the starter pages: the overview, then the drafts.
|
|
61
|
+
*
|
|
62
|
+
* The suggestions are pulled from the SAME wizard definitions the overview
|
|
63
|
+
* uses, by field id. A field id that no longer exists simply produces no
|
|
64
|
+
* suggestion — the heading stays, the blank stays, and the page is still worth
|
|
65
|
+
* having. That is the only failure mode this map is allowed to have.
|
|
66
|
+
*/
|
|
67
|
+
export declare function setupHandbookPages(input: SetupHandbookInput & {
|
|
68
|
+
verticalId?: string;
|
|
69
|
+
}): WriteHandbookInput[];
|
|
70
|
+
//# sourceMappingURL=handbook-seed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handbook-seed.d.ts","sourceRoot":"","sources":["../../src/onboarding/handbook-seed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3D;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,eAAe,wBAAwB,CAAA;AAiCpD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,2EAA2E;IAC3E,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,UAAU,EAAE,CAAA;CACvB;AAoHD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;IACnC,MAAM,EAAE,YAAY,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,kBAAkB,GAAG,kBAAkB,GAAG,IAAI,CAmChH;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,kBAAkB,EAAE,CAwC5G"}
|
|
@@ -8,12 +8,21 @@ export { buildWorkspaceSetupSteps, slugify } from './steps';
|
|
|
8
8
|
export { inferVerticalId } from './infer-vertical';
|
|
9
9
|
export { brandMark, connectorOptions, connectorRows, OTHER_CONNECTOR, type ConnectorOptionsFilter } from './connector-options';
|
|
10
10
|
export { getQuestionPack, resolveVerticalId, QUESTION_PACKS, beautyPack, foodPack, retailPack } from './packs';
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
11
|
+
export { setupHandbookPage, setupHandbookPages, SETUP_PAGE_PATH } from './handbook-seed';
|
|
12
|
+
export { submitWorkspaceSetup, GREETING_FLAG, type SubmitWorkspaceSetupInput } from './submit';
|
|
13
|
+
export { checkSlugAvailable, createLogoUploader, importLogoFromUrl, recordOnboardingResponse, readSetupAnswers } from './backend';
|
|
13
14
|
export { createSiteAnalyzer, type SiteAnalyzerOptions } from './analyze-site';
|
|
14
15
|
export { GettingStartedWidget } from './GettingStartedWidget';
|
|
16
|
+
export { ActivationProvider } from './ActivationProvider';
|
|
17
|
+
export { ActivationChecklistCard, type ActivationChecklistCardProps } from './ActivationChecklistCard';
|
|
18
|
+
export { useActivationWatch } from './useActivationWatch';
|
|
19
|
+
export { startGuidedRun, runStep, celebrate } from './guided';
|
|
20
|
+
export { planScript, playScript, runStepScript, say, type ScriptAct, type ScriptPlan, type PlayOptions, } from './guided-runner';
|
|
21
|
+
export { ActivationAgentSurface } from './ActivationAgentSurface';
|
|
22
|
+
export { useActivationStore, selectSteps, openStepKeys, type ActivationState, } from './activation.store';
|
|
23
|
+
export { buildActivationCatalog, programInstructions, supersededKeys, type ActivationStep, type BuildCatalogInput, } from './programs';
|
|
15
24
|
export { onboardingChecklist, mergeOnboardingSteps, dueDateFor, type OnboardingTaskSeed, type MergeContext, } from './checklist';
|
|
16
|
-
export { seedOnboardingTasks, listOnboardingTasks, completeOnboardingTask } from './tasks';
|
|
25
|
+
export { seedOnboardingTasks, listOnboardingTasks, completeOnboardingTask, cancelOnboardingTask } from './tasks';
|
|
17
26
|
export { toQuestionSpecs, coerceAnswers, type QuestionSpec, type QuestionType } from './questions';
|
|
18
27
|
export { WORKSPACE_SETUP_FLOW_ID, WORKSPACE_SETUP_FLOW_VERSION, type QuestionPack, type SetupAnswers, type SetupContext, type SetupSource, } from './types';
|
|
19
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../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