@get-bb/plugin-sdk 0.6.121 → 0.6.132

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.
package/dist/app.js CHANGED
@@ -115,7 +115,6 @@ var INDICATOR_LABELS = {
115
115
  "background-agent": "Background agent running",
116
116
  "background-command": "Background command running",
117
117
  "plan-mode": "Plan mode active",
118
- goal: "Goal active",
119
118
  runtime: "Thread working",
120
119
  "queued-failed": "Queued message failed to send",
121
120
  "queued-waiting": "Thread has a message waiting to send",
@@ -160,14 +159,12 @@ function addThreadFlags(flags, thread) {
160
159
  flags.backgroundAgent ||= thread.activity.backgroundAgents > 0;
161
160
  flags.backgroundCommand ||= thread.activity.backgroundCommands > 0;
162
161
  flags.planMode ||= thread.activity.planMode > 0;
163
- flags.goal ||= thread.activity.goals > 0;
164
162
  }
165
163
  function resolveIndicator(flags, queuedWork, hasUnsubmittedDraft, isWorking) {
166
164
  if (flags.unreadError) return "unread-error";
167
165
  if (flags.pending) return "waiting-for-input";
168
166
  if (hasUnsubmittedDraft && isWorking) return "working-draft";
169
167
  if (flags.planMode) return "plan-mode";
170
- if (flags.goal) return "goal";
171
168
  if (flags.runtime) return "runtime";
172
169
  if (flags.workflow) return "workflow";
173
170
  if (queuedWork === "failed") return "queued-failed";
@@ -192,12 +189,11 @@ function experimental_resolveThreadStatus({
192
189
  workflow: false,
193
190
  backgroundAgent: false,
194
191
  backgroundCommand: false,
195
- planMode: false,
196
- goal: false
192
+ planMode: false
197
193
  };
198
194
  if (thread !== null) addThreadFlags(flags, thread);
199
195
  for (const hiddenThread of hiddenThreads) addThreadFlags(flags, hiddenThread);
200
- const isThreadWorking = flags.runtime || flags.workflow || flags.backgroundAgent || flags.backgroundCommand || flags.planMode || flags.goal;
196
+ const isThreadWorking = flags.runtime || flags.workflow || flags.backgroundAgent || flags.backgroundCommand || flags.planMode;
201
197
  const indicator = resolveIndicator(
202
198
  flags,
203
199
  thread?.queuedWork ?? "none",
@@ -293,6 +289,9 @@ var experimental_FilePreview = runtimeComponent(
293
289
  var experimental_InfoSection = runtimeComponent(
294
290
  "experimental_InfoSection"
295
291
  );
292
+ var experimental_CollapsibleStackCard = runtimeComponent(
293
+ "experimental_CollapsibleStackCard"
294
+ );
296
295
  var experimental_DetailRow = runtimeComponent(
297
296
  "experimental_DetailRow"
298
297
  );
@@ -431,6 +430,9 @@ var experimental_useThreadContextKind = runtimeFunction(
431
430
  var experimental_usePanelTabs = runtimeFunction(
432
431
  "experimental_usePanelTabs"
433
432
  );
433
+ var experimental_useThreadExtensionState = runtimeFunction(
434
+ "experimental_useThreadExtensionState"
435
+ );
434
436
  var experimental_useSidebarThreadSplit = runtimeFunction(
435
437
  "experimental_useSidebarThreadSplit"
436
438
  );
@@ -491,6 +493,7 @@ export {
491
493
  UrlLink,
492
494
  definePluginApp,
493
495
  experimental_BranchPicker,
496
+ experimental_CollapsibleStackCard,
494
497
  experimental_ComposerRoot,
495
498
  experimental_DetailRow,
496
499
  experimental_Diff,
@@ -564,6 +567,7 @@ export {
564
567
  experimental_useThreadActionRegistrations,
565
568
  experimental_useThreadActions,
566
569
  experimental_useThreadContextKind,
570
+ experimental_useThreadExtensionState,
567
571
  experimental_useThreadTitleDisplayText,
568
572
  useBbContext,
569
573
  useBbNavigate,
@@ -350,7 +350,7 @@ function validatePluginProviderEnvEntries(value) {
350
350
  var PLUGIN_AGENT_STATIC_INSTRUCTIONS_MAX_CHARS = 4096;
351
351
  var PLUGIN_AGENT_STATUS_LABEL_MAX_CHARS = 80;
352
352
  var PLUGIN_AGENT_SELECTION_MAX_IDS = 256;
353
- var PLUGIN_AGENT_DYNAMIC_INSTRUCTIONS_MAX_CHARS = 4096;
353
+ var PLUGIN_DYNAMIC_INSTRUCTIONS_MAX_CHARS = 32768;
354
354
  var PLUGIN_AGENT_TOOL_PARAMETERS_MAX_BYTES = 128 * 1024;
355
355
  var MENTION_PROVIDER_ID_PATTERN = /^[a-zA-Z0-9_-]+$/;
356
356
  var PROVIDER_ID_PATTERN = /^[a-z0-9][a-z0-9-]{1,63}$/;
@@ -1388,6 +1388,12 @@ function validatePluginProviderDeclaration(declaration) {
1388
1388
  `provider "${id}" experimental_resolvesNativeRoots must be a boolean`
1389
1389
  );
1390
1390
  }
1391
+ const guidedSignIn = declaration.internal_DO_NOT_USE_guidedSignIn;
1392
+ if (guidedSignIn !== void 0 && typeof guidedSignIn !== "boolean") {
1393
+ throw new Error(
1394
+ `provider "${id}" internal_DO_NOT_USE_guidedSignIn must be a boolean`
1395
+ );
1396
+ }
1391
1397
  const deriveProviderOptions = declaration.deriveProviderOptions;
1392
1398
  if (deriveProviderOptions !== void 0 && typeof deriveProviderOptions !== "function") {
1393
1399
  throw new Error(
@@ -1417,6 +1423,7 @@ function validatePluginProviderDeclaration(declaration) {
1417
1423
  ...nativeSkillRoots === void 0 ? {} : { experimental_nativeSkillRoots: nativeSkillRoots },
1418
1424
  ...nativeCommandRoots === void 0 ? {} : { experimental_nativeCommandRoots: nativeCommandRoots },
1419
1425
  experimental_resolvesNativeRoots: resolvesNativeRoots ?? false,
1426
+ internal_DO_NOT_USE_guidedSignIn: guidedSignIn ?? false,
1420
1427
  ...deriveProviderOptions === void 0 ? {} : { deriveProviderOptions }
1421
1428
  });
1422
1429
  }
@@ -2693,10 +2700,7 @@ function normalizePluginAgentConfiguration(args) {
2693
2700
  if (output.instructions !== void 0 && typeof output.instructions !== "string") {
2694
2701
  throw new Error("configure() output.instructions must be a string");
2695
2702
  }
2696
- const instructions = typeof output.instructions === "string" && output.instructions.trim().length > 0 ? output.instructions.slice(
2697
- 0,
2698
- PLUGIN_AGENT_DYNAMIC_INSTRUCTIONS_MAX_CHARS
2699
- ) : null;
2703
+ const instructions = typeof output.instructions === "string" && output.instructions.trim().length > 0 ? output.instructions.slice(0, PLUGIN_DYNAMIC_INSTRUCTIONS_MAX_CHARS) : null;
2700
2704
  const toolSelections = normalizePluginAgentToolSelections({
2701
2705
  knownIds: args.knownToolIds,
2702
2706
  pluginId: args.pluginId,
@@ -2832,6 +2836,7 @@ export {
2832
2836
  KV_VALUE_MAX_BYTES,
2833
2837
  MACHINE_PROVIDER_DESCRIPTION_MAX_CHARS,
2834
2838
  PLUGIN_AGENT_STATUS_LABEL_MAX_CHARS,
2839
+ PLUGIN_DYNAMIC_INSTRUCTIONS_MAX_CHARS,
2835
2840
  PLUGIN_MENTION_TRIGGER_VALUES,
2836
2841
  PLUGIN_PROVIDER_BRIDGE_OPTIONS_MAX_BYTES,
2837
2842
  PLUGIN_PROVIDER_COMPOSER_ACTION_VALUES,
@@ -484,6 +484,7 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
484
484
  homepageSections: [],
485
485
  settingsSections: [],
486
486
  appOverlays: [],
487
+ setupGuideSections: [],
487
488
  navPanels: [],
488
489
  tabs: [],
489
490
  get threadPanelActions() {
@@ -528,6 +529,7 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
528
529
  homepageSection: /* @__PURE__ */ new Set(),
529
530
  settingsSection: /* @__PURE__ */ new Set(),
530
531
  appOverlay: /* @__PURE__ */ new Set(),
532
+ setupGuideSection: /* @__PURE__ */ new Set(),
531
533
  navPanel: /* @__PURE__ */ new Set(),
532
534
  tab: /* @__PURE__ */ new Set(),
533
535
  newThreadPanelAction: /* @__PURE__ */ new Set(),
@@ -730,6 +732,15 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
730
732
  component: requireComponent(kind, registration.component)
731
733
  });
732
734
  },
735
+ internal_DO_NOT_USE_setupGuideSection(registration) {
736
+ const kind = "slots.internal_DO_NOT_USE_setupGuideSection";
737
+ const id = requireSlotId(kind, registration?.id);
738
+ requireUniqueId(kind, seenIds.setupGuideSection, id);
739
+ collected.setupGuideSections.push({
740
+ id,
741
+ component: requireComponent(kind, registration.component)
742
+ });
743
+ },
733
744
  navPanel(registration) {
734
745
  const kind = "slots.navPanel";
735
746
  const id = requireSlotId(kind, registration?.id);
@@ -1696,6 +1696,7 @@ import { z as z8 } from "zod";
1696
1696
  var systemMessageKindValues = [
1697
1697
  "ownership-assigned",
1698
1698
  "ownership-removed",
1699
+ "ownership-batch",
1699
1700
  "child-needs-attention",
1700
1701
  "child-completed",
1701
1702
  "child-failed",
@@ -1752,6 +1753,7 @@ var queuedMessageWaitingOnKindValues = [
1752
1753
  "provisioning",
1753
1754
  "host-offline",
1754
1755
  "interaction",
1756
+ "app-update",
1755
1757
  "plugin",
1756
1758
  "superseded"
1757
1759
  ];
@@ -1772,6 +1774,7 @@ var queuedMessageWaitingOnSchema = z9.discriminatedUnion("kind", [
1772
1774
  hostName: queuedMessageWaitHostNameSchema
1773
1775
  }),
1774
1776
  z9.object({ kind: z9.literal("interaction") }),
1777
+ z9.object({ kind: z9.literal("app-update") }),
1775
1778
  z9.object({
1776
1779
  kind: z9.literal("plugin"),
1777
1780
  pluginId: pluginIdSchema,
@@ -1885,8 +1888,7 @@ var threadActivityStateSchema = z15.object({
1885
1888
  activeWorkflowCount: z15.number().int().nonnegative(),
1886
1889
  activeBackgroundAgentCount: z15.number().int().nonnegative(),
1887
1890
  activeBackgroundCommandCount: z15.number().int().nonnegative(),
1888
- activePlanModeCount: z15.number().int().nonnegative(),
1889
- activeGoalCount: z15.number().int().nonnegative()
1891
+ activePlanModeCount: z15.number().int().nonnegative()
1890
1892
  });
1891
1893
 
1892
1894
  // ../domain/src/thread.ts
@@ -1933,6 +1935,7 @@ var threadQueuedMessageSchema = z16.object({
1933
1935
  */
1934
1936
  failureReason: queuedMessageFailureReasonSchema.nullable(),
1935
1937
  payload: queuedMessagePayloadSchema,
1938
+ systemNotice: queuedMessageSystemNoticeSchema.nullable(),
1936
1939
  /**
1937
1940
  * Whether the sender may still rewrite this row's input. Not derivable from
1938
1941
  * `payload` alone: a `retry` row is never editable, and an `inline` row
@@ -2005,7 +2008,8 @@ var THREAD_CHANGE_KINDS = [
2005
2008
  "environment-changed",
2006
2009
  "read-state-changed",
2007
2010
  "tabs-changed",
2008
- "terminals-changed"
2011
+ "terminals-changed",
2012
+ "storage-changed"
2009
2013
  ];
2010
2014
  var PROJECT_CHANGE_KINDS = [
2011
2015
  "project-created",
@@ -2022,7 +2026,7 @@ var ENVIRONMENT_CHANGE_KINDS = [
2022
2026
  "status-changed",
2023
2027
  "work-status-changed",
2024
2028
  "git-refs-changed",
2025
- "thread-storage-changed"
2029
+ "git-branches-changed"
2026
2030
  ];
2027
2031
  var HOST_CHANGE_KINDS = [
2028
2032
  "host-connected",
@@ -7,7 +7,6 @@ var INDICATOR_LABELS = {
7
7
  "background-agent": "Background agent running",
8
8
  "background-command": "Background command running",
9
9
  "plan-mode": "Plan mode active",
10
- goal: "Goal active",
11
10
  runtime: "Thread working",
12
11
  "queued-failed": "Queued message failed to send",
13
12
  "queued-waiting": "Thread has a message waiting to send",
@@ -52,14 +51,12 @@ function addThreadFlags(flags, thread) {
52
51
  flags.backgroundAgent ||= thread.activity.backgroundAgents > 0;
53
52
  flags.backgroundCommand ||= thread.activity.backgroundCommands > 0;
54
53
  flags.planMode ||= thread.activity.planMode > 0;
55
- flags.goal ||= thread.activity.goals > 0;
56
54
  }
57
55
  function resolveIndicator(flags, queuedWork, hasUnsubmittedDraft, isWorking) {
58
56
  if (flags.unreadError) return "unread-error";
59
57
  if (flags.pending) return "waiting-for-input";
60
58
  if (hasUnsubmittedDraft && isWorking) return "working-draft";
61
59
  if (flags.planMode) return "plan-mode";
62
- if (flags.goal) return "goal";
63
60
  if (flags.runtime) return "runtime";
64
61
  if (flags.workflow) return "workflow";
65
62
  if (queuedWork === "failed") return "queued-failed";
@@ -84,12 +81,11 @@ function experimental_resolveThreadStatus({
84
81
  workflow: false,
85
82
  backgroundAgent: false,
86
83
  backgroundCommand: false,
87
- planMode: false,
88
- goal: false
84
+ planMode: false
89
85
  };
90
86
  if (thread !== null) addThreadFlags(flags, thread);
91
87
  for (const hiddenThread of hiddenThreads) addThreadFlags(flags, hiddenThread);
92
- const isThreadWorking = flags.runtime || flags.workflow || flags.backgroundAgent || flags.backgroundCommand || flags.planMode || flags.goal;
88
+ const isThreadWorking = flags.runtime || flags.workflow || flags.backgroundAgent || flags.backgroundCommand || flags.planMode;
93
89
  const indicator = resolveIndicator(
94
90
  flags,
95
91
  thread?.queuedWork ?? "none",