@crewx/sdk 0.9.0-rc.74 → 0.9.0-rc.76

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.
@@ -1,5 +1,18 @@
1
1
  import { CrewxPlugin } from '../plugin';
2
2
  import type { Crewx } from '../facade/Crewx';
3
+ export interface SqliteTracingMetrics {
4
+ flushCount: number;
5
+ flushedEntries: number;
6
+ maxQueueEntries: number;
7
+ maxQueueBytes: number;
8
+ appendFailureCount: number;
9
+ appendFailureEntries: number;
10
+ appendFailureBytes: number;
11
+ appendFailureByCode: Record<string, number>;
12
+ appendFailureByCause: Record<string, number>;
13
+ pendingQueueEntries: number;
14
+ pendingQueueBytes: number;
15
+ }
3
16
  export interface SqliteTracingPluginOptions {
4
17
  dbRoot?: string;
5
18
  version?: string;
@@ -9,7 +22,16 @@ export declare class SqliteTracingPlugin extends CrewxPlugin {
9
22
  private unsubs;
10
23
  private readonly dbPath;
11
24
  private readonly version;
25
+ private taskRepo?;
26
+ private readonly queues;
27
+ private metrics;
12
28
  constructor(opts?: SqliteTracingPluginOptions);
13
29
  attach(crewx: Crewx): void;
14
30
  detach(_crewx: Crewx): void;
31
+ getMetrics(): SqliteTracingMetrics;
32
+ private enqueueLog;
33
+ private flushTaskLogs;
34
+ private flushAllTaskLogs;
35
+ private clearAllTimers;
36
+ private recordAppendFailure;
15
37
  }
@@ -27,6 +27,10 @@ export { ThreadTitleMetadataPatchError, } from './thread.repository.js';
27
27
  export type { ThreadRow, NewThread, ThreadTitleMetadataPatch, ThreadTitleMetadataPatchResult, ThreadTitleMetadataPatchErrorReason, } from './thread.repository.js';
28
28
  export { migrateLegacyThreadTitleCommonCodes, migrateThreadTitleCommonCodes, } from './thread-title-common-code-migration.js';
29
29
  export type { ThreadTitleCommonCodeMigrationOptions, ThreadTitleCommonCodeMigrationResult, } from './thread-title-common-code-migration.js';
30
+ export { ThreadHistoryConflictError, ThreadHighlightConflictError, ThreadHistoryRepository, } from './thread-history.repository.js';
31
+ export type { CreateThreadHighlightInput, DismissThreadHighlightInput, ListActiveHighlightsOptions, ThreadActorInput, ThreadSnapshot, ThreadSnapshotMutationInput, ThreadTimeline, ThreadTimelineOptions, ThreadTimelineQuery, UpdateThreadHighlightInput, } from './thread-history.repository.js';
32
+ export { BUILTIN_THREAD_STATES, THREAD_PRIORITIES, customStateLabel, hasThreadTitleKey, isThreadPriority, isThreadState, matchesThreadTitleFilter, mergeThreadTitleMeta, parseThreadPriorityFilter, parseThreadStateFilter, readThreadTitleMeta, threadTitleSearchHaystack, } from './thread-title.types.js';
33
+ export type { BuiltinThreadState, LegacyThreadState, StableThreadState, ThreadPriority, ThreadState, ThreadTitleFilter, ThreadTitleMeta, ThreadTitlePatch, } from './thread-title.types.js';
30
34
  export { SpanRepository } from './span.repository.js';
31
35
  export type { SpanRow, NewSpan } from './span.repository.js';
32
36
  export { ToolCallRepository } from './tool-call.repository.js';