@get-bb/plugin-sdk 0.4.11 → 0.4.13

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.
@@ -221,6 +221,7 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
221
221
  diffRenderers: [],
222
222
  messageDirectives: [],
223
223
  messageActions: [],
224
+ commandPaletteActions: [],
224
225
  providerIcons: [],
225
226
  contentScripts: []
226
227
  };
@@ -240,6 +241,7 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
240
241
  diffRenderer: /* @__PURE__ */ new Set(),
241
242
  messageDirective: /* @__PURE__ */ new Set(),
242
243
  messageAction: /* @__PURE__ */ new Set(),
244
+ commandPaletteAction: /* @__PURE__ */ new Set(),
243
245
  providerIcon: /* @__PURE__ */ new Set(),
244
246
  contentScript: /* @__PURE__ */ new Set()
245
247
  };
@@ -535,6 +537,23 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
535
537
  run: registration.run
536
538
  });
537
539
  },
540
+ commandPaletteAction(registration) {
541
+ const kind = "slots.commandPaletteAction";
542
+ const id = requireSlotId(kind, registration?.id);
543
+ requireUniqueId(kind, seenIds.commandPaletteAction, id);
544
+ if (typeof registration.run !== "function") {
545
+ throw new Error(`${kind}: "run" must be a function`);
546
+ }
547
+ if (registration.isAvailable !== void 0 && typeof registration.isAvailable !== "function") {
548
+ throw new Error(`${kind}: "isAvailable" must be a function`);
549
+ }
550
+ collected.commandPaletteActions.push({
551
+ id,
552
+ title: requireNonEmptyString(kind, "title", registration.title),
553
+ ...registration.isAvailable !== void 0 ? { isAvailable: registration.isAvailable } : {},
554
+ run: registration.run
555
+ });
556
+ },
538
557
  experimental_providerIcon(registration) {
539
558
  const kind = "slots.experimental_providerIcon";
540
559
  const providerId = requireProviderId(kind, registration?.providerId);
@@ -2893,6 +2893,20 @@ var threadDeltaSchema = z20.discriminatedUnion("kind", [
2893
2893
  clientRequestId: clientTurnRequestIdSchema,
2894
2894
  providerTurnId: providerTurnIdSchema.optional()
2895
2895
  }),
2896
+ /**
2897
+ * Input the provider itself injected into the conversation, with no bb
2898
+ * client request behind it (a pi extension's `sendMessage` custom message
2899
+ * that triggered or steered a turn). The assembler records it as a
2900
+ * `userMessage` item in the open turn so the transcript shows what the
2901
+ * model was answering. Dropped silently when no turn is open: the provider
2902
+ * appended it to its own context without running the agent, so there is no
2903
+ * bb turn to attach it to.
2904
+ */
2905
+ z20.object({
2906
+ kind: z20.literal("input.provider"),
2907
+ text: z20.string().min(1),
2908
+ parentRef: deltaKeyPartSchema.optional()
2909
+ }),
2896
2910
  /**
2897
2911
  * An explicit provider signal opened work (pi `agent_start`, codex
2898
2912
  * `turn/started`). With `providerTurnId` the turn lives in the keyed
@@ -4272,6 +4286,25 @@ function createDeltaAssembler(options) {
4272
4286
  state.pendingAccepted.push(delta.clientRequestId);
4273
4287
  return;
4274
4288
  }
4289
+ case "input.provider": {
4290
+ if (state.currentTurnId === void 0) {
4291
+ return;
4292
+ }
4293
+ const parentToolCallId = mapParentRef(state, delta.parentRef);
4294
+ events.push({
4295
+ type: "item/completed",
4296
+ threadId: UNSTAMPED_THREAD_ID,
4297
+ providerThreadId: "",
4298
+ scope: turnScope(state.currentTurnId),
4299
+ item: {
4300
+ type: "userMessage",
4301
+ id: mintItemId(),
4302
+ content: [{ type: "text", text: delta.text }],
4303
+ ...parentToolCallId === void 0 ? {} : { parentToolCallId }
4304
+ }
4305
+ });
4306
+ return;
4307
+ }
4275
4308
  case "turn.open": {
4276
4309
  if (delta.providerTurnId !== void 0) {
4277
4310
  const parentToolCallId = mapParentRef(state, delta.parentRef);