deictic 0.3.1 → 0.4.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 (165) hide show
  1. package/API.md +26 -17
  2. package/README.md +6 -26
  3. package/dist/annotations/client.d.ts +1 -1
  4. package/dist/annotations/client.js +1 -1
  5. package/dist/annotations/index.d.ts +2 -101
  6. package/dist/annotations/index.js +1 -22
  7. package/dist/astro.d.ts +1 -1
  8. package/dist/astro.js +1 -1
  9. package/dist/cli.d.ts +1 -0
  10. package/dist/cli.js +37 -0
  11. package/dist/cli.js.map +1 -0
  12. package/dist/index.js +1 -10
  13. package/dist/logs/client.d.ts +1 -1
  14. package/dist/logs/client.js +1 -1
  15. package/dist/logs/index.d.ts +2 -18
  16. package/dist/logs/index.js +1 -21
  17. package/dist/network/client.d.ts +1 -1
  18. package/dist/network/client.js +1 -1
  19. package/dist/network/index.d.ts +1 -1
  20. package/dist/network/index.js +1 -37
  21. package/dist/recommended/index.d.ts +7 -7
  22. package/dist/recommended/index.js +1 -26
  23. package/dist/recordings/client.d.ts +1 -1
  24. package/dist/recordings/client.js +1 -1
  25. package/dist/recordings/index.d.ts +1 -1
  26. package/dist/screenshots/client.d.ts +1 -1
  27. package/dist/screenshots/client.js +1 -108
  28. package/dist/screenshots/dom.d.ts +1 -1
  29. package/dist/screenshots/dom.js +1 -1
  30. package/dist/screenshots/index.d.ts +1 -1
  31. package/dist/screenshots/index.js +1 -103
  32. package/dist/screenshots/rrweb.d.ts +1 -1
  33. package/dist/screenshots/rrweb.js +1 -1
  34. package/dist/shared/annotations.js +22 -0
  35. package/dist/shared/annotations.js.map +1 -0
  36. package/dist/shared/board.js +190 -0
  37. package/dist/shared/board.js.map +1 -0
  38. package/dist/shared/client.js +108 -0
  39. package/dist/shared/endpoints.js +4 -1
  40. package/dist/shared/endpoints.js.map +1 -1
  41. package/dist/shared/find.js +156 -0
  42. package/dist/shared/find.js.map +1 -0
  43. package/dist/shared/frame.js +75 -0
  44. package/dist/shared/frame.js.map +1 -0
  45. package/dist/shared/index.d.ts +5 -0
  46. package/dist/shared/index.d.ts.map +1 -1
  47. package/dist/shared/index2.d.ts +85 -88
  48. package/dist/shared/index2.d.ts.map +1 -1
  49. package/dist/shared/index3.d.ts +83 -89
  50. package/dist/shared/index3.d.ts.map +1 -1
  51. package/dist/shared/index4.d.ts +98 -50
  52. package/dist/shared/index4.d.ts.map +1 -1
  53. package/dist/shared/index5.d.ts +13 -219
  54. package/dist/shared/index5.d.ts.map +1 -1
  55. package/dist/shared/index6.d.ts +55 -61
  56. package/dist/shared/index6.d.ts.map +1 -1
  57. package/dist/shared/index7.d.ts +224 -0
  58. package/dist/shared/index7.d.ts.map +1 -0
  59. package/dist/shared/index8.d.ts +52 -0
  60. package/dist/shared/index8.d.ts.map +1 -0
  61. package/dist/shared/index9.d.ts +70 -0
  62. package/dist/shared/index9.d.ts.map +1 -0
  63. package/dist/shared/init.js +472 -0
  64. package/dist/shared/init.js.map +1 -0
  65. package/dist/shared/local.js +165 -0
  66. package/dist/shared/local.js.map +1 -0
  67. package/dist/shared/logs.js +22 -0
  68. package/dist/shared/logs.js.map +1 -0
  69. package/dist/shared/network.js +39 -0
  70. package/dist/shared/network.js.map +1 -0
  71. package/dist/shared/packages.js +125 -0
  72. package/dist/shared/packages.js.map +1 -0
  73. package/dist/shared/recommended.js +26 -0
  74. package/dist/shared/recommended.js.map +1 -0
  75. package/dist/shared/recording.js +316 -0
  76. package/dist/shared/recording.js.map +1 -0
  77. package/dist/shared/recordings.js +2 -1
  78. package/dist/shared/recordings.js.map +1 -1
  79. package/dist/shared/screenshots.js +108 -0
  80. package/dist/shared/screenshots.js.map +1 -0
  81. package/dist/shared/src.js +10 -0
  82. package/dist/shared/src.js.map +1 -0
  83. package/dist/shared/task.js +108 -0
  84. package/dist/shared/task.js.map +1 -0
  85. package/dist/shared/tasks.js +7 -180
  86. package/dist/shared/tasks.js.map +1 -1
  87. package/dist/shared/transcribe.js +128 -0
  88. package/dist/shared/transcribe.js.map +1 -0
  89. package/dist/shared/vb.js +13 -0
  90. package/dist/shared/vb.js.map +1 -0
  91. package/dist/shared/vite.d.ts +16 -0
  92. package/dist/shared/vite.d.ts.map +1 -0
  93. package/dist/shared/vite.js +61 -0
  94. package/dist/shared/vite.js.map +1 -0
  95. package/dist/shared/voice.js +84 -0
  96. package/dist/{voice/index.js.map → shared/voice.js.map} +1 -1
  97. package/dist/shared/voice2.js +90 -0
  98. package/dist/shared/voice2.js.map +1 -0
  99. package/dist/shared/watch.js +209 -0
  100. package/dist/shared/watch.js.map +1 -0
  101. package/dist/shared/watchers.js +62 -0
  102. package/dist/shared/watchers.js.map +1 -0
  103. package/dist/tailwind/client.d.ts +1 -1
  104. package/dist/tailwind/client.js +1 -1
  105. package/dist/tailwind/index.d.ts +1 -1
  106. package/dist/tailwind/index.js +1 -1
  107. package/dist/tasks/client.d.ts +1 -1
  108. package/dist/tasks/client.js +1 -1
  109. package/dist/tasks/index.d.ts +1 -1
  110. package/dist/tasks/index.js +3 -1
  111. package/dist/vite.d.ts +2 -15
  112. package/dist/vite.js +2 -60
  113. package/dist/voice/client.d.ts +1 -1
  114. package/dist/voice/client.js +1 -1
  115. package/dist/voice/index.d.ts +2 -52
  116. package/dist/voice/index.js +1 -84
  117. package/package.json +6 -9
  118. package/skills/deictic/SKILL.md +27 -42
  119. package/skills/deictic/references/recordings.md +9 -108
  120. package/skills/deictic/references/tasks.md +21 -112
  121. package/skills/deictic/references/watch.md +13 -68
  122. package/src/cli/board.ts +204 -0
  123. package/src/cli/bun.ts +133 -0
  124. package/src/cli/edit.ts +56 -0
  125. package/src/cli/find.ts +147 -0
  126. package/src/cli/frame.ts +90 -0
  127. package/src/cli/init.ts +388 -0
  128. package/src/cli/recording.ts +383 -0
  129. package/src/cli/task.ts +126 -0
  130. package/src/cli/transcribe.ts +129 -0
  131. package/src/cli/vb.ts +11 -0
  132. package/src/cli/voice.ts +59 -0
  133. package/src/cli/watch.ts +221 -0
  134. package/src/cli.ts +37 -0
  135. package/src/index.ts +5 -0
  136. package/src/plugins/logs/index.ts +1 -0
  137. package/src/plugins/network/index.ts +1 -0
  138. package/src/plugins/recordings/index.ts +1 -0
  139. package/src/plugins/screenshots/index.ts +5 -1
  140. package/src/plugins/tasks/index.ts +3 -2
  141. package/src/plugins/tasks/local.ts +19 -6
  142. package/src/plugins/tasks/watchers.ts +41 -6
  143. package/src/tools/endpoints.ts +3 -0
  144. package/src/tools/packages.ts +107 -0
  145. package/dist/annotations/index.d.ts.map +0 -1
  146. package/dist/annotations/index.js.map +0 -1
  147. package/dist/index.js.map +0 -1
  148. package/dist/logs/index.d.ts.map +0 -1
  149. package/dist/logs/index.js.map +0 -1
  150. package/dist/network/index.js.map +0 -1
  151. package/dist/recommended/index.js.map +0 -1
  152. package/dist/screenshots/index.js.map +0 -1
  153. package/dist/vite.d.ts.map +0 -1
  154. package/dist/vite.js.map +0 -1
  155. package/dist/voice/index.d.ts.map +0 -1
  156. package/skills/deictic/references/install.md +0 -103
  157. package/skills/deictic/scripts/frame.mjs +0 -62
  158. package/skills/deictic/scripts/lib.mjs +0 -283
  159. package/skills/deictic/scripts/recording.mjs +0 -266
  160. package/skills/deictic/scripts/task.mjs +0 -120
  161. package/skills/deictic/scripts/transcribe.mjs +0 -93
  162. package/skills/deictic/scripts/vb.mjs +0 -12
  163. package/skills/deictic/scripts/voice.mjs +0 -50
  164. package/skills/deictic/scripts/watch.mjs +0 -152
  165. /package/dist/{screenshots → shared}/client.js.map +0 -0
