@opendatalabs/connect 0.8.1-canary.9987f1d → 0.8.1-canary.9dbbab4

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 (55) hide show
  1. package/README.md +212 -0
  2. package/dist/cli/bin.js +8 -0
  3. package/dist/cli/bin.js.map +1 -1
  4. package/dist/cli/index.d.ts.map +1 -1
  5. package/dist/cli/index.js +2266 -143
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/cli/main.d.ts.map +1 -1
  8. package/dist/cli/main.js +8 -0
  9. package/dist/cli/main.js.map +1 -1
  10. package/dist/cli/render/capabilities.d.ts +9 -0
  11. package/dist/cli/render/capabilities.d.ts.map +1 -0
  12. package/dist/cli/render/capabilities.js +24 -0
  13. package/dist/cli/render/capabilities.js.map +1 -0
  14. package/dist/cli/render/format.d.ts +22 -0
  15. package/dist/cli/render/format.d.ts.map +1 -0
  16. package/dist/cli/render/format.js +77 -0
  17. package/dist/cli/render/format.js.map +1 -0
  18. package/dist/cli/render/index.d.ts +6 -0
  19. package/dist/cli/render/index.d.ts.map +1 -0
  20. package/dist/cli/render/index.js +6 -0
  21. package/dist/cli/render/index.js.map +1 -0
  22. package/dist/cli/render/progress.d.ts +11 -0
  23. package/dist/cli/render/progress.d.ts.map +1 -0
  24. package/dist/cli/render/progress.js +56 -0
  25. package/dist/cli/render/progress.js.map +1 -0
  26. package/dist/cli/render/symbols.d.ts +11 -0
  27. package/dist/cli/render/symbols.d.ts.map +1 -0
  28. package/dist/cli/render/symbols.js +21 -0
  29. package/dist/cli/render/symbols.js.map +1 -0
  30. package/dist/cli/render/theme.d.ts +15 -0
  31. package/dist/cli/render/theme.d.ts.map +1 -0
  32. package/dist/cli/render/theme.js +41 -0
  33. package/dist/cli/render/theme.js.map +1 -0
  34. package/dist/core/cli-types.d.ts +475 -1
  35. package/dist/core/cli-types.d.ts.map +1 -1
  36. package/dist/core/cli-types.js +222 -1
  37. package/dist/core/cli-types.js.map +1 -1
  38. package/dist/core/state-store.d.ts +6 -0
  39. package/dist/core/state-store.d.ts.map +1 -1
  40. package/dist/core/state-store.js +68 -4
  41. package/dist/core/state-store.js.map +1 -1
  42. package/dist/runtime/core/contracts.d.ts +15 -1
  43. package/dist/runtime/core/contracts.d.ts.map +1 -1
  44. package/dist/runtime/managed-playwright.d.ts +5 -0
  45. package/dist/runtime/managed-playwright.d.ts.map +1 -1
  46. package/dist/runtime/managed-playwright.js +69 -10
  47. package/dist/runtime/managed-playwright.js.map +1 -1
  48. package/dist/runtime/playwright/browser.d.ts +1 -0
  49. package/dist/runtime/playwright/browser.d.ts.map +1 -1
  50. package/dist/runtime/playwright/browser.js +14 -4
  51. package/dist/runtime/playwright/browser.js.map +1 -1
  52. package/dist/runtime/playwright/in-process-run.d.ts.map +1 -1
  53. package/dist/runtime/playwright/in-process-run.js +52 -10
  54. package/dist/runtime/playwright/in-process-run.js.map +1 -1
  55. package/package.json +12 -1
package/README.md CHANGED
@@ -2,6 +2,70 @@
2
2
 
3
3
  Let your users bring their own data to your app.
4
4
 
