@get-bb/plugin-sdk 0.6.133 → 0.6.136

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.
@@ -607,9 +607,9 @@ declare const environmentSchema: z$1.ZodObject<{
607
607
  type Environment = z$1.infer<typeof environmentSchema>;
608
608
 
609
609
  declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
610
+ agentCpuPriority: "agentCpuPriority";
610
611
  compactExpiredCache: "compactExpiredCache";
611
612
  dismissReadNotifications: "dismissReadNotifications";
612
- narrowPluginCss: "narrowPluginCss";
613
613
  performanceDiagnostics: "performanceDiagnostics";
614
614
  pluginUpdates: "pluginUpdates";
615
615
  resumeThreadsAfterRestart: "resumeThreadsAfterRestart";
@@ -618,12 +618,13 @@ declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
618
618
  threadContextCard: "threadContextCard";
619
619
  threadRowMetadata: "threadRowMetadata";
620
620
  updateWhenIdle: "updateWhenIdle";
621
+ walCheckpointWorker: "walCheckpointWorker";
621
622
  }>, z$1.ZodBoolean>;
622
623
  type Experiments = z$1.infer<typeof experimentsSchema>;
623
624
  declare const experimentUpdatesSchema: z$1.ZodRecord<z$1.ZodEnum<{
625
+ agentCpuPriority: "agentCpuPriority";
624
626
  compactExpiredCache: "compactExpiredCache";
625
627
  dismissReadNotifications: "dismissReadNotifications";
626
- narrowPluginCss: "narrowPluginCss";
627
628
  performanceDiagnostics: "performanceDiagnostics";
628
629
  pluginUpdates: "pluginUpdates";
629
630
  resumeThreadsAfterRestart: "resumeThreadsAfterRestart";
@@ -632,6 +633,7 @@ declare const experimentUpdatesSchema: z$1.ZodRecord<z$1.ZodEnum<{
632
633
  threadContextCard: "threadContextCard";
633
634
  threadRowMetadata: "threadRowMetadata";
634
635
  updateWhenIdle: "updateWhenIdle";
636
+ walCheckpointWorker: "walCheckpointWorker";
635
637
  }> & z$1.core.$partial, z$1.ZodBoolean>;
636
638
  type ExperimentUpdates = z$1.infer<typeof experimentUpdatesSchema>;
637
639
 
@@ -8729,6 +8731,21 @@ declare const pluginUpdateCheckEntrySchema: z$1.ZodObject<{
8729
8731
  pinned: "pinned";
8730
8732
  unavailable: "unavailable";
8731
8733
  }>;
8734
+ rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
8735
+ basis: z$1.ZodEnum<{
8736
+ catalog: "catalog";
8737
+ release: "release";
8738
+ }>;
8739
+ breaking: z$1.ZodBoolean;
8740
+ candidate: z$1.ZodObject<{
8741
+ display: z$1.ZodString;
8742
+ label: z$1.ZodString;
8743
+ version: z$1.ZodString;
8744
+ }, z$1.core.$strip>;
8745
+ currentRange: z$1.ZodString;
8746
+ range: z$1.ZodString;
8747
+ reasons: z$1.ZodArray<z$1.ZodString>;
8748
+ }, z$1.core.$strip>>;
8732
8749
  }, z$1.core.$strip>;
8733
8750
  type PluginUpdateCheckEntry = z$1.infer<typeof pluginUpdateCheckEntrySchema>;
8734
8751
  declare const pluginApplyUpdateResultSchema: z$1.ZodObject<{
@@ -8938,6 +8955,21 @@ declare const installedPluginSchema: z$1.ZodObject<{
8938
8955
  pinned: "pinned";
8939
8956
  unavailable: "unavailable";
8940
8957
  }>>;
8958
+ rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
8959
+ basis: z$1.ZodEnum<{
8960
+ catalog: "catalog";
8961
+ release: "release";
8962
+ }>;
8963
+ breaking: z$1.ZodBoolean;
8964
+ candidate: z$1.ZodObject<{
8965
+ display: z$1.ZodString;
8966
+ label: z$1.ZodString;
8967
+ version: z$1.ZodString;
8968
+ }, z$1.core.$strip>;
8969
+ currentRange: z$1.ZodString;
8970
+ range: z$1.ZodString;
8971
+ reasons: z$1.ZodArray<z$1.ZodString>;
8972
+ }, z$1.core.$strip>>;
8941
8973
  }, z$1.core.$strip>;
8942
8974
  updatedAt: z$1.ZodOptional<z$1.ZodISODateTime>;
8943
8975
  version: z$1.ZodString;
@@ -9063,6 +9095,21 @@ declare const pluginListResponseSchema: z$1.ZodObject<{
9063
9095
  pinned: "pinned";
9064
9096
  unavailable: "unavailable";
9065
9097
  }>>;
9098
+ rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
9099
+ basis: z$1.ZodEnum<{
9100
+ catalog: "catalog";
9101
+ release: "release";
9102
+ }>;
9103
+ breaking: z$1.ZodBoolean;
9104
+ candidate: z$1.ZodObject<{
9105
+ display: z$1.ZodString;
9106
+ label: z$1.ZodString;
9107
+ version: z$1.ZodString;
9108
+ }, z$1.core.$strip>;
9109
+ currentRange: z$1.ZodString;
9110
+ range: z$1.ZodString;
9111
+ reasons: z$1.ZodArray<z$1.ZodString>;
9112
+ }, z$1.core.$strip>>;
9066
9113
  }, z$1.core.$strip>;
9067
9114
  updatedAt: z$1.ZodOptional<z$1.ZodISODateTime>;
9068
9115
  version: z$1.ZodString;
@@ -9254,6 +9301,21 @@ declare const pluginInstallJobSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
9254
9301
  pinned: "pinned";
9255
9302
  unavailable: "unavailable";
9256
9303
  }>>;
