@getbourdon/participants 0.2.0 → 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
@@ -605,6 +605,329 @@ declare class OpenClawParticipant implements BourdonParticipant {
605
605
  healthCheck(): HealthStatus;
606
606
  }
607
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
+
608
931
  /**
609
932
  * Participant discovery — a STATIC TS registry replacing Python's `pkgutil`
610
933
  * package scan + entry-point duck-type (`participants/__init__.py`).
@@ -626,10 +949,9 @@ declare class OpenClawParticipant implements BourdonParticipant {
626
949
  type ParticipantCtor = new () => BourdonParticipant;
627
950
  /**
628
951
  * The first-party reader registry. Order here is irrelevant — discovery sorts by
629
- * `agentId`. (cursor / copilot-cli are the heavier SQLite readers; copilot is the
630
- * convention-file reader; cascade reads Windsurf; openclaw is the quarantined-
631
- * class network reader. codex — the ~2.6k-line turn-compiler reader — is still
632
- * deferred.)
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.
633
955
  */
634
956
  declare const FIRST_PARTY: ParticipantCtor[];
635
957
  /**
@@ -646,4 +968,4 @@ declare function discoverParticipants(ctors?: ParticipantCtor[]): BourdonPartici
646
968
  */
647
969
  declare function resolvePluginParticipants(): ParticipantCtor[];
648
970
 
649
- export { type AgentStore, type AuthProvider, type BourdonParticipant, CONTRACT_VERSION, CacheEntry, CascadeParticipant, ClaudeCodeParticipant, CopilotCliParticipant, CopilotParticipant, 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 };
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 };