5
+ ## CLI preview
6
+
7
+ This branch also carries the new `vana` collection CLI preview.
8
+
9
+ For the dedicated CLI README, use [docs/CLI-README.md](./docs/CLI-README.md).
10
+
11
+ - install the current canary on macOS with Homebrew:
12
+
13
+ ```bash
14
+ brew tap vana-com/vana
15
+ brew install vana
16
+ vana status
17
+ ```
18
+
19
+ - or use the hosted prerelease installer on macOS/Linux:
20
+
21
+ ```bash
22
+ curl -fsSL https://raw.githubusercontent.com/vana-com/vana-connect/feat/connect-cli-v1/install/install.sh | sh -s -- --version canary-feat-connect-cli-v1
23
+ ```
24
+
25
+ - branch release page:
26
+ `https://github.com/vana-com/vana-connect/releases/tag/canary-feat-connect-cli-v1`
27
+ - demo media:
28
+ [`status-and-sources.gif`](https://github.com/vana-com/vana-connect/releases/download/canary-feat-connect-cli-v1/status-and-sources.gif),
29
+ [`data-inspection.gif`](https://github.com/vana-com/vana-connect/releases/download/canary-feat-connect-cli-v1/data-inspection.gif),
30
+ [`connect-success.gif`](https://github.com/vana-com/vana-connect/releases/download/canary-feat-connect-cli-v1/connect-success.gif)
31
+ (`connect github`, then inspect the collected GitHub data)
32
+
33
+ Once installed, the best way to evaluate the CLI quickly is:
34
+
35
+ ```bash
36
+ vana --version
37
+ vana doctor
38
+ vana status
39
+ vana sources
40
+ vana connect github
41
+ vana data list
42
+ vana data show github
43
+ vana logs github
44
+ ```
45
+
46
+ Current reviewable transcripts:
47
+
48
+ - [CLI review surface](./docs/CLI-REVIEW-SURFACE.md)
49
+
50
+ - [`status`](./docs/transcripts/status.txt)
51
+ - [`doctor`](./docs/transcripts/doctor.txt)
52
+ - [`logs`](./docs/transcripts/logs.txt)
53
+ - [`setup`](./docs/transcripts/setup.txt)
54
+ - [`sources`](./docs/transcripts/sources.txt)
55
+ - [`data list`](./docs/transcripts/data-list.txt)
56
+ - [`data help`](./docs/transcripts/data-help.txt)
57
+ - [`data list (empty)`](./docs/transcripts/data-list-empty.txt)
58
+ - [`data show github`](./docs/transcripts/data-show-github.txt)
59
+ - [`data show github (missing)`](./docs/transcripts/data-show-github-missing.txt)
60
+ - [`data path github`](./docs/transcripts/data-path-github.txt)
61
+ - [`connect github`](./docs/transcripts/connect-github-success.txt)
62
+ - [`connect github --no-input`](./docs/transcripts/connect-github-no-input.txt)
63
+ - [`connect github session reuse --no-input`](./docs/transcripts/connect-github-session-reuse-no-input.txt)
64
+ - [`connect shop`](./docs/transcripts/connect-shop.txt)
65
+ - [`connect shop --no-input`](./docs/transcripts/connect-shop-no-input.txt)
66
+ - [`connect steam`](./docs/transcripts/connect-steam.txt)
67
+ - [`connect steam --no-input`](./docs/transcripts/connect-steam-no-input.txt)
68
+
5
69
  ## What problem this solves
6
70
 
7
71
  Your users already have rich personal data — ChatGPT conversations, Instagram activity, Gmail, purchase history — but it's locked inside the platforms that collected it. As a builder, you can't easily use that data to personalize onboarding, tailor recommendations, or skip lengthy signup forms.
@@ -76,6 +140,8 @@ If you prefer to integrate the SDK into an existing project, follow the steps be
76
140
 
77
141
  `vana-connect` now also ships a local collection CLI for connector setup and data export flows.
78
142
 
143
+ If you only care about the CLI, start with [docs/CLI-README.md](./docs/CLI-README.md).
144
+
79
145
  ### Install
80
146
 
81
147
  If you are evaluating this branch before it lands on `main`, use the prerelease path in the next section. The stable install commands below are the intended post-merge install path.
@@ -143,10 +209,156 @@ npx -y @opendatalabs/connect status
143
209
  ### Commands
144
210
 
145
211
  ```bash
212
+ vana --version
213
+ vana version
214
+ vana doctor
215
+ vana logs
216
+ vana connect
146
217
  vana sources
147
218
  vana connect github
219
+ vana connect github --json --no-input
148
220
  vana status
149
221
  vana setup
222
+ vana data list
223
+ vana data path github --json
224
+ vana data show github --json | jq '.summary.lines'
225
+ ```
226
+
227
+ - `vana connect` opens a guided source picker in human mode.
228
+ - `vana connect <source>` runs the end-to-end collection flow.
229
+ - `vana connect <source> --json --no-input` is the strict machine-safe path for agents and shell automation.
230
+ - `vana sources` groups sources into ready-now vs manual-step flows.
231
+ - `vana status` prioritizes sources that need attention before already-connected sources.
232
+ - `vana doctor` checks the local install, browser runtime, and state directories.
233
+ - `vana logs` lets you inspect the latest stored connector run logs without hunting through `~/.dataconnect/logs`.
234
+ - `vana data ...` lets you inspect collected local datasets without opening the raw JSON file yourself.
235
+
236
+ ### Shell contract
237
+
238
+ - `--json` mode writes machine-readable output to stdout without human narration.
239
+ - Successful command completion returns exit code `0`.
240
+ - Actionable failures like missing source selection, unavailable connectors, or disabled prompting return exit code `1`.
241
+ - `vana --version`, `vana version`, and `vana --help` return exit code `0`.
242
+ - `vana doctor --json` includes `installMethod`, `channel`, and upgrade/uninstall commands so scripts can surface the right lifecycle guidance.
243
+
244
+ ### Shell examples
245
+
246
+ ```bash
247
+ vana status --json | jq '.channel, .installMethod, .summary | {connectedCount, localCount, syncedCount}'
248
+ vana sources --json | jq '.summary, .recommendedSource'
249
+ vana data list --json | jq '.summary, .datasets[] | {source, dataState, path}'
250
+ vana logs --json | jq '.latestLog, .logs[] | {source, path}'
251
+ vana doctor --json | jq '.paths.executable, .paths.dataHome, .lifecycle'
252
+ ```
253
+
254
+ ### Upgrade, channels, and uninstall
255
+
256
+ Upgrade with the same channel you installed from:
257
+
258
+ You can always confirm the current install method and exact lifecycle commands with:
259
+
260
+ ```bash
261
+ vana doctor
262
+ ```
263
+
264
+ - Homebrew:
265
+ ```bash
266
+ brew update
267
+ brew upgrade vana
268
+ ```
269
+ - macOS/Linux installer:
270
+ ```bash
271
+ curl -fsSL https://raw.githubusercontent.com/vana-com/vana-connect/main/install/install.sh | sh
272
+ ```
273
+ - Windows PowerShell installer:
274
+ ```powershell
275
+ iwr https://raw.githubusercontent.com/vana-com/vana-connect/main/install/install.ps1 -useb | iex
276
+ ```
277
+
278
+ Current channels:
279
+
280
+ - `stable`: install from `main` or the eventual stable Homebrew tap state
281
+ - `canary`: install from the latest prerelease assets while this CLI is still rolling out
282
+
283
+ To remove the installed CLI:
284
+
285
+ - Homebrew:
286
+ ```bash
287
+ brew uninstall vana
288
+ ```
289
+ - macOS/Linux installer:
290
+ ```bash
291
+ rm -f ~/.local/bin/vana
292
+ rm -rf ~/.local/share/vana
293
+ ```
294
+ - Windows PowerShell installer:
295
+ - remove `%USERPROFILE%\AppData\Local\Microsoft\WinGet\Links\vana.cmd`
296
+ - remove `%USERPROFILE%\AppData\Local\Vana`
297
+
298
+ To remove local runtime and collected state as well:
299
+
300
+ ```bash
301
+ rm -rf ~/.dataconnect
302
+ ```
303
+
304
+ ### CLI demos
305
+
306
+ The branch also includes deterministic VHS demo scaffolding under
307
+ [`docs/vhs/`](./docs/vhs/README.md).
308
+
309
+ Branch prerelease preview media:
310
+
311
+ - [`status-and-sources.gif`](https://github.com/vana-com/vana-connect/releases/download/canary-feat-connect-cli-v1/status-and-sources.gif)
312
+ - [`data-inspection.gif`](https://github.com/vana-com/vana-connect/releases/download/canary-feat-connect-cli-v1/data-inspection.gif)
313
+ - [`connect-success.gif`](https://github.com/vana-com/vana-connect/releases/download/canary-feat-connect-cli-v1/connect-success.gif)
314
+ - connects GitHub, then shows the collected dataset summary
315
+
316
+ ![Vana status and sources demo](https://github.com/vana-com/vana-connect/releases/download/canary-feat-connect-cli-v1/status-and-sources.gif)
317
+
318
+ ![Vana data inspection demo](https://github.com/vana-com/vana-connect/releases/download/canary-feat-connect-cli-v1/data-inspection.gif)
319
+
320
+ ![Vana successful connect demo](https://github.com/vana-com/vana-connect/releases/download/canary-feat-connect-cli-v1/connect-success.gif)
321
+
322
+ Current reviewable transcripts:
323
+
324
+ - [`status`](./docs/transcripts/status.txt)
325
+ - [`doctor`](./docs/transcripts/doctor.txt)
326
+ - [`logs`](./docs/transcripts/logs.txt)
327
+ - [`setup`](./docs/transcripts/setup.txt)
328
+ - [`sources`](./docs/transcripts/sources.txt)
329
+ - [`data list`](./docs/transcripts/data-list.txt)
330
+ - [`data list (empty)`](./docs/transcripts/data-list-empty.txt)
331
+ - [`data show github`](./docs/transcripts/data-show-github.txt)
332
+ - [`data show github (missing)`](./docs/transcripts/data-show-github-missing.txt)
333
+ - [`data path github`](./docs/transcripts/data-path-github.txt)
334
+ - [`connect github`](./docs/transcripts/connect-github-success.txt)
335
+ - [`connect github --no-input`](./docs/transcripts/connect-github-no-input.txt)
336
+ - [`connect shop --no-input`](./docs/transcripts/connect-shop-no-input.txt)
337
+ - [`connect steam --no-input`](./docs/transcripts/connect-steam-no-input.txt)
338
+
339
+ To seed the fixture home used by the first tapes:
340
+
341
+ ```bash
342
+ pnpm demo:vhs:fixtures
343
+ ```
344
+
345
+ To render the checked-in tapes once `vhs` or Docker is available:
346
+
347
+ ```bash
348
+ pnpm demo:vhs
349
+ ```
350
+
351
+ To capture deterministic human-mode transcripts for review:
352
+
353
+ ```bash
354
+ pnpm demo:transcripts
355
+ ```
356
+
357
+ To watch the branch release lane, trigger Homebrew sync, and verify the
358
+ published installer automatically:
359
+
360
+ ```bash
361
+ pnpm release:watch
150
362
  ```
151
363
 
152
364
  ### Local development
package/dist/cli/bin.js CHANGED
@@ -1,5 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { runCli } from "./index.js";
3
+ for (const stream of [process.stdout, process.stderr]) {
4
+ stream.on("error", (error) => {
5
+ if (error.code === "EPIPE") {
6
+ process.exit(0);
7
+ }
8
+ throw error;
9
+ });
10
+ }
3
11
  const exitCode = await runCli(process.argv);
4
12
  if (typeof exitCode === "number") {
5
13
  process.exitCode = exitCode;
@@ -1 +1 @@
1
- {"version":3,"file":"bin.js","sourceRoot":"","sources":["../../src/cli/bin.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC5C,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;IACjC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC9B,CAAC"}
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../../src/cli/bin.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,KAAK,MAAM,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;IACtD,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAA4B,EAAE,EAAE;QAClD,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC5C,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;IACjC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAmDA,wBAAsB,MAAM,CAAC,IAAI,WAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CA2CjE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAkGA,wBAAsB,MAAM,CAAC,IAAI,WAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAiPjE"}