9304
+ rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
9305
+ basis: z$1.ZodEnum<{
9306
+ catalog: "catalog";
9307
+ release: "release";
9308
+ }>;
9309
+ breaking: z$1.ZodBoolean;
9310
+ candidate: z$1.ZodObject<{
9311
+ display: z$1.ZodString;
9312
+ label: z$1.ZodString;
9313
+ version: z$1.ZodString;
9314
+ }, z$1.core.$strip>;
9315
+ currentRange: z$1.ZodString;
9316
+ range: z$1.ZodString;
9317
+ reasons: z$1.ZodArray<z$1.ZodString>;
9318
+ }, z$1.core.$strip>>;
9257
9319
  }, z$1.core.$strip>;
9258
9320
  updatedAt: z$1.ZodOptional<z$1.ZodISODateTime>;
9259
9321
  version: z$1.ZodString;
@@ -9442,6 +9504,21 @@ declare const pluginReloadResponseSchema: z$1.ZodObject<{
9442
9504
  pinned: "pinned";
9443
9505
  unavailable: "unavailable";
9444
9506
  }>>;
9507
+ rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
9508
+ basis: z$1.ZodEnum<{
9509
+ catalog: "catalog";
9510
+ release: "release";
9511
+ }>;
9512
+ breaking: z$1.ZodBoolean;
9513
+ candidate: z$1.ZodObject<{
9514
+ display: z$1.ZodString;
9515
+ label: z$1.ZodString;
9516
+ version: z$1.ZodString;
9517
+ }, z$1.core.$strip>;
9518
+ currentRange: z$1.ZodString;
9519
+ range: z$1.ZodString;
9520
+ reasons: z$1.ZodArray<z$1.ZodString>;
9521
+ }, z$1.core.$strip>>;
9445
9522
  }, z$1.core.$strip>;
9446
9523
  updatedAt: z$1.ZodOptional<z$1.ZodISODateTime>;
9447
9524
  version: z$1.ZodString;
@@ -10515,9 +10592,9 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
10515
10592
  }, z$1.core.$strict>;
10516
10593
  }, z$1.core.$strict>>;
10517
10594
  experiments: z$1.ZodRecord<z$1.ZodEnum<{
10595
+ agentCpuPriority: "agentCpuPriority";
10518
10596
  compactExpiredCache: "compactExpiredCache";
10519
10597
  dismissReadNotifications: "dismissReadNotifications";
10520
- narrowPluginCss: "narrowPluginCss";
10521
10598
  performanceDiagnostics: "performanceDiagnostics";
10522
10599
  pluginUpdates: "pluginUpdates";
10523
10600
  resumeThreadsAfterRestart: "resumeThreadsAfterRestart";
@@ -10526,6 +10603,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
10526
10603
  threadContextCard: "threadContextCard";
10527
10604
  threadRowMetadata: "threadRowMetadata";
10528
10605
  updateWhenIdle: "updateWhenIdle";
10606
+ walCheckpointWorker: "walCheckpointWorker";
10529
10607
  }>, z$1.ZodBoolean>;
10530
10608
  featureFlags: z$1.ZodObject<{
10531
10609
  initiatorTelemetry: z$1.ZodDefault<z$1.ZodBoolean>;
@@ -15205,10 +15283,6 @@ declare const threadTimelineQuerySchema: z$1.ZodObject<{
15205
15283
  true: "true";
15206
15284
  }>>;
15207
15285
  segmentLimit: z$1.ZodOptional<z$1.ZodString>;
15208
- summaryOnly: z$1.ZodOptional<z$1.ZodEnum<{
15209
- false: "false";
15210
- true: "true";
15211
- }>>;
15212
15286
  }, z$1.core.$strip>;
15213
15287
  type ThreadTimelineQuery = z$1.infer<typeof threadTimelineQuerySchema>;
15214
15288
  declare const timelineTurnSummaryDetailsQuerySchema: z$1.ZodObject<{
@@ -16819,6 +16893,112 @@ declare const threadTimelineReadResponseSchema: z$1.ZodUnion<readonly [z$1.ZodOb
16819
16893
  }, z$1.core.$strict>;
16820
16894
  }, z$1.core.$strip>]>;
16821
16895
  type ThreadTimelineReadResponse = z$1.infer<typeof threadTimelineReadResponseSchema>;
