@fayz-ai/admin 0.16.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.
Files changed (96) hide show
  1. package/dist/{ScheduleEditor-A3SX6AYD.js → ScheduleEditor-63TVSCJC.js} +5 -4
  2. package/dist/ScheduleEditor-63TVSCJC.js.map +1 -0
  3. package/dist/SubscriptionPage-5PJ25YAD.js +8 -0
  4. package/dist/{SubscriptionPage-FE2B5ZXF.js.map → SubscriptionPage-5PJ25YAD.js.map} +1 -1
  5. package/dist/access/context.d.ts +3 -1
  6. package/dist/access/context.d.ts.map +1 -1
  7. package/dist/app/AdminShell.d.ts +6 -0
  8. package/dist/app/AdminShell.d.ts.map +1 -1
  9. package/dist/app/admin-app.d.ts.map +1 -1
  10. package/dist/app/config.d.ts +16 -0
  11. package/dist/app/config.d.ts.map +1 -1
  12. package/dist/app/scaffold.d.ts.map +1 -1
  13. package/dist/billing/TrialWidget.d.ts +25 -0
  14. package/dist/billing/TrialWidget.d.ts.map +1 -0
  15. package/dist/billing/index.d.ts +2 -0
  16. package/dist/billing/index.d.ts.map +1 -1
  17. package/dist/billing/index.js +2 -1
  18. package/dist/billing/trial.d.ts +48 -0
  19. package/dist/billing/trial.d.ts.map +1 -0
  20. package/dist/chunk-7DFJEXCR.js +48 -0
  21. package/dist/chunk-7DFJEXCR.js.map +1 -0
  22. package/dist/chunk-ERDS4OJS.js +194 -0
  23. package/dist/chunk-ERDS4OJS.js.map +1 -0
  24. package/dist/{chunk-IPWXA46H.js → chunk-G5PBC5OB.js} +10 -9
  25. package/dist/chunk-G5PBC5OB.js.map +1 -0
  26. package/dist/{chunk-OOWP6W2I.js → chunk-LZRLWKJ2.js} +3 -2
  27. package/dist/chunk-LZRLWKJ2.js.map +1 -0
  28. package/dist/{chunk-OB7ZSTQD.js → chunk-WN6PGQSG.js} +9 -51
  29. package/dist/chunk-WN6PGQSG.js.map +1 -0
  30. package/dist/components/billing/SoftLimitBanner.d.ts.map +1 -1
  31. package/dist/components/chat/ChatFab.d.ts.map +1 -1
  32. package/dist/crud/CrudAgentSurface.d.ts +7 -0
  33. package/dist/crud/CrudAgentSurface.d.ts.map +1 -1
  34. package/dist/crud/CrudPage.d.ts.map +1 -1
  35. package/dist/handbook/HandbookAgentSurface.d.ts +2 -0
  36. package/dist/handbook/HandbookAgentSurface.d.ts.map +1 -0
  37. package/dist/handbook/HandbookProvider.d.ts +7 -0
  38. package/dist/handbook/HandbookProvider.d.ts.map +1 -0
  39. package/dist/handbook/NotebookPanel.d.ts +5 -0
  40. package/dist/handbook/NotebookPanel.d.ts.map +1 -0
  41. package/dist/handbook/backend.d.ts +42 -0
  42. package/dist/handbook/backend.d.ts.map +1 -0
  43. package/dist/handbook/index.d.ts +10 -0
  44. package/dist/handbook/index.d.ts.map +1 -0
  45. package/dist/handbook/store.d.ts +36 -0
  46. package/dist/handbook/store.d.ts.map +1 -0
  47. package/dist/handbook/types.d.ts +124 -0
  48. package/dist/handbook/types.d.ts.map +1 -0
  49. package/dist/hooks/useChat.d.ts.map +1 -1
  50. package/dist/index.d.ts +1 -0
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +5266 -3549
  53. package/dist/index.js.map +1 -1
  54. package/dist/lib/ai-tool-handlers.d.ts.map +1 -1
  55. package/dist/onboarding/ActivationAgentSurface.d.ts +6 -0
  56. package/dist/onboarding/ActivationAgentSurface.d.ts.map +1 -0
  57. package/dist/onboarding/ActivationChecklistCard.d.ts +23 -0
  58. package/dist/onboarding/ActivationChecklistCard.d.ts.map +1 -0
  59. package/dist/onboarding/ActivationProvider.d.ts +17 -0
  60. package/dist/onboarding/ActivationProvider.d.ts.map +1 -0
  61. package/dist/onboarding/GettingStartedWidget.d.ts +5 -5
  62. package/dist/onboarding/activation.store.d.ts +53 -0
  63. package/dist/onboarding/activation.store.d.ts.map +1 -0
  64. package/dist/onboarding/backend.d.ts +14 -0
  65. package/dist/onboarding/backend.d.ts.map +1 -1
  66. package/dist/onboarding/checklist.d.ts +23 -0
  67. package/dist/onboarding/checklist.d.ts.map +1 -1
  68. package/dist/onboarding/guided-runner.d.ts +87 -0
  69. package/dist/onboarding/guided-runner.d.ts.map +1 -0
  70. package/dist/onboarding/guided.d.ts +27 -0
  71. package/dist/onboarding/guided.d.ts.map +1 -0
  72. package/dist/onboarding/handbook-seed.d.ts +70 -0
  73. package/dist/onboarding/handbook-seed.d.ts.map +1 -0
  74. package/dist/onboarding/index.d.ts +12 -3
  75. package/dist/onboarding/index.d.ts.map +1 -1
  76. package/dist/onboarding/programs.d.ts +78 -0
  77. package/dist/onboarding/programs.d.ts.map +1 -0
  78. package/dist/onboarding/submit.d.ts +7 -2
  79. package/dist/onboarding/submit.d.ts.map +1 -1
  80. package/dist/onboarding/tasks.d.ts +7 -0
  81. package/dist/onboarding/tasks.d.ts.map +1 -1
  82. package/dist/onboarding/useActivationWatch.d.ts +2 -0
  83. package/dist/onboarding/useActivationWatch.d.ts.map +1 -0
  84. package/dist/org/adapters/supabase.d.ts.map +1 -1
  85. package/dist/org/index.js +3 -2
  86. package/dist/tasks/components/TaskCard.d.ts.map +1 -1
  87. package/package.json +5 -5
  88. package/dist/ScheduleEditor-A3SX6AYD.js.map +0 -1
  89. package/dist/SubscriptionPage-FE2B5ZXF.js +0 -7
  90. package/dist/chunk-IPWXA46H.js.map +0 -1
  91. package/dist/chunk-OB7ZSTQD.js.map +0 -1
  92. package/dist/chunk-OOWP6W2I.js.map +0 -1
  93. package/dist/chunk-VN5NTK26.js +0 -36
  94. package/dist/chunk-VN5NTK26.js.map +0 -1
  95. package/dist/components/notes/NotesPanel.d.ts +0 -13
  96. 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":"AAwFA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAA;AAC7E,O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Q,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,YAAY,EAAE,EACrB,EAAE,SAAS,EAAE,cAAc,EAAE,QAA6B,EAAE,EAAE,mBAAmB,GAChF,SAAS,EAAE,CAoBb;AAibD;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,OAAO,CAAC,qBAAqB,CAAC,CAehC"}
