@basou/core 0.29.0 → 0.30.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.
package/dist/index.d.ts CHANGED
@@ -2,6 +2,13 @@ import { z } from 'zod';
2
2
  import { SimpleGit } from 'simple-git';
3
3
  import { ChildProcess } from 'node:child_process';
4
4
 
5
+ /**
6
+ * Predicate deciding whether a candidate executable is reachable on PATH.
7
+ * Exposed as a parameter on the per-tool `resolve*Command` helpers so tests can
8
+ * substitute a deterministic mock; production callers rely on {@link isOnPath}.
9
+ */
10
+ type CommandLookup = (command: string) => Promise<boolean>;
11
+
5
12
  /**
6
13
  * Static metadata identifying the claude-code adapter as the session source.
7
14
  * Consumed by the CLI orchestration when populating `session.yaml.source`
@@ -13,13 +20,6 @@ declare const claudeCodeAdapterMetadata: {
13
20
  readonly kind: "claude-code-adapter";
14
21
  readonly version: "0.1.0";
15
22
  };
16
- /**
17
- * Lookup predicate used by {@link resolveClaudeCodeCommand} to decide
18
- * whether a candidate executable is reachable on PATH. Exposed as a
19
- * parameter so tests can substitute a deterministic mock; production
20
- * callers should omit it and rely on the default `which`-based lookup.
21
- */
22
- type CommandLookup = (command: string) => Promise<boolean>;
23
23
  /**
24
24
  * Resolve the Claude Code CLI executable name. Tries `claude-code` first
25
25
  * and falls back to `claude`; the first candidate found on PATH wins.
@@ -63,6 +63,8 @@ type BuildStopHookCommandOptions = {
63
63
  cliEntry: string;
64
64
  /** Register the blocking (opt-in enforcement) form. */
65
65
  block?: boolean;
66
+ /** Enable the opt-in review gate (adds `--require-review`). */
67
+ requireReview?: boolean;
66
68
  /** Override the file-edit threshold passed to `hook stop`. */
67
69
  minEdits?: number;
68
70
  };
