@get-bb/plugin-sdk 0.4.94 → 0.4.99

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.
@@ -15803,6 +15803,7 @@ function renderSlot(registration, props, options = {}) {
15803
15803
  submits: []
15804
15804
  };
15805
15805
  const composerOwnership = { active: true };
15806
+ const submissionListeners = /* @__PURE__ */ new Set();
15806
15807
  const composer = {
15807
15808
  getAttachmentCount: () => composerAttachmentCount,
15808
15809
  getScope: () => composerScope,
@@ -15846,6 +15847,21 @@ ${block}
15846
15847
  }
15847
15848
  composerLog.focusCount += 1;
15848
15849
  },
15850
+ experimental_onSubmitted(listener) {
15851
+ submissionListeners.add(listener);
15852
+ return () => {
15853
+ submissionListeners.delete(listener);
15854
+ };
15855
+ },
15856
+ experimental_removeMention({ provider, id }) {
15857
+ for (let index = composerLog.mentions.length - 1; index >= 0; index -= 1) {
15858
+ const mention = composerLog.mentions[index];
15859
+ if (mention?.provider === provider && mention.id === id) {
15860
+ commitComposerText(composerText.replace(mention.label, ""));
15861
+ composerLog.mentions.splice(index, 1);
15862
+ }
15863
+ }
15864
+ },
15849
15865
  insertMention(mention) {
15850
15866
  const label = mention.label.trim() || mention.id;
15851
15867
  const separator = composerText.length === 0 || /\s$/u.test(composerText) ? "" : " ";
@@ -15868,6 +15884,7 @@ ${block}
15868
15884
  }
15869
15885
  composerLog.submits.push(options2);
15870
15886
  commitComposerText("");
15887
+ for (const listener of submissionListeners) listener();
15871
15888
  }
15872
15889
  }
15873
15890
  };
@@ -1,6 +1,6 @@
1
1
  // src/internal/host-policy.ts
2
2
  import { createHash } from "node:crypto";
3
- import { z as z4 } from "zod";
3
+ import { z as z5 } from "zod";
4
4
 
5
5
  // ../domain/src/plugin-icon.ts
