@basou/core 0.41.0 → 0.42.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.ts CHANGED
@@ -271,6 +271,16 @@ declare const SessionInnerImportSchema: z.ZodObject<{
271
271
  * --format json`. The top level is `.strict()`; unknown keys at the outer
272
272
  * envelope are rejected.
273
273
  */
274
+ /**
275
+ * The only import envelope version the importer accepts. The published JSON
276
+ * Schema pins it as a `const` and the runtime gate compares against it, so the
277
+ * portable contract and the implementation cannot drift: a third party who
278
+ * validates a payload against the published artifact gets the same answer the
279
+ * importer will give, instead of passing validation and being rejected at run
280
+ * time. Unrelated to the events INSIDE the envelope, which carry their own
281
+ * `schema_version` and are at 0.2.0.
282
+ */
283
+ declare const SESSION_IMPORT_SCHEMA_VERSION: "0.1.0";
274
284
  declare const SessionImportPayloadSchema: z.ZodObject<{
275
285
  schema_version: z.ZodString;
276
286
  session: z.ZodObject<{
@@ -425,7 +435,7 @@ declare const SessionImportPayloadSchema: z.ZodObject<{
425
435
  exit_code: z.ZodNullable<z.ZodNumber>;
426
436
  signal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
427
437
  received_signal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
428
- duration_ms: z.ZodNumber;
438
+ duration_ms: z.ZodNullable<z.ZodNumber>;
429
439
  }, z.core.$strip>, z.ZodObject<{
430
440
  schema_version: z.ZodString;
431
441
  id: z.ZodString & z.ZodType<`evt_${string}`, string, z.core.$ZodTypeInternals<`evt_${string}`, string>>;
@@ -681,7 +691,8 @@ type ClaudeTranscriptToPayloadOptions = {
681
691
  * decisions.md / orientation's latest-decision surface).
682
692
  *
683
693
  * Exit codes and per-command durations are not present in the transcript, so
684
- * `command_executed.exit_code` is `null` and `duration_ms` is `0`.
694
+ * `command_executed.exit_code` and `duration_ms` are both `null` basou
695
+ * observed neither.
685
696
  *
686
697
  * Returns `null` when the transcript has no timestamped records, or no
687
698
  * observable command / file / decision action — such sessions carry no
@@ -1165,6 +1176,25 @@ declare function enumerateApprovals(paths: BasouPaths): Promise<{
1165
1176
  */
1166
1177
  declare function isLazyExpired(approval: Approval, now: Date): boolean;
1167
1178
 
1179
+ /**
1180
+ * `schema_version` stamped on NEWLY WRITTEN events. Bumped to 0.2.0 when
1181
+ * `command_executed.duration_ms` became nullable, which widened the field's
1182
+ * domain and so is a breaking change to the format.
1183
+ *
1184
+ * The bump does not change what any value already on disk means: `0` meant "not
1185
+ * observed" before and still does. What changes is that a writer now says so
1186
+ * with `null` instead of storing the floor, and never writes `0` at all. So the
1187
+ * read rule needs no version branch (it lives in `observed-duration.ts` as
1188
+ * `readObservedDuration`), and the
1189
+ * version is a statement about validation, not about interpretation.
1190
+ *
1191
+ * Reading is unaffected — {@link SchemaVersionSchema} accepts any 0.x.y — so
1192
+ * events already on disk keep validating, and are not rewritten in place (a
1193
+ * session IS re-derived, and restamped, when its source log grows). Only EVENTS
1194
+ * carry this version: the other `.basou/` documents did not change, so their
1195
+ * `schema_version` stays 0.1.0.
1196
+ */
1197
+ declare const EVENT_SCHEMA_VERSION: "0.2.0";
1168
1198
  declare const SessionStartedEventSchema: z.ZodObject<{
1169
1199
  schema_version: z.ZodString;
1170
1200
  id: z.ZodString & z.ZodType<`evt_${string}`, string, z.core.$ZodTypeInternals<`evt_${string}`, string>>;
@@ -1265,7 +1295,7 @@ declare const CommandExecutedEventSchema: z.ZodObject<{
1265
1295
  exit_code: z.ZodNullable<z.ZodNumber>;
1266
1296
  signal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1267
1297
  received_signal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1268
- duration_ms: z.ZodNumber;
1298
+ duration_ms: z.ZodNullable<z.ZodNumber>;
1269
1299
  }, z.core.$strip>;
1270
1300
  declare const GitSnapshotEventSchema: z.ZodObject<{
1271
1301
  schema_version: z.ZodString;
@@ -1575,7 +1605,7 @@ declare const EventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1575
1605
  exit_code: z.ZodNullable<z.ZodNumber>;
1576
1606
  signal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1577
1607
  received_signal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1578
- duration_ms: z.ZodNumber;
1608
+ duration_ms: z.ZodNullable<z.ZodNumber>;
1579
1609
  }, z.core.$strip>, z.ZodObject<{
1580
1610
  schema_version: z.ZodString;
1581
1611
  id: z.ZodString & z.ZodType<`evt_${string}`, string, z.core.$ZodTypeInternals<`evt_${string}`, string>>;
@@ -1823,6 +1853,12 @@ type AdapterOutputEvent = z.infer<typeof AdapterOutputEventSchema>;
1823
1853
  * the unterminated tail parsed as a complete event. The line is dropped
1824
1854
  * instead of yielded so consumers cannot accidentally observe a
1825
1855
  * partially-written record.
1856
+ *
1857
+ * `retired_zero_duration` is ADVISORY: the line is valid and IS yielded. It
1858
+ * reports a `command_executed` carrying `duration_ms: 0` on an event version
1859
+ * whose writers never produce one, which no basou writer can create (they are
1860
+ * guarded) but a third party using this package's writers, or another host
1861
+ * reached through the federation reader, could. See `hasRetiredZeroDuration`.
1826
1862
  */
1827
1863
  type ReplayWarning = {
1828
1864
  kind: "partial_trailing_line";
@@ -1835,6 +1871,9 @@ type ReplayWarning = {
1835
1871
  kind: "schema_violation";
1836
1872
  line: number;
1837
1873
  cause: unknown;
1874
+ } | {
1875
+ kind: "retired_zero_duration";
1876
+ line: number;
1838
1877
  };
1839
1878
  type ReplayOptions = {
1840
1879
  /**
@@ -2101,6 +2140,15 @@ type ViewStrings = {
2101
2140
  headingForward: string;
2102
2141
  headingCurrency: string;
2103
2142
  inFlightTasksHeading: (n: number) => string;
2143
+ /**
2144
+ * Body line under the in-flight-tasks heading when NO task was ever
2145
+ * recorded here. "(none)" states that nothing is pending — a claim about
2146
+ * the work. This one claims only what it can see: that the record is
2147
+ * empty. It says nothing about whether the workspace should use tasks,
2148
+ * and names no command: the renderers report position, and a nudge that
2149
+ * cannot be silenced is noise (see `trackNudge`, which is gated).
2150
+ */
2151
+ noTasksRecorded: string;
2104
2152
  pendingApprovalsHeading: (n: number) => string;
2105
2153
  suspectSessionsHeading: (n: number) => string;
2106
2154
  openTracksHeading: (n: number) => string;
@@ -2149,6 +2197,10 @@ type ViewStrings = {
2149
2197
  headingNextWork: string;
2150
2198
  headingSessions: string;
2151
2199
  lastTaskLabel: string;
2200
+ /** "Work to do next" placeholder: tasks exist, none are open. */
2201
+ noPendingTasks: string;
2202
+ /** "Work to do next" placeholder: no task was ever recorded. */
2203
+ noTasksRecorded: string;
2152
2204
  decisionStaleNote: string;
2153
2205
  trackCloseInstruction: string;
2154
2206
  };
@@ -4335,6 +4387,10 @@ type OrientationSummary = {
4335
4387
  };
4336
4388
  /** Tasks whose status is `planned` or `in_progress`. */
4337
4389
  inFlightTasks: InFlightTask[];
4390
+ /** Whether any task was ever recorded here, by any surviving trace — lets a
4391
+ * zero in-flight count distinguish "all closed" from "never used here".
4392
+ * See {@link anyTaskEverRecorded}: a live count is NOT this. */
4393
+ anyTaskEverRecorded: boolean;
4338
4394
  /** Tasks whose status is `planned` ("where am I heading"). */
4339
4395
  plannedTasks: PlannedTask[];
4340
4396
  pendingApprovals: PendingApproval[];
@@ -5590,11 +5646,31 @@ type WorkspaceViewPlan = {
5590
5646
  declare function planWorkspaceView(facts: ViewRepoFact[], existing?: ExistingViewLink[], rosterNames?: string[]): WorkspaceViewPlan;
5591
5647
 
5592
5648
  /**
5593
- * Schema version of the on-disk Basou v0.1 formats these JSON Schemas describe.
5594
- * It tracks {@link SchemaVersionSchema} (the `schema_version` field), NOT the
5595
- * npm package version, so the `$id` URLs stay stable while the package moves.
5596
- */
5597
- declare const JSON_SCHEMA_VERSION = "0.1.0";
5649
+ * `schema_version` of each on-disk format, keyed by artifact basename.
5650
+ *
5651
+ * Per document, not workspace-wide: the formats version independently, so one
5652
+ * of them changing must not move the `$id` of the others. It tracks
5653
+ * {@link SchemaVersionSchema} (the `schema_version` field a writer stamps on
5654
+ * that document), NOT the npm package version, so a document's `$id` stays
5655
+ * stable while the package moves.
5656
+ *
5657
+ * The version a document is listed under is the version its WRITERS stamp, so
5658
+ * the published `$id` and the `schema_version` inside the same artifact always
5659
+ * agree. `session-import` is the case worth naming: its envelope still stamps
5660
+ * (and its importer still requires) `0.1.0`, while the events it carries are
5661
+ * individually versioned and now include `0.2.0` ones — so the envelope's bytes
5662
+ * changed without the envelope's own format changing.
5663
+ */
5664
+ declare const JSON_SCHEMA_VERSIONS: {
5665
+ readonly manifest: "0.1.0";
5666
+ readonly session: "0.1.0";
5667
+ readonly event: "0.2.0";
5668
+ readonly task: "0.1.0";
5669
+ readonly approval: "0.1.0";
5670
+ readonly status: "0.1.0";
5671
+ readonly "task-index": "0.1.0";
5672
+ readonly "session-import": "0.1.0";
5673
+ };
5598
5674
  /** One emitted JSON Schema artifact. */
5599
5675
  type JsonSchemaArtifact = {
5600
5676
  /** Artifact basename without extension (e.g. `session`). */
@@ -5606,8 +5682,9 @@ type JsonSchemaArtifact = {
5606
5682
  * Build the published JSON Schema artifacts from the canonical Zod schemas.
5607
5683
  *
5608
5684
  * Pure: no disk or environment access. Each artifact is `z.toJSONSchema` of the
5609
- * document schema, re-headed with a stable `$id` / `title` / `description` (the
5610
- * draft `$schema` from zod is preserved). This is the single generator used by
5685
+ * document schema, re-headed with an `$id` carrying that document's own
5686
+ * {@link JSON_SCHEMA_VERSIONS} entry, plus `title` / `description` (the draft
5687
+ * `$schema` from zod is preserved). This is the single generator used by
5611
5688
  * both the `gen:schemas` script (which writes the committed files) and the
5612
5689
  * drift-guard test (which asserts the committed files still match), so the two
5613
5690
  * can never disagree.
@@ -5629,6 +5706,83 @@ declare function buildJsonSchemas(): JsonSchemaArtifact[];
5629
5706
  * compare byte-for-byte. */
5630
5707
  declare function serializeJsonSchema(schema: Record<string, unknown>): string;
5631
5708
 
5709
+ /**
5710
+ * The duration a `command_executed` event actually OBSERVED, in milliseconds,
5711
+ * or `null` when it observed none.
5712
+ *
5713
+ * This is the single implementation of the read rule stated in
5714
+ * `docs/spec/schemas.md` §7.3. Every reader of `duration_ms` goes through it
5715
+ * instead of reading the field directly, so the rule cannot hold in one surface
5716
+ * and lapse in another.
5717
+ *
5718
+ * The rule needs no `schema_version` branch, because `0` means the same thing
5719
+ * on every version:
5720
+ *
5721
+ * - Under `0.1.0` the field could not be null, so a writer with nothing to
5722
+ * report stored `0` as the floor. Every command imported from a Claude Code
5723
+ * transcript, which carries no timing at all, was written that way.
5724
+ * - From `0.2.0` a writer records `null` instead and never writes `0` (see
5725
+ * {@link writeObservedDuration} and {@link hasRetiredZeroDuration}), so the
5726
+ * value survives only on events already on disk. Those are not rewritten in
5727
+ * place — that would break the tamper-evidence chain — though a session whose
5728
+ * source log grows is re-derived, which restamps its events at the current
5729
+ * version. A session whose source is gone keeps its 0.1.0 lines indefinitely.
5730
+ * - A `0` from any other writer is read the same way. A spawned process cannot
5731
+ * have run in under half a millisecond: `fork` + `exec` alone costs more, and
5732
+ * `Math.round` collapses anything below that anyway. So `0` is not a
5733
+ * duration a command can have had, whoever wrote it.
5734
+ */
5735
+ declare function readObservedDuration(ev: CommandExecutedEvent): number | null;
5736
+ /**
5737
+ * A measured duration as it should be WRITTEN: the measurement itself, or
5738
+ * `null` when there was nothing to observe.
5739
+ *
5740
+ * The counterpart of {@link readObservedDuration}, so the two halves of the
5741
+ * convention live side by side.
5742
+ *
5743
+ * A non-positive measurement is not an observation of a command. A spawn costs
5744
+ * real time — measured on one host, 40 of 40 `/usr/bin/true` spawns took over
5745
+ * 0.5ms (minimum 0.75ms, median 0.83ms) — and basou's own live capture times it
5746
+ * on a monotonic sub-millisecond clock, so a real spawn rounds to at least 1ms.
5747
+ * A zero or negative value therefore means the measurement itself is not
5748
+ * usable, not that the command ran instantly, and basou reports no duration it
5749
+ * cannot back.
5750
+ *
5751
+ * This depends on the caller measuring at sub-millisecond resolution. Taking
5752
+ * the difference of two whole-millisecond wall-clock readings does NOT
5753
+ * qualify: a 0.8ms spawn lands on 0 or 1 depending only on where in the
5754
+ * millisecond it started, and 5 of those same 40 runs came out 0 that way —
5755
+ * which this function would then report as unobserved. `ChildProcessRunner`
5756
+ * measures with {@link performance.now} for exactly that reason.
5757
+ *
5758
+ * The paths where nothing was timed at all (a spawn that failed before the
5759
+ * child ran, a run interrupted early) write null directly and do not come
5760
+ * through here.
5761
+ */
5762
+ declare function writeObservedDuration(measuredMs: number | null): number | null;
5763
+ /**
5764
+ * Event `schema_version` from which writers stopped emitting
5765
+ * `command_executed.duration_ms: 0` and record `null` instead.
5766
+ */
5767
+ declare const ZERO_DURATION_RETIRED_SINCE: "0.2.0";
5768
+ /**
5769
+ * Whether this event carries a `duration_ms` of `0` that its OWN version says
5770
+ * no writer should have produced.
5771
+ *
5772
+ * This is NOT the read rule. {@link readObservedDuration} treats `0` as
5773
+ * unobserved on every version and needs no version branch; this is a
5774
+ * data-quality check on top of it, and it is the only thing that makes the
5775
+ * 0.2.0 bump verifiable. Without it the invariant "a 0.2.0 writer never emits
5776
+ * 0" is a promise no code checks: the schema still accepts `0` (0.1.0 events
5777
+ * carrying it are on disk and must keep validating), so a future code path, or
5778
+ * a third party using this package's writers, could put one there and the read
5779
+ * rule would silently reinterpret it.
5780
+ *
5781
+ * A `0` on a pre-0.2.0 event is expected and not flagged: that was the floor a
5782
+ * writer stored when it had nothing to report.
5783
+ */
5784
+ declare function hasRetiredZeroDuration(ev: Event): boolean;
5785
+
5632
5786
  /**
5633
5787
  * The `.basou` on-disk format version, of the form `MAJOR.MINOR.PATCH`.
5634
5788
  *
@@ -5745,8 +5899,18 @@ type MeasureAvailability = {
5745
5899
  /** Always true (started_at + now bound the span). */
5746
5900
  span: boolean;
5747
5901
  /**
5748
- * `commandTimeMs` reflects real shell time. False for `claude-code-import`,
5749
- * whose transcript carries no per-command duration (recorded as 0).
5902
+ * `commandTimeMs` rests on at least one real observation: this session
5903
+ * observed a duration for at least one command, or its whole event stream was
5904
+ * read and shows it ran no commands (0ms is then the truth). False when it
5905
+ * ran commands and none was timed, and false when the stream was incomplete —
5906
+ * unreadable, or with lines dropped as malformed / schema-invalid — since
5907
+ * "ran no commands" is then unbacked.
5908
+ *
5909
+ * True does NOT mean every command was timed. When only some were,
5910
+ * `commandTimeMs` is a FLOOR and this flag does not say so — one boolean
5911
+ * cannot carry "all", "some" and "none". Measured 2026-09-10: 292 of 818
5912
+ * importable codex rollouts are partly timed, at 15.1% of commands overall.
5913
+ * Compare `commandCount` if the difference matters to the caller.
5750
5914
  */
5751
5915
  commandTime: boolean;
5752
5916
  /** At least one active interval could be measured (stored or event-derived). */
@@ -5824,7 +5988,8 @@ type SourceWorkStats = {
5824
5988
  decisionCount: number;
5825
5989
  eventCount: number;
5826
5990
  tokens: TokenTotals;
5827
- /** Every session of this kind reports real command time. */
5991
+ /** Every session of this kind has a real `commandTimeMs` (see
5992
+ * {@link MeasureAvailability.commandTime}); one untimed session clears it. */
5828
5993
  commandTimeReliable: boolean;
5829
5994
  /** At least one session of this kind captured token totals. */
5830
5995
  tokensAvailable: boolean;
@@ -5882,7 +6047,8 @@ type WorkStatsTotals = {
5882
6047
  decisionCount: number;
5883
6048
  eventCount: number;
5884
6049
  tokens: TokenTotals;
5885
- /** No `claude-code-import` sessions present, so command time is workspace-wide real. */
6050
+ /** Every session's `commandTimeMs` is a real measurement, so the workspace
6051
+ * total is too (see {@link MeasureAvailability.commandTime}). */
5886
6052
  commandTimeReliable: boolean;
5887
6053
  tokensAvailable: boolean;
5888
6054
  /** At least one session captured model compute time (`machine_active_time_ms`). */
@@ -5919,8 +6085,9 @@ type WorkStatsResult = {
5919
6085
  * produced few tool calls is still counted; idle gaps over `ACTIVE_GAP_CAP_MS`
5920
6086
  * (5 min) are not credited. Live sessions and pre-v2 imports lack that signal
5921
6087
  * and fall back to the action-event stream (`activeTimeBasis: "events"`).
5922
- * - `sessionSpanMs` overcounts (includes idle) and `commandTimeMs` is
5923
- * shell-execution only (0 for `claude-code-import`); both are kept as context.
6088
+ * - `sessionSpanMs` overcounts (includes idle) and `commandTimeMs` counts only
6089
+ * the shell time a source actually reported (nothing for `claude-code-import`,
6090
+ * whose transcript carries no timing); both are kept as context.
5924
6091
  *
5925
6092
  * The per-day view buckets the union intervals by `timeZone` (logs are UTC, so
5926
6093
  * a billing day needs an explicit zone). A union interval crossing local
@@ -5936,7 +6103,14 @@ declare function computeWorkStats(input: WorkStatsInput): Promise<WorkStatsResul
5936
6103
  * and exported so a single-session surface (e.g. `basou session show`) can
5937
6104
  * reuse the exact same measures the workspace aggregator produces.
5938
6105
  */
5939
- declare function sessionWorkStatsFromEvents(sessionId: string, inner: Session["session"], events: ReadonlyArray<Event>, now: Date, eventsUnreadable?: boolean): SessionWorkStats;
6106
+ declare function sessionWorkStatsFromEvents(sessionId: string, inner: Session["session"], events: ReadonlyArray<Event>, now: Date, eventsUnreadable?: boolean,
6107
+ /**
6108
+ * A line of `events.jsonl` was read but could not be used (malformed JSON or
6109
+ * a schema violation), so the stream is incomplete in a way replay cannot
6110
+ * see. A half-flushed trailing line does not count: that is the normal tail
6111
+ * of a live session.
6112
+ */
6113
+ eventsLostLines?: number): SessionWorkStats;
5940
6114
 
5941
6115
  type ReportRendererInput = {
5942
6116
  paths: BasouPaths;
@@ -6478,6 +6652,16 @@ type RunResult = {
6478
6652
  readonly started_at: string;
6479
6653
  /** ISO 8601 timestamp captured on the `close` event. */
6480
6654
  readonly ended_at: string;
6655
+ /**
6656
+ * Elapsed time on a monotonic sub-millisecond clock, rounded to whole
6657
+ * milliseconds — NOT `ended_at - started_at`, and not required to equal it:
6658
+ * those two are whole-millisecond wall-clock captures, and measured, 7 of 40
6659
+ * `/usr/bin/true` runs disagreed with their difference. The monotonic basis
6660
+ * is what keeps a sub-millisecond spawn from rounding to `0`, which callers
6661
+ * record as "no duration observed". One consequence on macOS: this clock
6662
+ * does not advance across a system sleep, so a command spanning a suspend
6663
+ * reports less than the wall interval it covered.
6664
+ */
6481
6665
  readonly duration_ms: number;
6482
6666
  readonly pid: number | null;
6483
6667
  };
@@ -6985,4 +7169,4 @@ declare function overwriteYamlFile(filePath: string, value: unknown): Promise<vo
6985
7169
  */
6986
7170
  declare const BASOU_CORE_VERSION = "0.1.0";
6987
7171
 
6988
- export { ACTIVE_GAP_CAP_MS, AGENT_INFRA_DIRS, type ActiveTimeBasis, type AdapterOutputEvent, type AdoptCandidate, type AdoptCandidateKind, type AnchorStarterInput, type AnchorStarterRepo, 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 CodexHooksFile, 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 IncompleteWiring, 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 MissingCanonical, 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 PresetStrings, 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 RepoPathProblem, 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, SESSION_START_HOOK_CONTEXT_LIMIT, SESSION_START_HOOK_MATCHER, SESSION_START_HOOK_STATUS_MESSAGE, SESSION_START_HOOK_TIMEOUT_SECONDS, STOP_HOOK_TIMEOUT_SECONDS, STUCK_THRESHOLD_MS, type SanitizePathOptions, type SanitizeRelatedFilesResult, SchemaVersionSchema, type SelfReportedReview, 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 SessionStartHookLocation, type SessionStartHookRemoval, type SessionStartHookUpsert, 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 UnattachedSelfReports, type UnbindableRepo, type UpdateAdHocTaskStatusInput, type UpdateTaskStatusInput, type UpdateTaskStatusResult, type ViewCollision, type ViewConflict, type ViewLanguage, type ViewLinkState, type ViewPresetInput, type ViewPresetRepo, type ViewRepoFact, type ViewStrayUnknown, type ViewStrings, type ViewWiringFacts, type WiringCollision, type WiringConflict, type WiringDriftSummary, 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, buildSessionStartHookCommand, buildStatusSnapshot, buildStopHookCommand, chainEvents, chainRawJsonLines, classifyFilesBySourceRoot, classifyRetrofit, classifySuspect, claudeCodeAdapterMetadata, claudeTranscriptToImportPayload, codexAdapterMetadata, codexRolloutToImportPayload, computeWorkStats, createAdHocSessionWithEvent, createManifest, createTaskWithEvent, deleteTask, editTask, ensureBasouDirectory, enumerateApprovals, enumerateArchivedTaskIds, enumerateSessionDirs, enumerateTaskIds, evaluateStopHook, finalizeSessionYaml, findBasouSessionStartHook, findBasouStopHookCommand, findErrorCode, findReviewGaps, findUnbindableRepos, formatDurationMs, genesisHash, getDiff, getSnapshot, importSessionFromJson, inspectChainTail, instructionMode, isBasouSessionStartHookCommand, 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, presetStrings, readAllEvents, readManifest, readMarkdownFile, readSessionYaml, readStatus, readTaskFile, readTaskFileWithArchiveFallback, readYamlFile, rechainSessionInPlace, reconcileAllTasks, reconcileSourceRoots, reconcileTask, refreshTaskLinkedSessions, reimportPreservingId, removeMarkerSection, removeSessionStartHook, removeStopHook, renderAnchorStarter, renderDecisions, renderHandoff, renderOrientation, renderPresetBlock, renderReport, renderViewPresetBlock, renderWithMarkers, replayEvents, resolveAnchorContentLanguage, resolveBasouRepositoryRoot, resolveClaudeCodeCommand, resolveCodexCommand, resolveRepoContentLanguage, resolveRepoRoot, resolveRepositoryRoot, resolveSessionId, resolveTaskId, resolveViewLanguage, resolveViewLanguageFromPaths, safeSimpleGit, sanitizePath, sanitizeRelatedFiles, sanitizeWorkingDirectory, seedMarkers, serializeEventLine, serializeJsonSchema, sessionWorkStatsFromEvents, summarizeAdapterOutput, summarizeOrientation, summarizePresetPlan, summarizeRosterDrift, summarizeSymlinkPlan, summarizeWiring, summarizeWiringDrift, tryRemoteUrl, ulid, unknownManifestKeys, updateTaskStatusWithEvent, upsertSessionStartHook, upsertStopHook, verifyEventsChain, viewStrings, writeEventsBulk, writeManifest, writeMarkdownFile, writeStatus, writeTaskFile, writeYamlFile };
7172
+ export { ACTIVE_GAP_CAP_MS, AGENT_INFRA_DIRS, type ActiveTimeBasis, type AdapterOutputEvent, type AdoptCandidate, type AdoptCandidateKind, type AnchorStarterInput, type AnchorStarterRepo, 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 CodexHooksFile, 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, EVENT_SCHEMA_VERSION, 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 IncompleteWiring, type InstructionFileFact, type InstructionSymlinkFact, type InstructionSymlinkState, IsoTimestampSchema, JSON_SCHEMA_VERSIONS, type JsonSchemaArtifact, type LoadFederatedOptions, type LoadSessionEntriesOptions, type LoadTaskEntriesOptions, type LoadedApproval, type LockHandle, type LockScope, type Manifest, ManifestSchema, type MarkerSection, type Markers, type MeasureAvailability, type MissingCanonical, 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 PresetStrings, 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 RepoPathProblem, 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, SESSION_IMPORT_SCHEMA_VERSION, SESSION_START_HOOK_CONTEXT_LIMIT, SESSION_START_HOOK_MATCHER, SESSION_START_HOOK_STATUS_MESSAGE, SESSION_START_HOOK_TIMEOUT_SECONDS, STOP_HOOK_TIMEOUT_SECONDS, STUCK_THRESHOLD_MS, type SanitizePathOptions, type SanitizeRelatedFilesResult, SchemaVersionSchema, type SelfReportedReview, 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 SessionStartHookLocation, type SessionStartHookRemoval, type SessionStartHookUpsert, 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 UnattachedSelfReports, type UnbindableRepo, type UpdateAdHocTaskStatusInput, type UpdateTaskStatusInput, type UpdateTaskStatusResult, type ViewCollision, type ViewConflict, type ViewLanguage, type ViewLinkState, type ViewPresetInput, type ViewPresetRepo, type ViewRepoFact, type ViewStrayUnknown, type ViewStrings, type ViewWiringFacts, type WiringCollision, type WiringConflict, type WiringDriftSummary, type WiringRisk, type WiringSummary, type WorkStatsInput, type WorkStatsResult, type WorkStatsTotals, WorkspaceIdSchema, type WorkspaceViewPlan, type WriteEventsBulkOptions, type WriteTaskFileMode, ZERO_DURATION_RETIRED_SINCE, acquireLock, appendBasouGitignore, appendChainedEvent, appendChainedEventLocked, appendEvent, appendEventToExistingSession, archiveTask, assertBasouRootSafe, basouPaths, buildJsonSchemas, buildReviewRecordLabel, buildReviewRecordedEvent, buildSessionStartHookCommand, buildStatusSnapshot, buildStopHookCommand, chainEvents, chainRawJsonLines, classifyFilesBySourceRoot, classifyRetrofit, classifySuspect, claudeCodeAdapterMetadata, claudeTranscriptToImportPayload, codexAdapterMetadata, codexRolloutToImportPayload, computeWorkStats, createAdHocSessionWithEvent, createManifest, createTaskWithEvent, deleteTask, editTask, ensureBasouDirectory, enumerateApprovals, enumerateArchivedTaskIds, enumerateSessionDirs, enumerateTaskIds, evaluateStopHook, finalizeSessionYaml, findBasouSessionStartHook, findBasouStopHookCommand, findErrorCode, findReviewGaps, findUnbindableRepos, formatDurationMs, genesisHash, getDiff, getSnapshot, hasRetiredZeroDuration, importSessionFromJson, inspectChainTail, instructionMode, isBasouSessionStartHookCommand, 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, presetStrings, readAllEvents, readManifest, readMarkdownFile, readObservedDuration, readSessionYaml, readStatus, readTaskFile, readTaskFileWithArchiveFallback, readYamlFile, rechainSessionInPlace, reconcileAllTasks, reconcileSourceRoots, reconcileTask, refreshTaskLinkedSessions, reimportPreservingId, removeMarkerSection, removeSessionStartHook, removeStopHook, renderAnchorStarter, renderDecisions, renderHandoff, renderOrientation, renderPresetBlock, renderReport, renderViewPresetBlock, renderWithMarkers, replayEvents, resolveAnchorContentLanguage, resolveBasouRepositoryRoot, resolveClaudeCodeCommand, resolveCodexCommand, resolveRepoContentLanguage, resolveRepoRoot, resolveRepositoryRoot, resolveSessionId, resolveTaskId, resolveViewLanguage, resolveViewLanguageFromPaths, safeSimpleGit, sanitizePath, sanitizeRelatedFiles, sanitizeWorkingDirectory, seedMarkers, serializeEventLine, serializeJsonSchema, sessionWorkStatsFromEvents, summarizeAdapterOutput, summarizeOrientation, summarizePresetPlan, summarizeRosterDrift, summarizeSymlinkPlan, summarizeWiring, summarizeWiringDrift, tryRemoteUrl, ulid, unknownManifestKeys, updateTaskStatusWithEvent, upsertSessionStartHook, upsertStopHook, verifyEventsChain, viewStrings, writeEventsBulk, writeManifest, writeMarkdownFile, writeObservedDuration, writeStatus, writeTaskFile, writeYamlFile };