@@ -219,6 +221,7 @@ declare const SessionInnerImportSchema: z.ZodObject<{
219
221
  "claude-code-adapter": "claude-code-adapter";
220
222
  import: "import";
221
223
  "claude-code-import": "claude-code-import";
224
+ "codex-adapter": "codex-adapter";
222
225
  "codex-import": "codex-import";
223
226
  human: "human";
224
227
  terminal: "terminal";
@@ -284,6 +287,7 @@ declare const SessionImportPayloadSchema: z.ZodObject<{
284
287
  "claude-code-adapter": "claude-code-adapter";
285
288
  import: "import";
286
289
  "claude-code-import": "claude-code-import";
290
+ "codex-adapter": "codex-adapter";
287
291
  "codex-import": "codex-import";
288
292
  human: "human";
289
293
  terminal: "terminal";
@@ -566,6 +570,39 @@ declare const SessionImportPayloadSchema: z.ZodObject<{
566
570
  note: "note";
567
571
  next_step: "next_step";
568
572
  }>>;
573
+ }, z.core.$strip>, z.ZodObject<{
574
+ schema_version: z.ZodLiteral<"0.1.0">;
575
+ id: z.ZodString & z.ZodType<`evt_${string}`, string, z.core.$ZodTypeInternals<`evt_${string}`, string>>;
576
+ session_id: z.ZodString & z.ZodType<`ses_${string}`, string, z.core.$ZodTypeInternals<`ses_${string}`, string>>;
577
+ occurred_at: z.ZodString;
578
+ source: z.ZodString;
579
+ prev_hash: z.ZodOptional<z.ZodString>;
580
+ type: z.ZodLiteral<"review_recorded">;
581
+ reviewer: z.ZodString;
582
+ target: z.ZodString;
583
+ verdict: z.ZodOptional<z.ZodEnum<{
584
+ pass: "pass";
585
+ "needs-attention": "needs-attention";
586
+ fail: "fail";
587
+ }>>;
588
+ findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
589
+ title: z.ZodString;
590
+ severity: z.ZodOptional<z.ZodEnum<{
591
+ low: "low";
592
+ medium: "medium";
593
+ high: "high";
594
+ }>>;
595
+ location: z.ZodOptional<z.ZodString>;
596
+ summary: z.ZodOptional<z.ZodString>;
597
+ }, z.core.$strip>>>;
598
+ blocked: z.ZodOptional<z.ZodArray<z.ZodObject<{
599
+ title: z.ZodString;
600
+ reason: z.ZodEnum<{
601
+ "spec-deviation": "spec-deviation";
602
+ "design-reversal": "design-reversal";
603
+ }>;
604
+ why: z.ZodOptional<z.ZodString>;
605
+ }, z.core.$strip>>>;
569
606
  }, z.core.$strip>, z.ZodObject<{
570
607
  schema_version: z.ZodLiteral<"0.1.0">;
571
608
  id: z.ZodString & z.ZodType<`evt_${string}`, string, z.core.$ZodTypeInternals<`evt_${string}`, string>>;
@@ -682,6 +719,31 @@ type StopHookEvaluationInput = {
682
719
  };
683
720
  /** Why the hook stayed silent (useful for tests and `--json` introspection). */
684
721
  type StopHookSilentReason = "stop_hook_active" | "not_substantive" | "already_captured";
722
+ /**
723
+ * Why the review gate stayed silent. The gate fires only when a SHIP act, a
724
+ * substantive-code edit, and the ABSENCE of a review record all hold; each
725
+ * reason names the first of those three that did not.
726
+ * - `stop_hook_active`: loop guard — a continuation turn never fires.
727
+ * - `no_ship_act`: nothing was shipped this turn (review is a pre-ship act, so
728
+ * a turn that did not push / open / merge owes no review).
729
+ * - `not_substantive_code`: shipped, but fewer than `minEdits` file edits.
730
+ * - `already_reviewed`: a `basou review record` ran this session.
731
+ */
732
+ type ReviewGateSilentReason = "stop_hook_active" | "no_ship_act" | "not_substantive_code" | "already_reviewed";
733
+ /**
734
+ * The review gate's verdict, computed INDEPENDENTLY of the capture gate in the
735
+ * same transcript pass: a session can have captured its decisions yet still owe
736
+ * a review (it shipped code without recording one), and vice versa. Returned
737
+ * alongside the capture verdict; no caller renders it yet — a follow-on slice
738
+ * will have the CLI compose it with the capture signal into the nudge / block.
739
+ */
740
+ type ReviewGateResult = {
741
+ fires: false;
742
+ reason: ReviewGateSilentReason;
743
+ } | {
744
+ fires: true;
745
+ additionalContext: string;
746
+ };
685
747
  type StopHookCounts = {
686
748
  /** Bash tool uses (informational — does NOT drive the trigger). */
687
749
  commandCount: number;
@@ -693,9 +755,11 @@ type StopHookCounts = {
693
755
  type StopHookEvaluation = ({
694
756
  kind: "silent";
695
757
  reason: StopHookSilentReason;
758
+ review: ReviewGateResult;
696
759
  } & StopHookCounts) | ({
697
760
  kind: "nudge";
698
761
  additionalContext: string;
762
+ review: ReviewGateResult;
699
763
  } & StopHookCounts);
700
764
  /**
701
765
  * Decide whether a finished turn warrants a non-blocking capture nudge.
@@ -717,9 +781,42 @@ type StopHookEvaluation = ({
717
781
  * - no capture verb (`basou decision capture` / `decision record` / `note`)
718
782
  * was run this session, so a session that already recorded its intent is
719
783
  * left alone.
784
+ *
785
+ * It ALSO computes a second, independent verdict: the {@link ReviewGateResult}
786
+ * (whether a substantive-code session shipped — push / PR / merge — without
787
+ * recording a review). The two are computed in one transcript pass and returned
788
+ * together; the CLI composes them. The review verdict is purely additive here —
789
+ * the capture `kind` / `additionalContext` / `reason` are byte-identical to
790
+ * before, so consumers that read only the capture signal are unaffected.
720
791
  */
721
792
  declare function evaluateStopHook(input: StopHookEvaluationInput): StopHookEvaluation;
722
793
 
794
+ /** Alias kept for API symmetry with the claude-code adapter's `CommandLookup`. */
795
+ type CodexCommandLookup = CommandLookup;
796
+ /**
797
+ * Static metadata identifying a live `basou run codex` session source. The twin
798
+ * of {@link import("../claude-code/claude-code-adapter.js").claudeCodeAdapterMetadata};
799
+ * `kind` is part of the wire format defined by the session schema
800
+ * (`SessionSourceKindSchema`), so do not change it without a coordinated schema
801
+ * migration. Distinct from `codex-import` (the after-the-fact rollout importer).
802
+ */
803
+ declare const codexAdapterMetadata: {
804
+ readonly kind: "codex-adapter";
805
+ readonly version: "0.1.0";
806
+ };
807
+ /**
808
+ * Resolve the Codex CLI executable name. Only `codex` is a candidate (unlike
809
+ * claude-code's `claude-code`/`claude` pair, Codex ships a single binary name).
810
+ *
811
+ * Throws a fixed-message Error when it is not reachable, so callers can present
812
+ * a single user-facing prompt to install the CLI.
813
+ *
814
+ * @throws Error("Codex CLI not found in PATH. Install codex first.")
815
+ */
816
+ declare function resolveCodexCommand(lookup?: CommandLookup): Promise<{
817
+ command: string;
818
+ }>;
819
+
723
820
  /**
724
821
  * The `source` string stamped on every event derived from an OpenAI Codex
725
822
  * native rollout log, and the matching session `source.kind`.
@@ -1192,6 +1289,58 @@ declare const NoteAddedEventSchema: z.ZodObject<{
1192
1289
  next_step: "next_step";
1193
1290
  }>>;
1194
1291
  }, z.core.$strip>;
1292
+ declare const ReviewFindingSchema: z.ZodObject<{
1293
+ title: z.ZodString;
1294
+ severity: z.ZodOptional<z.ZodEnum<{
1295
+ low: "low";
1296
+ medium: "medium";
1297
+ high: "high";
1298
+ }>>;
1299
+ location: z.ZodOptional<z.ZodString>;
1300
+ summary: z.ZodOptional<z.ZodString>;
1301
+ }, z.core.$strip>;
1302
+ declare const ReviewBlockedSchema: z.ZodObject<{
1303
+ title: z.ZodString;
1304
+ reason: z.ZodEnum<{
1305
+ "spec-deviation": "spec-deviation";
1306
+ "design-reversal": "design-reversal";
1307
+ }>;
1308
+ why: z.ZodOptional<z.ZodString>;
1309
+ }, z.core.$strip>;
1310
+ declare const ReviewRecordedEventSchema: z.ZodObject<{
1311
+ schema_version: z.ZodLiteral<"0.1.0">;
1312
+ id: z.ZodString & z.ZodType<`evt_${string}`, string, z.core.$ZodTypeInternals<`evt_${string}`, string>>;
1313
+ session_id: z.ZodString & z.ZodType<`ses_${string}`, string, z.core.$ZodTypeInternals<`ses_${string}`, string>>;
1314
+ occurred_at: z.ZodString;
1315
+ source: z.ZodString;
1316
+ prev_hash: z.ZodOptional<z.ZodString>;
1317
+ type: z.ZodLiteral<"review_recorded">;
1318
+ reviewer: z.ZodString;
1319
+ target: z.ZodString;
1320
+ verdict: z.ZodOptional<z.ZodEnum<{
1321
+ pass: "pass";
1322
+ "needs-attention": "needs-attention";
1323
+ fail: "fail";
1324
+ }>>;
1325
+ findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1326
+ title: z.ZodString;
1327
+ severity: z.ZodOptional<z.ZodEnum<{
1328
+ low: "low";
1329
+ medium: "medium";
1330
+ high: "high";
1331
+ }>>;
1332
+ location: z.ZodOptional<z.ZodString>;
1333
+ summary: z.ZodOptional<z.ZodString>;
1334
+ }, z.core.$strip>>>;
1335
+ blocked: z.ZodOptional<z.ZodArray<z.ZodObject<{
1336
+ title: z.ZodString;
1337
+ reason: z.ZodEnum<{
1338
+ "spec-deviation": "spec-deviation";
1339
+ "design-reversal": "design-reversal";
1340
+ }>;
1341
+ why: z.ZodOptional<z.ZodString>;
1342
+ }, z.core.$strip>>>;
1343
+ }, z.core.$strip>;
1195
1344
  declare const AdapterOutputEventSchema: z.ZodObject<{
1196
1345
  schema_version: z.ZodLiteral<"0.1.0">;
1197
1346
  id: z.ZodString & z.ZodType<`evt_${string}`, string, z.core.$ZodTypeInternals<`evt_${string}`, string>>;
@@ -1447,6 +1596,39 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1447
1596
  note: "note";
1448
1597
  next_step: "next_step";
1449
1598
  }>>;
1599
+ }, z.core.$strip>, z.ZodObject<{
1600
+ schema_version: z.ZodLiteral<"0.1.0">;
1601
+ id: z.ZodString & z.ZodType<`evt_${string}`, string, z.core.$ZodTypeInternals<`evt_${string}`, string>>;
1602
+ session_id: z.ZodString & z.ZodType<`ses_${string}`, string, z.core.$ZodTypeInternals<`ses_${string}`, string>>;
1603
+ occurred_at: z.ZodString;
1604
+ source: z.ZodString;
1605
+ prev_hash: z.ZodOptional<z.ZodString>;
1606
+ type: z.ZodLiteral<"review_recorded">;
1607
+ reviewer: z.ZodString;
1608
+ target: z.ZodString;
1609
+ verdict: z.ZodOptional<z.ZodEnum<{
1610
+ pass: "pass";
1611
+ "needs-attention": "needs-attention";
1612
+ fail: "fail";
1613
+ }>>;
1614
+ findings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1615
+ title: z.ZodString;
1616
+ severity: z.ZodOptional<z.ZodEnum<{
1617
+ low: "low";
1618
+ medium: "medium";
1619
+ high: "high";
1620
+ }>>;
1621
+ location: z.ZodOptional<z.ZodString>;
1622
+ summary: z.ZodOptional<z.ZodString>;
1623
+ }, z.core.$strip>>>;
1624
+ blocked: z.ZodOptional<z.ZodArray<z.ZodObject<{
1625
+ title: z.ZodString;
1626
+ reason: z.ZodEnum<{
1627
+ "spec-deviation": "spec-deviation";
1628
+ "design-reversal": "design-reversal";
1629
+ }>;
1630
+ why: z.ZodOptional<z.ZodString>;
1631
+ }, z.core.$strip>>>;
1450
1632
  }, z.core.$strip>, z.ZodObject<{
1451
1633
  schema_version: z.ZodLiteral<"0.1.0">;
1452
1634
  id: z.ZodString & z.ZodType<`evt_${string}`, string, z.core.$ZodTypeInternals<`evt_${string}`, string>>;
@@ -1501,6 +1683,12 @@ type TaskDeletedEvent = z.infer<typeof TaskDeletedEventSchema>;
1501
1683
  type TaskArchivedEvent = z.infer<typeof TaskArchivedEventSchema>;
1502
1684
  /** Narrowed runtime type for the `note_added` event variant. */
1503
1685
  type NoteAddedEvent = z.infer<typeof NoteAddedEventSchema>;
1686
+ /** Narrowed runtime type for the `review_recorded` event variant. */
1687
+ type ReviewRecordedEvent = z.infer<typeof ReviewRecordedEventSchema>;
1688
+ /** One finding surfaced by a `review_recorded` event. */
1689
+ type ReviewFinding = z.infer<typeof ReviewFindingSchema>;
1690
+ /** One blocked finding (spec-deviation / design-reversal) of a `review_recorded` event. */
1691
+ type ReviewBlocked = z.infer<typeof ReviewBlockedSchema>;
1504
1692
  /** Narrowed runtime type for the `adapter_output` event variant (.strict()). */
1505
1693
  type AdapterOutputEvent = z.infer<typeof AdapterOutputEventSchema>;
1506
1694
 
@@ -1579,6 +1767,7 @@ type SessionStatus = z.infer<typeof SessionStatusSchema>;
1579
1767
  * - `claude-code-adapter` — a live `basou run claude-code` process wrap.
1580
1768
  * - `claude-code-import` — derived after the fact from a Claude Code native
1581
1769
  * transcript (`~/.claude/projects/*.jsonl`) by `basou import claude-code`.
1770
+ * - `codex-adapter` — a live `basou run codex` process wrap.
1582
1771
  * - `codex-import` — derived after the fact from an OpenAI Codex native
1583
1772
  * rollout log (date-partitioned `~/.codex/sessions`) by `basou import codex`.
1584
1773
  * - `import` — a round-trip of a Basou-format export (`basou session import`).
@@ -1588,6 +1777,7 @@ declare const SessionSourceKindSchema: z.ZodEnum<{
1588
1777
  "claude-code-adapter": "claude-code-adapter";
1589
1778
  import: "import";
1590
1779
  "claude-code-import": "claude-code-import";
1780
+ "codex-adapter": "codex-adapter";
1591
1781
  "codex-import": "codex-import";
1592
1782
  human: "human";
1593
1783
  terminal: "terminal";
@@ -1672,6 +1862,7 @@ declare const SessionSchema: z.ZodObject<{
1672
1862
  "claude-code-adapter": "claude-code-adapter";
1673
1863
  import: "import";
1674
1864
  "claude-code-import": "claude-code-import";
1865
+ "codex-adapter": "codex-adapter";
1675
1866
  "codex-import": "codex-import";
1676
1867
  human: "human";
1677
1868
  terminal: "terminal";
@@ -5325,6 +5516,63 @@ type ReviewGapsInput = {
5325
5516
  */
5326
5517
  declare function findReviewGaps(input: ReviewGapsInput): Promise<ReviewGapsSummary>;
5327
5518
 
5519
+ /**
5520
+ * The deterministic writer for `basou review record` — the twin of
5521
+ * `basou decision capture`. The in-loop agent runs a review (with a
5522
+ * vendor-specific command), then pipes a JSON object describing what ran;
5523
+ * basou parses + validates it here and writes a `review_recorded` event,
5524
+ * with NO runtime LLM. Keeping parse + build in core (rather than the CLI,
5525
+ * where `decision capture` happens to live) makes the writer unit-testable
5526
+ * on its own and reusable by the read-only `review-gaps` surfacer.
5527
+ *
5528
+ * This is a self-report: basou records that a review happened; it does not
5529
+ * verify the review actually executed. Cryptographic enforcement is the
5530
+ * bridle's (mcp-bridle) concern — core stays read-only/advisory.
5531
+ */
5532
+ /** A finding in the review record input (the on-wire `findings[]` shape). */
5533
+ type ReviewRecordFindingInput = ReviewFinding;
5534
+ /** A blocked finding in the review record input (the on-wire `blocked[]` shape). */
5535
+ type ReviewRecordBlockedInput = ReviewBlocked;
5536
+ /** A parsed + validated review record: required minimum + optional rich fields. */
5537
+ type ReviewRecordInput = {
5538
+ /** What/who reviewed (e.g. "codex", a model name, "self"). Required. */
5539
+ reviewer: string;
5540
+ /** What was reviewed (e.g. "working-tree", a git ref, "PR #145"). Required. */
5541
+ target: string;
5542
+ /** Overall outcome. Optional. */
5543
+ verdict?: "pass" | "needs-attention" | "fail";
5544
+ /** Findings surfaced by the review. Optional. */
5545
+ findings?: ReviewRecordFindingInput[];
5546
+ /**
5547
+ * Findings blocked as spec-deviation / design-reversal. Optional, but an
5548
+ * explicit empty array is encouraged — it records "I blocked nothing" as the
5549
+ * adversarial-review protocol requires.
5550
+ */
5551
+ blocked?: ReviewRecordBlockedInput[];
5552
+ };
5553
+ /** Actionable hint shown when nothing is piped in. */
5554
+ declare const REVIEW_RECORD_NO_INPUT_HINT = "No input: pipe a JSON object describing the review to stdin or pass --file <path>.";
5555
+ /**
5556
+ * Parse + validate the review record input — a SINGLE JSON object (one
5557
+ * invocation = one review), unlike `decision capture`'s array. Errors name the
5558
+ * offending field (e.g. `findings[2].severity must be ...`) so the in-loop
5559
+ * agent can self-correct without guessing. Pure: no disk/environment access.
5560
+ */
5561
+ declare function parseReviewRecordInput(raw: string): ReviewRecordInput;
5562
+ /**
5563
+ * Build the `review_recorded` event from a validated input. Mirrors
5564
+ * `buildDecisionEvent`: optional fields are spread only when present so an
5565
+ * event with just the required minimum round-trips byte-identically.
5566
+ */
5567
+ declare function buildReviewRecordedEvent(input: {
5568
+ eventId: PrefixedId<"evt">;
5569
+ sessionId: PrefixedId<"ses">;
5570
+ occurredAt: string;
5571
+ review: ReviewRecordInput;
5572
+ }): Event;
5573
+ /** Ad-hoc session label for a recorded review: `Ad-hoc review: <reviewer> -> <target>`. */
5574
+ declare function buildReviewRecordLabel(review: ReviewRecordInput): string;
5575
+
5328
5576
  /**
5329
5577
  * Internal abstraction over child-process execution.
5330
5578
  *
@@ -5568,6 +5816,10 @@ declare const GENERATED_END = "<!-- BASOU:GENERATED:END -->";
5568
5816
  declare const PROTOCOL_START = "<!-- BASOU:PROTOCOLS:START -->";
5569
5817
  /** Marker line that ends a managed protocol block. */
5570
5818
  declare const PROTOCOL_END = "<!-- BASOU:PROTOCOLS:END -->";
5819
+ /** Marker line that begins a managed orientation block in a vendor context face (e.g. ~/.codex/AGENTS.md). */
5820
+ declare const ORIENTATION_START = "<!-- BASOU:ORIENTATION:START -->";
5821
+ /** Marker line that ends a managed orientation block. */
5822
+ declare const ORIENTATION_END = "<!-- BASOU:ORIENTATION:END -->";
5571
5823
  /** A start/end marker pair. Both lines are matched whole-line, exact. */
5572
5824
  type Markers = {
5573
5825
  start: string;
@@ -5886,4 +6138,4 @@ declare function overwriteYamlFile(filePath: string, value: unknown): Promise<vo
5886
6138
  */
5887
6139
  declare const BASOU_CORE_VERSION = "0.1.0";
5888
6140
 
5889
- export { ACTIVE_GAP_CAP_MS, AGENT_INFRA_DIRS, type ActiveTimeBasis, type AdapterOutputEvent, type AdoptCandidate, type AdoptCandidateKind, type AppendBasouGitignoreOptions, type AppendBasouGitignoreResult, type AppendEventToExistingInput, type AppendEventToExistingResult, type Approval, type ApprovalApprovedEvent, type ApprovalExpiredEvent, ApprovalIdSchema, type ApprovalLocation, type ApprovalRejectedEvent, type ApprovalRequestedEvent, ApprovalSchema, type ApprovalStatus, ApprovalStatusSchema, type ArchivePlan, type ArchiveTaskInput, type ArchiveTaskResult, type AttachTaskInput, type AttachUpdateTaskStatusInput, type AttachableStatus, BASOU_CORE_VERSION, type BasouPaths, type BuildStopHookCommandOptions, type BulkChainResult, CLAUDE_IMPORT_SOURCE, CODEX_IMPORT_SOURCE, type CaptureMode, type ChainBreakReason, type ChainTailState, type ChainVerdict, type ChainVerdictStatus, type ChainedEvents, ChildProcessRunner, type CitedReview, type ClaudeSettings, type ClaudeTranscriptRecord, type ClaudeTranscriptToPayloadOptions, type CodexRolloutRecord, type CodexRolloutToPayloadOptions, type CommandExecutedEvent, type CommandLookup, type CreateAdHocSessionInput, type CreateAdHocSessionResult, type CreateAdHocTaskInput, type CreateManifestInput, type CreateTaskInput, type CreateTaskResult, DEFAULT_STOP_HOOK_MIN_EDITS, type DayWorkStats, DecisionIdSchema, type DecisionRecordedEvent, type DecisionsRendererInput, type DecisionsRendererResult, type DeleteTaskInput, type DeleteTaskResult, type DiffResult, type EditTaskInput, type EditTaskResult, type Event, EventIdSchema, EventSchema, EventSourceSchema, type ExistingViewLink, FailedToFinalizeError, type FederatedRoot, type FileChange, type FileChangeStatus, type FileChangedEvent, GENERATED_END, GENERATED_START, type GitSnapshot, type GitSnapshotEvent, type GitignorePlanSummary, type HandoffRendererInput, type HandoffRendererResult, ID_PREFIXES, type IdPrefix, type ImportSessionOptions, type ImportSessionResult, type InstructionFileFact, type InstructionSymlinkFact, type InstructionSymlinkState, IsoTimestampSchema, JSON_SCHEMA_VERSION, type JsonSchemaArtifact, type LoadFederatedOptions, type LoadSessionEntriesOptions, type LoadTaskEntriesOptions, type LoadedApproval, type LockHandle, type LockScope, type Manifest, ManifestSchema, type MarkerSection, type Markers, type MeasureAvailability, type NoteAddedEvent, type OrientationRendererInput, type OrientationRendererResult, type OrientationSummary, PROTOCOL_END, PROTOCOL_START, type PrefixedId, type PresetAction, type PresetCollision, type PresetMarkerConflict, type PresetMarkerKind, type PresetPlanSummary, type PresetRepo, type ProcessRunner, type PublishKind, type PublishTarget, type RechainOptions, type RechainResult, type ReconcileAllResult, type ReconcileAllTasksInput, type ReconcileAllTasksOptions, type ReconcileFailure, type ReconcileResult, type ReconcileTaskInput, type RefreshLinkageInput, type RefreshLinkageResult, type ReimportOptions, type ReimportResult, type RenamePlan, type ReplayOptions, type ReplayWarning, type RepoEntry, type RepoGitignoreFacts, type RepoGitignorePlan, type RepoInstructions, type RepoLanguage, type RepoPresetFacts, type RepoPresetPlan, type RepoSymlinkFacts, type RepoSymlinkPlan, type RepoVisibility, type RepoWiringFacts, type ReportApprovalItem, type ReportData, type ReportDecisionItem, type ReportRendererInput, type ReportRendererResult, type ReportSessionItem, type ReportTaskItem, type RetrofitAction, type RetrofitAgentsState, type RetrofitFacts, type RetrofitPlan, type RetrofitReason, type ReviewGapRepoSummary, type ReviewGapUnit, type ReviewGapVerdict, type ReviewGapsInput, type ReviewGapsSummary, type RiskLevel, RiskLevelSchema, type RosterAdoptionPlan, type RosterDriftSummary, type RunOptions, type RunResult, STOP_HOOK_TIMEOUT_SECONDS, STUCK_THRESHOLD_MS, type SanitizePathOptions, type SanitizeRelatedFilesResult, SchemaVersionSchema, type Session, type SessionEndedEvent, type SessionEntry, SessionIdSchema, type SessionImportPayload, SessionImportPayloadSchema, type SessionInnerImportInput, SessionInnerImportSchema, type SessionIntegrity, SessionIntegritySchema, type SessionMetrics, SessionMetricsSchema, SessionSchema, type SessionSkipReason, type SessionSourceKind, SessionSourceKindSchema, type SessionStartedEvent, type SessionStatus, type SessionStatusChangedEvent, SessionStatusSchema, type SessionWorkStats, type SourceRootScope, type SourceRootsReconcile, type SourceWorkStats, type StatusCount, StatusSchema, type StatusSnapshot, type StopHookEvaluation, type StopHookEvaluationInput, type StopHookRemoval, type StopHookSilentReason, type StopHookUpsert, type SuspectReason, type SymlinkCollision, type SymlinkConflict, type SymlinkPlanSummary, type Task, type TaskArchivedEvent, type TaskCreatedEvent, type TaskDeletedEvent, type TaskDocument, TaskIdSchema, type TaskLinkageRefreshedEvent, type TaskReconciledEvent, TaskSchema, type TaskSkipReason, type TaskStatus, type TaskStatusChangedEvent, type TaskStatusCount, TaskStatusSchema, TaskWriteAfterEventError, type TaskWriteAfterEventPhase, type TokenTotals, type UpdateAdHocTaskStatusInput, type UpdateTaskStatusInput, type UpdateTaskStatusResult, type ViewCollision, type ViewConflict, type ViewLinkState, type ViewRepoFact, type ViewStrayUnknown, type WiringRisk, type WiringSummary, type WorkStatsInput, type WorkStatsResult, type WorkStatsTotals, WorkspaceIdSchema, type WorkspaceViewPlan, type WriteEventsBulkOptions, type WriteTaskFileMode, acquireLock, appendBasouGitignore, appendChainedEvent, appendChainedEventLocked, appendEvent, appendEventToExistingSession, archiveTask, assertBasouRootSafe, basouPaths, buildJsonSchemas, buildStatusSnapshot, buildStopHookCommand, chainEvents, chainRawJsonLines, classifyFilesBySourceRoot, classifyRetrofit, classifySuspect, claudeCodeAdapterMetadata, claudeTranscriptToImportPayload, codexRolloutToImportPayload, computeWorkStats, createAdHocSessionWithEvent, createManifest, createTaskWithEvent, deleteTask, editTask, ensureBasouDirectory, enumerateApprovals, enumerateArchivedTaskIds, enumerateSessionDirs, enumerateTaskIds, evaluateStopHook, finalizeSessionYaml, findBasouStopHookCommand, findErrorCode, findReviewGaps, formatDurationMs, genesisHash, getDiff, getSnapshot, importSessionFromJson, inspectChainTail, instructionMode, isBasouStopHookCommand, isGitNotFound, isImportDerivedSource, isLazyExpired, isRenderable, isValidPrefixedId, lineHash, linkYamlFile, loadApproval, loadFederatedSessionEntries, loadSessionEntries, loadTaskEntries, normalizeRepoKey, normalizeRepoPath, overwriteYamlFile, parseDuration, parseMarkers, pathBasename, planArchive, planGitignore, planRename, planRosterAdoption, planWorkspaceView, prefixedUlid, readAllEvents, readManifest, readMarkdownFile, readSessionYaml, readStatus, readTaskFile, readTaskFileWithArchiveFallback, readYamlFile, rechainSessionInPlace, reconcileAllTasks, reconcileSourceRoots, reconcileTask, refreshTaskLinkedSessions, reimportPreservingId, removeMarkerSection, removeStopHook, renderDecisions, renderHandoff, renderOrientation, renderPresetBlock, renderReport, renderWithMarkers, replayEvents, resolveBasouRepositoryRoot, resolveClaudeCodeCommand, resolveRepositoryRoot, resolveSessionId, resolveTaskId, safeSimpleGit, sanitizePath, sanitizeRelatedFiles, sanitizeWorkingDirectory, serializeEventLine, serializeJsonSchema, sessionWorkStatsFromEvents, summarizeAdapterOutput, summarizeOrientation, summarizePresetPlan, summarizeRosterDrift, summarizeSymlinkPlan, summarizeWiring, tryRemoteUrl, ulid, unknownManifestKeys, updateTaskStatusWithEvent, upsertStopHook, verifyEventsChain, writeEventsBulk, writeManifest, writeMarkdownFile, writeStatus, writeTaskFile, writeYamlFile };
6141
+ export { ACTIVE_GAP_CAP_MS, AGENT_INFRA_DIRS, type ActiveTimeBasis, type AdapterOutputEvent, type AdoptCandidate, type AdoptCandidateKind, type AppendBasouGitignoreOptions, type AppendBasouGitignoreResult, type AppendEventToExistingInput, type AppendEventToExistingResult, type Approval, type ApprovalApprovedEvent, type ApprovalExpiredEvent, ApprovalIdSchema, type ApprovalLocation, type ApprovalRejectedEvent, type ApprovalRequestedEvent, ApprovalSchema, type ApprovalStatus, ApprovalStatusSchema, type ArchivePlan, type ArchiveTaskInput, type ArchiveTaskResult, type AttachTaskInput, type AttachUpdateTaskStatusInput, type AttachableStatus, BASOU_CORE_VERSION, type BasouPaths, type BuildStopHookCommandOptions, type BulkChainResult, CLAUDE_IMPORT_SOURCE, CODEX_IMPORT_SOURCE, type CaptureMode, type ChainBreakReason, type ChainTailState, type ChainVerdict, type ChainVerdictStatus, type ChainedEvents, ChildProcessRunner, type CitedReview, type ClaudeSettings, type ClaudeTranscriptRecord, type ClaudeTranscriptToPayloadOptions, type CodexCommandLookup, type CodexRolloutRecord, type CodexRolloutToPayloadOptions, type CommandExecutedEvent, type CommandLookup, type CreateAdHocSessionInput, type CreateAdHocSessionResult, type CreateAdHocTaskInput, type CreateManifestInput, type CreateTaskInput, type CreateTaskResult, DEFAULT_STOP_HOOK_MIN_EDITS, type DayWorkStats, DecisionIdSchema, type DecisionRecordedEvent, type DecisionsRendererInput, type DecisionsRendererResult, type DeleteTaskInput, type DeleteTaskResult, type DiffResult, type EditTaskInput, type EditTaskResult, type Event, EventIdSchema, EventSchema, EventSourceSchema, type ExistingViewLink, FailedToFinalizeError, type FederatedRoot, type FileChange, type FileChangeStatus, type FileChangedEvent, GENERATED_END, GENERATED_START, type GitSnapshot, type GitSnapshotEvent, type GitignorePlanSummary, type HandoffRendererInput, type HandoffRendererResult, ID_PREFIXES, type IdPrefix, type ImportSessionOptions, type ImportSessionResult, type InstructionFileFact, type InstructionSymlinkFact, type InstructionSymlinkState, IsoTimestampSchema, JSON_SCHEMA_VERSION, type JsonSchemaArtifact, type LoadFederatedOptions, type LoadSessionEntriesOptions, type LoadTaskEntriesOptions, type LoadedApproval, type LockHandle, type LockScope, type Manifest, ManifestSchema, type MarkerSection, type Markers, type MeasureAvailability, type NoteAddedEvent, ORIENTATION_END, ORIENTATION_START, type OrientationRendererInput, type OrientationRendererResult, type OrientationSummary, PROTOCOL_END, PROTOCOL_START, type PrefixedId, type PresetAction, type PresetCollision, type PresetMarkerConflict, type PresetMarkerKind, type PresetPlanSummary, type PresetRepo, type ProcessRunner, type PublishKind, type PublishTarget, REVIEW_RECORD_NO_INPUT_HINT, type RechainOptions, type RechainResult, type ReconcileAllResult, type ReconcileAllTasksInput, type ReconcileAllTasksOptions, type ReconcileFailure, type ReconcileResult, type ReconcileTaskInput, type RefreshLinkageInput, type RefreshLinkageResult, type ReimportOptions, type ReimportResult, type RenamePlan, type ReplayOptions, type ReplayWarning, type RepoEntry, type RepoGitignoreFacts, type RepoGitignorePlan, type RepoInstructions, type RepoLanguage, type RepoPresetFacts, type RepoPresetPlan, type RepoSymlinkFacts, type RepoSymlinkPlan, type RepoVisibility, type RepoWiringFacts, type ReportApprovalItem, type ReportData, type ReportDecisionItem, type ReportRendererInput, type ReportRendererResult, type ReportSessionItem, type ReportTaskItem, type RetrofitAction, type RetrofitAgentsState, type RetrofitFacts, type RetrofitPlan, type RetrofitReason, type ReviewBlocked, type ReviewFinding, type ReviewGapRepoSummary, type ReviewGapUnit, type ReviewGapVerdict, type ReviewGapsInput, type ReviewGapsSummary, type ReviewGateResult, type ReviewGateSilentReason, type ReviewRecordBlockedInput, type ReviewRecordFindingInput, type ReviewRecordInput, type ReviewRecordedEvent, type RiskLevel, RiskLevelSchema, type RosterAdoptionPlan, type RosterDriftSummary, type RunOptions, type RunResult, STOP_HOOK_TIMEOUT_SECONDS, STUCK_THRESHOLD_MS, type SanitizePathOptions, type SanitizeRelatedFilesResult, SchemaVersionSchema, type Session, type SessionEndedEvent, type SessionEntry, SessionIdSchema, type SessionImportPayload, SessionImportPayloadSchema, type SessionInnerImportInput, SessionInnerImportSchema, type SessionIntegrity, SessionIntegritySchema, type SessionMetrics, SessionMetricsSchema, SessionSchema, type SessionSkipReason, type SessionSourceKind, SessionSourceKindSchema, type SessionStartedEvent, type SessionStatus, type SessionStatusChangedEvent, SessionStatusSchema, type SessionWorkStats, type SourceRootScope, type SourceRootsReconcile, type SourceWorkStats, type StatusCount, StatusSchema, type StatusSnapshot, type StopHookEvaluation, type StopHookEvaluationInput, type StopHookRemoval, type StopHookSilentReason, type StopHookUpsert, type SuspectReason, type SymlinkCollision, type SymlinkConflict, type SymlinkPlanSummary, type Task, type TaskArchivedEvent, type TaskCreatedEvent, type TaskDeletedEvent, type TaskDocument, TaskIdSchema, type TaskLinkageRefreshedEvent, type TaskReconciledEvent, TaskSchema, type TaskSkipReason, type TaskStatus, type TaskStatusChangedEvent, type TaskStatusCount, TaskStatusSchema, TaskWriteAfterEventError, type TaskWriteAfterEventPhase, type TokenTotals, type UpdateAdHocTaskStatusInput, type UpdateTaskStatusInput, type UpdateTaskStatusResult, type ViewCollision, type ViewConflict, type ViewLinkState, type ViewRepoFact, type ViewStrayUnknown, type WiringRisk, type WiringSummary, type WorkStatsInput, type WorkStatsResult, type WorkStatsTotals, WorkspaceIdSchema, type WorkspaceViewPlan, type WriteEventsBulkOptions, type WriteTaskFileMode, acquireLock, appendBasouGitignore, appendChainedEvent, appendChainedEventLocked, appendEvent, appendEventToExistingSession, archiveTask, assertBasouRootSafe, basouPaths, buildJsonSchemas, buildReviewRecordLabel, buildReviewRecordedEvent, buildStatusSnapshot, buildStopHookCommand, chainEvents, chainRawJsonLines, classifyFilesBySourceRoot, classifyRetrofit, classifySuspect, claudeCodeAdapterMetadata, claudeTranscriptToImportPayload, codexAdapterMetadata, codexRolloutToImportPayload, computeWorkStats, createAdHocSessionWithEvent, createManifest, createTaskWithEvent, deleteTask, editTask, ensureBasouDirectory, enumerateApprovals, enumerateArchivedTaskIds, enumerateSessionDirs, enumerateTaskIds, evaluateStopHook, finalizeSessionYaml, findBasouStopHookCommand, findErrorCode, findReviewGaps, formatDurationMs, genesisHash, getDiff, getSnapshot, importSessionFromJson, inspectChainTail, instructionMode, isBasouStopHookCommand, isGitNotFound, isImportDerivedSource, isLazyExpired, isRenderable, isValidPrefixedId, lineHash, linkYamlFile, loadApproval, loadFederatedSessionEntries, loadSessionEntries, loadTaskEntries, normalizeRepoKey, normalizeRepoPath, overwriteYamlFile, parseDuration, parseMarkers, parseReviewRecordInput, pathBasename, planArchive, planGitignore, planRename, planRosterAdoption, planWorkspaceView, prefixedUlid, readAllEvents, readManifest, readMarkdownFile, readSessionYaml, readStatus, readTaskFile, readTaskFileWithArchiveFallback, readYamlFile, rechainSessionInPlace, reconcileAllTasks, reconcileSourceRoots, reconcileTask, refreshTaskLinkedSessions, reimportPreservingId, removeMarkerSection, removeStopHook, renderDecisions, renderHandoff, renderOrientation, renderPresetBlock, renderReport, renderWithMarkers, replayEvents, resolveBasouRepositoryRoot, resolveClaudeCodeCommand, resolveCodexCommand, resolveRepositoryRoot, resolveSessionId, resolveTaskId, safeSimpleGit, sanitizePath, sanitizeRelatedFiles, sanitizeWorkingDirectory, serializeEventLine, serializeJsonSchema, sessionWorkStatsFromEvents, summarizeAdapterOutput, summarizeOrientation, summarizePresetPlan, summarizeRosterDrift, summarizeSymlinkPlan, summarizeWiring, tryRemoteUrl, ulid, unknownManifestKeys, updateTaskStatusWithEvent, upsertStopHook, verifyEventsChain, writeEventsBulk, writeManifest, writeMarkdownFile, writeStatus, writeTaskFile, writeYamlFile };