16896
+ declare const threadHeadStateResponseSchema: z$1.ZodObject<{
16897
+ activePromptMode: z$1.ZodNullable<z$1.ZodObject<{
16898
+ mode: z$1.ZodLiteral<"plan">;
16899
+ prompt: z$1.ZodString;
16900
+ providerId: z$1.ZodString;
16901
+ }, z$1.core.$strict>>;
16902
+ contextWindowUsage: z$1.ZodNullable<z$1.ZodObject<{
16903
+ compactionOfferAt: z$1.ZodOptional<z$1.ZodISODateTime>;
16904
+ cost: z$1.ZodOptional<z$1.ZodObject<{
16905
+ amount: z$1.ZodNumber;
16906
+ currency: z$1.ZodString;
16907
+ }, z$1.core.$strip>>;
16908
+ estimated: z$1.ZodBoolean;
16909
+ modelContextWindow: z$1.ZodNumber;
16910
+ snapshot: z$1.ZodOptional<z$1.ZodObject<{
16911
+ autoCompactAtTokens: z$1.ZodNullable<z$1.ZodNumber>;
16912
+ capturedAt: z$1.ZodISODateTime;
16913
+ categories: z$1.ZodArray<z$1.ZodObject<{
16914
+ entries: z$1.ZodArray<z$1.ZodObject<{
16915
+ id: z$1.ZodString;
16916
+ label: z$1.ZodString;
16917
+ tokens: z$1.ZodNumber;
16918
+ }, z$1.core.$strip>>;
16919
+ id: z$1.ZodString;
16920
+ kind: z$1.ZodEnum<{
16921
+ deferred: "deferred";
16922
+ free: "free";
16923
+ reserved: "reserved";
16924
+ used: "used";
16925
+ }>;
16926
+ label: z$1.ZodString;
16927
+ tokens: z$1.ZodNumber;
16928
+ }, z$1.core.$strip>>;
16929
+ contextWindowTokens: z$1.ZodNumber;
16930
+ estimated: z$1.ZodBoolean;
16931
+ model: z$1.ZodString;
16932
+ providerSessionId: z$1.ZodString;
16933
+ providerTurnId: z$1.ZodNullable<z$1.ZodString>;
16934
+ usedTokens: z$1.ZodNumber;
16935
+ }, z$1.core.$strip>>;
16936
+ usedTokens: z$1.ZodNumber;
16937
+ }, z$1.core.$strip>>;
16938
+ extensionStates: z$1.ZodRecord<z$1.ZodString, z$1.ZodType<JsonValue, unknown, z$1.core.$ZodTypeInternals<JsonValue, unknown>>>;
16939
+ modelFallback: z$1.ZodNullable<z$1.ZodObject<{
16940
+ detectedAt: z$1.ZodNumber;
16941
+ fallbackModel: z$1.ZodString;
16942
+ message: z$1.ZodString;
16943
+ originalModel: z$1.ZodString;
16944
+ reason: z$1.ZodEnum<{
16945
+ provider: "provider";
16946
+ refusal: "refusal";
16947
+ }>;
16948
+ sourceSeq: z$1.ZodNumber;
16949
+ }, z$1.core.$strip>>;
16950
+ pendingTodos: z$1.ZodNullable<z$1.ZodObject<{
16951
+ items: z$1.ZodArray<z$1.ZodObject<{
16952
+ id: z$1.ZodString;
16953
+ status: z$1.ZodEnum<{
16954
+ completed: "completed";
16955
+ in_progress: "in_progress";
16956
+ pending: "pending";
16957
+ }>;
16958
+ text: z$1.ZodString;
16959
+ }, z$1.core.$strip>>;
16960
+ sourceSeq: z$1.ZodNumber;
16961
+ updatedAt: z$1.ZodNumber;
16962
+ }, z$1.core.$strip>>;
16963
+ providerCommands: z$1.ZodNullable<z$1.ZodArray<z$1.ZodObject<{
16964
+ argumentHint: z$1.ZodNullable<z$1.ZodString>;
16965
+ description: z$1.ZodNullable<z$1.ZodString>;
16966
+ name: z$1.ZodString;
16967
+ origin: z$1.ZodEnum<{
16968
+ builtin: "builtin";
16969
+ project: "project";
16970
+ user: "user";
16971
+ }>;
16972
+ source: z$1.ZodEnum<{
16973
+ command: "command";
16974
+ skill: "skill";
16975
+ }>;
16976
+ }, z$1.core.$strip>>>;
16977
+ sessionOptions: z$1.ZodNullable<z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
16978
+ category: z$1.ZodNullable<z$1.ZodString>;
16979
+ description: z$1.ZodNullable<z$1.ZodString>;
16980
+ id: z$1.ZodString;
16981
+ label: z$1.ZodString;
16982
+ pendingValue: z$1.ZodNullable<z$1.ZodString>;
16983
+ type: z$1.ZodLiteral<"select">;
16984
+ value: z$1.ZodString;
16985
+ values: z$1.ZodArray<z$1.ZodObject<{
16986
+ description: z$1.ZodNullable<z$1.ZodString>;
16987
+ group: z$1.ZodNullable<z$1.ZodString>;
16988
+ id: z$1.ZodString;
16989
+ label: z$1.ZodString;
16990
+ }, z$1.core.$strip>>;
16991
+ }, z$1.core.$strip>, z$1.ZodObject<{
16992
+ category: z$1.ZodNullable<z$1.ZodString>;
16993
+ description: z$1.ZodNullable<z$1.ZodString>;
16994
+ id: z$1.ZodString;
16995
+ label: z$1.ZodString;
16996
+ pendingValue: z$1.ZodNullable<z$1.ZodBoolean>;
16997
+ type: z$1.ZodLiteral<"boolean">;
16998
+ value: z$1.ZodBoolean;
16999
+ }, z$1.core.$strip>], "type">>>;
17000
+ }, z$1.core.$strip>;
17001
+ type ThreadHeadStateResponse = z$1.infer<typeof threadHeadStateResponseSchema>;
16822
17002
  declare const threadConversationOutlineQuerySchema: z$1.ZodObject<{
16823
17003
  role: z$1.ZodOptional<z$1.ZodEnum<{
16824
17004
  assistant: "assistant";
@@ -18001,6 +18181,10 @@ interface ProvidersArea {
18001
18181
  interface PluginIdArgs {
18002
18182
  pluginId: string;
18003
18183
  }
18184
+ interface PluginApplyUpdateArgs extends PluginIdArgs {
18185
+ range?: string;
18186
+ expectedVersion?: string;
18187
+ }
18004
18188
  interface PluginInstallArgs {
18005
18189
  source: string;
18006
18190
  subdirectory?: string;
@@ -18143,8 +18327,8 @@ interface PluginsArea {
18143
18327
  experimental_getSafeMode(args?: PluginGetSafeModeArgs): Promise<PluginSafeModeResult>;
18144
18328
  experimental_setSafeMode(args: PluginSetSafeModeArgs): Promise<PluginSetSafeModeResult>;
18145
18329
  experimental_pruneCache(args?: PluginPruneCacheArgs): Promise<PluginPruneCacheResult>;
18146
- applyUpdate(args: PluginIdArgs): Promise<PluginApplyUpdateResult>;
18147
- experimental_startUpdate(args: PluginIdArgs): Promise<PluginUpdateJob>;
18330
+ applyUpdate(args: PluginApplyUpdateArgs): Promise<PluginApplyUpdateResult>;
18331
+ experimental_startUpdate(args: PluginApplyUpdateArgs): Promise<PluginUpdateJob>;
18148
18332
  experimental_updateJobs: PluginUpdateJobsArea;
18149
18333
  callRpc<TOutput>(args: PluginRpcArgs<TOutput>): Promise<TOutput>;
18150
18334
  checkUpdates(args?: PluginCheckUpdatesArgs): Promise<PluginCheckUpdatesResult>;
@@ -18683,6 +18867,7 @@ type ThreadInteractionCancelResult = PendingInteraction;
18683
18867
  type ThreadEventsListResult = ThreadEventRow[];
18684
18868
  type ThreadEventWaitResult = ThreadEventRow | null;
18685
18869
  type ThreadContextResult = ThreadContextResponse;
18870
+ type ThreadHeadStateResult = ThreadHeadStateResponse;
18686
18871
  type ThreadTimelineResult = ThreadTimelineResponse;
18687
18872
  type ThreadTimelineReadResult = ThreadTimelineReadResponse;
18688
18873
  type ThreadArchiveResult = ThreadArchiveAllResponse;
@@ -19103,6 +19288,15 @@ interface ThreadsArea {
19103
19288
  stop(args: ThreadActionArgs): Promise<ThreadStopResult>;
19104
19289
  tabs: ThreadTabsArea;
19105
19290
  context(args: ThreadStatusArgs): Promise<ThreadContextResult>;
19291
+ /**
19292
+ * The thread's head state: to-dos, provider slash commands, session options,
19293
+ * extension states, plan prompt mode, model fallback, and context usage, as
19294
+ * of its latest event. Read from the latest stored state events without
19295
+ * building a timeline window; the latest timeline page embeds the same
19296
+ * values. `pendingTodos` and `activePromptMode` are null unless the thread
19297
+ * is active. Experimental: see docs/api_to_audit.md.
19298
+ */
19299
+ experimental_headState(args: ThreadStatusArgs): Promise<ThreadHeadStateResult>;
19106
19300
  timeline(args: ThreadTimelineArgs & {
19107
19301
  afterTag?: undefined;
19108
19302
  }): Promise<ThreadTimelineResult>;
@@ -698,9 +698,9 @@ declare const environmentSchema: z$1.ZodObject<{
698
698
  type Environment = z$1.infer<typeof environmentSchema>;
699
699
 
700
700
  declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
701
+ agentCpuPriority: "agentCpuPriority";
701
702
  compactExpiredCache: "compactExpiredCache";
702
703
  dismissReadNotifications: "dismissReadNotifications";
703
- narrowPluginCss: "narrowPluginCss";
704
704
  performanceDiagnostics: "performanceDiagnostics";
705
705
  pluginUpdates: "pluginUpdates";
706
706
  resumeThreadsAfterRestart: "resumeThreadsAfterRestart";
@@ -709,12 +709,13 @@ declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
709
709
  threadContextCard: "threadContextCard";
710
710
  threadRowMetadata: "threadRowMetadata";
711
711
  updateWhenIdle: "updateWhenIdle";
712
+ walCheckpointWorker: "walCheckpointWorker";
712
713
  }>, z$1.ZodBoolean>;
713
714
  type Experiments = z$1.infer<typeof experimentsSchema>;
714
715
  declare const experimentUpdatesSchema: z$1.ZodRecord<z$1.ZodEnum<{
716
+ agentCpuPriority: "agentCpuPriority";
715
717
  compactExpiredCache: "compactExpiredCache";
716
718
  dismissReadNotifications: "dismissReadNotifications";
717
- narrowPluginCss: "narrowPluginCss";
718
719
  performanceDiagnostics: "performanceDiagnostics";
719
720
  pluginUpdates: "pluginUpdates";
720
721
  resumeThreadsAfterRestart: "resumeThreadsAfterRestart";
@@ -723,6 +724,7 @@ declare const experimentUpdatesSchema: z$1.ZodRecord<z$1.ZodEnum<{
723
724
  threadContextCard: "threadContextCard";
724
725
  threadRowMetadata: "threadRowMetadata";
725
726
  updateWhenIdle: "updateWhenIdle";
727
+ walCheckpointWorker: "walCheckpointWorker";
726
728
  }> & z$1.core.$partial, z$1.ZodBoolean>;
727
729
  type ExperimentUpdates = z$1.infer<typeof experimentUpdatesSchema>;
728
730
 
@@ -8944,6 +8946,21 @@ declare const pluginUpdateCheckEntrySchema: z$1.ZodObject<{
8944
8946
  pinned: "pinned";
8945
8947
  unavailable: "unavailable";
8946
8948
  }>;
8949
+ rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
8950
+ basis: z$1.ZodEnum<{
8951
+ catalog: "catalog";
8952
+ release: "release";
8953
+ }>;
8954
+ breaking: z$1.ZodBoolean;
8955
+ candidate: z$1.ZodObject<{
8956
+ display: z$1.ZodString;
8957
+ label: z$1.ZodString;
8958
+ version: z$1.ZodString;
8959
+ }, z$1.core.$strip>;
8960
+ currentRange: z$1.ZodString;
8961
+ range: z$1.ZodString;
8962
+ reasons: z$1.ZodArray<z$1.ZodString>;
8963
+ }, z$1.core.$strip>>;
8947
8964
  }, z$1.core.$strip>;
8948
8965
  type PluginUpdateCheckEntry = z$1.infer<typeof pluginUpdateCheckEntrySchema>;
8949
8966
  declare const pluginApplyUpdateResultSchema: z$1.ZodObject<{
@@ -9153,6 +9170,21 @@ declare const installedPluginSchema: z$1.ZodObject<{
9153
9170
  pinned: "pinned";
9154
9171
  unavailable: "unavailable";
9155
9172
  }>>;
9173
+ rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
9174
+ basis: z$1.ZodEnum<{
9175
+ catalog: "catalog";
9176
+ release: "release";
9177
+ }>;
9178
+ breaking: z$1.ZodBoolean;
9179
+ candidate: z$1.ZodObject<{
9180
+ display: z$1.ZodString;
9181
+ label: z$1.ZodString;
9182
+ version: z$1.ZodString;
9183
+ }, z$1.core.$strip>;
9184
+ currentRange: z$1.ZodString;
9185
+ range: z$1.ZodString;
9186
+ reasons: z$1.ZodArray<z$1.ZodString>;
9187
+ }, z$1.core.$strip>>;
9156
9188
  }, z$1.core.$strip>;
9157
9189
  updatedAt: z$1.ZodOptional<z$1.ZodISODateTime>;
9158
9190
  version: z$1.ZodString;
@@ -9278,6 +9310,21 @@ declare const pluginListResponseSchema: z$1.ZodObject<{
9278
9310
  pinned: "pinned";
9279
9311
  unavailable: "unavailable";
9280
9312
  }>>;
9313
+ rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
9314
+ basis: z$1.ZodEnum<{
9315
+ catalog: "catalog";
9316
+ release: "release";
9317
+ }>;
9318
+ breaking: z$1.ZodBoolean;
9319
+ candidate: z$1.ZodObject<{
9320
+ display: z$1.ZodString;
9321
+ label: z$1.ZodString;
9322
+ version: z$1.ZodString;
9323
+ }, z$1.core.$strip>;
9324
+ currentRange: z$1.ZodString;
9325
+ range: z$1.ZodString;
9326
+ reasons: z$1.ZodArray<z$1.ZodString>;
9327
+ }, z$1.core.$strip>>;
9281
9328
  }, z$1.core.$strip>;
9282
9329
  updatedAt: z$1.ZodOptional<z$1.ZodISODateTime>;
9283
9330
  version: z$1.ZodString;
@@ -9469,6 +9516,21 @@ declare const pluginInstallJobSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
9469
9516
  pinned: "pinned";
9470
9517
  unavailable: "unavailable";
9471
9518
  }>>;
9519
+ rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
9520
+ basis: z$1.ZodEnum<{
9521
+ catalog: "catalog";
9522
+ release: "release";
9523
+ }>;
9524
+ breaking: z$1.ZodBoolean;
9525
+ candidate: z$1.ZodObject<{
9526
+ display: z$1.ZodString;
9527
+ label: z$1.ZodString;
9528
+ version: z$1.ZodString;
9529
+ }, z$1.core.$strip>;
9530
+ currentRange: z$1.ZodString;
9531
+ range: z$1.ZodString;
9532
+ reasons: z$1.ZodArray<z$1.ZodString>;
9533
+ }, z$1.core.$strip>>;
9472
9534
  }, z$1.core.$strip>;
