@fayz-ai/plugin-scribe 0.10.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 (60) hide show
  1. package/LICENSE +21 -0
  2. package/dist/components/DraftPanel.d.ts +14 -0
  3. package/dist/components/DraftPanel.d.ts.map +1 -0
  4. package/dist/components/ScribeConsentDialog.d.ts +12 -0
  5. package/dist/components/ScribeConsentDialog.d.ts.map +1 -0
  6. package/dist/components/ScribeRecordingPill.d.ts +16 -0
  7. package/dist/components/ScribeRecordingPill.d.ts.map +1 -0
  8. package/dist/components/ScribeRecoveryBanner.d.ts +8 -0
  9. package/dist/components/ScribeRecoveryBanner.d.ts.map +1 -0
  10. package/dist/components/ScribeSessionPage.d.ts +13 -0
  11. package/dist/components/ScribeSessionPage.d.ts.map +1 -0
  12. package/dist/components/ScribeShellMount.d.ts +19 -0
  13. package/dist/components/ScribeShellMount.d.ts.map +1 -0
  14. package/dist/components/TranscriptPanel.d.ts +10 -0
  15. package/dist/components/TranscriptPanel.d.ts.map +1 -0
  16. package/dist/data/supabase.d.ts +63 -0
  17. package/dist/data/supabase.d.ts.map +1 -0
  18. package/dist/data/tables.d.ts +31 -0
  19. package/dist/data/tables.d.ts.map +1 -0
  20. package/dist/index.d.ts +13 -0
  21. package/dist/index.d.ts.map +1 -0
  22. package/dist/index.js +2910 -0
  23. package/dist/index.js.map +1 -0
  24. package/dist/lib/config.d.ts +19 -0
  25. package/dist/lib/config.d.ts.map +1 -0
  26. package/dist/lib/config.test.d.ts +2 -0
  27. package/dist/lib/config.test.d.ts.map +1 -0
  28. package/dist/lib/drain.d.ts +13 -0
  29. package/dist/lib/drain.d.ts.map +1 -0
  30. package/dist/lib/generate.d.ts +23 -0
  31. package/dist/lib/generate.d.ts.map +1 -0
  32. package/dist/lib/prompt.d.ts +39 -0
  33. package/dist/lib/prompt.d.ts.map +1 -0
  34. package/dist/lib/prompt.test.d.ts +2 -0
  35. package/dist/lib/prompt.test.d.ts.map +1 -0
  36. package/dist/lib/transport.d.ts +59 -0
  37. package/dist/lib/transport.d.ts.map +1 -0
  38. package/dist/locales/en.d.ts +2 -0
  39. package/dist/locales/en.d.ts.map +1 -0
  40. package/dist/locales/index.d.ts +2 -0
  41. package/dist/locales/index.d.ts.map +1 -0
  42. package/dist/locales/pt-BR.d.ts +2 -0
  43. package/dist/locales/pt-BR.d.ts.map +1 -0
  44. package/dist/migrations/index.d.ts +6 -0
  45. package/dist/migrations/index.d.ts.map +1 -0
  46. package/dist/runtime/capture.d.ts +84 -0
  47. package/dist/runtime/capture.d.ts.map +1 -0
  48. package/dist/runtime/idb.d.ts +121 -0
  49. package/dist/runtime/idb.d.ts.map +1 -0
  50. package/dist/runtime/index.d.ts +48 -0
  51. package/dist/runtime/index.d.ts.map +1 -0
  52. package/dist/runtime/pump.d.ts +11 -0
  53. package/dist/runtime/pump.d.ts.map +1 -0
  54. package/dist/store.d.ts +25 -0
  55. package/dist/store.d.ts.map +1 -0
  56. package/dist/types.d.ts +266 -0
  57. package/dist/types.d.ts.map +1 -0
  58. package/functions/scribe-generate/index.ts +255 -0
  59. package/functions/scribe-transcribe/index.ts +455 -0
  60. package/package.json +58 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Faya Labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import type { NarrativeSchema, ScribeGeneration, ScribeLabels, ScribeSession } from '../types';