@@ -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
- * `SidebarOnboarding` lives in @fayz-ai/ui, which cannot reach a store or a
6
- * database, so the loading half is here — the same split as `SeuSiteWidget`:
7
- * self-loading, tenant-keyed, self-hiding.
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
- * Same rows the assistant's Tasks tab shows. Ticking a step there and reloading
10
- * moves the count here, because there is only one place either of them reads.
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;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,YAAY,CAAA;CACrB;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,CAoB3F"}
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;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,YAAY,CAAA;CACrB;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,CAoB3F;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;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;AAEtD,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,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;CAC/B;AAmED;;;GAGG;AACH,wBAAgB,mBAAmB,C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E,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
+ //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oBD,mEAAmE;AACnE,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI5C;AAED,uEAAuE;AACvE,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAE7C;AAED,uCAAuC;AACvC,wBAAgB,QAAQ,IAAI,IAAI,CAE/B;AAED,6EAA6E;AAC7E,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,CAY1D;AAuBD,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACpC,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsC3F;AAED,mFAAmF;AACnF,wBAAsB,aAAa,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAKjG"}
@@ -0,0 +1,27 @@
1
+ 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 { submitWorkspaceSetup, type SubmitWorkspaceSetupInput } from './submit';
12
- export { checkSlugAvailable, createLogoUploader, importLogoFromUrl, recordOnboardingResponse } from './backend';
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":"","s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AAChH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAClG,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,SAAS,CAAA"}
@@ -0,0 +1,78 @@
1
+ import type { OnboardingMove, ResolvedOnboardingProgram, TourDef } from '@fayz-ai/core';
2
+ import type { AgentRole } from '@fayz-ai/core';
3
+ import { type OnboardingTaskSeed } from './checklist';
4
+ /**
5
+ * The activation catalog — every step a tenant has to finish, from every source.
6
+ *
7
+ * Two sources, deliberately unequal:
8
+ *
9
+ * • The WORKSPACE steps (brand, team, payments, publish, first record) come
10
+ * from `checklist.ts` and are true of any business on the platform.
11
+ * • The MODULE steps come from each active plugin's `onboarding` program.
12
+ * A shop is not live until it has a catalog, a payment method and a
13
+ * published storefront; a clinic could not care less about any of that.
14
+ *
15
+ * Module keys are namespaced by their program (`shop.catalog`) and workspace
16
+ * keys are not, because the workspace ones were seeded before programs existed
17
+ * and their rows are already in production. Namespacing them now would seed a
18
+ * second copy of every one.
19
+ */
20
+ export interface ActivationStep extends OnboardingTaskSeed {
21
+ /** 'workspace' for the base list, the plugin id for a module program. */
22
+ programId: string;
23
+ programTitle: string;
24
+ /** Guidance the agent follows on this step. */
25
+ agentHint?: string;
26
+ /** How it is done in this system — seeded onto the task, read by the agent. */
27
+ howTo?: string;
28
+ /** The walkthrough as data. Played by the runtime; see guided-runner.ts. */
29
+ script?: OnboardingMove[];
30
+ /** One line when it closes. Said locally, no model call. */
31
+ celebrate?: string;
32
+ /** Colleague who owns this step, when the program named one. */
33
+ role?: AgentRole;
34
+ tour?: TourDef;
35
+ }
36
+ export interface BuildCatalogInput {
37
+ verticalId?: string;
38
+ programs?: ResolvedOnboardingProgram[];
39
+ /**
40
+ * "Does this app have that screen?"
41
+ *
42
+ * A step's route comes from whoever wrote the step, and an app is free not to
43
+ * install the module behind it — the base list points at `/settings/appearance`
44
+ * for branding, and an app with the branding tab turned off has no such
45
+ * screen. Sending somebody (or the agent) there paints an empty page, so a
46
+ * route this app cannot serve is dropped and the step stays as a plain line.
47
+ * Absent means "trust every route", which is what the tests and the pure
48
+ * callers want.
49
+ */
50
+ hasRoute?: (route: string) => boolean;
51
+ }
52
+ /**
53
+ * Base list first, modules after, each program in its declared order.
54
+ *
55
+ * Order is the whole information design of the checklist: the rail offers an
56
+ * action on the FIRST open step only, and the agent works the list top-down. So
57
+ * "name your business" has to come before "import your catalog", and a module's
58
+ * own steps have to stay in the order the module wrote them.
59
+ */
60
+ export declare function buildActivationCatalog({ verticalId, programs, hasRoute, }: BuildCatalogInput): ActivationStep[];
61
+ /**
62
+ * Base keys the active programs supersede.
63
+ *
64
+ * Also read by the shell to CLOSE rows the wizard seeded before the module's
65
+ * program was known: the base "cadastre seu primeiro produto" row is written at
66
+ * signup, and the shop's own catalog step arrives one mount later. Leaving both
67
+ * would put a step in the Tasks panel that no checklist can ever tick.
68
+ */
69
+ export declare function supersededKeys(programs: ResolvedOnboardingProgram[], verticalId: string | undefined): Set<string>;
70
+ /**
71
+ * The instructions block handed to the agent — every active program's own words,
72
+ * in catalog order, with the steps still open under each one.
73
+ *
74
+ * This is what makes the guidance the MODULE's rather than the shell's: the shop
75
+ * plugin says how a shop gets launched, and the shell only decides when to say it.
76
+ */
77
+ export declare function programInstructions(programs: ResolvedOnboardingProgram[], openKeys: ReadonlySet<string>): string[];
78
+ //# sourceMappingURL=programs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"programs.d.ts","sourceRoot":"","sources":["../../src/onboarding/programs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAqB,yBAAyB,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAC1G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAuB,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAE1E;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4EAA4E;IAC5E,MAAM,CAAC,EAAE,cAAc,EAAE,CAAA;IACzB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gEAAgE;IAChE,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,yBAAyB,EAAE,CAAA;IACtC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAA;CACtC;AA2CD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EAAE,QAAa,EAAE,QAAQ,GACpC,EAAE,iBAAiB,GAAG,cAAc,EAAE,CAgCtC;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,yBAAyB,EAAE,EACrC,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,GAAG,CAAC,MAAM,CAAC,CASb;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,yBAAyB,EAAE,EACrC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,GAC5B,MAAM,EAAE,CAIV"}
@@ -1,12 +1,17 @@
1
1
  import type { Organization, OrgAdapter } from '@fayz-ai/core';