9473
9535
  updatedAt: z$1.ZodOptional<z$1.ZodISODateTime>;
9474
9536
  version: z$1.ZodString;
@@ -9657,6 +9719,21 @@ declare const pluginReloadResponseSchema: z$1.ZodObject<{
9657
9719
  pinned: "pinned";
9658
9720
  unavailable: "unavailable";
9659
9721
  }>>;
9722
+ rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
9723
+ basis: z$1.ZodEnum<{
9724
+ catalog: "catalog";
9725
+ release: "release";
9726
+ }>;
9727
+ breaking: z$1.ZodBoolean;
9728
+ candidate: z$1.ZodObject<{
9729
+ display: z$1.ZodString;
9730
+ label: z$1.ZodString;
9731
+ version: z$1.ZodString;
9732
+ }, z$1.core.$strip>;
9733
+ currentRange: z$1.ZodString;
9734
+ range: z$1.ZodString;
9735
+ reasons: z$1.ZodArray<z$1.ZodString>;
9736
+ }, z$1.core.$strip>>;
9660
9737
  }, z$1.core.$strip>;
9661
9738
  updatedAt: z$1.ZodOptional<z$1.ZodISODateTime>;
9662
9739
  version: z$1.ZodString;
@@ -10730,9 +10807,9 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
10730
10807
  }, z$1.core.$strict>;
