@get-bb/plugin-sdk 0.6.5 → 0.6.14

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.
@@ -57,7 +57,7 @@ var reasoningLevelValues = [
57
57
  "ultra"
58
58
  ];
59
59
  var reasoningLevelSchema = z3.enum(reasoningLevelValues);
60
- var serviceTierSchema = z3.enum(["fast", "default"]);
60
+ var serviceTierSchema = z3.string().min(1);
61
61
  var instructionModeValues = ["append", "replace"];
62
62
  var instructionModeSchema = z3.enum(instructionModeValues);
63
63
  var permissionModeValues = ["accept-edits", "auto", "full"];
@@ -915,25 +915,7 @@ var turnRequestRejectedEventDataSchema = z11.object({
915
915
  var systemErrorEventDataSchema = z11.object({
916
916
  code: z11.string().optional(),
917
917
  message: z11.string(),
918
- detail: z11.string().optional(),
919
- reconnectAttempt: z11.number().int().positive().optional(),
920
- reconnectTotal: z11.number().int().positive().optional()
921
- }).superRefine((value, ctx) => {
922
- const hasReconnectAttempt = value.reconnectAttempt !== void 0;
923
- const hasReconnectTotal = value.reconnectTotal !== void 0;
924
- if (hasReconnectAttempt !== hasReconnectTotal) {
925
- ctx.addIssue({
926
- code: z11.ZodIssueCode.custom,
927
- message: "system/error reconnectAttempt and reconnectTotal must be provided together"
928
- });
929
- return;
930
- }
931
- if (value.reconnectAttempt !== void 0 && value.reconnectTotal !== void 0 && value.reconnectAttempt > value.reconnectTotal) {
932
- ctx.addIssue({
933
- code: z11.ZodIssueCode.custom,
934
- message: "system/error reconnectAttempt cannot be greater than reconnectTotal"
935
- });
936
- }
918
+ detail: z11.string().optional()
937
919
  });
938
920
  var ownershipChangeOperationActionValues = [
939
921
  "assign",
@@ -1853,46 +1835,20 @@ var unscopedSystemEventSchema = z14.discriminatedUnion("type", [
1853
1835
  }).merge(systemProviderTurnWatchdogEventDataSchema)
1854
1836
  ]);
1855
1837
  var systemEventSchema = unscopedSystemEventSchema.and(scopedEventDataSchema);
1856
- var legacyClientRequestKey = ["clientRequest", "Sequence"].join("");
1857
- function isEventPropertyBag(value) {
1858
- return typeof value === "object" && value !== null && !Array.isArray(value);
1859
- }
1860
- var rejectLegacyClientRequestSequenceSchema = z14.unknown().superRefine((value, ctx) => {
1861
- if (!isEventPropertyBag(value)) {
1862
- return;
1863
- }
1864
- if (Object.hasOwn(value, legacyClientRequestKey)) {
1865
- ctx.addIssue({
1866
- code: z14.ZodIssueCode.custom,
1867
- message: "legacy request sequence field is no longer accepted",
1868
- path: [legacyClientRequestKey]
1869
- });
1870
- }
1871
- const item = value.item;
1872
- if (isEventPropertyBag(item) && item.type === "userMessage" && Object.hasOwn(item, legacyClientRequestKey)) {
1838
+ var threadEventSchema = z14.union([providerEventSchema, systemEventSchema]).superRefine((event, ctx) => {
1839
+ const result2 = validateThreadEventScope({
1840
+ type: event.type,
1841
+ scope: event.scope
1842
+ });
1843
+ if (!result2.valid) {
1873
1844
  ctx.addIssue({
1874
1845
  code: z14.ZodIssueCode.custom,
1875
- message: "legacy user-message request sequence field is no longer accepted",
1876
- path: ["item", legacyClientRequestKey]
1846
+ message: result2.message ?? "Invalid thread event scope",
1847
+ path: ["scope"]
1877
1848
  });
1849
+ return;
1878
1850
  }
1879
1851
  });
1880
- var threadEventSchema = rejectLegacyClientRequestSequenceSchema.pipe(
1881
- z14.union([providerEventSchema, systemEventSchema]).superRefine((event, ctx) => {
1882
- const result2 = validateThreadEventScope({
1883
- type: event.type,
1884
- scope: event.scope
1885
- });
1886
- if (!result2.valid) {
1887
- ctx.addIssue({
1888
- code: z14.ZodIssueCode.custom,
1889
- message: result2.message ?? "Invalid thread event scope",
1890
- path: ["scope"]
1891
- });
1892
- return;
1893
- }
1894
- })
1895
- );
1896
1852
  function isThreadEventWithItem(event) {
1897
1853
  switch (event.type) {
1898
1854
  case "item/started":
@@ -1944,6 +1900,11 @@ var modelReasoningEffortSchema = z16.object({
1944
1900
  reasoningEffort: reasoningLevelSchema,
1945
1901
  description: z16.string()
1946
1902
  });
1903
+ var modelServiceTierSchema = z16.object({
1904
+ id: serviceTierSchema,
1905
+ label: z16.string().min(1).optional(),
1906
+ description: z16.string().min(1).optional()
1907
+ });
1947
1908
  var availableModelSchema = z16.object({
1948
1909
  id: z16.string(),
1949
1910
  model: z16.string(),
@@ -1952,6 +1913,7 @@ var availableModelSchema = z16.object({
1952
1913
  description: z16.string(),
1953
1914
  supportedReasoningEfforts: z16.array(modelReasoningEffortSchema),
1954
1915
  defaultReasoningEffort: reasoningLevelSchema,
1916
+ supportedServiceTiers: z16.array(modelServiceTierSchema).optional(),
1955
1917
  isDefault: z16.boolean()
1956
1918
  });
1957
1919
  var providerModelCatalogScopeSchema = z16.enum(["host", "workspace"]);
@@ -4251,11 +4213,6 @@ function assembleCapturedThreadEvents(messages, providerId = "pi") {
4251
4213
  const collector = createBridgeDeltaEventCollector(providerId);
4252
4214
  return messages.flatMap((message) => collector.assembleMessage(message));
4253
4215
  }
4254
- function toConformanceMessages() {
4255
- throw new Error(
4256
- "experimental_toConformanceMessages was removed: experimental_runBridgeConformance assembles thread/delta itself. Hand it a transport whose takeMessages returns the raw captured messages (CapturedBridgeJsonRpcOutput.takeMessages) and pass the bridge's providerId."
4257
- );
4258
- }
4259
4216
 
4260
4217
  // ../provider-bridge-protocol/src/conformance/client.ts
4261
4218
  import { z as z20 } from "zod";
@@ -4435,7 +4392,8 @@ var providerMaintenanceParamsSchema = z23.object({
4435
4392
  }).passthrough();
4436
4393
  var providerInstallationRequirementSchema = z23.enum(["thread_rewind"]);
4437
4394
  var providerInstallationStatusParamsSchema = providerMaintenanceParamsSchema.extend({
4438
- requirement: providerInstallationRequirementSchema.optional()
4395
+ requirement: providerInstallationRequirementSchema.optional(),
4396
+ checkUpdates: z23.boolean().default(true)
4439
4397
  });
4440
4398
  var providerHealthSchema = z23.object({
4441
4399
  status: z23.enum([
@@ -6267,7 +6225,7 @@ import {
6267
6225
  } from "node:fs";
6268
6226
  import { tmpdir } from "node:os";
6269
6227
  import { isAbsolute, join as join2, resolve as resolve2 } from "node:path";
6270
- import { fileURLToPath as fileURLToPath2 } from "node:url";
6228
+ import { fileURLToPath as fileURLToPath2, pathToFileURL } from "node:url";
6271
6229
 
6272
6230
  // ../provider-bridge-protocol/src/bridge-kit/bounded-line-reader.ts
6273
6231
  import { StringDecoder } from "node:string_decoder";
@@ -6616,7 +6574,7 @@ async function replayRecording(options) {
6616
6574
  [
6617
6575
  "#!/usr/bin/env node",
6618
6576
  `process.argv.splice(2, 0, ${JSON.stringify(replayCommand.slice(2)).slice(1, -1)});`,
6619
- `await import(${JSON.stringify(REPLAY_CHILD_PATH)});`,
6577
+ `await import(${JSON.stringify(pathToFileURL(REPLAY_CHILD_PATH).href)});`,
6620
6578
  ""
6621
6579
  ].join("\n"),
6622
6580
  { mode: 493 }
@@ -7166,6 +7124,5 @@ export {
7166
7124
  rerecordCurrentBridgeLane as experimental_rerecordCurrentBridgeLane,
7167
7125
  resolveProviderBridgeLaunch as experimental_resolveProviderBridgeLaunch,
7168
7126
  runBridgeConformance as experimental_runBridgeConformance,
7169
- toConformanceMessages as experimental_toConformanceMessages,
7170
7127
  withCurrentBridgeLane as experimental_withCurrentBridgeLane
7171
7128
  };
@@ -542,6 +542,9 @@ import { rmSync } from "node:fs";
542
542
  import { isAbsolute } from "node:path";
543
543
  import { pathToFileURL } from "node:url";
544
544
 
545
+ // ../process-utils/src/spawn.ts
546
+ var import_cross_spawn = __toESM(require_cross_spawn(), 1);
547
+
545
548
  // ../process-utils/src/plugin-process-paths.ts
546
549
  import { mkdir, mkdtemp } from "node:fs/promises";
547
550
  import { tmpdir } from "node:os";
@@ -555,8 +558,10 @@ async function createPluginProcessTempDir(args) {
555
558
  );
556
559
  }
557
560
 
558
- // ../process-utils/src/index.ts
559
- var import_cross_spawn = __toESM(require_cross_spawn(), 1);
561
+ // ../process-utils/src/process-info.ts
562
+ import { execFile } from "node:child_process";
563
+ import { promisify } from "node:util";
564
+ var execFileAsync = promisify(execFile);
560
565
 
561
566
  // ../provider-bridge-protocol/src/bridge-kit/bounded-line-reader.ts
562
567
  import { StringDecoder } from "node:string_decoder";