3
+ export interface DraftPanelProps {
4
+ generation: ScribeGeneration;
5
+ session: ScribeSession;
6
+ schema: NarrativeSchema;
7
+ templateName: string;
8
+ labels: ScribeLabels;
9
+ onRegenerate: () => void;
10
+ onCommitted: (documentId: string) => void;
11
+ onDiscarded: () => void;
12
+ }
13
+ export declare function DraftPanel({ generation, session, schema, templateName, labels, onRegenerate, onCommitted, onDiscarded, }: DraftPanelProps): React.JSX.Element;
14
+ //# sourceMappingURL=DraftPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DraftPanel.d.ts","sourceRoot":"","sources":["../../src/components/DraftPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAkB9F,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,gBAAgB,CAAA;IAC5B,OAAO,EAAE,aAAa,CAAA;IACtB,MAAM,EAAE,eAAe,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,YAAY,CAAA;IACpB,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,WAAW,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB;AAED,wBAAgB,UAAU,CAAC,EACzB,UAAU,EACV,OAAO,EACP,MAAM,EACN,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,WAAW,EACX,WAAW,GACZ,EAAE,eAAe,qBA+IjB"}
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import type { ConsentMode, ScribeLabels } from '../types';
3
+ export interface ScribeConsentDialogProps {
4
+ open: boolean;
5
+ labels: ScribeLabels;
6
+ subjectName?: string;
7
+ defaultConsentMode: ConsentMode;
8
+ onCancel: () => void;
9
+ onConfirm: (mode: ConsentMode) => void;
10
+ }
11
+ export declare function ScribeConsentDialog({ open, labels, subjectName, defaultConsentMode, onCancel, onConfirm, }: ScribeConsentDialogProps): React.JSX.Element;
12
+ //# sourceMappingURL=ScribeConsentDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScribeConsentDialog.d.ts","sourceRoot":"","sources":["../../src/components/ScribeConsentDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAY9B,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAuBzD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,YAAY,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,WAAW,CAAA;IAC/B,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAA;CACvC;AAED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,MAAM,EACN,WAAW,EACX,kBAAkB,EAClB,QAAQ,EACR,SAAS,GACV,EAAE,wBAAwB,qBAgD1B"}
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import type { ScribeLabels } from '../types';
3
+ export interface ScribeRecordingPillProps {
4
+ labels: ScribeLabels;
5
+ onOpenSession?: (sessionId: string) => void;
6
+ }
7
+ export declare function ScribeRecordingPill({ labels, onOpenSession }: ScribeRecordingPillProps): React.JSX.Element | null;
8
+ export interface ScribeStartButtonProps {
9
+ labels: ScribeLabels;
10
+ disabled?: boolean;
11
+ onStart: () => void;
12
+ variant?: 'default' | 'outline';
13
+ size?: 'sm' | 'default';
14
+ }
15
+ export declare function ScribeStartButton({ labels, disabled, onStart, variant, size }: ScribeStartButtonProps): React.JSX.Element;
16
+ //# sourceMappingURL=ScribeRecordingPill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScribeRecordingPill.d.ts","sourceRoot":"","sources":["../../src/components/ScribeRecordingPill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAsB5C,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,YAAY,CAAA;IACpB,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5C;AAmDD,wBAAgB,mBAAmB,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,wBAAwB,4BA2GtF;AAMD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,YAAY,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC/B,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;CACxB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAmB,EAAE,IAAW,EAAE,EAAE,sBAAsB,qBAUxH"}
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import type { ScribeLabels } from '../types';
3
+ export interface ScribeRecoveryBannerProps {
4
+ labels: ScribeLabels;
5
+ onOpenSession?: (sessionId: string) => void;
6
+ }
7
+ export declare function ScribeRecoveryBanner({ labels, onOpenSession }: ScribeRecoveryBannerProps): React.JSX.Element | null;
8
+ //# sourceMappingURL=ScribeRecoveryBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScribeRecoveryBanner.d.ts","sourceRoot":"","sources":["../../src/components/ScribeRecoveryBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAoB5C,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,YAAY,CAAA;IACpB,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5C;AAED,wBAAgB,oBAAoB,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,yBAAyB,4BAqExF"}
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import type { NarrativeTemplatePreset, ScribeLabels, ScribeSttConfig } from '../types';
3
+ export interface ScribeSessionPageProps {
4
+ sessionId: string;
5
+ labels: ScribeLabels;
6
+ presets: NarrativeTemplatePreset[];
7
+ stt: ScribeSttConfig;
8
+ generateEndpoint: string;
9
+ onOpenDocument?: (documentId: string) => void;
10
+ onBack?: () => void;
11
+ }
12
+ export declare function ScribeSessionPage({ sessionId, labels, presets, stt, generateEndpoint, onOpenDocument, onBack, }: ScribeSessionPageProps): React.JSX.Element;
13
+ //# sourceMappingURL=ScribeSessionPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScribeSessionPage.d.ts","sourceRoot":"","sources":["../../src/components/ScribeSessionPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA2B9B,OAAO,KAAK,EACV,uBAAuB,EAEvB,YAAY,EAGZ,eAAe,EAChB,MAAM,UAAU,CAAA;AAmBjB,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,YAAY,CAAA;IACpB,OAAO,EAAE,uBAAuB,EAAE,CAAA;IAClC,GAAG,EAAE,eAAe,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,MAAM,EACN,OAAO,EACP,GAAG,EACH,gBAAgB,EAChB,cAAc,EACd,MAAM,GACP,EAAE,sBAAsB,qBAwPxB"}
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ import type { ScribeLabels, ScribeRetentionConfig } from '../types';
3
+ export interface ScribeStartEventDetail {
4
+ subjectId?: string;
5
+ subjectName?: string;
6
+ appointmentId?: string;
7
+ templateKeys?: string[];
8
+ }
9
+ export declare const SCRIBE_START_EVENT = "scribe:start";
10
+ export interface ScribeShellMountProps {
11
+ labels: ScribeLabels;
12
+ retention: ScribeRetentionConfig;
13
+ locale: string;
14
+ onOpenSession?: (sessionId: string) => void;
15
+ }
16
+ export declare function ScribeShellMount({ labels, retention, locale, onOpenSession }: ScribeShellMountProps): React.JSX.Element;
17
+ /** Helper para qualquer tela disparar o início sem importar o plugin. */
18
+ export declare function requestScribeStart(detail: ScribeStartEventDetail): void;
19
+ //# sourceMappingURL=ScribeShellMount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScribeShellMount.d.ts","sourceRoot":"","sources":["../../src/components/ScribeShellMount.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B,OAAO,KAAK,EAAe,YAAY,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAgBhF,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CACxB;AAED,eAAO,MAAM,kBAAkB,iBAAiB,CAAA;AAEhD,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,YAAY,CAAA;IACpB,SAAS,EAAE,qBAAqB,CAAA;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5C;AAED,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,qBAAqB,qBA4EnG;AAED,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAEvE"}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import type { ScribeSegment } from '../types';
3
+ export interface TranscriptPanelProps {
4
+ segments: ScribeSegment[];
5
+ /** True enquanto ainda há segmento subindo ou transcrevendo. */
6
+ pending: boolean;
7
+ emptyLabel?: string;
8
+ }
9
+ export declare function TranscriptPanel({ segments, pending, emptyLabel }: TranscriptPanelProps): React.JSX.Element;
10
+ //# sourceMappingURL=TranscriptPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranscriptPanel.d.ts","sourceRoot":"","sources":["../../src/components/TranscriptPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAa7C,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,aAAa,EAAE,CAAA;IACzB,gEAAgE;IAChE,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,oBAAoB,qBAqEtF"}
@@ -0,0 +1,63 @@
1
+ import type { ScribeGeneration, ScribeSegment, ScribeSession } from '../types';
2
+ export declare function fetchSession(sessionId: string): Promise<ScribeSession | null>;
3
+ export declare function fetchSegments(sessionId: string): Promise<ScribeSegment[]>;
4
+ export declare function fetchGenerations(sessionId: string): Promise<ScribeGeneration[]>;
5
+ /** Sessões abertas de qualquer dispositivo — a recuperação cross-device. */
6
+ export declare function fetchOpenSessions(userId: string): Promise<ScribeSession[]>;
7
+ export declare function fetchSessionsForSubject(subjectId: string): Promise<ScribeSession[]>;
8
+ /**
9
+ * Autosave do rascunho. Escreve SÓ `markdown_edited` — `markdown` é a saída do
10
+ * modelo e nunca é tocada. É a diferença entre as duas que prova a revisão e
11
+ * que alimenta o ajuste de prompt.
12
+ */
13
+ export declare function saveDraft(generationId: string, markdownEdited: string): Promise<void>;
14
+ export declare function discardGeneration(generationId: string): Promise<void>;
15
+ /**
16
+ * Grava o documento na ficha. Três escritas encadeadas:
17
+ *
18
+ * documents o arquétipo — é o que o PersonDocumentsWidget lista
19
+ * plg_forms_documents a extensão com o markdown e as seções parseadas
20
+ * generations fecha o ciclo apontando para o documento criado
21
+ *
22
+ * `kind` fica `'form'` de propósito: assim a lista de documentos da pessoa
23
+ * mostra este documento SEM nenhuma mudança no plugin-forms. O que distingue um
24
+ * documento de scribe é `metadata.scribe`, que é o filtro de qualquer visão
25
+ * específica.
26
+ */
27
+ export declare function commitGeneration(args: {
28
+ generation: ScribeGeneration;
29
+ session: ScribeSession;
30
+ markdown: string;
31
+ title: string;
32
+ sections: Record<string, string>;
33
+ edited: boolean;
34
+ }): Promise<string>;
35
+ /**
36
+ * Apaga o ÁUDIO e nada mais. Transcrição e documento assinado ficam — é o que
37
+ * torna o direito de eliminação (art. 18 VI) exercível sem destruir o registro
38
+ * clínico, que tem prazo de guarda próprio.
39
+ */
40
+ export declare function deleteSessionAudio(session: ScribeSession): Promise<number>;
41
+ export declare function invokeTranscribe(args: {
42
+ endpoint: string;
43
+ sessionId: string;
44
+ provider: string;
45
+ model?: string;
46
+ diarize?: boolean;
47
+ }): Promise<{
48
+ transcribed: number;
49
+ failed: number;
50
+ remaining: number;
51
+ }>;
52
+ export declare function invokeGenerate(args: {
53
+ endpoint: string;
54
+ sessionId: string;
55
+ templateId?: string;
56
+ templateKey?: string;
57
+ schema?: unknown;
58
+ tabOrder?: number;
59
+ }): Promise<{
60
+ generationId: string;
61
+ markdown: string;
62
+ }>;
63
+ //# sourceMappingURL=supabase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supabase.d.ts","sourceRoot":"","sources":["../../src/data/supabase.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAmF9E,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAInF;AAED,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAQ/E;AAED,wBAAsB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CASrF;AAED,4EAA4E;AAC5E,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAUhF;AAED,wBAAsB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CASzF;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM3F;AAED,wBAAsB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM3E;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,UAAU,EAAE,gBAAgB,CAAA;IAC5B,OAAO,EAAE,aAAa,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,MAAM,EAAE,OAAO,CAAA;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgDlB;AAeD;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAyBhF;AAMD,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAatE;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,OAAO,CAAC;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAatD"}
@@ -0,0 +1,31 @@
1
+ export declare const T: {
2
+ readonly sessions: "plg_scribe_sessions";
3
+ readonly segments: "plg_scribe_segments";
4
+ readonly generations: "plg_scribe_generations";
5
+ };
6
+ /** Bucket privado do áudio. A gramática do caminho está em `storagePath()`. */
7
+ export declare const AUDIO_BUCKET = "scribe-audio";
8
+ /**
9
+ * {tenant_id}/{yyyy}/{mm}/{session_id}/{seg_index:05d}.{ext}
10
+ *
11
+ * Segmento 1 é a chave do isolamento (toda policy pendura nele); 2-3 dão
12
+ * varredura por prefixo para retenção; 4 agrupa a sessão e é inadivinhável;
13
+ * 5 ordena lexicograficamente = cronologicamente, o que faz `list()` já voltar
14
+ * na ordem certa sem sort.
15
+ */
16
+ export declare function storagePath(args: {
17
+ tenantId: string;
18
+ sessionId: string;
19
+ segIndex: number;
20
+ startedAt: Date;
21
+ ext: string;
22
+ }): string;
23
+ /** Prefixo de uma sessão inteira — é o que "apagar o áudio" varre. */
24
+ export declare function sessionPrefix(args: {
25
+ tenantId: string;
26
+ sessionId: string;
27
+ startedAt: Date;
28
+ }): string;
29
+ /** Extensão a partir do mime negociado — o regex da policy só aceita estas quatro. */
30
+ export declare function extForMime(mimeType: string): string;
31
+ //# sourceMappingURL=tables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../src/data/tables.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC;;;;CAIJ,CAAA;AAEV,+EAA+E;AAC/E,eAAO,MAAM,YAAY,iBAAiB,CAAA;AAE1C;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,IAAI,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,MAAM,CAKT;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,IAAI,CAAA;CAAE,GAAG,MAAM,CAIpG;AAED,sFAAsF;AACtF,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKnD"}
@@ -0,0 +1,13 @@
1
+ import type { PluginManifest } from '@fayz-ai/core';
2
+ import type { ScribePluginOptions } from './types';
3
+ export declare function createScribePlugin(options: ScribePluginOptions): PluginManifest;
4
+ export { requestScribeStart, SCRIBE_START_EVENT } from './components/ScribeShellMount';
5
+ export { ScribeStartButton } from './components/ScribeRecordingPill';
6
+ export { ScribeSessionPage } from './components/ScribeSessionPage';
7
+ export { useScribeStore, formatElapsed } from './store';
8
+ export { PROMPT_VERSION, formatOffset, parseSections, renderTranscript } from './lib/prompt';
9
+ export { beginSession, endSession, pauseSession, resumeSession, discardSession, isCaptureSupported, } from './runtime';
10
+ export { fetchSession, fetchSegments, fetchGenerations, fetchSessionsForSubject, fetchOpenSessions, deleteSessionAudio, } from './data/supabase';
11
+ export type { ScribePluginOptions, ScribeLabels, ScribeSession, ScribeSegment, ScribeGeneration, NarrativeSchema, NarrativeSectionDef, NarrativeTemplatePreset, SessionStatus, CaptureState, ConsentMode, } from './types';
12
+ export { isNarrativeSchema } from './types';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAA2B,MAAM,eAAe,CAAA;AAS5E,OAAO,KAAK,EAEV,mBAAmB,EAEpB,MAAM,SAAS,CAAA;AAsBhB,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,cAAc,CAwJ/E;AAMD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC5F,OAAO,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,kBAAkB,GACnB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,iBAAiB,CAAA;AACxB,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}