10731
10808
  }, z$1.core.$strict>>;
10732
10809
  experiments: z$1.ZodRecord<z$1.ZodEnum<{
10810
+ agentCpuPriority: "agentCpuPriority";
10733
10811
  compactExpiredCache: "compactExpiredCache";
10734
10812
  dismissReadNotifications: "dismissReadNotifications";
10735
- narrowPluginCss: "narrowPluginCss";
10736
10813
  performanceDiagnostics: "performanceDiagnostics";
10737
10814
  pluginUpdates: "pluginUpdates";
10738
10815
  resumeThreadsAfterRestart: "resumeThreadsAfterRestart";
@@ -10741,6 +10818,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
10741
10818
  threadContextCard: "threadContextCard";
10742
10819
  threadRowMetadata: "threadRowMetadata";
10743
10820
  updateWhenIdle: "updateWhenIdle";
10821
+ walCheckpointWorker: "walCheckpointWorker";
10744
10822
  }>, z$1.ZodBoolean>;
10745
10823
  featureFlags: z$1.ZodObject<{
10746
10824
  initiatorTelemetry: z$1.ZodDefault<z$1.ZodBoolean>;
@@ -15421,10 +15499,6 @@ declare const threadTimelineQuerySchema: z$1.ZodObject<{
15421
15499
  true: "true";
15422
15500
  }>>;
15423
15501
  segmentLimit: z$1.ZodOptional<z$1.ZodString>;
15424
- summaryOnly: z$1.ZodOptional<z$1.ZodEnum<{
15425
- false: "false";
15426
- true: "true";
15427
- }>>;
15428
15502
  }, z$1.core.$strip>;
15429
15503
  type ThreadTimelineQuery = z$1.infer<typeof threadTimelineQuerySchema>;
15430
15504
  declare const timelineTurnSummaryDetailsQuerySchema: z$1.ZodObject<{
@@ -17035,6 +17109,112 @@ declare const threadTimelineReadResponseSchema: z$1.ZodUnion<readonly [z$1.ZodOb
17035
17109
  }, z$1.core.$strict>;
17036
17110
  }, z$1.core.$strip>]>;
