@getbourdon/participants 0.1.1 → 0.2.1

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/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { L5ManifestModel, SessionModel } from '@getbourdon/l5';
1
+ import { L5ManifestModel, SessionModel, VisibilityPolicyModel } from '@getbourdon/l5';
2
2
  export { EntityModel, L5ManifestModel, SessionModel, Visibility, VisibilityPolicyModel, applyVisibility, filterForFederation, toDict, validateManifest } from '@getbourdon/l5';
3
3
  import DatabaseT from 'better-sqlite3';
4
4
 
@@ -67,6 +67,13 @@ interface BourdonParticipant {
67
67
  nativePath: string;
68
68
  /** Human-friendly label (e.g. "GitHub Copilot"). Optional. */
69
69
  displayName?: string;
70
+ /** Quarantined-class marker (Python `QUARANTINED_CLASS`). When true, the CLI
71
+ * requires `--i-understand-the-risk` to register the agent trusted, and its
72
+ * exports are staged for operator review rather than written to the live
73
+ * store (spec D6: quarantine follows the content, not the invoker). Absent =
74
+ * a normal, non-quarantined participant. Read by `bourdon agent add/set-tier`
75
+ * (cli/src/commands/federation.ts). */
76
+ quarantinedClass?: boolean;
70
77
  /** Confirm the native store exists; return metadata. Throws
71
78
  * {@link ParticipantDiscoveryError} when missing/unreadable. */
72
79
  discover(): AgentStore;
@@ -356,6 +363,571 @@ declare class GitHubCopilotParticipant extends NetworkParticipant {
356
363
  payloadToL5(payload: Record<string, unknown>): L5ManifestModel;
357
364
  }
358
365
 
366
+ /**
367
+ * Cursor participant — reads Cursor's (the AI-first IDE) SQLite-backed
368
+ * workspace/composer state and normalizes it into L5. Port of
369
+ * `participants/cursor.py` + the extraction helper `participants/_cursor_sqlite.py`.
370
+ *
371
+ * Cursor stores workspace state in `state.vscdb` SQLite DBs at platform-specific
372
+ * paths (`~/.config/Cursor/`, `~/Library/Application Support/Cursor/`,
373
+ * `%APPDATA%/Cursor/`). This reader discovers those stores, reads the `ItemTable`
374
+ * key/value rows read-only, parses the composer/chat records into sessions +
375
+ * project/topic entities, and merges curated `.cursor/memory/short-index.json`
376
+ * entities alongside them.
377
+ *
378
+ * SQLite access: the Python oracle copies each DB (+ its `-wal`/`-shm`
379
+ * companions) to a tmp file and opens it read-write so SQLite folds the WAL into
380
+ * a consistent snapshot. The TS mirror instead leans on {@link tryOpenReadonly}
381
+ * (`mode=ro`), which respects SQLite locking and reads the `-wal` sidecar of a
382
+ * live writer — the same consistent view without the copy. Read-only,
383
+ * deterministic, visibility-enforced-before-emission, redaction on every native
384
+ * string; `healthCheck` never throws.
385
+ */
386
+
387
+ /** External participant for Cursor's SQLite workspace state. */
388
+ declare class CursorParticipant implements BourdonParticipant {
389
+ agentId: string;
390
+ agentType: string;
391
+ private readonly cursorDir;
392
+ private readonly workspaceRoot;
393
+ private readonly policy;
394
+ /**
395
+ * Conventional Cursor config dir (`~/.cursor`) used by the setup wizard. The
396
+ * wizard probes `~/.cursor` for presence; the SQLite workspace state that
397
+ * `exportL5` actually reads lives at {@link defaultCursorDir}. Detection and
398
+ * extraction intentionally use different anchors.
399
+ */
400
+ static defaultNativePath(home?: string): string;
401
+ constructor(cursorDir?: string | null, workspaceRoot?: string | null);
402
+ get nativePath(): string;
403
+ discover(): AgentStore;
404
+ exportSessions(since?: Date, limit?: number): SessionModel[];
405
+ exportL5(since?: Date): L5ManifestModel;
406
+ healthCheck(): HealthStatus;
407
+ private extract;
408
+ }
409
+
410
+ /**
411
+ * GitHub Copilot (local convention) participant — reads the convention-based
412
+ * memory file at `~/.copilot-bourdon/memory.md`. Port of `participants/copilot.py`.
413
+ *
414
+ * Copilot has no accessible local session index (its reasoning is cloud-side and
415
+ * its native memory is not exposed on disk), so — like the Codex pre-distillation
416
+ * fallback — this reader normalizes a user-maintained convention file into a
417
+ * Bourdon L5 manifest. The file is YAML front-matter (structured `entities:` /
418
+ * `sessions:`) followed by an optional freeform markdown body that Copilot Chat
419
+ * reads as plain context but this reader ignores.
420
+ *
421
+ * NOT the cloud GitHub-Copilot network adapter ({@link GitHubCopilotParticipant})
422
+ * and NOT the Copilot CLI SQLite reader.
423
+ *
424
+ * Paths checked (in order):
425
+ * 1. `COPILOT_BOURDON_HOME` env-var override
426
+ * 2. `~/.copilot-bourdon/` (default convention path)
427
+ *
428
+ * Defensive throughout: a missing convention directory raises
429
+ * {@link ParticipantDiscoveryError} from `discover()`; malformed YAML degrades to
430
+ * an empty manifest rather than raising; `healthCheck` never throws.
431
+ */
432
+
433
+ /**
434
+ * External participant for GitHub Copilot via `~/.copilot-bourdon/memory.md`.
435
+ * Implements {@link BourdonParticipant} structurally.
436
+ */
437
+ declare class CopilotParticipant implements BourdonParticipant {
438
+ agentId: string;
439
+ agentType: string;
440
+ displayName: string;
441
+ nativePath: string;
442
+ /** Conventional `~/.copilot-bourdon` dir used by the setup wizard's detection. */
443
+ static defaultNativePath(home?: string): string;
444
+ private readonly copilotDir;
445
+ constructor(copilotDir?: string | null);
446
+ discover(): AgentStore;
447
+ exportSessions(since?: Date, limit?: number): SessionModel[];
448
+ exportL5(since?: Date): L5ManifestModel;
449
+ healthCheck(): HealthStatus;
450
+ private read;
451
+ }
452
+
453
+ /**
454
+ * GitHub Copilot CLI participant — normalize the `copilot` terminal agent's
455
+ * SQLite session store into L5. Port of `participants/copilot_cli.py`.
456
+ *
457
+ * Copilot CLI stores session history in a SQLite database at
458
+ * `~/.copilot/session-store.db` (override `$COPILOT_CLI_HOME`). This is distinct
459
+ * from:
460
+ * - the VS Code Copilot Chat extension (`github-copilot` network reader)
461
+ * - the `~/.copilot-bourdon/memory.md` convention-file participant (`copilot`)
462
+ * - GitHub-embedded Copilot (no local state)
463
+ *
464
+ * The schema (schema_version 4) carries `sessions` / `turns` / `checkpoints`
465
+ * plus `session_files` / `session_refs` / `dynamic_context_items`. The reader
466
+ * opens the DB read-only (`mode=ro` via {@link tryOpenReadonly}) so a live
467
+ * writer's lock can never block the export, probes each table defensively (a
468
+ * missing table degrades to "no rows" rather than raising), redacts every native
469
+ * string, applies the visibility filter BEFORE emission, and is deterministic.
470
+ * `healthCheck` never throws.
471
+ */
472
+
473
+ /**
474
+ * External participant for GitHub Copilot CLI (`~/.copilot/session-store.db`).
475
+ * Reads the SQLite database read-only (never locks the live db).
476
+ */
477
+ declare class CopilotCliParticipant implements BourdonParticipant {
478
+ agentId: string;
479
+ agentType: string;
480
+ displayName: string;
481
+ nativePath: string;
482
+ private readonly copilotDir;
483
+ /** Conventional `~/.copilot` dir used by the setup wizard's detection. */
484
+ static defaultNativePath(home?: string): string;
485
+ constructor(copilotDir?: string);
486
+ discover(): AgentStore;
487
+ exportSessions(since?: Date, limit?: number): SessionModel[];
488
+ exportL5(since?: Date): L5ManifestModel;
489
+ healthCheck(): HealthStatus;
490
+ private emptyManifest;
491
+ }
492
+
493
+ /**
494
+ * Cascade (Windsurf) participant — convention-file reader. Port of
495
+ * `participants/cascade.py`.
496
+ *
497
+ * Cascade's internal state is not exposed on the filesystem in a standardized
498
+ * format (like cloud Copilot). Instead this participant uses a CONVENTION FILE:
499
+ * Cascade maintains a structured memory file at `~/.cascade-bourdon/memory.md`
500
+ * with YAML front-matter carrying `entities` + `sessions`. Cascade owns that
501
+ * projection explicitly (it writes what it knows at session end); the
502
+ * participant normalizes the front-matter into an L5 manifest for federation.
503
+ *
504
+ * Privacy: entity/session summaries pass through the redaction SSOT; the
505
+ * visibility policy (private_tags) filters PRIVATE entities before emission.
506
+ */
507
+
508
+ /**
509
+ * Convention-based Bourdon participant for Cascade (Windsurf). Reads structured
510
+ * memory from `~/.cascade-bourdon/memory.md` and normalizes it into L5.
511
+ */
512
+ declare class CascadeParticipant implements BourdonParticipant {
513
+ agentId: string;
514
+ agentType: string;
515
+ displayName: string;
516
+ private readonly dir;
517
+ private readonly policy;
518
+ static defaultNativePath(home?: string): string;
519
+ constructor(cascadeDir?: string, policy?: VisibilityPolicyModel);
520
+ /** Path to the Cascade-Bourdon convention directory. */
521
+ get nativePath(): string;
522
+ private memoryPath;
523
+ private readFrontmatter;
524
+ discover(): AgentStore;
525
+ exportL5(since?: Date): L5ManifestModel;
526
+ exportSessions(since?: Date, limit?: number): SessionModel[];
527
+ healthCheck(): HealthStatus;
528
+ }
529
+
530
+ /**
531
+ * OpenClaw participant — network-shaped, QUARANTINED-CLASS. Port of
532
+ * `participants/openclaw.py` (v0.9.0, spec R4/D9).
533
+ *
534
+ * OpenClaw is the highest-demand adapter target in the ecosystem and also its
535
+ * highest-risk agent class: CVE-2026-25253 (one-click RCE, CVSS 8.8, first
536
+ * patched in 2026.1.29), tens of thousands of internet-exposed instances (~93%
537
+ * without authentication), ClawHub's malicious-skill problem, and auth disabled
538
+ * by default on port 8080. Bourdon therefore treats OpenClaw differently from
539
+ * every on-disk participant:
540
+ *
541
+ * 1. **Network-shaped** — state is read from the OpenClaw instance's local
542
+ * HTTP API, not on-disk artifacts. Because the {@link BourdonParticipant}
543
+ * contract is SYNCHRONOUS (`discover`/`exportL5` return values, not
544
+ * Promises) and `fetch` is async, the reads go through a tiny synchronous
545
+ * `curl` shell-out (the same idiom as the github-copilot reader).
546
+ * 2. **Hard handshake gate** — {@link OpenClawParticipant.discover} refuses to
547
+ * talk to an instance that is unpatched (< 2026.1.29) or has authentication
548
+ * disabled. These are refusals with exact reasons AND fixes, not warnings,
549
+ * and every read re-runs the gate.
550
+ * 3. **Quarantined-class** — `quarantinedClass = true`: registering the agent
551
+ * trusted requires `--i-understand-the-risk`, and exports stage for
552
+ * operator review (spec D6: quarantine follows the content, not the
553
+ * invoker). Its content federates under TEAM, never PUBLIC.
554
+ *
555
+ * We gate on instance hygiene (version, auth) — NOT on auditing the user's
556
+ * installed skills; that's ClawSecure et al.'s job (spec non-goal 3).
557
+ */
558
+
559
+ /** First OpenClaw release that patches CVE-2026-25253 (one-click RCE). */
560
+ declare const MIN_PATCHED_VERSION = "2026.1.29";
561
+ /**
562
+ * Hard handshake preconditions (spec D9). Returns the version on success.
563
+ * Raises {@link ParticipantDiscoveryError} with the exact reason AND the fix —
564
+ * these are refusals, not warnings.
565
+ */
566
+ declare function verifyInstance(status: Record<string, unknown>, url: string): string;
567
+ /**
568
+ * Minimal HTTP client for a local OpenClaw instance. Read-only: status,
569
+ * sessions, memories. Failures raise {@link ParticipantDiscoveryError} with the
570
+ * reason — the participant decides how to surface them.
571
+ *
572
+ * Error mapping (faithful to the Python `urllib` client): an HTTP >= 400
573
+ * response -> "returned HTTP {code}"; a transport failure / timeout / non-JSON
574
+ * body -> "instance unreachable at {url}".
575
+ */
576
+ declare class OpenClawApiClient {
577
+ readonly url: string;
578
+ private readonly token;
579
+ readonly timeout: number;
580
+ constructor(url: string, token?: string, timeout?: number);
581
+ private get;
582
+ status(): Record<string, unknown>;
583
+ sessions(): Record<string, unknown>[];
584
+ memories(): Record<string, unknown>[];
585
+ /** Shared `sessions()`/`memories()` body: try/except-returns-[], unwrap the
586
+ * `{ "<key>": [...] }` envelope, and keep only object rows. */
587
+ private readCollection;
588
+ }
589
+ /** Bourdon participant for OpenClaw (quarantined class). */
590
+ declare class OpenClawParticipant implements BourdonParticipant {
591
+ agentId: string;
592
+ agentType: string;
593
+ displayName: string;
594
+ /** Trust marker consumed by `bourdon agent add/set-tier` + export-all:
595
+ * registering as trusted needs --i-understand-the-risk; exports stage. */
596
+ quarantinedClass: boolean;
597
+ readonly url: string;
598
+ private readonly client;
599
+ static defaultNativePath(home?: string): string;
600
+ constructor(url?: string, token?: string, client?: OpenClawApiClient);
601
+ get nativePath(): string;
602
+ discover(): AgentStore;
603
+ exportSessions(since?: Date, limit?: number): SessionModel[];
604
+ exportL5(since?: Date): L5ManifestModel;
605
+ healthCheck(): HealthStatus;
606
+ }
607
+
608
+ /**
609
+ * Claude Code automations participant — publishes background-run memory as L5
610
+ * evidence. Port of `participants/claude_code_automations.py`.
611
+ *
612
+ * Convention-file reader over the `~/.claude/automations/<id>/` tree:
613
+ * automation.toml — id, name, status, schedule (rrule), kind, cwds
614
+ * memory.md — dated bullet entries, one block per run
615
+ *
616
+ * Each `automation.toml` becomes a known Entity (`type: automation`); each dated
617
+ * section of `memory.md` becomes a recent Session. Mirrors the Codex automation
618
+ * publisher — it covers the federation gap that the interactive-only
619
+ * `claude-code` participant leaves behind (automations whose work never touches
620
+ * claude-brain / auto-memory / the MCP knowledge graph).
621
+ *
622
+ * Privacy: every native string routes through the redaction SSOT
623
+ * (`redactText`, == the oracle's `_safe_native_memory_text`); the visibility
624
+ * policy filters PRIVATE entities before emission. `healthCheck` never throws.
625
+ */
626
+
627
+ /** External participant for Claude Code automation memory artifacts. */
628
+ declare class ClaudeCodeAutomationsParticipant implements BourdonParticipant {
629
+ agentId: string;
630
+ agentType: string;
631
+ nativePath: string;
632
+ private readonly automationsDir;
633
+ private readonly policy;
634
+ /**
635
+ * Conventional Claude Code automations dir (`~/.claude/automations`). Provided
636
+ * for protocol uniformity — the setup wizard wires the parent `claude-code`
637
+ * participant and skips `-automations` sub-surfaces.
638
+ */
639
+ static defaultNativePath(home?: string): string;
640
+ constructor(automationsDir?: string, claudeHome?: string);
641
+ discover(): AgentStore;
642
+ exportSessions(since?: Date, limit?: number): SessionModel[];
643
+ exportL5(since?: Date): L5ManifestModel;
644
+ healthCheck(): HealthStatus;
645
+ private runs;
646
+ }
647
+
648
+ /**
649
+ * Codex automations participant — publishes read-only Codex background/automation
650
+ * run memory into Bourdon as L5 evidence. Port of
651
+ * `participants/codex_automations.py`.
652
+ *
653
+ * Store convention (NOT SQLite, NOT network): a CONVENTION-FILE directory tree at
654
+ * `~/.codex/automations/<id>/`, each holding an `automation.toml` config and an
655
+ * optional `memory.md` run log. The reader parses the TOML config and extracts
656
+ * dated "runs" from the markdown memory, normalizing them into L5 sessions +
657
+ * entities (the automation itself, plus inferred projects and signal classes).
658
+ *
659
+ * Source-resolution order for the automations dir:
660
+ * 1. explicit `automationsDir` constructor arg
661
+ * 2. `codexHome` constructor arg → `<codexHome>/automations`
662
+ * 3. `CODEX_HOME` env-var → `$CODEX_HOME/automations`
663
+ * 4. `~/.codex/automations` (default convention path)
664
+ *
665
+ * Privacy: every native string routes through the redaction SSOT
666
+ * (`redactText(v, 180)` == the oracle's `_safe_native_memory_text`); the
667
+ * visibility policy filters PRIVATE entities before emission. Defensive
668
+ * throughout — a missing dir raises {@link ParticipantDiscoveryError} from
669
+ * `discover()`, malformed TOML/markdown degrades to empty rather than raising,
670
+ * and `healthCheck` never throws.
671
+ *
672
+ * NOTE: does NOT depend on the full codex reader — only the redaction helper it
673
+ * imports (`_safe_native_memory_text`, reproduced inline as {@link safeNativeMemoryText}).
674
+ */
675
+
676
+ /**
677
+ * External participant for Codex automation memory artifacts. Reads
678
+ * `~/.codex/automations/<id>/{automation.toml,memory.md}` and normalizes dated
679
+ * runs into an L5 manifest.
680
+ */
681
+ declare class CodexAutomationsParticipant implements BourdonParticipant {
682
+ agentId: string;
683
+ agentType: string;
684
+ private readonly automationsDir;
685
+ private readonly policy;
686
+ /**
687
+ * Conventional Codex automations dir (`~/.codex/automations`). Provided for
688
+ * protocol uniformity — the setup wizard wires the parent `codex` participant
689
+ * and skips `-automations` sub-surfaces rather than detecting this one.
690
+ */
691
+ static defaultNativePath(home?: string): string;
692
+ constructor(automationsDir?: string, codexHome?: string);
693
+ get nativePath(): string;
694
+ discover(): AgentStore;
695
+ exportSessions(since?: Date, limit?: number): SessionModel[];
696
+ exportL5(since?: Date): L5ManifestModel;
697
+ healthCheck(): HealthStatus;
698
+ private runs;
699
+ }
700
+
701
+ /**
702
+ * GitHub Copilot · Automations participant — convention-file reader. Port of
703
+ * `participants/copilot_automations.py`.
704
+ *
705
+ * GitHub Copilot can be triggered by GitHub Actions workflows, scheduled tasks,
706
+ * and event-driven automations (issue triage, PR review, etc.). These run on a
707
+ * separate memory surface from both the CLI agent and the VS Code extension.
708
+ * Copilot automations have no standardized local state dump, so — mirroring the
709
+ * codex-automations reader — this participant uses a CONVENTION directory:
710
+ *
711
+ * ~/.copilot-bourdon/automations/<automation-id>/
712
+ * automation.toml — id, name, status, trigger, kind, repos
713
+ * memory.md — dated bullet entries, one block per run
714
+ *
715
+ * Each `automation.toml` describes a recurring automation; each dated section of
716
+ * `memory.md` captures what happened in that run. Users or CI scripts maintain
717
+ * these files.
718
+ *
719
+ * Path resolution (matches the oracle):
720
+ * 1. `COPILOT_AUTOMATIONS_HOME` env-var override (verbatim, → /automations skipped:
721
+ * the override IS the automations dir).
722
+ * 2. `~/.copilot-bourdon/automations/` (default convention path).
723
+ *
724
+ * Defensive throughout: a missing automations directory raises
725
+ * {@link ParticipantDiscoveryError} from `discover()`; a malformed
726
+ * `automation.toml` or unreadable `memory.md` is logged and skipped rather than
727
+ * raising; `healthCheck` never throws.
728
+ */
729
+
730
+ /**
731
+ * Convention-based Bourdon participant for Copilot automation memory artifacts.
732
+ * Users or CI scripts maintain `automation.toml` + `memory.md` files at
733
+ * `~/.copilot-bourdon/automations/<id>/`.
734
+ */
735
+ declare class CopilotAutomationsParticipant implements BourdonParticipant {
736
+ agentId: string;
737
+ agentType: string;
738
+ displayName: string;
739
+ private readonly automationsDir;
740
+ private readonly policy;
741
+ /** Conventional automations dir (`~/.copilot-bourdon/automations`). Does NOT
742
+ * consult `COPILOT_AUTOMATIONS_HOME` (matches Python `default_native_path`). */
743
+ static defaultNativePath(home?: string): string;
744
+ constructor(automationsDir?: string | null);
745
+ get nativePath(): string;
746
+ discover(): AgentStore;
747
+ exportSessions(since?: Date, limit?: number): SessionModel[];
748
+ exportL5(since?: Date): L5ManifestModel;
749
+ healthCheck(): HealthStatus;
750
+ private runs;
751
+ }
752
+
753
+ /**
754
+ * Cursor automations participant — publish background agent run memory as L5
755
+ * evidence. Port of `participants/cursor_automations.py`.
756
+ *
757
+ * Reads the `~/.cursor/automations/<id>/` CONVENTION (file-based, no SQLite):
758
+ *
759
+ * automation.toml — id, name, status, schedule (rrule), kind, cwds
760
+ * memory.md — dated bullet entries, one block per run
761
+ *
762
+ * Each `automation.toml` becomes a known Entity; each dated section of
763
+ * `memory.md` becomes a recent Session. This covers the federation gap the
764
+ * interactive-only `cursor` participant leaves behind: Cursor Cloud Agent
765
+ * background tasks whose work never touches the interactive SQLite state.
766
+ *
767
+ * Path resolution (default dir):
768
+ * 1. explicit `cursorHome` ctor arg → `<cursorHome>/automations`
769
+ * 2. `CURSOR_DIR` or `CURSOR_HOME` env → `<env>/automations`
770
+ * 3. `~/.cursor/automations`
771
+ *
772
+ * Redaction: every native action string passes through the redaction SSOT
773
+ * (`redactText(v, 180)` == Python `_safe_native_memory_text`). Visibility policy
774
+ * filters PRIVATE entities BEFORE emission. `healthCheck` never throws.
775
+ */
776
+
777
+ /** External participant for Cursor Cloud Agent automation memory artifacts. */
778
+ declare class CursorAutomationsParticipant implements BourdonParticipant {
779
+ agentId: string;
780
+ agentType: string;
781
+ private readonly automationsDir;
782
+ private readonly policy;
783
+ constructor(automationsDir?: string | null, cursorHome?: string | null);
784
+ get nativePath(): string;
785
+ discover(): AgentStore;
786
+ exportSessions(since?: Date, limit?: number): SessionModel[];
787
+ exportL5(since?: Date): L5ManifestModel;
788
+ healthCheck(): HealthStatus;
789
+ private runs;
790
+ }
791
+
792
+ /**
793
+ * Claude Desktop · Code participant — the Claude desktop app's GUI "Claude Code"
794
+ * surface. Port of `participants/claude_desktop_code.py` (+ the shared
795
+ * `participants/_claude_desktop.py` helpers it needs).
796
+ *
797
+ * The desktop GUI's Claude Code keeps **metadata-only** state on disk — there is
798
+ * no transcript. State files live at:
799
+ *
800
+ * <desktop>/claude-code-sessions/<accountUUID>/<orgUUID>/local_<id>.json
801
+ *
802
+ * This participant emits **recognition metadata only** and routes every emitted
803
+ * string through the shared redactor + a length cap (defense in depth): title,
804
+ * cwd→project, model, effort, `enabledMcpTools` *count*, timestamps. It never
805
+ * emits `planPath` contents or any free-form text beyond the redacted title.
806
+ *
807
+ * Distinct from the interactive-CLI {@link ClaudeCodeParticipant} and the richer
808
+ * Co-Work surface. Convention: file/JSON reader (no SQLite, no network).
809
+ */
810
+
811
+ /**
812
+ * External participant for the Claude desktop app's GUI Claude Code surface.
813
+ * File/JSON reader — metadata-only, no transcript, no SQLite, no network.
814
+ */
815
+ declare class ClaudeDesktopCodeParticipant implements BourdonParticipant {
816
+ agentId: string;
817
+ agentType: string;
818
+ displayName: string;
819
+ private readonly storeDir;
820
+ private readonly policy;
821
+ /**
822
+ * The Claude Code sub-store dir the setup wizard probes for presence. Resolves
823
+ * to `<desktop>/claude-code-sessions`. Falls back to a non-existent sentinel
824
+ * under `home` on an unrecognized platform so the wizard reports "not found".
825
+ */
826
+ static defaultNativePath(home?: string): string;
827
+ constructor(storeDir?: string, home?: string);
828
+ get nativePath(): string;
829
+ discover(): AgentStore;
830
+ exportSessions(since?: Date, limit?: number): SessionModel[];
831
+ exportL5(since?: Date): L5ManifestModel;
832
+ healthCheck(): HealthStatus;
833
+ private collectConversations;
834
+ private conversations;
835
+ }
836
+
837
+ /**
838
+ * Claude Desktop · Co-Work participant — the richest of the two Claude-desktop
839
+ * surfaces. Port of `participants/claude_desktop_cowork.py` (+ the shared
840
+ * `participants/_claude_desktop.py` extraction helpers, inlined here).
841
+ *
842
+ * The desktop app stores each Co-Work / local-agent run as a state file plus a
843
+ * sibling audit transcript:
844
+ *
845
+ * <desktop>/local-agent-mode-sessions/<acct>/<org>/local_<id>.json (state)
846
+ * <desktop>/local-agent-mode-sessions/<acct>/<org>/local_<id>/audit.jsonl
847
+ *
848
+ * This participant emits **recognition metadata only**. From the state file it
849
+ * reads surface scalars (title, cwd, model, permission mode, timestamps,
850
+ * `enabledMcpTools` *count*, `userSelectedFolders` *basenames*). From the
851
+ * sibling `audit.jsonl` it reads ONLY the `system`/`init` capability *counts*
852
+ * and the `result` safe scalars (cost, turns, error flag). It NEVER reads
853
+ * conversation content. Every emitted string passes through the redaction SSOT
854
+ * + a length cap, and TEAM entities are visibility-filtered before emission.
855
+ *
856
+ * Storage kind: file/convention (glob + JSON + JSONL), so this reads like the
857
+ * claude-code / cascade file readers — no SQLite, no network.
858
+ */
859
+
860
+ /** External participant for the Claude desktop app's Co-Work surface. */
861
+ declare class ClaudeDesktopCoworkParticipant implements BourdonParticipant {
862
+ agentId: string;
863
+ agentType: string;
864
+ displayName: string;
865
+ private readonly storeDir;
866
+ private readonly policy;
867
+ /**
868
+ * The Co-Work sub-store dir the setup wizard probes for presence. Resolves to
869
+ * `<desktop>/local-agent-mode-sessions`. When the desktop dir cannot be
870
+ * resolved on this platform, falls back to a non-existent sentinel under
871
+ * `home` so the wizard reports "not found" rather than crashing.
872
+ */
873
+ static defaultNativePath(home?: string): string;
874
+ constructor(storeDir?: string, home?: string);
875
+ get nativePath(): string;
876
+ discover(): AgentStore;
877
+ exportSessions(since?: Date, limit?: number): SessionModel[];
878
+ exportL5(since?: Date): L5ManifestModel;
879
+ healthCheck(): HealthStatus;
880
+ private collectRuns;
881
+ private runs;
882
+ }
883
+
884
+ /**
885
+ * GitHub Copilot · VS Code participant — reads the GUI Copilot Chat extension's
886
+ * per-workspace transcripts + repo-scoped memory. Port of
887
+ * `participants/copilot_vscode.py`.
888
+ *
889
+ * VS Code's Copilot Chat extension stores per-workspace data at
890
+ * `<workspaceStorage>/<hash>/GitHub.copilot-chat/`:
891
+ * - `transcripts/<session-uuid>.jsonl` — event stream per chat session
892
+ * - `memory-tool/memories/**\/*.md` — per-repo memory (markdown bullets)
893
+ *
894
+ * This is a FILE/CONVENTION reader (not SQLite, not network): it walks the
895
+ * workspaceStorage tree read-only, parses JSONL transcripts + markdown memory
896
+ * files, aggregates across every workspace hash, redacts every native string,
897
+ * applies the visibility filter BEFORE emission, and is deterministic.
898
+ * `healthCheck` never throws.
899
+ *
900
+ * Distinct from:
901
+ * - `copilot` (convention-file at `~/.copilot-bourdon/memory.md`)
902
+ * - `copilot-cli` (terminal agent, `~/.copilot/session-store.db`, SQLite)
903
+ * - `github-copilot` (network reader — GitHub-embedded Copilot)
904
+ */
905
+
906
+ /**
907
+ * External participant for GitHub Copilot in VS Code. Reads transcripts and
908
+ * memory-tool files from VS Code's workspaceStorage read-only, aggregating
909
+ * across all workspace hashes.
910
+ */
911
+ declare class CopilotVscodeParticipant implements BourdonParticipant {
912
+ agentId: string;
913
+ agentType: string;
914
+ displayName: string;
915
+ private readonly workspaceStorage;
916
+ /** The workspaceStorage dir the setup wizard probes for presence. */
917
+ static defaultNativePath(home?: string): string;
918
+ constructor(workspaceStorage?: string);
919
+ get nativePath(): string;
920
+ private resolveWs;
921
+ discover(): AgentStore;
922
+ exportSessions(since?: Date, limit?: number): SessionModel[];
923
+ exportL5(since?: Date): L5ManifestModel;
924
+ healthCheck(): HealthStatus;
925
+ /** Collect and parse all transcripts across all workspaces. */
926
+ private allTranscripts;
927
+ /** Collect all memory-tool files across all workspaces. */
928
+ private allMemories;
929
+ }
930
+
359
931
  /**
360
932
  * Participant discovery — a STATIC TS registry replacing Python's `pkgutil`
361
933
  * package scan + entry-point duck-type (`participants/__init__.py`).
@@ -377,8 +949,9 @@ declare class GitHubCopilotParticipant extends NetworkParticipant {
377
949
  type ParticipantCtor = new () => BourdonParticipant;
378
950
  /**
379
951
  * The first-party reader registry. Order here is irrelevant — discovery sorts by
380
- * `agentId`. (cursor / codex / copilot_cli are the heavier SQLite readers of the
381
- * follow-on slice; openclaw ships as the `@getbourdon/openclaw` plugin.)
952
+ * `agentId`. Covers the base agents, their background-run "automations" variants,
953
+ * the Claude-desktop surfaces, and the quarantined-class openclaw network reader.
954
+ * codex — the ~2.6k-line turn-compiler reader — is the only one still deferred.
382
955
  */
383
956
  declare const FIRST_PARTY: ParticipantCtor[];
384
957
  /**
@@ -395,4 +968,4 @@ declare function discoverParticipants(ctors?: ParticipantCtor[]): BourdonPartici
395
968
  */
396
969
  declare function resolvePluginParticipants(): ParticipantCtor[];
397
970
 
398
- export { type AgentStore, type AuthProvider, type BourdonParticipant, CONTRACT_VERSION, CacheEntry, ClaudeCodeParticipant, DEFAULT_CACHE_TTL_SECONDS, FIRST_PARTY, GitHubCopilotParticipant, type HealthStatus, HermesParticipant, NETWORK_CONTRACT_VERSION, NetworkParticipant, type NetworkParticipantOptions, NetworkUnavailable, type OpenReadonlyOptions, ParticipantAuthError, type ParticipantCtor, ParticipantDiscoveryError, ParticipantError, ParticipantExportError, ParticipantVersionMismatchError, PayloadCache, SPEC_VERSION, type SqliteDatabase, defaultCacheRoot, discoverParticipants, envAuthProvider, epochToIsoDate, epochToIsoDatetime, friendlyLabel, ghTokenProvider, isParticipant, openReadonly, projectKeyFromCwd, resolvePluginParticipants, sqliteAvailable, tableColumns, tableExists, tryOpenReadonly };
971
+ export { type AgentStore, type AuthProvider, type BourdonParticipant, CONTRACT_VERSION, CacheEntry, CascadeParticipant, ClaudeCodeAutomationsParticipant, ClaudeCodeParticipant, ClaudeDesktopCodeParticipant, ClaudeDesktopCoworkParticipant, CodexAutomationsParticipant, CopilotAutomationsParticipant, CopilotCliParticipant, CopilotParticipant, CopilotVscodeParticipant, CursorAutomationsParticipant, CursorParticipant, DEFAULT_CACHE_TTL_SECONDS, FIRST_PARTY, GitHubCopilotParticipant, type HealthStatus, HermesParticipant, MIN_PATCHED_VERSION, NETWORK_CONTRACT_VERSION, NetworkParticipant, type NetworkParticipantOptions, NetworkUnavailable, OpenClawApiClient, OpenClawParticipant, type OpenReadonlyOptions, ParticipantAuthError, type ParticipantCtor, ParticipantDiscoveryError, ParticipantError, ParticipantExportError, ParticipantVersionMismatchError, PayloadCache, SPEC_VERSION, type SqliteDatabase, defaultCacheRoot, discoverParticipants, envAuthProvider, epochToIsoDate, epochToIsoDatetime, friendlyLabel, ghTokenProvider, isParticipant, openReadonly, projectKeyFromCwd, resolvePluginParticipants, sqliteAvailable, tableColumns, tableExists, tryOpenReadonly, verifyInstance };