2
- import type { WizardValues } from '@fayz-ai/ui';
2
+ import type { WizardStepDef, WizardValues } from '@fayz-ai/ui';
3
3
  import type { SetupSource } from './types';
4
+ /** Set when a workspace is created; consumed once by the shell (see ActivationProvider). */
5
+ export declare const GREETING_FLAG = "fayz:onboarding-greeting";
4
6
  export interface SubmitWorkspaceSetupInput {
5
7
  adapter: OrgAdapter;
6
8
  userId: string;
7
9
  /** Display name of the person running the flow — the checklist's assignee. */
8
10
  userName?: string;
9
11
  values: WizardValues;
12
+ /** The questionnaire as it was actually shown — the labels the handbook page
13
+ * is written from. Absent skips the page rather than inventing labels. */
14
+ steps?: ReadonlyArray<WizardStepDef>;
10
15
  source: SetupSource;
11
16
  /** Fixed by the app; when absent the flow asked for it. */
12
17
  verticalId?: string;
@@ -21,5 +26,5 @@ export interface SubmitWorkspaceSetupInput {
21
26
  * a tenant that must exist. The logo is a second call (`create_tenant_with_owner`
22
27
  * takes no logo), and the questionnaire row is a third that is allowed to fail.
23
28
  */
24
- export declare function submitWorkspaceSetup({ adapter, userId, userName, values, source, verticalId, timezone, currency, locale, }: SubmitWorkspaceSetupInput): Promise<Organization>;
29
+ export declare function submitWorkspaceSetup({ adapter, userId, userName, values, steps, source, verticalId, timezone, currency, locale, }: SubmitWorkspaceSetupInput): Promise<Organization>;
25
30
  //# sourceMappingURL=submit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"submit.d.ts","sourceRoot":"","sources":["../../src/onboarding/submit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAQ/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,UAAU,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,WAAW,CAA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EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GACzF,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAsFnD"}
@@ -23,6 +23,13 @@ export interface SeedOnboardingTasksInput {
23
23
  export declare function seedOnboardingTasks(input: SeedOnboardingTasksInput): Promise<boolean>;
24
24
  /** `[]` when Supabase is absent, when nothing was seeded, or on any error. */
25
25
  export declare function listOnboardingTasks(tenantId: string): Promise<Task[]>;
26
+ /**
27
+ * Close a seeded step a module has taken over (see `supersededKeys`).
28
+ *
29
+ * `cancelled`, not `done`: nobody did it, and the checklist that would have
30
+ * ticked it no longer exists. Both read as closed everywhere downstream.
31
+ */
32
+ export declare function cancelOnboardingTask(tenantId: string, sourceKey: string): Promise<void>;
26
33
  /** The latch. Fire-and-forget; never throws. */
27
34
  export declare function completeOnboardingTask(tenantId: string, sourceKey: string): Promise<void>;
28
35
  //# sourceMappingURL=tasks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/onboarding/tasks.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAc,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAMjE;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAA;IAChB,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,kBAAkB,EAAE,CAAA;CAC5B;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,CAiC3F;AAUD,8EAA8E;AAC9E,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAsB3E;AAED,gDAAgD;AAChD,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB/F"}
1
+ {"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../src/onboarding/tasks.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAc,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAMjE;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAA;IAChB,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,kBAAkB,EAAE,CAAA;CAC5B;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,CAoC3F;AAUD,8EAA8E;AAC9E,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAsB3E;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAc7F;AAED,gDAAgD;AAChD,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB/F"}
@@ -0,0 +1,2 @@
1
+ export declare function useActivationWatch(): void;
2
+ //# sourceMappingURL=useActivationWatch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useActivationWatch.d.ts","sourceRoot":"","sources":["../../src/onboarding/useActivationWatch.ts"],"names":[],"mappings":"AA8BA,wBAAgB,kBAAkB,IAAI,IAAI,CA2EzC"}