@getbourdon/participants 0.2.3 → 0.2.4

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 (43) hide show
  1. package/dist/base.d.ts +109 -0
  2. package/dist/base.js +88 -0
  3. package/dist/index.d.ts +42 -1083
  4. package/dist/index.js +53 -6590
  5. package/dist/network-base.d.ts +108 -0
  6. package/dist/network-base.js +248 -0
  7. package/dist/readers/cascade.d.ts +49 -0
  8. package/dist/readers/cascade.js +428 -0
  9. package/dist/readers/claude-code-automations.d.ts +62 -0
  10. package/dist/readers/claude-code-automations.js +693 -0
  11. package/dist/readers/claude-code.d.ts +50 -0
  12. package/dist/readers/claude-code.js +583 -0
  13. package/dist/readers/claude-desktop-code.d.ts +54 -0
  14. package/dist/readers/claude-desktop-code.js +526 -0
  15. package/dist/readers/claude-desktop-cowork.d.ts +47 -0
  16. package/dist/readers/claude-desktop-cowork.js +659 -0
  17. package/dist/readers/codex-automations.d.ts +55 -0
  18. package/dist/readers/codex-automations.js +519 -0
  19. package/dist/readers/codex-sessions.d.ts +88 -0
  20. package/dist/readers/codex-sessions.js +194 -0
  21. package/dist/readers/copilot-automations.d.ts +64 -0
  22. package/dist/readers/copilot-automations.js +530 -0
  23. package/dist/readers/copilot-cli.d.ts +45 -0
  24. package/dist/readers/copilot-cli.js +416 -0
  25. package/dist/readers/copilot-vscode.d.ts +54 -0
  26. package/dist/readers/copilot-vscode.js +553 -0
  27. package/dist/readers/copilot.d.ts +59 -0
  28. package/dist/readers/copilot.js +413 -0
  29. package/dist/readers/cursor-automations.d.ts +57 -0
  30. package/dist/readers/cursor-automations.js +685 -0
  31. package/dist/readers/cursor.d.ts +50 -0
  32. package/dist/readers/cursor.js +670 -0
  33. package/dist/readers/github-copilot.d.ts +34 -0
  34. package/dist/readers/github-copilot.js +242 -0
  35. package/dist/readers/hermes.d.ts +37 -0
  36. package/dist/readers/hermes.js +426 -0
  37. package/dist/readers/openclaw.d.ts +78 -0
  38. package/dist/readers/openclaw.js +386 -0
  39. package/dist/registry.d.ts +39 -0
  40. package/dist/registry.js +98 -0
  41. package/dist/sqlite-base.d.ts +65 -0
  42. package/dist/sqlite-base.js +163 -0
  43. package/package.json +6 -6
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Cursor participant — reads Cursor's (the AI-first IDE) SQLite-backed
3
+ * workspace/composer state and normalizes it into L5. Port of
4
+ * `participants/cursor.py` + the extraction helper `participants/_cursor_sqlite.py`.
5
+ *
6
+ * Cursor stores workspace state in `state.vscdb` SQLite DBs at platform-specific
7
+ * paths (`~/.config/Cursor/`, `~/Library/Application Support/Cursor/`,
8
+ * `%APPDATA%/Cursor/`). This reader discovers those stores, reads the `ItemTable`
9
+ * key/value rows read-only, parses the composer/chat records into sessions +
10
+ * project/topic entities, and merges curated `.cursor/memory/short-index.json`
11
+ * entities alongside them.
12
+ *
13
+ * SQLite access: the Python oracle copies each DB (+ its `-wal`/`-shm`
14
+ * companions) to a tmp file and opens it read-write so SQLite folds the WAL into
15
+ * a consistent snapshot. The TS mirror instead leans on {@link tryOpenReadonly}
16
+ * (`mode=ro`), which respects SQLite locking and reads the `-wal` sidecar of a
17
+ * live writer — the same consistent view without the copy. Read-only,
18
+ * deterministic, visibility-enforced-before-emission, redaction on every native
19
+ * string; `healthCheck` never throws.
20
+ */
21
+ import { type L5ManifestModel, type SessionModel } from "@getbourdon/l5";
22
+ import { type AgentStore, type BourdonParticipant, type HealthStatus } from "../base.js";
23
+ /**
24
+ * Platform-specific Cursor data dir (the SQLite workspace state lives here),
25
+ * `$CURSOR_DIR` override first. Returns null on an unrecognized platform (or
26
+ * Windows without `%APPDATA%`). Mirrors `default_cursor_dir`.
27
+ */
28
+ export declare function defaultCursorDir(): string | null;
29
+ /** External participant for Cursor's SQLite workspace state. */
30
+ export declare class CursorParticipant implements BourdonParticipant {
31
+ agentId: string;
32
+ agentType: string;
33
+ private readonly cursorDir;
34
+ private readonly workspaceRoot;
35
+ private readonly policy;
36
+ /**
37
+ * Conventional Cursor config dir (`~/.cursor`) used by the setup wizard. The
38
+ * wizard probes `~/.cursor` for presence; the SQLite workspace state that
39
+ * `exportL5` actually reads lives at {@link defaultCursorDir}. Detection and
40
+ * extraction intentionally use different anchors.
41
+ */
42
+ static defaultNativePath(home?: string): string;
43
+ constructor(cursorDir?: string | null, workspaceRoot?: string | null);
44
+ get nativePath(): string;
45
+ discover(): AgentStore;
46
+ exportSessions(since?: Date, limit?: number): SessionModel[];
47
+ exportL5(since?: Date): L5ManifestModel;
48
+ healthCheck(): HealthStatus;
49
+ private extract;
50
+ }