6
6
  function isPluginOwnedIconPath(icon) {
@@ -35,6 +35,7 @@ var RESERVED_BB_CLI_COMMANDS = [
35
35
  "plugin",
36
36
  "project",
37
37
  "provider",
38
+ "server",
38
39
  "settings",
39
40
  "skill",
40
41
  "status",
@@ -54,6 +55,12 @@ import { z } from "zod";
54
55
  var PROVIDER_FORK_VALUES = ["none", "tip", "checkpoint"];
55
56
  var providerForkSchema = z.enum(PROVIDER_FORK_VALUES);
56
57
 
58
+ // ../domain/src/completed-turn-display.ts
59
+ import { z as z2 } from "zod";
60
+ var COMPLETED_TURN_DISPLAY_VALUES = ["collapse", "flat"];
61
+ var completedTurnDisplaySchema = z2.enum(COMPLETED_TURN_DISPLAY_VALUES);
62
+ var DEFAULT_COMPLETED_TURN_DISPLAY = "collapse";
63
+
57
64
  // ../domain/src/provider-skill-roots.ts
58
65
  function isAbsoluteProviderSkillRootPath(value) {
59
66
  if (value.length === 0) {
@@ -76,53 +83,53 @@ function isRelativeProviderSkillRootPath(value) {
76
83
  }
77
84
 
78
85
  // ../domain/src/json-value.ts
79
- import { z as z2 } from "zod";
80
- var jsonValueSchema = z2.lazy(
81
- () => z2.union([
82
- z2.string(),
83
- z2.number(),
84
- z2.boolean(),
85
- z2.null(),
86
- z2.array(jsonValueSchema),
87
- z2.record(z2.string(), jsonValueSchema)
86
+ import { z as z3 } from "zod";
87
+ var jsonValueSchema = z3.lazy(
88
+ () => z3.union([
89
+ z3.string(),
90
+ z3.number(),
91
+ z3.boolean(),
92
+ z3.null(),
93
+ z3.array(jsonValueSchema),
94
+ z3.record(z3.string(), jsonValueSchema)
88
95
  ])
89
96
  );
90
- var jsonObjectSchema = z2.record(
91
- z2.string(),
97
+ var jsonObjectSchema = z3.record(
98
+ z3.string(),
92
99
  jsonValueSchema
93
100
  );
94
101
 
95
102
  // ../domain/src/native-roots.ts
96
- import { z as z3 } from "zod";
103
+ import { z as z4 } from "zod";
97
104
  var PROVIDER_NATIVE_ROOTS_MAX = 32;
98
105
  var PROVIDER_NATIVE_ROOT_NAME_PREFIX_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,62}:$/u;
99
- var nativeRootNamePrefixSchema = z3.string().refine(
106
+ var nativeRootNamePrefixSchema = z4.string().refine(
100
107
  (value) => value === "" || PROVIDER_NATIVE_ROOT_NAME_PREFIX_PATTERN.test(value),
101
108
  "A root name prefix is a plugin-name-like token ending in ':'"
102
109
  );
103
- var nativeRootManifestPathSchema = z3.string().min(1).refine(
110
+ var nativeRootManifestPathSchema = z4.string().min(1).refine(
104
111
  isRelativeProviderSkillRootPath,
105
112
  "A manifest marker is a relative path without dot segments"
106
113
  );
107
- var relativeNativeRootPathSchema = z3.string().min(1).refine(
114
+ var relativeNativeRootPathSchema = z4.string().min(1).refine(
108
115
  isRelativeProviderSkillRootPath,
109
116
  "Roots must be relative paths without dot segments"
110
117
  );
111
- var absoluteNativeRootPathSchema = z3.string().min(1).refine(
118
+ var absoluteNativeRootPathSchema = z4.string().min(1).refine(
112
119
  isAbsoluteProviderSkillRootPath,
113
120
  "Absolute roots must be absolute paths without dot segments"
114
121
  );
115
- var providerNativeRootInputSchema = z3.union([
116
- z3.string().min(1),
117
- z3.object({
118
- path: z3.string().min(1),
122
+ var providerNativeRootInputSchema = z4.union([
123
+ z4.string().min(1),
124
+ z4.object({
125
+ path: z4.string().min(1),
119
126
  /** Skills nest in subdirectories (the agent scans recursively). */
120
- recursive: z3.boolean().optional(),
127
+ recursive: z4.boolean().optional(),
121
128
  /**
122
129
  * Scan the same relative directory in every ancestor of the workspace
123
130
  * up to the repository root (`project` roots only).
124
131
  */
125
- ancestors: z3.boolean().optional(),
132
+ ancestors: z4.boolean().optional(),
126
133
  /**
127
134
  * Prepended to every name under the root, a vendor plugin's
128
135
  * `plugin-name:`; a prefixed root is listed as a plugin root.
@@ -137,14 +144,14 @@ var providerNativeRootInputSchema = z3.union([
137
144
  skipIfManifest: nativeRootManifestPathSchema.optional()
138
145
  }).strict()
139
146
  ]);
140
- var providerNativeRootsInputSchema = z3.object({
141
- user: z3.array(providerNativeRootInputSchema).optional(),
142
- project: z3.array(providerNativeRootInputSchema).optional()
147
+ var providerNativeRootsInputSchema = z4.object({
148
+ user: z4.array(providerNativeRootInputSchema).optional(),
149
+ project: z4.array(providerNativeRootInputSchema).optional()
143
150
  }).strict();
144
- var providerNativeRootSchema = z3.object({
145
- path: z3.string().min(1),
146
- recursive: z3.boolean(),
147
- ancestors: z3.boolean(),
151
+ var providerNativeRootSchema = z4.object({
152
+ path: z4.string().min(1),
153
+ recursive: z4.boolean(),
154
+ ancestors: z4.boolean(),
148
155
  namePrefix: nativeRootNamePrefixSchema,
149
156
  /** Absent: every skill-shaped directory under the root is a skill. */
150
157
  skipIfManifest: nativeRootManifestPathSchema.optional()
@@ -153,7 +160,7 @@ function uniqueByPath(roots) {
153
160
  return new Set(roots.map((root) => root.path)).size === roots.length;
154
161
  }
155
162
  function nativeRootSideSchema(side) {
156
- return z3.array(
163
+ return z4.array(
157
164
  providerNativeRootSchema.extend({ path: relativeNativeRootPathSchema }).superRefine((root, context) => {
158
165
  if (root.ancestors && side !== "project") {
159
166
  context.addIssue({
@@ -164,7 +171,7 @@ function nativeRootSideSchema(side) {
164
171
  })
165
172
  ).max(PROVIDER_NATIVE_ROOTS_MAX).refine(uniqueByPath, "Roots must not repeat a path");
166
173
  }
167
- var providerNativeRootsSchema = z3.object({
174
+ var providerNativeRootsSchema = z4.object({
168
175
  user: nativeRootSideSchema("user"),
169
176
  project: nativeRootSideSchema("project")
170
177
  }).strict();
@@ -190,19 +197,19 @@ function normalizeProviderNativeRoots(roots) {
190
197
  project: (roots?.project ?? []).map(normalizeProviderNativeRoot)
191
198
  };
192
199
  }
193
- var providerResolvedNativeRootShapeSchema = z3.enum([
200
+ var providerResolvedNativeRootShapeSchema = z4.enum([
194
201
  "skills",
195
202
  "skill",
196
203
  "skill-file",
197
204
  "commands",
198
205
  "command-file"
199
206
  ]);
200
- var resolvedNativeRootFieldsSchema = z3.object({
207
+ var resolvedNativeRootFieldsSchema = z4.object({
201
208
  path: absoluteNativeRootPathSchema,
202
- origin: z3.enum(["user", "project"]),
203
- recursive: z3.boolean(),
209
+ origin: z4.enum(["user", "project"]),
210
+ recursive: z4.boolean(),
204
211
  /** Only with origin `project`, for a path inside the workspace. */
205
- ancestors: z3.boolean(),
212
+ ancestors: z4.boolean(),
206
213
  namePrefix: nativeRootNamePrefixSchema,
207
214
  shape: providerResolvedNativeRootShapeSchema,
208
215
  /**
@@ -210,7 +217,7 @@ var resolvedNativeRootFieldsSchema = z3.object({
210
217
  * none. A vendor plugin's root SKILL.md takes the plugin's name; absent
211
218
  * means the parent directory's name.
212
219
  */
213
- fallbackName: z3.string().min(1).optional(),
220
+ fallbackName: z4.string().min(1).optional(),
214
221
  /**
215
222
  * `skills` only: a file, relative to a skill directory under this root,
216
223
  * that marks the directory as a vendor plugin rather than a skill; the
@@ -254,14 +261,14 @@ var resolvedCommandShapes = /* @__PURE__ */ new Set([
254
261
  "command-file"
255
262
  ]);
256
263
  var PROVIDER_RESOLVED_NATIVE_ROOTS_MAX = 256;
257
- var providerResolvedNativeRootsSchema = z3.object({
258
- skills: z3.array(
264
+ var providerResolvedNativeRootsSchema = z4.object({
265
+ skills: z4.array(
259
266
  providerResolvedNativeRootSchema.refine(
260
267
  (root) => resolvedSkillShapes.has(root.shape),
261
268
  "A skills root needs a skill shape"
262
269
  )
263
270
  ).max(PROVIDER_RESOLVED_NATIVE_ROOTS_MAX),
264
- commands: z3.array(
271
+ commands: z4.array(
265
272
  providerResolvedNativeRootSchema.refine(
266
273
  (root) => resolvedCommandShapes.has(root.shape),
267
274
  "A commands root needs a command shape"
@@ -272,7 +279,7 @@ var EMPTY_PROVIDER_RESOLVED_NATIVE_ROOTS = Object.freeze({
272
279
  skills: Object.freeze([]),
273
280
  commands: Object.freeze([])
274
281
  });
275
- var providerNativeRootSetSchema = z3.object({
282
+ var providerNativeRootSetSchema = z4.object({
276
283
  skills: providerNativeRootsSchema,
277
284
  commands: providerNativeRootsSchema,
278
285
  resolved: providerResolvedNativeRootsSchema
@@ -350,15 +357,15 @@ var CLI_COMMAND_NAME_PATTERN = /^[a-z0-9-]+$/;
350
357
  var AGENT_TOOL_NAME_PATTERN = /^[a-zA-Z0-9_-]+$/;
351
358
  var PLUGIN_PROVIDER_ENV_NAME_PATTERN = /^[A-Z_][A-Z0-9_]*$/;
352
359
  var PLUGIN_PROVIDER_ENV_MAX_ENTRIES = 32;
353
- var pluginProviderEnvEntrySchema = z4.object({
354
- name: z4.string().regex(PLUGIN_PROVIDER_ENV_NAME_PATTERN),
355
- value: z4.union([
356
- z4.string(),
357
- z4.object({ serverPath: z4.string().startsWith("/") }).strict()
360
+ var pluginProviderEnvEntrySchema = z5.object({
361
+ name: z5.string().regex(PLUGIN_PROVIDER_ENV_NAME_PATTERN),
362
+ value: z5.union([
363
+ z5.string(),
364
+ z5.object({ serverPath: z5.string().startsWith("/") }).strict()
358
365
  ]),
359
- reason: z4.string()
366
+ reason: z5.string()
360
367
  }).strict();
361
- var pluginProviderEnvEntriesSchema = z4.array(pluginProviderEnvEntrySchema).max(PLUGIN_PROVIDER_ENV_MAX_ENTRIES).superRefine((entries, context) => {
368
+ var pluginProviderEnvEntriesSchema = z5.array(pluginProviderEnvEntrySchema).max(PLUGIN_PROVIDER_ENV_MAX_ENTRIES).superRefine((entries, context) => {
362
369
  const names = /* @__PURE__ */ new Set();
363
370
  for (let index = 0; index < entries.length; index += 1) {
364
371
  const name = entries[index]?.name;
@@ -393,26 +400,26 @@ var PROVIDER_ID_PATTERN = /^[a-z0-9][a-z0-9-]{1,63}$/;
393
400
  var PLUGIN_PROVIDER_BRIDGE_OPTIONS_MAX_BYTES = 64 * 1024;
394
401
  var SETTING_KEY_PATTERN = /^[a-zA-Z0-9_-]+$/;
395
402
  var settingsBaseFields = {
396
- label: z4.string().min(1),
397
- description: z4.string().min(1).optional()
403
+ label: z5.string().min(1),
404
+ description: z5.string().min(1).optional()
398
405
  };
399
- var stringSettingSchemaSchema = z4.custom(
406
+ var stringSettingSchemaSchema = z5.custom(
400
407
  (value) => isStandardSchema(value)
401
408
  );
402
- var booleanSettingSchemaSchema = z4.custom(
409
+ var booleanSettingSchemaSchema = z5.custom(
403
410
  (value) => isStandardSchema(value)
404
411
  );
405
- var numberSettingSchemaSchema = z4.custom(
412
+ var numberSettingSchemaSchema = z5.custom(
406
413
  (value) => isStandardSchema(value)
407
414
  );
408
- var settingDescriptorSchema = z4.discriminatedUnion("type", [
409
- z4.object({
410
- type: z4.literal("string"),
415
+ var settingDescriptorSchema = z5.discriminatedUnion("type", [
416
+ z5.object({
417
+ type: z5.literal("string"),
411
418
  ...settingsBaseFields,
412
- secret: z4.literal(true).optional(),
413
- experimental_multiline: z4.boolean().optional(),
419
+ secret: z5.literal(true).optional(),
420
+ experimental_multiline: z5.boolean().optional(),
414
421
  experimental_schema: stringSettingSchemaSchema.optional(),
415
- default: z4.string().optional()
422
+ default: z5.string().optional()
416
423
  }).strict().refine(
417
424
  (descriptor) => !(descriptor.secret === true && descriptor.experimental_multiline === true),
418
425
  {
@@ -420,30 +427,30 @@ var settingDescriptorSchema = z4.discriminatedUnion("type", [
420
427
  path: ["experimental_multiline"]
421
428
  }
422
429
  ),
423
- z4.object({
424
- type: z4.literal("boolean"),
430
+ z5.object({
431
+ type: z5.literal("boolean"),
425
432
  ...settingsBaseFields,
426
433
  experimental_schema: booleanSettingSchemaSchema.optional(),
427
- default: z4.boolean().optional()
434
+ default: z5.boolean().optional()
428
435
  }).strict(),
429
- z4.object({
430
- type: z4.literal("number"),
436
+ z5.object({
437
+ type: z5.literal("number"),
431
438
  ...settingsBaseFields,
432
439
  experimental_schema: numberSettingSchemaSchema.optional(),
433
- default: z4.number().finite().optional()
440
+ default: z5.number().finite().optional()
434
441
  }).strict(),
435
- z4.object({
436
- type: z4.literal("select"),
442
+ z5.object({
443
+ type: z5.literal("select"),
437
444
  ...settingsBaseFields,
438
- options: z4.array(z4.string().min(1)).min(1),
445
+ options: z5.array(z5.string().min(1)).min(1),
439
446
  experimental_schema: stringSettingSchemaSchema.optional(),
440
- default: z4.string().optional()
447
+ default: z5.string().optional()
441
448
  }).strict(),
442
- z4.object({
443
- type: z4.literal("project"),
449
+ z5.object({
450
+ type: z5.literal("project"),
444
451
  ...settingsBaseFields,
445
452
  experimental_schema: stringSettingSchemaSchema.optional(),
446
- default: z4.string().optional()
453
+ default: z5.string().optional()
447
454
  }).strict()
448
455
  ]);
449
456
  function registerSettingDescriptors(target, added) {
@@ -991,6 +998,18 @@ function validateProviderModelCatalogScope(providerId, value) {
991
998
  }
992
999
  return value;
993
1000
  }
1001
+ var PROVIDER_COMPLETED_TURN_DISPLAYS = COMPLETED_TURN_DISPLAY_VALUES;
1002
+ function validateProviderCompletedTurnDisplay(providerId, value) {
1003
+ if (value === void 0) {
1004
+ return DEFAULT_COMPLETED_TURN_DISPLAY;
1005
+ }
1006
+ if (typeof value !== "string" || !PROVIDER_COMPLETED_TURN_DISPLAYS.includes(value)) {
1007
+ throw new Error(
1008
+ `provider "${providerId}" completedTurnDisplay must be one of ${PROVIDER_COMPLETED_TURN_DISPLAYS.join(", ")}`
1009
+ );
1010
+ }
1011
+ return value;
1012
+ }
994
1013
  function validateProviderFallbackModels(providerId, value) {
995
1014
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
996
1015
  throw new Error(`provider "${providerId}" models must be an object`);
@@ -1371,6 +1390,10 @@ function validatePluginProviderDeclaration(declaration) {
1371
1390
  allowed: PLUGIN_PROVIDER_COMPOSER_ACTION_VALUES,
1372
1391
  requireNonEmpty: false
1373
1392
  });
1393
+ const completedTurnDisplay = validateProviderCompletedTurnDisplay(
1394
+ id,
1395
+ declaration.completedTurnDisplay
1396
+ );
1374
1397
  const bridgeOptions = declaration.experimental_bridgeOptions === void 0 ? void 0 : normalizeProviderBridgeOptions(
1375
1398
  id,
1376
1399
  declaration.experimental_bridgeOptions
@@ -1436,6 +1459,7 @@ function validatePluginProviderDeclaration(declaration) {
1436
1459
  maintenance: normalizedMaintenance,
1437
1460
  capabilities: normalizedCapabilities,
1438
1461
  composerActions,
1462
+ completedTurnDisplay,
1439
1463
  ...strings === void 0 ? {} : { strings },
1440
1464
  ...serviceTiers === void 0 ? {} : { serviceTiers },
1441
1465
  ...reasoningLevels === void 0 ? {} : { reasoningLevels },
@@ -1456,9 +1480,9 @@ function isStandardSchema(value) {
1456
1480
  const standard = Reflect.get(value, "~standard");
1457
1481
  return typeof standard === "object" && standard !== null && Reflect.get(standard, "version") === 1 && typeof Reflect.get(standard, "vendor") === "string" && typeof Reflect.get(standard, "validate") === "function";
1458
1482
  }
1459
- var rpcDescriptionSchema = z4.string().trim().min(1).max(4096).optional().transform((value) => value ?? null);
1460
- var rpcPublicationOptionsSchema = z4.object({
1461
- experimental_discoverable: z4.boolean().default(false),
1483
+ var rpcDescriptionSchema = z5.string().trim().min(1).max(4096).optional().transform((value) => value ?? null);
1484
+ var rpcPublicationOptionsSchema = z5.object({
1485
+ experimental_discoverable: z5.boolean().default(false),
1462
1486
  experimental_description: rpcDescriptionSchema
1463
1487
  }).strict();
1464
1488
  function readRpcMethodContract(method, value) {
@@ -1500,7 +1524,7 @@ function publishedRpcSchema(schema, direction) {
1500
1524
  if (serialized === void 0 || new TextEncoder().encode(serialized).byteLength > 128 * 1024) {
1501
1525
  throw new Error("published RPC schema must be JSON and at most 128 KiB");
1502
1526
  }
1503
- const result = z4.record(z4.string(), jsonValueSchema).parse(JSON.parse(serialized));
1527
+ const result = z5.record(z5.string(), jsonValueSchema).parse(JSON.parse(serialized));
1504
1528
  const inspect = (value) => {
1505
1529
  if (value === null || typeof value !== "object") return;
1506
1530
  if (Array.isArray(value)) {
@@ -1550,7 +1574,7 @@ function zodSchemaToJsonSchema(schema) {
1550
1574
  if (typeof schema.toJSONSchema === "function") {
1551
1575
  return schema.toJSONSchema({ io: "input" });
1552
1576
  }
1553
- return z4.toJSONSchema(schema, { io: "input" });
1577
+ return z5.toJSONSchema(schema, { io: "input" });
1554
1578
  }
1555
1579
  var SINGLE_SCHEMA_KEYWORDS = [
1556
1580
  "additionalItems",
@@ -1885,15 +1909,15 @@ var ENVIRONMENT_PROVIDER_REQUIREMENT_NAMES = [
1885
1909
  "gitRemote",
1886
1910
  "projectless"
1887
1911
  ];
1888
- var environmentCompositionSchema = z4.object({
1889
- id: z4.string().regex(ENVIRONMENT_PROVIDER_ID_PATTERN),
1890
- displayName: z4.string().trim().min(1).max(ENVIRONMENT_PROVIDER_DISPLAY_NAME_MAX_CHARS),
1891
- description: z4.string().trim().min(1).max(ENVIRONMENT_PROVIDER_DESCRIPTION_MAX_CHARS).optional().transform((value) => value ?? null),
1892
- icon: z4.string().trim().min(1).transform(
1912
+ var environmentCompositionSchema = z5.object({
1913
+ id: z5.string().regex(ENVIRONMENT_PROVIDER_ID_PATTERN),
1914
+ displayName: z5.string().trim().min(1).max(ENVIRONMENT_PROVIDER_DISPLAY_NAME_MAX_CHARS),
1915
+ description: z5.string().trim().min(1).max(ENVIRONMENT_PROVIDER_DESCRIPTION_MAX_CHARS).optional().transform((value) => value ?? null),
1916
+ icon: z5.string().trim().min(1).transform(
1893
1917
  (icon) => isPluginOwnedIconPath(icon) ? validateProviderRelativePath(icon, "Composition icon") : icon
1894
1918
  ).optional().transform((value) => value ?? null),
1895
- machineProviderId: z4.string().regex(ENVIRONMENT_PROVIDER_ID_PATTERN),
1896
- environmentProviderId: z4.string().regex(ENVIRONMENT_PROVIDER_ID_PATTERN)
1919
+ machineProviderId: z5.string().regex(ENVIRONMENT_PROVIDER_ID_PATTERN),
1920
+ environmentProviderId: z5.string().regex(ENVIRONMENT_PROVIDER_ID_PATTERN)
1897
1921
  }).strict();
1898
1922
  function requireProviderIdAndDisplayName(noun, declaration) {
1899
1923
  if (typeof declaration !== "object" || declaration === null) {
@@ -1959,8 +1983,8 @@ function validatePluginEnvironmentProviderDeclaration(declaration) {
1959
1983
  "environment provider",
1960
1984
  declaration
1961
1985
  );
1962
- const description = z4.string().trim().min(1).max(ENVIRONMENT_PROVIDER_DESCRIPTION_MAX_CHARS).optional().transform((value) => value ?? null).parse(declaration.description);
1963
- const icon = z4.string().trim().min(1).optional().transform((value) => value ?? null).parse(declaration.icon);
1986
+ const description = z5.string().trim().min(1).max(ENVIRONMENT_PROVIDER_DESCRIPTION_MAX_CHARS).optional().transform((value) => value ?? null).parse(declaration.description);
1987
+ const icon = z5.string().trim().min(1).optional().transform((value) => value ?? null).parse(declaration.icon);
1964
1988
  if (icon !== null) {
1965
1989
  assertProviderIconShape("environment provider", id, icon);
1966
1990
  }
@@ -2029,9 +2053,9 @@ function normalizeEnvironmentProviderRequirements(id, declaration) {
2029
2053
  }
2030
2054
  return normalized;
2031
2055
  }
2032
- var environmentProviderPolicySchema = z4.object({
2033
- retireGraceMs: z4.number().int().nonnegative().nullable().default(3e5),
2034
- pathKeys: z4.enum(["per-thread", "per-attempt"]).default("per-thread")
2056
+ var environmentProviderPolicySchema = z5.object({
2057
+ retireGraceMs: z5.number().int().nonnegative().nullable().default(3e5),
2058
+ pathKeys: z5.enum(["per-thread", "per-attempt"]).default("per-thread")
2035
2059
  }).strict();
2036
2060
  var MACHINE_PROVIDER_DESCRIPTION_MAX_CHARS = 200;
2037
2061
  function validatePluginMachineProviderDeclaration(declaration) {
@@ -2039,10 +2063,10 @@ function validatePluginMachineProviderDeclaration(declaration) {
2039
2063
  "machine provider",
2040
2064
  declaration
2041
2065
  );
2042
- const description = z4.string().trim().min(1).max(MACHINE_PROVIDER_DESCRIPTION_MAX_CHARS).parse(declaration.description);
2043
- const icon = z4.string().trim().min(1).parse(declaration.icon);
2066
+ const description = z5.string().trim().min(1).max(MACHINE_PROVIDER_DESCRIPTION_MAX_CHARS).parse(declaration.description);
2067
+ const icon = z5.string().trim().min(1).parse(declaration.icon);
2044
2068
  assertProviderIconShape("machine provider", id, icon);
2045
- const ephemeral = z4.boolean().default(false).parse(declaration.ephemeral);
2069
+ const ephemeral = z5.boolean().default(false).parse(declaration.ephemeral);
2046
2070
  const inputs = normalizeProviderInputs(
2047
2071
  "machine provider",
2048
2072
  id,
@@ -4221,6 +4245,7 @@ function makeThreadResponse(overrides = {}) {
4221
4245
  sectionId: null,
4222
4246
  status: "idle",
4223
4247
  parentThreadId: null,
4248
+ lifecycleOwnerThreadId: null,
4224
4249
  sourceThreadId: null,
4225
4250
  originKind: null,
4226
4251
  originPluginId: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@get-bb/plugin-sdk",
3
- "version": "0.4.94",
3
+ "version": "0.4.99",
4
4
  "homepage": "https://github.com/get-bb/bb#readme",
5
5
  "bugs": {
6
6
  "url": "https://github.com/get-bb/bb/issues"