@get-bb/plugin-sdk 0.6.37 → 0.6.42
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/bundled-types/bb-plugin-sdk-app.d.ts +391 -281
- package/bundled-types/bb-plugin-sdk-internal-composer-handle.d.ts +1 -10
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +9 -23
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +2 -1
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp-next.d.ts +606 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp.d.ts +32 -90
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +11 -10
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +66 -220
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +2 -1
- package/bundled-types/bb-plugin-sdk-testing.d.ts +7 -3
- package/bundled-types/bb-plugin-sdk.d.ts +409 -284
- package/dist/internal/host-policy.js +13 -7
- package/dist/internal/plugin-app-collector.js +32 -0
- package/dist/provider-bridge-acp-next.js +24029 -0
- package/dist/provider-bridge-acp.js +959 -873
- package/dist/provider-bridge-testing.js +571 -510
- package/dist/provider-bridge.js +633 -559
- package/dist/testing/app.js +32 -0
- package/dist/testing/index.js +15 -7
- package/package.json +8 -1
|
@@ -1042,13 +1042,12 @@ function validateProviderFallbackModels(providerId, value) {
|
|
|
1042
1042
|
`provider "${providerId}" ${field}.supportedReasoningEfforts[${effortIndex}] must be { reasoningEffort, description }`
|
|
1043
1043
|
);
|
|
1044
1044
|
}
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
const level = reasoningEffort;
|
|
1045
|
+
const level = requireNonBlankString({
|
|
1046
|
+
providerId,
|
|
1047
|
+
field: `${field}.supportedReasoningEfforts[${effortIndex}].reasoningEffort`,
|
|
1048
|
+
value: Reflect.get(effort, "reasoningEffort")
|
|
1049
|
+
});
|
|
1050
|
+
const label = Reflect.get(effort, "label");
|
|
1052
1051
|
if (levels.has(level)) {
|
|
1053
1052
|
throw new Error(
|
|
1054
1053
|
`provider "${providerId}" ${field}.supportedReasoningEfforts repeats ${JSON.stringify(level)}`
|
|
@@ -1057,6 +1056,13 @@ function validateProviderFallbackModels(providerId, value) {
|
|
|
1057
1056
|
levels.add(level);
|
|
1058
1057
|
return Object.freeze({
|
|
1059
1058
|
reasoningEffort: level,
|
|
1059
|
+
...label === void 0 ? {} : {
|
|
1060
|
+
label: requireNonBlankString({
|
|
1061
|
+
providerId,
|
|
1062
|
+
field: `${field}.supportedReasoningEfforts[${effortIndex}].label`,
|
|
1063
|
+
value: label
|
|
1064
|
+
})
|
|
1065
|
+
},
|
|
1060
1066
|
description: requireNonBlankString({
|
|
1061
1067
|
providerId,
|
|
1062
1068
|
field: `${field}.supportedReasoningEfforts[${effortIndex}].description`,
|
|
@@ -248,6 +248,7 @@ function collectComposerCustomization(registration, seenIds, onRejected, seenPop
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
// src/internal/plugin-app-collector.ts
|
|
251
|
+
var CODE_FENCE_LANGUAGE_PATTERN = /^[a-z0-9][a-z0-9+#._-]*$/;
|
|
251
252
|
var sidebarFooterCommandSequence = 0;
|
|
252
253
|
var SIDEBAR_FOOTER_ACTION_KEYS = /* @__PURE__ */ new Set([
|
|
253
254
|
"id",
|
|
@@ -477,6 +478,7 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
|
|
|
477
478
|
sourceCodeRenderers: [],
|
|
478
479
|
diffRenderers: [],
|
|
479
480
|
messageDirectives: [],
|
|
481
|
+
codeFenceRenderers: [],
|
|
480
482
|
messageActions: [],
|
|
481
483
|
commandPaletteActions: [],
|
|
482
484
|
providerIcons: [],
|
|
@@ -506,6 +508,8 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
|
|
|
506
508
|
sourceCodeRenderer: /* @__PURE__ */ new Set(),
|
|
507
509
|
diffRenderer: /* @__PURE__ */ new Set(),
|
|
508
510
|
messageDirective: /* @__PURE__ */ new Set(),
|
|
511
|
+
codeFenceRenderer: /* @__PURE__ */ new Set(),
|
|
512
|
+
codeFenceLanguage: /* @__PURE__ */ new Set(),
|
|
509
513
|
messageAction: /* @__PURE__ */ new Set(),
|
|
510
514
|
command: /* @__PURE__ */ new Set(),
|
|
511
515
|
providerIcon: /* @__PURE__ */ new Set(),
|
|
@@ -822,6 +826,34 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
|
|
|
822
826
|
component: requireComponent(kind, registration.component)
|
|
823
827
|
});
|
|
824
828
|
},
|
|
829
|
+
experimental_codeFenceRenderer(registration) {
|
|
830
|
+
const kind = "slots.experimental_codeFenceRenderer";
|
|
831
|
+
const id = requireSlotId(kind, registration?.id);
|
|
832
|
+
requireUniqueId(kind, seenIds.codeFenceRenderer, id);
|
|
833
|
+
const rawLanguages = registration.languages;
|
|
834
|
+
if (!Array.isArray(rawLanguages) || rawLanguages.length === 0) {
|
|
835
|
+
throw new Error(
|
|
836
|
+
`${kind}: "languages" must be a non-empty array of lowercase info-string languages`
|
|
837
|
+
);
|
|
838
|
+
}
|
|
839
|
+
const languages = rawLanguages.map((language) => {
|
|
840
|
+
if (typeof language !== "string" || !CODE_FENCE_LANGUAGE_PATTERN.test(language)) {
|
|
841
|
+
throw new Error(
|
|
842
|
+
`${kind}: languages must match ${CODE_FENCE_LANGUAGE_PATTERN}, got ${JSON.stringify(language)}`
|
|
843
|
+
);
|
|
844
|
+
}
|
|
845
|
+
if (seenIds.codeFenceLanguage.has(language)) {
|
|
846
|
+
throw new Error(`${kind}: duplicate language "${language}"`);
|
|
847
|
+
}
|
|
848
|
+
seenIds.codeFenceLanguage.add(language);
|
|
849
|
+
return language;
|
|
850
|
+
});
|
|
851
|
+
collected.codeFenceRenderers.push({
|
|
852
|
+
id,
|
|
853
|
+
languages,
|
|
854
|
+
component: requireComponent(kind, registration.component)
|
|
855
|
+
});
|
|
856
|
+
},
|
|
825
857
|
messageAction(registration) {
|
|
826
858
|
const kind = "slots.messageAction";
|
|
827
859
|
const id = requireSlotId(kind, registration?.id);
|