@arbidocs/blocks 0.5.149 → 0.5.150
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/README.md +1 -1
- package/bin/arbidocs-record-take.mjs +122 -0
- package/dist/{ConnectedCallDock-EASMNJXB.cjs → ConnectedCallDock-L3QIWXAA.cjs} +22 -22
- package/dist/{ConnectedCallDock-EASMNJXB.cjs.map → ConnectedCallDock-L3QIWXAA.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-BWZ2FHXN.cjs → ConnectedCallRoom-S7INF4I5.cjs} +15 -15
- package/dist/{ConnectedCallRoom-BWZ2FHXN.cjs.map → ConnectedCallRoom-S7INF4I5.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-4FAJDXPT.cjs → ConnectedNativeDocxComparison-BVECWYJ5.cjs} +20 -20
- package/dist/{ConnectedNativeDocxComparison-4FAJDXPT.cjs.map → ConnectedNativeDocxComparison-BVECWYJ5.cjs.map} +1 -1
- package/dist/{ConnectedPresentation-EIWVV7ON.cjs → ConnectedPresentation-F6NYQ2X7.cjs} +21 -21
- package/dist/{ConnectedPresentation-EIWVV7ON.cjs.map → ConnectedPresentation-F6NYQ2X7.cjs.map} +1 -1
- package/dist/{ConnectedProductionSetDialog-SDHD5KTG.cjs → ConnectedProductionSetDialog-T5J4YLA7.cjs} +3 -3
- package/dist/{ConnectedProductionSetDialog-SDHD5KTG.cjs.map → ConnectedProductionSetDialog-T5J4YLA7.cjs.map} +1 -1
- package/dist/{ConnectedSlidesTab-4FN5ZRRI.cjs → ConnectedSlidesTab-WY6JCGWZ.cjs} +18 -18
- package/dist/{ConnectedSlidesTab-4FN5ZRRI.cjs.map → ConnectedSlidesTab-WY6JCGWZ.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-D7EZFIJ7.cjs → ConnectedStreamedWordArtifact-ELNWWKZD.cjs} +20 -20
- package/dist/{ConnectedStreamedWordArtifact-D7EZFIJ7.cjs.map → ConnectedStreamedWordArtifact-ELNWWKZD.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-7MVNPVZC.cjs → DocumentReviewCard-KV2B7BD3.cjs} +19 -19
- package/dist/{DocumentReviewCard-7MVNPVZC.cjs.map → DocumentReviewCard-KV2B7BD3.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-6363IOTL.cjs → FilesViewerDialog-HJABYPOA.cjs} +46 -46
- package/dist/{FilesViewerDialog-6363IOTL.cjs.map → FilesViewerDialog-HJABYPOA.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-HHATEV2H.cjs → WorkspaceTableView-XXCJ7LBO.cjs} +10 -10
- package/dist/{WorkspaceTableView-HHATEV2H.cjs.map → WorkspaceTableView-XXCJ7LBO.cjs.map} +1 -1
- package/dist/agents/index.cjs +303 -303
- package/dist/{ai-NC4ZE3UT.cjs → ai-RKRKOYO4.cjs} +26 -26
- package/dist/ai-RKRKOYO4.cjs.map +1 -0
- package/dist/auth/index.cjs +1 -1
- package/dist/calls/index.cjs +120 -120
- package/dist/chat/index.cjs +18 -18
- package/dist/{chunk-ZLJP6447.cjs → chunk-2XIENKEI.cjs} +31 -31
- package/dist/{chunk-ZLJP6447.cjs.map → chunk-2XIENKEI.cjs.map} +1 -1
- package/dist/{chunk-JARRHAQW.cjs → chunk-5636X4OX.cjs} +9 -9
- package/dist/{chunk-JARRHAQW.cjs.map → chunk-5636X4OX.cjs.map} +1 -1
- package/dist/{chunk-MKJBEL4W.cjs → chunk-6LTUUXRL.cjs} +4 -4
- package/dist/{chunk-MKJBEL4W.cjs.map → chunk-6LTUUXRL.cjs.map} +1 -1
- package/dist/{chunk-47NBCI3E.cjs → chunk-7PUVSSXX.cjs} +4 -4
- package/dist/{chunk-47NBCI3E.cjs.map → chunk-7PUVSSXX.cjs.map} +1 -1
- package/dist/{chunk-54Y4LWTA.cjs → chunk-AUEFLW3V.cjs} +50 -50
- package/dist/{chunk-54Y4LWTA.cjs.map → chunk-AUEFLW3V.cjs.map} +1 -1
- package/dist/{chunk-SQHR7564.cjs → chunk-BDLXTMOK.cjs} +70 -70
- package/dist/{chunk-SQHR7564.cjs.map → chunk-BDLXTMOK.cjs.map} +1 -1
- package/dist/{chunk-6KT6BEP4.cjs → chunk-BL3UUWIU.cjs} +8 -8
- package/dist/{chunk-6KT6BEP4.cjs.map → chunk-BL3UUWIU.cjs.map} +1 -1
- package/dist/{chunk-43GIESOM.cjs → chunk-CFSLZW4Y.cjs} +4 -4
- package/dist/{chunk-43GIESOM.cjs.map → chunk-CFSLZW4Y.cjs.map} +1 -1
- package/dist/{chunk-STFIBNND.cjs → chunk-CSN52UFI.cjs} +49 -49
- package/dist/{chunk-STFIBNND.cjs.map → chunk-CSN52UFI.cjs.map} +1 -1
- package/dist/{chunk-JZWLIOTP.cjs → chunk-DEJTECAY.cjs} +3 -3
- package/dist/{chunk-JZWLIOTP.cjs.map → chunk-DEJTECAY.cjs.map} +1 -1
- package/dist/{chunk-DHQH4EYB.cjs → chunk-FE4H7Z37.cjs} +4 -4
- package/dist/{chunk-DHQH4EYB.cjs.map → chunk-FE4H7Z37.cjs.map} +1 -1
- package/dist/{chunk-CRN64MYK.cjs → chunk-FVFIAQ2S.cjs} +12 -12
- package/dist/{chunk-CRN64MYK.cjs.map → chunk-FVFIAQ2S.cjs.map} +1 -1
- package/dist/{chunk-IIOFQKQV.cjs → chunk-IC3NREIK.cjs} +3 -3
- package/dist/{chunk-IIOFQKQV.cjs.map → chunk-IC3NREIK.cjs.map} +1 -1
- package/dist/{chunk-H5ITWXUA.cjs → chunk-JUFSJGTN.cjs} +4 -4
- package/dist/{chunk-H5ITWXUA.cjs.map → chunk-JUFSJGTN.cjs.map} +1 -1
- package/dist/{chunk-LXQMTVAB.cjs → chunk-KGAYY7LB.cjs} +7 -7
- package/dist/{chunk-LXQMTVAB.cjs.map → chunk-KGAYY7LB.cjs.map} +1 -1
- package/dist/{chunk-YV36BZE7.cjs → chunk-L7QNPS52.cjs} +11 -11
- package/dist/{chunk-YV36BZE7.cjs.map → chunk-L7QNPS52.cjs.map} +1 -1
- package/dist/{chunk-UHT2Q6IF.cjs → chunk-LW7TDQ63.cjs} +12 -12
- package/dist/{chunk-UHT2Q6IF.cjs.map → chunk-LW7TDQ63.cjs.map} +1 -1
- package/dist/{chunk-5QEPUONH.cjs → chunk-M53KQLFA.cjs} +4 -4
- package/dist/{chunk-5QEPUONH.cjs.map → chunk-M53KQLFA.cjs.map} +1 -1
- package/dist/{chunk-GPP7E3OQ.cjs → chunk-N2IQSGYU.cjs} +3 -3
- package/dist/{chunk-GPP7E3OQ.cjs.map → chunk-N2IQSGYU.cjs.map} +1 -1
- package/dist/{chunk-2ZH4KVAZ.cjs → chunk-P65JMN57.cjs} +36 -36
- package/dist/{chunk-2ZH4KVAZ.cjs.map → chunk-P65JMN57.cjs.map} +1 -1
- package/dist/{chunk-J5YEEWZT.cjs → chunk-QRCYKBLX.cjs} +7 -7
- package/dist/{chunk-J5YEEWZT.cjs.map → chunk-QRCYKBLX.cjs.map} +1 -1
- package/dist/{chunk-3WXAGCUL.cjs → chunk-QVKSN3G3.cjs} +6 -6
- package/dist/{chunk-3WXAGCUL.cjs.map → chunk-QVKSN3G3.cjs.map} +1 -1
- package/dist/{chunk-X5H2STK4.cjs → chunk-RBBUKGG4.cjs} +7 -7
- package/dist/{chunk-X5H2STK4.cjs.map → chunk-RBBUKGG4.cjs.map} +1 -1
- package/dist/{chunk-2E5AODIC.cjs → chunk-RCUM5HQN.cjs} +28 -28
- package/dist/{chunk-2E5AODIC.cjs.map → chunk-RCUM5HQN.cjs.map} +1 -1
- package/dist/{chunk-U6XMZG6G.cjs → chunk-RDBUQCAS.cjs} +3 -3
- package/dist/{chunk-U6XMZG6G.cjs.map → chunk-RDBUQCAS.cjs.map} +1 -1
- package/dist/{chunk-ZUYY3JRO.cjs → chunk-TBLQCML6.cjs} +3 -3
- package/dist/{chunk-ZUYY3JRO.cjs.map → chunk-TBLQCML6.cjs.map} +1 -1
- package/dist/{chunk-TJDCTRB5.cjs → chunk-TGZAJVDV.cjs} +4 -4
- package/dist/{chunk-TJDCTRB5.cjs.map → chunk-TGZAJVDV.cjs.map} +1 -1
- package/dist/{chunk-CFJAWCVX.cjs → chunk-UBKJNCWY.cjs} +16 -16
- package/dist/{chunk-CFJAWCVX.cjs.map → chunk-UBKJNCWY.cjs.map} +1 -1
- package/dist/{chunk-FHNWK5RO.cjs → chunk-VGRLKOIZ.cjs} +6 -6
- package/dist/{chunk-FHNWK5RO.cjs.map → chunk-VGRLKOIZ.cjs.map} +1 -1
- package/dist/{chunk-WSUHF676.cjs → chunk-VZZ2YIN4.cjs} +3 -3
- package/dist/{chunk-WSUHF676.cjs.map → chunk-VZZ2YIN4.cjs.map} +1 -1
- package/dist/{chunk-MHGZZ6IJ.cjs → chunk-WECRDCH4.cjs} +3 -3
- package/dist/{chunk-MHGZZ6IJ.cjs.map → chunk-WECRDCH4.cjs.map} +1 -1
- package/dist/{chunk-FZASPI2Q.cjs → chunk-XJAPT42P.cjs} +5 -5
- package/dist/{chunk-FZASPI2Q.cjs.map → chunk-XJAPT42P.cjs.map} +1 -1
- package/dist/{chunk-JARBYN6Z.cjs → chunk-Y3OI7ZP7.cjs} +3 -3
- package/dist/{chunk-JARBYN6Z.cjs.map → chunk-Y3OI7ZP7.cjs.map} +1 -1
- package/dist/{chunk-C7EGCNLV.cjs → chunk-YF5J44EA.cjs} +62 -62
- package/dist/{chunk-C7EGCNLV.cjs.map → chunk-YF5J44EA.cjs.map} +1 -1
- package/dist/{chunk-MIYEIACV.cjs → chunk-YRU6ZJUW.cjs} +6 -6
- package/dist/{chunk-MIYEIACV.cjs.map → chunk-YRU6ZJUW.cjs.map} +1 -1
- package/dist/{chunk-WXMD4AA4.cjs → chunk-ZNPBC4MK.cjs} +4 -4
- package/dist/{chunk-WXMD4AA4.cjs.map → chunk-ZNPBC4MK.cjs.map} +1 -1
- package/dist/{chunk-A5ZNAZ7Q.cjs → chunk-ZX76KVRE.cjs} +13 -13
- package/dist/{chunk-A5ZNAZ7Q.cjs.map → chunk-ZX76KVRE.cjs.map} +1 -1
- package/dist/collaboration/index.cjs +13 -13
- package/dist/connect/docx.cjs +23 -23
- package/dist/connect/index.cjs +1046 -1046
- package/dist/connect/viewer.cjs +34 -34
- package/dist/dashboards/index.cjs +1 -1
- package/dist/embed/index.cjs +44 -44
- package/dist/facts/index.cjs +43 -43
- package/dist/files/index.cjs +227 -227
- package/dist/home/index.cjs +31 -31
- package/dist/index.cjs +1584 -1584
- package/dist/pages/index.cjs +4 -4
- package/dist/record/index.cjs +234 -3
- package/dist/record/index.cjs.map +1 -1
- package/dist/record/index.d.ts +29 -2
- package/dist/record/index.js +231 -4
- package/dist/record/index.js.map +1 -1
- package/dist/record/runs.d.ts +101 -0
- package/dist/settings/index.cjs +148 -148
- package/dist/shell/index.cjs +87 -87
- package/dist/studio/index.cjs +29 -29
- package/dist/workflow-canvas/index.cjs +64 -64
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +7 -5
- package/record/SKILL.md +126 -0
- package/dist/ai-NC4ZE3UT.cjs.map +0 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Following a workflow run on camera — the run page of `ConnectedWorkflowRunner` (and the run
|
|
3
|
+
* thread's step bar once the run has its thread).
|
|
4
|
+
*
|
|
5
|
+
* Every wait reads the state the page shows: the step chips' `aria-current` and `data-phase`, the
|
|
6
|
+
* runner's `<prefix>-next` / `<prefix>-done` / `<prefix>-<step>-failed`. Nothing waits on text the
|
|
7
|
+
* AI writes. A failed AI step is retried the way an operator would, with the current-step panel's
|
|
8
|
+
* "Try again" (twice at most); the render cuts the wait.
|
|
9
|
+
*
|
|
10
|
+
* const runs = createRunKit(cine, { prefix: 'run' })
|
|
11
|
+
* await runs.driveRun(take, {
|
|
12
|
+
* ai: ['conflicts', 'kyc-checks'],
|
|
13
|
+
* captions: { conflicts: ['The AI searches the register…'] },
|
|
14
|
+
* handlers: { accept: runs.approveStep('accept', (p) => runs.pickTile(p, 'fee', /Fixed/)) },
|
|
15
|
+
* })
|
|
16
|
+
*
|
|
17
|
+
* Playwright is used through the page only (no runtime import of `@playwright/test`).
|
|
18
|
+
*/
|
|
19
|
+
import type { Locator, Page } from '@playwright/test';
|
|
20
|
+
import { Take, type Cinematic } from './index';
|
|
21
|
+
export type StepHandler = (page: Page) => Promise<void>;
|
|
22
|
+
export interface RunKitConfig {
|
|
23
|
+
/** The runner's `testIdPrefix` (default `workflow-run`, the runner's own default). */
|
|
24
|
+
prefix?: string;
|
|
25
|
+
/** The accessible name of the run thread's current-step panel (default "Current step"). */
|
|
26
|
+
currentStepLabel?: string | RegExp;
|
|
27
|
+
/** The panel's retry button (default /try again/i). */
|
|
28
|
+
tryAgain?: RegExp;
|
|
29
|
+
/** How often a failed AI step is tried again before the take fails (default 2). */
|
|
30
|
+
retries?: number;
|
|
31
|
+
/** The callout on a failed step a story expects (`mayFail`; default "Failed"). */
|
|
32
|
+
failedLabel?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface WhileWorkingOptions {
|
|
35
|
+
/** Fail the take after this long (default 15 minutes). */
|
|
36
|
+
timeoutMs?: number;
|
|
37
|
+
/** What went wrong, when it did (a failed pill's text): tried again, then thrown. */
|
|
38
|
+
failed?: () => Promise<string | null>;
|
|
39
|
+
}
|
|
40
|
+
export interface DriveRun {
|
|
41
|
+
/** Steps the AI or the server does: logged waits, narrated by `captions`. */
|
|
42
|
+
ai: string[];
|
|
43
|
+
/** Captions while an AI step works (several cycle), or as a person's step comes up (the first). */
|
|
44
|
+
captions?: Record<string, string | string[]>;
|
|
45
|
+
/** The person's steps, by step id. */
|
|
46
|
+
handlers?: Record<string, StepHandler>;
|
|
47
|
+
/** Shown once an AI step is done, before the run moves on (read the result, open it in Word). */
|
|
48
|
+
reviews?: Record<string, StepHandler>;
|
|
49
|
+
/** Stop once this step is current (and done, if it is an AI step), without finishing the run. */
|
|
50
|
+
stopAt?: string;
|
|
51
|
+
/** Steps whose failure the story deals with itself (e.g. a signature the service refuses). */
|
|
52
|
+
mayFail?: string[];
|
|
53
|
+
/** Fail the take after this long (default 40 minutes). */
|
|
54
|
+
deadlineMs?: number;
|
|
55
|
+
}
|
|
56
|
+
export interface RunKit {
|
|
57
|
+
/** A step's chip on whichever step bar the run page shows. */
|
|
58
|
+
stepChip(page: Page, stepId: string): Locator;
|
|
59
|
+
/** The step the run is on (the step bar marks it `aria-current`), or "" before there is one. */
|
|
60
|
+
currentStep(page: Page): Promise<string>;
|
|
61
|
+
/**
|
|
62
|
+
* Narrate a wait: cycle `lines` as captions until `done` holds, logged as one wait. Each line
|
|
63
|
+
* holds at least nine seconds. A failed AI step (`failed`) is tried again with the current-step
|
|
64
|
+
* panel's "Try again", at most `retries` times; after that the take fails.
|
|
65
|
+
*/
|
|
66
|
+
whileWorking(take: Take, label: string, lines: string[], done: () => Promise<boolean>, opts?: WhileWorkingOptions): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Follow a run on the run page: each AI step a logged, captioned wait; each person's step done
|
|
69
|
+
* by its handler; a result reviewed before Next. Ends on the finish screen, or at `stopAt`.
|
|
70
|
+
*/
|
|
71
|
+
driveRun(take: Take, opts: DriveRun): Promise<void>;
|
|
72
|
+
/** Approve a review step at human speed: read what it asks, fill its fields, approve. */
|
|
73
|
+
approveStep(stepId: string, fill?: StepHandler, readMs?: number): StepHandler;
|
|
74
|
+
/** Pick a tile of a select field (`<prefix>-field-<name>`) by its label. */
|
|
75
|
+
pickTile(page: Page, field: string, label: RegExp, prefix?: string): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* `E2E_RESUME_RUN` (a run's path, `/app/run/<workflow>?run=con-…`): open that run instead of
|
|
78
|
+
* starting one, to try a story's later steps in minutes. Returns the path, or null when unset.
|
|
79
|
+
* A resumed take is for trying steps, never the delivered video.
|
|
80
|
+
*/
|
|
81
|
+
resumeRun(page: Page, opts?: {
|
|
82
|
+
env?: string;
|
|
83
|
+
readyTestId?: string;
|
|
84
|
+
}): Promise<string | null>;
|
|
85
|
+
}
|
|
86
|
+
/** Navigate inside the app without a reload (a hard load would sign the session out). */
|
|
87
|
+
export declare function spaGo(page: Page, url: string): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Open a Word document by its id in the Word editor (the documents viewer's `?doc=` link). Open
|
|
90
|
+
* documents by id — from the step's own link or the POST that stored them — never by searching a
|
|
91
|
+
* documents table (it renders only the rows in view).
|
|
92
|
+
*/
|
|
93
|
+
export declare function openWordById(take: Take, documentId: string, { path, lowerThird, timeoutMs, }?: {
|
|
94
|
+
path?: string;
|
|
95
|
+
lowerThird?: {
|
|
96
|
+
kicker: string;
|
|
97
|
+
title: string;
|
|
98
|
+
};
|
|
99
|
+
timeoutMs?: number;
|
|
100
|
+
}): Promise<Locator>;
|
|
101
|
+
export declare function createRunKit(cine: Cinematic, config?: RunKitConfig): RunKit;
|