17037
17111
  type ThreadTimelineReadResponse = z$1.infer<typeof threadTimelineReadResponseSchema>;
17112
+ declare const threadHeadStateResponseSchema: z$1.ZodObject<{
17113
+ activePromptMode: z$1.ZodNullable<z$1.ZodObject<{
17114
+ mode: z$1.ZodLiteral<"plan">;
17115
+ prompt: z$1.ZodString;
17116
+ providerId: z$1.ZodString;
17117
+ }, z$1.core.$strict>>;
17118
+ contextWindowUsage: z$1.ZodNullable<z$1.ZodObject<{
17119
+ compactionOfferAt: z$1.ZodOptional<z$1.ZodISODateTime>;
17120
+ cost: z$1.ZodOptional<z$1.ZodObject<{
17121
+ amount: z$1.ZodNumber;
17122
+ currency: z$1.ZodString;
17123
+ }, z$1.core.$strip>>;
17124
+ estimated: z$1.ZodBoolean;
17125
+ modelContextWindow: z$1.ZodNumber;
17126
+ snapshot: z$1.ZodOptional<z$1.ZodObject<{
17127
+ autoCompactAtTokens: z$1.ZodNullable<z$1.ZodNumber>;
17128
+ capturedAt: z$1.ZodISODateTime;
17129
+ categories: z$1.ZodArray<z$1.ZodObject<{
17130
+ entries: z$1.ZodArray<z$1.ZodObject<{
17131
+ id: z$1.ZodString;
17132
+ label: z$1.ZodString;
17133
+ tokens: z$1.ZodNumber;
17134
+ }, z$1.core.$strip>>;
17135
+ id: z$1.ZodString;
17136
+ kind: z$1.ZodEnum<{
17137
+ deferred: "deferred";
17138
+ free: "free";
17139
+ reserved: "reserved";
17140
+ used: "used";
17141
+ }>;
17142
+ label: z$1.ZodString;
17143
+ tokens: z$1.ZodNumber;
17144
+ }, z$1.core.$strip>>;
17145
+ contextWindowTokens: z$1.ZodNumber;
17146
+ estimated: z$1.ZodBoolean;
17147
+ model: z$1.ZodString;
17148
+ providerSessionId: z$1.ZodString;
17149
+ providerTurnId: z$1.ZodNullable<z$1.ZodString>;
17150
+ usedTokens: z$1.ZodNumber;
17151
+ }, z$1.core.$strip>>;
17152
+ usedTokens: z$1.ZodNumber;
17153
+ }, z$1.core.$strip>>;
17154
+ extensionStates: z$1.ZodRecord<z$1.ZodString, z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>>;
17155
+ modelFallback: z$1.ZodNullable<z$1.ZodObject<{
17156
+ detectedAt: z$1.ZodNumber;
17157
+ fallbackModel: z$1.ZodString;
17158
+ message: z$1.ZodString;
17159
+ originalModel: z$1.ZodString;
17160
+ reason: z$1.ZodEnum<{
17161
+ provider: "provider";
17162
+ refusal: "refusal";
17163
+ }>;
17164
+ sourceSeq: z$1.ZodNumber;
17165
+ }, z$1.core.$strip>>;
17166
+ pendingTodos: z$1.ZodNullable<z$1.ZodObject<{
17167
+ items: z$1.ZodArray<z$1.ZodObject<{
17168
+ id: z$1.ZodString;
17169
+ status: z$1.ZodEnum<{
17170
+ completed: "completed";
17171
+ in_progress: "in_progress";
17172
+ pending: "pending";
17173
+ }>;
17174
+ text: z$1.ZodString;
17175
+ }, z$1.core.$strip>>;
17176
+ sourceSeq: z$1.ZodNumber;
17177
+ updatedAt: z$1.ZodNumber;
17178
+ }, z$1.core.$strip>>;
17179
+ providerCommands: z$1.ZodNullable<z$1.ZodArray<z$1.ZodObject<{
17180
+ argumentHint: z$1.ZodNullable<z$1.ZodString>;
17181
+ description: z$1.ZodNullable<z$1.ZodString>;
17182
+ name: z$1.ZodString;
17183
+ origin: z$1.ZodEnum<{
17184
+ builtin: "builtin";
17185
+ project: "project";
17186
+ user: "user";
17187
+ }>;
17188
+ source: z$1.ZodEnum<{
17189
+ command: "command";
17190
+ skill: "skill";
17191
+ }>;
17192
+ }, z$1.core.$strip>>>;
17193
+ sessionOptions: z$1.ZodNullable<z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
17194
+ category: z$1.ZodNullable<z$1.ZodString>;
17195
+ description: z$1.ZodNullable<z$1.ZodString>;
17196
+ id: z$1.ZodString;
17197
+ label: z$1.ZodString;
17198
+ pendingValue: z$1.ZodNullable<z$1.ZodString>;
17199
+ type: z$1.ZodLiteral<"select">;
17200
+ value: z$1.ZodString;
17201
+ values: z$1.ZodArray<z$1.ZodObject<{
17202
+ description: z$1.ZodNullable<z$1.ZodString>;
17203
+ group: z$1.ZodNullable<z$1.ZodString>;
17204
+ id: z$1.ZodString;
17205
+ label: z$1.ZodString;
17206
+ }, z$1.core.$strip>>;
17207
+ }, z$1.core.$strip>, z$1.ZodObject<{
17208
+ category: z$1.ZodNullable<z$1.ZodString>;
17209
+ description: z$1.ZodNullable<z$1.ZodString>;
17210
+ id: z$1.ZodString;
17211
+ label: z$1.ZodString;
17212
+ pendingValue: z$1.ZodNullable<z$1.ZodBoolean>;
17213
+ type: z$1.ZodLiteral<"boolean">;
17214
+ value: z$1.ZodBoolean;
17215
+ }, z$1.core.$strip>], "type">>>;
17216
+ }, z$1.core.$strip>;
17217
+ type ThreadHeadStateResponse = z$1.infer<typeof threadHeadStateResponseSchema>;
17038
17218
  declare const threadConversationOutlineQuerySchema: z$1.ZodObject<{
17039
17219
  role: z$1.ZodOptional<z$1.ZodEnum<{
17040
17220
  assistant: "assistant";
@@ -18228,6 +18408,10 @@ interface ProvidersArea {
18228
18408
  interface PluginIdArgs {
18229
18409
  pluginId: string;
18230
18410
  }
18411
+ interface PluginApplyUpdateArgs extends PluginIdArgs {
18412
+ range?: string;
18413
+ expectedVersion?: string;
18414
+ }
18231
18415
  interface PluginInstallArgs {
18232
18416
  source: string;
18233
18417
  subdirectory?: string;
@@ -18370,8 +18554,8 @@ interface PluginsArea {
18370
18554
  experimental_getSafeMode(args?: PluginGetSafeModeArgs): Promise<PluginSafeModeResult>;
18371
18555
  experimental_setSafeMode(args: PluginSetSafeModeArgs): Promise<PluginSetSafeModeResult>;
18372
18556
  experimental_pruneCache(args?: PluginPruneCacheArgs): Promise<PluginPruneCacheResult>;
18373
- applyUpdate(args: PluginIdArgs): Promise<PluginApplyUpdateResult>;
18374
- experimental_startUpdate(args: PluginIdArgs): Promise<PluginUpdateJob>;
18557
+ applyUpdate(args: PluginApplyUpdateArgs): Promise<PluginApplyUpdateResult>;
18558
+ experimental_startUpdate(args: PluginApplyUpdateArgs): Promise<PluginUpdateJob>;
18375
18559
  experimental_updateJobs: PluginUpdateJobsArea;
18376
18560
  callRpc<TOutput>(args: PluginRpcArgs<TOutput>): Promise<TOutput>;
18377
18561
  checkUpdates(args?: PluginCheckUpdatesArgs): Promise<PluginCheckUpdatesResult>;
@@ -18910,6 +19094,7 @@ type ThreadInteractionCancelResult = PendingInteraction;
18910
19094
  type ThreadEventsListResult = ThreadEventRow[];
18911
19095
  type ThreadEventWaitResult = ThreadEventRow | null;
18912
19096
  type ThreadContextResult = ThreadContextResponse;
19097
+ type ThreadHeadStateResult = ThreadHeadStateResponse;
18913
19098
  type ThreadTimelineResult = ThreadTimelineResponse;
18914
19099
  type ThreadTimelineReadResult = ThreadTimelineReadResponse;
18915
19100
  type ThreadArchiveResult = ThreadArchiveAllResponse;
@@ -19330,6 +19515,15 @@ interface ThreadsArea {
19330
19515
  stop(args: ThreadActionArgs): Promise<ThreadStopResult>;
19331
19516
  tabs: ThreadTabsArea;
19332
19517
  context(args: ThreadStatusArgs): Promise<ThreadContextResult>;
19518
+ /**
19519
+ * The thread's head state: to-dos, provider slash commands, session options,
19520
+ * extension states, plan prompt mode, model fallback, and context usage, as
19521
+ * of its latest event. Read from the latest stored state events without
19522
+ * building a timeline window; the latest timeline page embeds the same
19523
+ * values. `pendingTodos` and `activePromptMode` are null unless the thread
19524
+ * is active. Experimental: see docs/api_to_audit.md.
19525
+ */
19526
+ experimental_headState(args: ThreadStatusArgs): Promise<ThreadHeadStateResult>;
19333
19527
  timeline(args: ThreadTimelineArgs & {
19334
19528
  afterTag?: undefined;
19335
19529
  }): Promise<ThreadTimelineResult>;
@@ -2774,59 +2774,61 @@ async function validateRpcValue(schema, value, phase, fail) {
2774
2774
  }
2775
2775
  function normalizeRpcJsonResult(value, fail) {
2776
2776
  const ancestors = /* @__PURE__ */ new Set();
2777
- function visit(current, path) {
2777
+ const pathSegments = [];
2778
+ function failAt(problem) {
2779
+ let path = "$result";
2780
+ for (const segment of pathSegments) {
2781
+ path += typeof segment === "number" ? `[${segment}]` : `.${segment}`;
2782
+ }
2783
+ return fail({
2784
+ code: "non_json_result",
2785
+ message: `rpc result at ${path} ${problem}`
2786
+ });
2787
+ }
2788
+ function visit(current) {
2778
2789
  if (current === null || typeof current === "string" || typeof current === "boolean") {
2779
2790
  return current;
2780
2791
  }
2781
2792
  if (typeof current === "number") {
2782
2793
  if (!Number.isFinite(current)) {
2783
- return fail({
2784
- code: "non_json_result",
2785
- message: `rpc result at ${path} contains a non-finite number`
2786
- });
2794
+ return failAt("contains a non-finite number");
2787
2795
  }
2788
2796
  return current;
2789
2797
  }
2790
2798
  if (typeof current !== "object") {
2791
- return fail({
2792
- code: "non_json_result",
2793
- message: `rpc result at ${path} is not a JSON value (${typeof current})`
2794
- });
2799
+ return failAt(`is not a JSON value (${typeof current})`);
2795
2800
  }
2796
2801
  if (ancestors.has(current)) {
2797
- return fail({
2798
- code: "non_json_result",
2799
- message: `rpc result at ${path} is cyclic`
2800
- });
2802
+ return failAt("is cyclic");
2801
2803
  }
2802
2804
  ancestors.add(current);
2803
- try {
2804
- if (Array.isArray(current)) {
2805
- return current.map((item, index) => visit(item, `${path}[${index}]`));
2806
- }
2807
- const prototype = Object.getPrototypeOf(current);
2808
- if (prototype !== Object.prototype && prototype !== null) {
2809
- return fail({
2810
- code: "non_json_result",
2811
- message: `rpc result at ${path} must be a plain JSON object`
2812
- });
2813
- }
2814
- if (Reflect.ownKeys(current).some((key) => typeof key === "symbol")) {
2815
- return fail({
2816
- code: "non_json_result",
2817
- message: `rpc result at ${path} contains a symbol key`
2818
- });
2819
- }
2820
- const normalized = {};
2821
- for (const [key, child] of Object.entries(current)) {
2822
- normalized[key] = visit(child, `${path}.${key}`);
2823
- }
2824
- return normalized;
2825
- } finally {
2805
+ if (Array.isArray(current)) {
2806
+ const normalized2 = current.map((item, index) => {
2807
+ pathSegments.push(index);
2808
+ const child = visit(item);
2809
+ pathSegments.pop();
2810
+ return child;
2811
+ });
2826
2812
  ancestors.delete(current);
2813
+ return normalized2;
2814
+ }
2815
+ const prototype = Object.getPrototypeOf(current);
2816
+ if (prototype !== Object.prototype && prototype !== null) {
2817
+ return failAt("must be a plain JSON object");
2818
+ }
2819
+ if (Object.getOwnPropertySymbols(current).length > 0) {
2820
+ return failAt("contains a symbol key");
2821
+ }
2822
+ const normalized = {};
2823
+ for (const key of Object.keys(current)) {
2824
+ pathSegments.push(key);
2825
+ normalized[key] = visit(Reflect.get(current, key));
2826
+ pathSegments.pop();
2827
2827
  }
2828
+ ancestors.delete(current);
2829
+ return normalized;
2828
2830
  }
2829
- return visit(value, "$result");
2831
+ return visit(value);
2830
2832
  }
2831
2833
  export {
2832
2834
  ENVIRONMENT_PROVIDER_DESCRIPTION_MAX_CHARS,
@@ -2895,59 +2895,61 @@ async function validateRpcValue(schema, value, phase, fail) {
2895
2895
  }
2896
2896
  function normalizeRpcJsonResult(value, fail) {
2897
2897
  const ancestors = /* @__PURE__ */ new Set();
2898
- function visit(current, path) {
2898
+ const pathSegments = [];
2899
+ function failAt(problem) {
2900
+ let path = "$result";
2901
+ for (const segment of pathSegments) {
2902
+ path += typeof segment === "number" ? `[${segment}]` : `.${segment}`;
2903
+ }
2904
+ return fail({
2905
+ code: "non_json_result",
2906
+ message: `rpc result at ${path} ${problem}`
2907
+ });
2908
+ }
2909
+ function visit(current) {
2899
2910
  if (current === null || typeof current === "string" || typeof current === "boolean") {
2900
2911
  return current;
2901
2912
  }
2902
2913
  if (typeof current === "number") {
2903
2914
  if (!Number.isFinite(current)) {
2904
- return fail({
2905
- code: "non_json_result",
2906
- message: `rpc result at ${path} contains a non-finite number`
2907
- });
2915
+ return failAt("contains a non-finite number");
2908
2916
  }
2909
2917
  return current;
2910
2918
  }
2911
2919
  if (typeof current !== "object") {
2912
- return fail({
2913
- code: "non_json_result",
2914
- message: `rpc result at ${path} is not a JSON value (${typeof current})`
2915
- });
2920
+ return failAt(`is not a JSON value (${typeof current})`);
2916
2921
  }
2917
2922
  if (ancestors.has(current)) {
2918
- return fail({
2919
- code: "non_json_result",
2920
- message: `rpc result at ${path} is cyclic`
2921
- });
2923
+ return failAt("is cyclic");
2922
2924
  }
2923
2925
  ancestors.add(current);
2924
- try {
2925
- if (Array.isArray(current)) {
2926
- return current.map((item, index) => visit(item, `${path}[${index}]`));
2927
- }
2928
- const prototype = Object.getPrototypeOf(current);
2929
- if (prototype !== Object.prototype && prototype !== null) {
2930
- return fail({
2931
- code: "non_json_result",
2932
- message: `rpc result at ${path} must be a plain JSON object`
2933
- });
2934
- }
2935
- if (Reflect.ownKeys(current).some((key) => typeof key === "symbol")) {
2936
- return fail({
2937
- code: "non_json_result",
2938
- message: `rpc result at ${path} contains a symbol key`
2939
- });
2940
- }
2941
- const normalized = {};
2942
- for (const [key, child] of Object.entries(current)) {
2943
- normalized[key] = visit(child, `${path}.${key}`);
2944
- }
2945
- return normalized;
2946
- } finally {
2926
+ if (Array.isArray(current)) {
2927
+ const normalized2 = current.map((item, index) => {
2928
+ pathSegments.push(index);
2929
+ const child = visit(item);
2930
+ pathSegments.pop();
2931
+ return child;
2932
+ });
2947
2933
  ancestors.delete(current);
2934
+ return normalized2;
2935
+ }
2936
+ const prototype = Object.getPrototypeOf(current);
2937
+ if (prototype !== Object.prototype && prototype !== null) {
2938
+ return failAt("must be a plain JSON object");
2939
+ }
2940
+ if (Object.getOwnPropertySymbols(current).length > 0) {
2941
+ return failAt("contains a symbol key");
2942
+ }
2943
+ const normalized = {};
2944
+ for (const key of Object.keys(current)) {
2945
+ pathSegments.push(key);
2946
+ normalized[key] = visit(Reflect.get(current, key));
2947
+ pathSegments.pop();
2948
2948
  }
2949
+ ancestors.delete(current);
2950
+ return normalized;
2949
2951
  }
2950
- return visit(value, "$result");
2952
+ return visit(value);
2951
2953
  }
2952
2954
 
2953
2955
  // src/testing/fake-plugin-host.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@get-bb/plugin-sdk",
3
- "version": "0.6.133",
3
+ "version": "0.6.136",
4
4
  "homepage": "https://github.com/get-bb/bb#readme",
5
5
  "bugs": {
6
6
  "url": "https://github.com/get-bb/bb/issues"