@@ -1,224 +1,18 @@
1
- import { Board } from "@vercel/board";
2
- import { w as Shortcut, y as Target } from "./index.js";
3
- import { t as Box } from "./index2.js";
4
- interface LocalOptions {
1
+ import { i as Recorded } from "./index4.js";
2
+ /** What of the console is kept: its methods, by name. */
3
+ type Level = 'assert' | 'count' | 'countReset' | 'debug' | 'dir' | 'dirxml' | 'error' | 'group' | 'groupCollapsed' | 'info' | 'log' | 'table' | 'time' | 'timeEnd' | 'timeLog' | 'trace' | 'warn';
4
+ interface LogsOptions {
5
5
  /**
6
- * The port it listens on, on 127.0.0.1. By default 4100, or a free one where that's taken. One named here is
7
- * the only one tried: taken, the board doesn't start.
6
+ * The console's methods kept, `['warn', 'error']` for the least: every one that says something by default. Errors
7
+ * nothing caught, and rejections nothing handled, come with `error`.
8
8
  */
9
- port?: number;
10
- /** Where its log is kept, from the project's root: `.deictic/board` by default. */
11
- dir?: string;
12
- /** `false` for no pages of the board's own (its inspector): the panel then links its tasks nowhere. */
13
- inspect?: boolean;
14
- /** More arguments for `vb serve`, as it takes them: `['--tailscale', 'box.tailnet.ts.net']`. */
15
- args?: string[];
9
+ levels?: Level[];
16
10
  }
17
- /** What `local()` answers, for the tasks plugin's `board` option. */
18
- interface LocalBoard {
19
- local: LocalOptions;
11
+ declare module 'deictic' {
12
+ interface ClientApis {
13
+ logs: Recorded;
14
+ }
20
15
  }
21
- /**
22
- * The project's own board on this machine, as the tasks plugin's `board`: what it uses anyway with no
23
- * `BOARD_URL`, here whatever the environment says, and with options.
24
- */
25
- declare const local: (options?: LocalOptions) => LocalBoard;
26
- /** What the plugin uses of a board: `board()` from `@vercel/board` is one. */
27
- type TaskBoard = Pick<Board, 'tasks' | 'thread' | 'discovery' | 'upload' | 'edit' | 'actors'>;
28
- interface TasksOptions {
29
- /**
30
- * The board, as `@vercel/board`'s `board()` answers it. By default the one `BOARD_URL` names, and with none,
31
- * one of the project's own on this machine: `vb serve`, started with the dev server and stopped with it, at
32
- * `http://127.0.0.1:4100/api/board` (or the port `.deictic/board.json` says, where that one's taken), its log
33
- * in `.deictic/board`. For your team's board, through `vercel login`, pass `board()`. `local()`, from here, is
34
- * that board of the project's own whatever `BOARD_URL` says, with its port, its folder and the rest as options.
35
- */
36
- board?: TaskBoard | LocalBoard;
37
- /** The channel tasks go to: `deictic` by default. */
38
- channel?: string;
39
- /**
40
- * The project the tasks are about, as the `deictic.project` label, to tell them apart on a board several
41
- * projects share: by default the `name` in the root's `package.json`, and no label where it has none.
42
- */
43
- project?: string;
44
- /** Labels every task gets besides deictic's own, for whoever works them to filter by (`vb tail --label`). None by default. */
45
- labels?: Record<string, string>;
46
- /**
47
- * Where the panel links the channel to, for a person to see its tasks, and with `task`, where it links
48
- * that task's ID to. By default the board's own pages when it's one `vb serve` runs on this machine
49
- * (`http://127.0.0.1:4100/c/deictic`, and `?thread=<id>` on it), and none for another board, whose pages
50
- * deictic can't know.
51
- */
52
- link?: (channel: string, task?: string) => string | undefined;
53
- /**
54
- * Whether a task has the element's HTML as it rendered attached, as `element.html`, masked as a screenshot is
55
- * (the screenshots plugin's masking, where it's loaded): what was on the page, for whoever can't open it as the
56
- * person did. True by default: the Task tab has a box for it, ticked, to untick for a task that should go
57
- * without. `false` takes the box away, where a page shows what the board shouldn't hold.
58
- */
59
- html?: boolean;
60
- /** What opens its tab directly, beside deictic's own shortcut, which opens any: none by default. */
61
- shortcut?: Shortcut;
62
- }
63
- interface Task {
64
- id: string;
65
- /** The first line of what was typed. */
66
- title: string;
67
- /** What was typed, whole: what an edit changes. */
68
- text: string;
69
- state: string;
70
- /** Who holds its claim, by name (`claude`), while it's claimed. A board keeps no one for a task's end. */
71
- by?: string;
72
- /** Whether it can still be edited or deleted: no one has claimed it. */
73
- open: boolean;
74
- /** Its page on the board, when there's one to link to. */
75
- link?: string;
76
- /**
77
- * Where it was added, where that isn't the element's place: for one of `tasks`, where the element was before
78
- * it moved; for one of `elsewhere`, the element it's about.
79
- */
80
- at?: Place;
81
- }
82
- /** A place in the element's file: a line and a column, from 1, and the tag there as the task saw it. */
83
- interface Place {
84
- line: number;
85
- column: number;
86
- tag: string;
87
- }
88
- interface Model {
89
- channel: string;
90
- /** The channel's page, when there's one to link to. */
91
- link?: string;
92
- /** Tasks about this element, oldest first, canceled ones left out: also those added before it moved. */
93
- tasks: Task[];
94
- /** Tasks about the file's other elements, by line, canceled ones left out: each with its `at`. */
95
- elsewhere: Task[];
96
- /**
97
- * Who watches the channel, by name (`claude`): the agents whose watch (the skill's `watch.mjs`) is running in
98
- * this project, as a board can't say, and those holding a claim on one of the channel's tasks, which it can.
99
- * Empty where none is and the board is this machine's own;
100
- * left out where none is and the board is another, which an agent may watch from elsewhere.
101
- */
102
- watching?: string[];
103
- }
104
- /**
105
- * What the Task tab asks for: a new task (an `Op`), other words for one it lists (`edit` is its ID), or
106
- * that one deleted (`remove` is its ID), which cancels it on the board.
107
- */
108
- type Change = Op | {
109
- edit: string;
110
- text: string;
111
- } | {
112
- remove: string;
113
- };
114
- /** A new task: what the page knows and the source doesn't. */
115
- interface Op {
116
- text: string;
117
- /** The page's URL. */
118
- page: string;
119
- viewport: {
120
- width: number;
121
- height: number;
122
- };
123
- /**
124
- * What was under the pointer inside the element, where nothing marked it (a dependency's markup, or a
125
- * shadow root's): its path from the element, and its HTML, cut short.
126
- */
127
- pointed?: {
128
- path: string;
129
- html: string;
130
- };
131
- /** How many elements on the page come from the same place in the source. */
132
- count: number;
133
- /**
134
- * The source it rendered through, after its own place, nearest first: where the one before it is used. With
135
- * React in development, the components that wrote it, `Field (src/Field.tsx:20)` or a name alone; without, the
136
- * files around it, each a `file:line`. A shared component's line says nothing of which use of it this is, and
137
- * these do.
138
- */
139
- chain?: string[];
140
- /** The element's HTML as it rendered, to attach: cut short, and masked where the screenshots plugin is loaded. */
141
- html?: string;
142
- /**
143
- * Shots the screenshots plugin took of it, to attach, where that plugin is loaded: each with where the
144
- * element is in it, whether it's `outlined` there (dashes drawn around it, in the PNG), and the marks drawn
145
- * on it in the panel, where there are any.
146
- */
147
- screenshots?: {
148
- id: string;
149
- box: Box;
150
- outlined?: boolean;
151
- marks?: Marks;
152
- }[];
153
- /**
154
- * Recordings the recordings plugin made, to attach, where that plugin is loaded: how long each ran,
155
- * where it plays back, and the voice plugin's clips of the mic in it, attached too.
156
- */
157
- recordings?: {
158
- id: string;
159
- duration: number;
160
- replay: string;
161
- voice?: string[];
162
- }[];
163
- /** Voice notes the voice plugin kept, to attach, where that plugin is loaded, and how long each runs. */
164
- voice?: {
165
- id: string;
166
- duration: number;
167
- }[];
168
- /** The page's annotations, where that plugin is loaded and there are any: how many, and their notes' text. */
169
- annotations?: Marks;
170
- }
171
- /**
172
- * A task the Task tab just added, as the page hears of it: the `detail` of a `deictic:task` event on `window`, for a
173
- * page that shows its own tasks (deictic's playground lists them as a board does).
174
- */
175
- interface TaskAdded {
176
- id: string;
177
- /** The first line of what was typed. */
178
- title: string;
179
- state: string;
180
- channel: string;
181
- /** The element: its file, line and column, and its tag. */
182
- target: Target;
183
- /** The page's URL. */
184
- page: string;
185
- /** How many of each were attached; `marks` counts those drawn on shots and on the page. */
186
- attached: {
187
- screenshots: number;
188
- recordings: number;
189
- voice: number;
190
- marks: number;
191
- };
192
- }
193
- /** Marks, as a task tells of them: how many, and what the notes among them say. */
194
- interface Marks {
195
- count: number;
196
- notes: string[];
197
- }
198
- interface Added {
199
- channel: string;
200
- id: string;
201
- text: string;
202
- labels: Record<string, string>;
203
- /** What's attached, by the board's IDs: kept, so a redo attaches the same without uploading it again. */
204
- attachments?: string[];
205
- }
206
- /** A task's words changed: its message's whole text before and after. */
207
- interface Edited {
208
- kind: 'edited';
209
- id: string;
210
- before: string;
211
- after: string;
212
- }
213
- /**
214
- * A task deleted in the panel: canceled on the board, for good, as a board has it. So it's kept whole, and
215
- * an undo adds it again, as a new task whose ID the record then has.
216
- */
217
- interface Removed extends Added {
218
- kind: 'removed';
219
- }
220
- /** What the history keeps of a change: a task added has no `kind`, as it had none before there were others. */
221
- type Kept = Added | Edited | Removed;
222
- declare function tasks(options?: TasksOptions): import("deictic").ServerPlugin<Model, Change, Kept, unknown>;
223
- export { local as _, Marks as a, Place as c, TaskAdded as d, TaskBoard as f, LocalOptions as g, LocalBoard as h, Kept as i, Removed as l, tasks as m, Change as n, Model as o, TasksOptions as p, Edited as r, Op as s, Added as t, Task as u };
16
+ declare function logs(options?: LogsOptions): import("deictic").ServerPlugin<never, never, unknown, unknown>;
17
+ export { LogsOptions as n, logs as r, Level as t };
224
18
  //# sourceMappingURL=index5.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index5.d.ts","names":[],"sources":["../../src/plugins/tasks/local.ts","../../src/plugins/tasks/index.ts"],"mappings":";;;UAkBiB;;;;;EAKf;;EAEA;;EAEA;;EAEA;;;UAIe;EACf,OAAO;;;;;;cAOI,QAAK,UAAa,iBAAoB;;KCTvC,YAAY,KAAK;UAEZ;;;;;;;;EAQf,QAAQ,YAAY;;EAEpB;;;;;EAKA;;EAEA,SAAS;;;;;;;EAOT,QAAQ,iBAAiB;;;;;;;EAOzB;;EAEA,WAAW;;UAGI;EACf;;EAEA;;EAEA;EACA;;EAEA;;EAEA;;EAEA;;;;;EAKA,KAAK;;;UAIU;EACf;EACA;EACA;;UAGe;EACf;;EAEA;;EAEA,OAAO;;EAEP,WAAW;;;;;;;EAOX;;;;;;KAOU,SAAS;EAAO;EAAc;;EAAmB;;;UAG5C;EACf;;EAEA;EACA;IAAY;IAAe;;;;;;EAK3B;IAAY;IAAc;;;EAE1B;;;;;;;EAOA;;EAEA;;;;;;EAMA;IAAgB;IAAY,KAAK;IAAK;IAAoB,QAAQ;;;;;;EAKlE;IAAe;IAAY;IAAkB;IAAgB;;;EAE7D;IAAU;IAAY;;;EAEtB,cAAc;;;;;;UAOC;EACf;;EAEA;EACA;EACA;;EAEA,QAAQ;;EAER;;EAEA;IAAY;IAAqB;IAAoB;IAAe;;;;UAIrD;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA,QAAQ;;EAER;;;UAIe;EACf;EACA;EACA;EACA;;;;;;UAOe,gBAAgB;EAC/B;;;KAIU,OAAO,QAAQ,SAAS;iBAQpB,MAAM,UAAS,iCAAiB,aAAA,OAAA,QAAA"}
1
+ {"version":3,"file":"index5.d.ts","names":[],"sources":["../../src/plugins/logs/index.ts"],"mappings":";;KAaY;UAmBK;;;;;EAKf,SAAS;;;YAIC;IACR,MAAM;;;iBAIM,KAAK,UAAS,gCAAgB"}
@@ -1,70 +1,64 @@
1
- import { w as Shortcut } from "./index.js";
2
- /** A class as the panel shows it. */
3
- interface ClassInfo {
1
+ import { i as Recorded } from "./index4.js";
2
+ /**
3
+ * What a request is kept as: with what it carries that's a secret blanked, wherever a name says so. The
4
+ * names are all there is to go by, so a secret under a name that says nothing (a token in a path, a password in
5
+ * prose) isn't found: bodies and headers are kept only where asked for, and `ignore` leaves a request out whole.
6
+ */
7
+ /** A request as rrweb's network plugin has it: all this reads of one, and changes. */
8
+ interface Request {
4
9
  name: string;
5
- /** Whether Tailwind makes anything of it: a class of the project's own isn't known. */
6
- known: boolean;
7
- /** The colour it sets, as CSS. */
8
- color?: string;
9
- /** What it sets its main property to, theme values resolved: `0.875rem`. */
10
- value?: string;
11
- /** A variant to go on typing after (`hover:`), not a class. */
12
- variant?: true;
10
+ requestHeaders?: Record<string, string>;
11
+ responseHeaders?: Record<string, string>;
12
+ requestBody?: string | null;
13
+ responseBody?: string | null;
13
14
  }
14
- /** The classes of one kind, and how to write one with a value of the user's own. */
15
- interface Alternatives {
16
- /** The property the kind sets: `font-size`. */
17
- label: string;
18
- /** Whether the kind is a colour's, shown as swatches. */
19
- colors: boolean;
20
- items: ClassInfo[];
21
- /** A custom value goes between these: `md:text-[` and `]`. None for a kind that takes no value (`flex`). */
22
- custom?: {
23
- before: string;
24
- after: string;
25
- value?: string;
26
- };
15
+ interface Masking {
16
+ /** More names whose values are blanked, as these are: a part of the name, in any case. */
17
+ mask: string[];
18
+ /** Requests left out: a part of the URL. */
19
+ ignore: string[];
27
20
  }
28
- interface TailwindOptions {
29
- /** Calls whose first argument is a class list: `cn`, `clsx`, `cx`, `twMerge`, `classNames` by default. */
30
- helpers?: string[];
31
- /** The attribute an element without one gets: `className`, or `class` for Solid and Preact. */
32
- attribute?: 'className' | 'class';
21
+ /** What a blanked value reads as. */
22
+ declare const MASKED = "***";
23
+ declare const sensitive: (name: string, more?: readonly string[]) => boolean;
24
+ /** The URL without a name and password before its host, and with its secrets blanked: the query's, and a fragment's that reads as one. */
25
+ declare function maskUrl(url: string, more?: readonly string[]): string;
26
+ declare function maskHeaders(headers: Record<string, string>, more?: readonly string[]): Record<string, string>;
27
+ /** A body with its secrets blanked where it's JSON or a form's fields, cut where it's long: other text has no names to go by. */
28
+ declare function maskBody(body: string, more?: readonly string[]): string;
29
+ /** The request as it's kept, or nothing for one left out. */
30
+ declare function maskRequest<R extends Request>(request: R, { mask, ignore }: Masking): R | undefined;
31
+ interface NetworkOptions {
33
32
  /**
34
- * The stylesheet that imports Tailwind and holds the theme, from the project's root: `src/index.css`. What
35
- * the panel completes and shows comes from it. Tailwind's default theme without one.
33
+ * What made the requests kept, as the browser names it (a resource's `initiatorType`): `['fetch',
34
+ * 'xmlhttprequest']` by default, the page's own calls. `'img'`, `'script'`, `'css'` and the like add what it loads.
36
35
  */
37
- css?: string;
38
- /** What opens its tab directly, beside deictic's own shortcut, which opens any: none by default. */
39
- shortcut?: Shortcut;
36
+ initiators?: string[];
37
+ /** Keeps each request's and response's headers, the secret ones blanked (`Authorization`, `Cookie`, …): not by default. */
38
+ headers?: boolean;
39
+ /**
40
+ * Keeps each request's and response's body, cut at 10,000 characters, secrets blanked by name where it's JSON or a
41
+ * form's fields: not by default. `true` is JSON, text and forms; a list names the content types, by a part of each.
42
+ */
43
+ body?: boolean | string[];
44
+ /** More names whose values are blanked, in a query, a header or a body: a part of the name, in any case (`['email']`). */
45
+ mask?: string[];
46
+ /** Requests left out whole: a part of the URL (`['/analytics', 'sentry.io']`). */
47
+ ignore?: string[];
40
48
  }
41
- type Model = {
42
- editable: true;
43
- classes: string;
44
- /** The helper's other arguments, which add classes at runtime, each read as far as the source says. */
45
- others?: Extra[];
46
- } | {
47
- editable: false;
48
- source: string;
49
- };
50
- /** Classes a helper's argument adds: `active && 'ring'` is `ring` when `active`. */
51
- interface Extra {
52
- /** The argument, or the part of it these classes come from, as written. */
53
- source: string;
54
- /** The classes, where the source spells them out: there, or in a `const` of the file it names. */
55
- classes?: string;
56
- /** What must hold for them to be added, as written: `active === 'h3'`. None where they always are. */
57
- when?: string;
58
- /** Set where the classes are a string in this file, which an op with `at` can write. */
59
- editable?: true;
60
- /** The `const` the string is in, where it isn't the argument itself: other elements may use it too. */
61
- shared?: string;
49
+ /** The options as the page half gets them. */
50
+ interface Resolved {
51
+ initiators: string[];
52
+ headers: boolean;
53
+ body: false | string[];
54
+ mask: string[];
55
+ ignore: string[];
62
56
  }
63
- interface Op {
64
- classes: string;
65
- /** Which of the model's `others` the classes are for, by its place there. The element's own list without. */
66
- at?: number;
57
+ declare module 'deictic' {
58
+ interface ClientApis {
59
+ network: Recorded;
60
+ }
67
61
  }
68
- declare function tailwind(options?: TailwindOptions): import("deictic").ServerPlugin<Model, Op, unknown, unknown>;
69
- export { tailwind as a, TailwindOptions as i, Model as n, Alternatives as o, Op as r, ClassInfo as s, Extra as t };
62
+ declare function network(options?: NetworkOptions): import("deictic").ServerPlugin<never, never, unknown, unknown>;
63
+ export { maskBody as a, maskUrl as c, MASKED as i, sensitive as l, Resolved as n, maskHeaders as o, network as r, maskRequest as s, NetworkOptions as t };
70
64
  //# sourceMappingURL=index6.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index6.d.ts","names":[],"sources":["../../src/plugins/tailwind/catalog.ts","../../src/plugins/tailwind/index.ts"],"mappings":";;UAeiB;EACf;;EAEA;;EAEA;;EAEA;;EAEA;;;UAIe;;EAEf;;EAEA;EACA,OAAO;;EAEP;IAAW;IAAgB;IAAe;;;UCf3B;;EAEf;;EAEA;;;;;EAKA;;EAEA,WAAW;;KAGD;EAEN;EACA;;EAEA,SAAS;;EAET;EAAiB;;;UAGN;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe;EACf;;EAEA;;iBASc,SAAS,UAAS,oCAAoB,aAAA,OAAA"}
1
+ {"version":3,"file":"index6.d.ts","names":[],"sources":["../../src/plugins/network/mask.ts","../../src/plugins/network/index.ts"],"mappings":";;;;;;;UAOiB;EACf;EACA,iBAAiB;EACjB,kBAAkB;EAClB;EACA;;UAGe;;EAEf;;EAEA;;;cAIW;cA+BA,YAAS,cAAgB;;iBAgBtB,QAAQ,aAAa;iBAsBrB,YAAY,SAAS,wBAAwB,2BAA+B;;iBAW5E,SAAS,cAAc;;iBAmBvB,YAAY,UAAU,SAAS,SAAS,KAAK,MAAM,UAAU,UAAU;UCzGtE;;;;;EAKf;;EAEA;;;;;EAKA;;EAEA;;EAEA;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;YAIU;IACR,SAAS;;;iBAOG,QAAQ,UAAS,mCAAmB"}
@@ -0,0 +1,224 @@
1
+ import { Board } from "@vercel/board";
2
+ import { w as Shortcut, y as Target } from "./index.js";
3
+ import { t as Box } from "./index3.js";
4
+ interface LocalOptions {
5
+ /**
6
+ * The port it listens on, on 127.0.0.1. By default 4100, or a free one where that's taken. One named here is
7
+ * the only one tried: taken, the board doesn't start.
8
+ */
9
+ port?: number;
10
+ /** Where its log is kept, from the project's root: `.deictic/board` by default. */
11
+ dir?: string;
12
+ /** `false` for no pages of the board's own (its inspector): the panel then links its tasks nowhere. */
13
+ inspect?: boolean;
14
+ /** More arguments for `vb serve`, as it takes them: `['--tailscale', 'box.tailnet.ts.net']`. */
15
+ args?: string[];
16
+ }
17
+ /** What `local()` answers, for the tasks plugin's `board` option. */
18
+ interface LocalBoard {
19
+ local: LocalOptions;
20
+ }
21
+ /**
22
+ * The project's own board on this machine, as the tasks plugin's `board`: what it uses anyway with no
23
+ * `BOARD_URL`, here whatever the environment says, and with options.
24
+ */
25
+ declare const local: (options?: LocalOptions) => LocalBoard;
26
+ /** What the plugin uses of a board: `board()` from `@vercel/board` is one. */
27
+ type TaskBoard = Pick<Board, 'tasks' | 'thread' | 'discovery' | 'upload' | 'edit' | 'actors'>;
28
+ interface TasksOptions {
29
+ /**
30
+ * The board, as `@vercel/board`'s `board()` answers it. By default the one `BOARD_URL` names, and with none,
31
+ * one of the project's own on this machine: `vb serve`, started with the dev server and stopped with it, at
32
+ * `http://127.0.0.1:4100/api/board` (or the port `.deictic/board.json` says, where that one's taken), its log
33
+ * in `.deictic/board`. For your team's board, through `vercel login`, pass `board()`. `local()`, from here, is
34
+ * that board of the project's own whatever `BOARD_URL` says, with its port, its folder and the rest as options.
35
+ */
36
+ board?: TaskBoard | LocalBoard;
37
+ /** The channel tasks go to: `deictic` by default. */
38
+ channel?: string;
39
+ /**
40
+ * The project the tasks are about, as the `deictic.project` label, to tell them apart on a board several
41
+ * projects share: by default the `name` in the root's `package.json`, and no label where it has none.
42
+ */
43
+ project?: string;
44
+ /** Labels every task gets besides deictic's own, for whoever works them to filter by (`vb tail --label`). None by default. */
45
+ labels?: Record<string, string>;
46
+ /**
47
+ * Where the panel links the channel to, for a person to see its tasks, and with `task`, where it links
48
+ * that task's ID to. By default the board's own pages when it's one `vb serve` runs on this machine
49
+ * (`http://127.0.0.1:4100/c/deictic`, and `?thread=<id>` on it), and none for another board, whose pages
50
+ * deictic can't know.
51
+ */
52
+ link?: (channel: string, task?: string) => string | undefined;
53
+ /**
54
+ * Whether a task has the element's HTML as it rendered attached, as `element.html`, masked as a screenshot is
55
+ * (the screenshots plugin's masking, where it's loaded): what was on the page, for whoever can't open it as the
56
+ * person did. True by default: the Task tab has a box for it, ticked, to untick for a task that should go
57
+ * without. `false` takes the box away, where a page shows what the board shouldn't hold.
58
+ */
59
+ html?: boolean;
60
+ /** What opens its tab directly, beside deictic's own shortcut, which opens any: none by default. */
61
+ shortcut?: Shortcut;
62
+ }
63
+ interface Task {
64
+ id: string;
65
+ /** The first line of what was typed. */
66
+ title: string;
67
+ /** What was typed, whole: what an edit changes. */
68
+ text: string;
69
+ state: string;
70
+ /** Who holds its claim, by name (`claude`), while it's claimed. A board keeps no one for a task's end. */
71
+ by?: string;
72
+ /** Whether it can still be edited or deleted: no one has claimed it. */
73
+ open: boolean;
74
+ /** Its page on the board, when there's one to link to. */
75
+ link?: string;
76
+ /**
77
+ * Where it was added, where that isn't the element's place: for one of `tasks`, where the element was before
78
+ * it moved; for one of `elsewhere`, the element it's about.
79
+ */
80
+ at?: Place;
81
+ }
82
+ /** A place in the element's file: a line and a column, from 1, and the tag there as the task saw it. */
83
+ interface Place {
84
+ line: number;
85
+ column: number;
86
+ tag: string;
87
+ }
88
+ interface Model {
89
+ channel: string;
90
+ /** The channel's page, when there's one to link to. */
91
+ link?: string;
92
+ /** Tasks about this element, oldest first, canceled ones left out: also those added before it moved. */
93
+ tasks: Task[];
94
+ /** Tasks about the file's other elements, by line, canceled ones left out: each with its `at`. */
95
+ elsewhere: Task[];
96
+ /**
97
+ * Who watches the channel, by name (`claude`): the agents whose watch (`deictic watch`) is running in
98
+ * this project, as a board can't say, and those holding a claim on one of the channel's tasks, which it can.
99
+ * Empty where none is and the board is this machine's own;
100
+ * left out where none is and the board is another, which an agent may watch from elsewhere.
101
+ */
102
+ watching?: string[];
103
+ }
104
+ /**
105
+ * What the Task tab asks for: a new task (an `Op`), other words for one it lists (`edit` is its ID), or
106
+ * that one deleted (`remove` is its ID), which cancels it on the board.
107
+ */
108
+ type Change = Op | {
109
+ edit: string;
110
+ text: string;
111
+ } | {
112
+ remove: string;
113
+ };
114
+ /** A new task: what the page knows and the source doesn't. */
115
+ interface Op {
116
+ text: string;
117
+ /** The page's URL. */
118
+ page: string;
119
+ viewport: {
120
+ width: number;
121
+ height: number;
122
+ };
123
+ /**
124
+ * What was under the pointer inside the element, where nothing marked it (a dependency's markup, or a
125
+ * shadow root's): its path from the element, and its HTML, cut short.
126
+ */
127
+ pointed?: {
128
+ path: string;
129
+ html: string;
130
+ };
131
+ /** How many elements on the page come from the same place in the source. */
132
+ count: number;
133
+ /**
134
+ * The source it rendered through, after its own place, nearest first: where the one before it is used. With
135
+ * React in development, the components that wrote it, `Field (src/Field.tsx:20)` or a name alone; without, the
136
+ * files around it, each a `file:line`. A shared component's line says nothing of which use of it this is, and
137
+ * these do.
138
+ */
139
+ chain?: string[];
140
+ /** The element's HTML as it rendered, to attach: cut short, and masked where the screenshots plugin is loaded. */
141
+ html?: string;
142
+ /**
143
+ * Shots the screenshots plugin took of it, to attach, where that plugin is loaded: each with where the
144
+ * element is in it, whether it's `outlined` there (dashes drawn around it, in the PNG), and the marks drawn
145
+ * on it in the panel, where there are any.
146
+ */
147
+ screenshots?: {
148
+ id: string;
149
+ box: Box;
150
+ outlined?: boolean;
151
+ marks?: Marks;
152
+ }[];
153
+ /**
154
+ * Recordings the recordings plugin made, to attach, where that plugin is loaded: how long each ran,
155
+ * where it plays back, and the voice plugin's clips of the mic in it, attached too.
156
+ */
157
+ recordings?: {
158
+ id: string;
159
+ duration: number;
160
+ replay: string;
161
+ voice?: string[];
162
+ }[];
163
+ /** Voice notes the voice plugin kept, to attach, where that plugin is loaded, and how long each runs. */
164
+ voice?: {
165
+ id: string;
166
+ duration: number;
167
+ }[];
168
+ /** The page's annotations, where that plugin is loaded and there are any: how many, and their notes' text. */
169
+ annotations?: Marks;
170
+ }
171
+ /**
172
+ * A task the Task tab just added, as the page hears of it: the `detail` of a `deictic:task` event on `window`, for a
173
+ * page that shows its own tasks (deictic's playground lists them as a board does).
174
+ */
175
+ interface TaskAdded {
176
+ id: string;
177
+ /** The first line of what was typed. */
178
+ title: string;
179
+ state: string;
180
+ channel: string;
181
+ /** The element: its file, line and column, and its tag. */
182
+ target: Target;
183
+ /** The page's URL. */
184
+ page: string;
185
+ /** How many of each were attached; `marks` counts those drawn on shots and on the page. */
186
+ attached: {
187
+ screenshots: number;
188
+ recordings: number;
189
+ voice: number;
190
+ marks: number;
191
+ };
192
+ }
193
+ /** Marks, as a task tells of them: how many, and what the notes among them say. */
194
+ interface Marks {
195
+ count: number;
196
+ notes: string[];
197
+ }
198
+ interface Added {
199
+ channel: string;
200
+ id: string;
201
+ text: string;
202
+ labels: Record<string, string>;
203
+ /** What's attached, by the board's IDs: kept, so a redo attaches the same without uploading it again. */
204
+ attachments?: string[];
205
+ }
206
+ /** A task's words changed: its message's whole text before and after. */
207
+ interface Edited {
208
+ kind: 'edited';
209
+ id: string;
210
+ before: string;
211
+ after: string;
212
+ }
213
+ /**
214
+ * A task deleted in the panel: canceled on the board, for good, as a board has it. So it's kept whole, and
215
+ * an undo adds it again, as a new task whose ID the record then has.
216
+ */
217
+ interface Removed extends Added {
218
+ kind: 'removed';
219
+ }
220
+ /** What the history keeps of a change: a task added has no `kind`, as it had none before there were others. */
221
+ type Kept = Added | Edited | Removed;
222
+ declare function tasks(options?: TasksOptions): import("deictic").ServerPlugin<Model, Change, Kept, unknown>;
223
+ export { local as _, Marks as a, Place as c, TaskAdded as d, TaskBoard as f, LocalOptions as g, LocalBoard as h, Kept as i, Removed as l, tasks as m, Change as n, Model as o, TasksOptions as p, Edited as r, Op as s, Added as t, Task as u };
224
+ //# sourceMappingURL=index7.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index7.d.ts","names":[],"sources":["../../src/plugins/tasks/local.ts","../../src/plugins/tasks/index.ts"],"mappings":";;;UAkBiB;;;;;EAKf;;EAEA;;EAEA;;EAEA;;;UAIe;EACf,OAAO;;;;;;cAOI,QAAK,UAAa,iBAAoB;;KCTvC,YAAY,KAAK;UAEZ;;;;;;;;EAQf,QAAQ,YAAY;;EAEpB;;;;;EAKA;;EAEA,SAAS;;;;;;;EAOT,QAAQ,iBAAiB;;;;;;;EAOzB;;EAEA,WAAW;;UAGI;EACf;;EAEA;;EAEA;EACA;;EAEA;;EAEA;;EAEA;;;;;EAKA,KAAK;;;UAIU;EACf;EACA;EACA;;UAGe;EACf;;EAEA;;EAEA,OAAO;;EAEP,WAAW;;;;;;;EAOX;;;;;;KAOU,SAAS;EAAO;EAAc;;EAAmB;;;UAG5C;EACf;;EAEA;EACA;IAAY;IAAe;;;;;;EAK3B;IAAY;IAAc;;;EAE1B;;;;;;;EAOA;;EAEA;;;;;;EAMA;IAAgB;IAAY,KAAK;IAAK;IAAoB,QAAQ;;;;;;EAKlE;IAAe;IAAY;IAAkB;IAAgB;;;EAE7D;IAAU;IAAY;;;EAEtB,cAAc;;;;;;UAOC;EACf;;EAEA;EACA;EACA;;EAEA,QAAQ;;EAER;;EAEA;IAAY;IAAqB;IAAoB;IAAe;;;;UAIrD;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA,QAAQ;;EAER;;;UAIe;EACf;EACA;EACA;EACA;;;;;;UAOe,gBAAgB;EAC/B;;;KAIU,OAAO,QAAQ,SAAS;iBAQpB,MAAM,UAAS,iCAAiB,aAAA,OAAA,QAAA"}
@@ -0,0 +1,52 @@
1
+ /** A clip as the page knows it: its ID, where it plays from, how long it runs in milliseconds, and its type. */
2
+ interface Clip {
3
+ id: string;
4
+ url: string;
5
+ duration: number;
6
+ type: string;
7
+ }
8
+ /** A take going on: `stop` ends it and answers its clip, `cancel` ends it with none (what was sent of it goes as the oldest clips do). */
9
+ interface Take {
10
+ /** When it started, as `Date.now()`. */
11
+ started: number;
12
+ /** The mic, while it's recorded: to show it's heard (`liveWaveform` from `deictic/client`). */
13
+ stream: MediaStream;
14
+ /**
15
+ * What's kept of it by now, as the clip it would be if it ended here, or nothing before its first second is:
16
+ * for a page that's going, with no time left to `stop` it.
17
+ */
18
+ soFar(): Pick<Clip, 'id' | 'duration'> | undefined;
19
+ stop(): Promise<Clip>;
20
+ cancel(): void;
21
+ }
22
+ /** The page's half, for other plugins' page halves. */
23
+ interface Voice {
24
+ /** Starts recording the mic, asking for it the first time: rejects when it's refused or there's none. */
25
+ start(): Promise<Take>;
26
+ }
27
+ /** The server's half, for other plugins' server halves. */
28
+ interface Clips {
29
+ /** A clip's audio, or nothing for one not kept (any more). */
30
+ read(id: string): {
31
+ data: Uint8Array<ArrayBuffer>;
32
+ name: string;
33
+ type: string;
34
+ } | undefined;
35
+ }
36
+ declare module 'deictic' {
37
+ interface ServerApis {
38
+ voice: Clips;
39
+ }
40
+ interface ClientApis {
41
+ voice: Voice;
42
+ }
43
+ }
44
+ interface VoiceOptions {
45
+ /** How many clips to keep, the latest: 50 by default. */
46
+ keep?: number;
47
+ /** Where they're kept, from the project's root: `.deictic/voice` by default. */
48
+ dir?: string;
49
+ }
50
+ declare function voice(options?: VoiceOptions): import("deictic").ServerPlugin<never, never, never, Clips>;
51
+ export { VoiceOptions as a, Voice as i, Clips as n, voice as o, Take as r, Clip as t };
52
+ //# sourceMappingURL=index8.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index8.d.ts","names":[],"sources":["../../src/plugins/voice/index.ts"],"mappings":";UAciB;EACf;EACA;EACA;EACA;;;UAIe;;EAEf;;EAEA,QAAQ;;;;;EAKR,SAAS,KAAK;EACd,QAAQ,QAAQ;EAChB;;;UAIe;;EAEf,SAAS,QAAQ;;;UAIF;;EAEf,KAAK;IAAe,MAAM,WAAW;IAAc;IAAc;;;;YAIvD;IACR,OAAO;;YAEC;IACR,OAAO;;;UAIM;;EAEf;;EAEA;;iBASc,MAAM,UAAS,iCAAiB,kCAAA"}