@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
package/dist/testing/app.js
CHANGED
|
@@ -967,6 +967,7 @@ var experimental_THREAD_ACTION_GROUPS = {
|
|
|
967
967
|
|
|
968
968
|
// src/internal/plugin-app-collector.ts
|
|
969
969
|
import { z as z2 } from "zod";
|
|
970
|
+
var CODE_FENCE_LANGUAGE_PATTERN = /^[a-z0-9][a-z0-9+#._-]*$/;
|
|
970
971
|
var sidebarFooterCommandSequence = 0;
|
|
971
972
|
var SIDEBAR_FOOTER_ACTION_KEYS = /* @__PURE__ */ new Set([
|
|
972
973
|
"id",
|
|
@@ -1193,6 +1194,7 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
|
|
|
1193
1194
|
sourceCodeRenderers: [],
|
|
1194
1195
|
diffRenderers: [],
|
|
1195
1196
|
messageDirectives: [],
|
|
1197
|
+
codeFenceRenderers: [],
|
|
1196
1198
|
messageActions: [],
|
|
1197
1199
|
commandPaletteActions: [],
|
|
1198
1200
|
providerIcons: [],
|
|
@@ -1222,6 +1224,8 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
|
|
|
1222
1224
|
sourceCodeRenderer: /* @__PURE__ */ new Set(),
|
|
1223
1225
|
diffRenderer: /* @__PURE__ */ new Set(),
|
|
1224
1226
|
messageDirective: /* @__PURE__ */ new Set(),
|
|
1227
|
+
codeFenceRenderer: /* @__PURE__ */ new Set(),
|
|
1228
|
+
codeFenceLanguage: /* @__PURE__ */ new Set(),
|
|
1225
1229
|
messageAction: /* @__PURE__ */ new Set(),
|
|
1226
1230
|
command: /* @__PURE__ */ new Set(),
|
|
1227
1231
|
providerIcon: /* @__PURE__ */ new Set(),
|
|
@@ -1538,6 +1542,34 @@ function collectPluginAppRegistrations(definition, onComposerCustomizationReject
|
|
|
1538
1542
|
component: requireComponent(kind, registration.component)
|
|
1539
1543
|
});
|
|
1540
1544
|
},
|
|
1545
|
+
experimental_codeFenceRenderer(registration) {
|
|
1546
|
+
const kind = "slots.experimental_codeFenceRenderer";
|
|
1547
|
+
const id = requireSlotId(kind, registration?.id);
|
|
1548
|
+
requireUniqueId(kind, seenIds.codeFenceRenderer, id);
|
|
1549
|
+
const rawLanguages = registration.languages;
|
|
1550
|
+
if (!Array.isArray(rawLanguages) || rawLanguages.length === 0) {
|
|
1551
|
+
throw new Error(
|
|
1552
|
+
`${kind}: "languages" must be a non-empty array of lowercase info-string languages`
|
|
1553
|
+
);
|
|
1554
|
+
}
|
|
1555
|
+
const languages = rawLanguages.map((language) => {
|
|
1556
|
+
if (typeof language !== "string" || !CODE_FENCE_LANGUAGE_PATTERN.test(language)) {
|
|
1557
|
+
throw new Error(
|
|
1558
|
+
`${kind}: languages must match ${CODE_FENCE_LANGUAGE_PATTERN}, got ${JSON.stringify(language)}`
|
|
1559
|
+
);
|
|
1560
|
+
}
|
|
1561
|
+
if (seenIds.codeFenceLanguage.has(language)) {
|
|
1562
|
+
throw new Error(`${kind}: duplicate language "${language}"`);
|
|
1563
|
+
}
|
|
1564
|
+
seenIds.codeFenceLanguage.add(language);
|
|
1565
|
+
return language;
|
|
1566
|
+
});
|
|
1567
|
+
collected.codeFenceRenderers.push({
|
|
1568
|
+
id,
|
|
1569
|
+
languages,
|
|
1570
|
+
component: requireComponent(kind, registration.component)
|
|
1571
|
+
});
|
|
1572
|
+
},
|
|
1541
1573
|
messageAction(registration) {
|
|
1542
1574
|
const kind = "slots.messageAction";
|
|
1543
1575
|
const id = requireSlotId(kind, registration?.id);
|
package/dist/testing/index.js
CHANGED
|
@@ -1087,13 +1087,12 @@ function validateProviderFallbackModels(providerId, value) {
|
|
|
1087
1087
|
`provider "${providerId}" ${field}.supportedReasoningEfforts[${effortIndex}] must be { reasoningEffort, description }`
|
|
1088
1088
|
);
|
|
1089
1089
|
}
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
const level = reasoningEffort;
|
|
1090
|
+
const level = requireNonBlankString({
|
|
1091
|
+
providerId,
|
|
1092
|
+
field: `${field}.supportedReasoningEfforts[${effortIndex}].reasoningEffort`,
|
|
1093
|
+
value: Reflect.get(effort, "reasoningEffort")
|
|
1094
|
+
});
|
|
1095
|
+
const label = Reflect.get(effort, "label");
|
|
1097
1096
|
if (levels.has(level)) {
|
|
1098
1097
|
throw new Error(
|
|
1099
1098
|
`provider "${providerId}" ${field}.supportedReasoningEfforts repeats ${JSON.stringify(level)}`
|
|
@@ -1102,6 +1101,13 @@ function validateProviderFallbackModels(providerId, value) {
|
|
|
1102
1101
|
levels.add(level);
|
|
1103
1102
|
return Object.freeze({
|
|
1104
1103
|
reasoningEffort: level,
|
|
1104
|
+
...label === void 0 ? {} : {
|
|
1105
|
+
label: requireNonBlankString({
|
|
1106
|
+
providerId,
|
|
1107
|
+
field: `${field}.supportedReasoningEfforts[${effortIndex}].label`,
|
|
1108
|
+
value: label
|
|
1109
|
+
})
|
|
1110
|
+
},
|
|
1105
1111
|
description: requireNonBlankString({
|
|
1106
1112
|
providerId,
|
|
1107
1113
|
field: `${field}.supportedReasoningEfforts[${effortIndex}].description`,
|
|
@@ -3316,6 +3322,7 @@ function createFakePluginHostInternal(options, sharedState) {
|
|
|
3316
3322
|
});
|
|
3317
3323
|
const threadEventHandlers = {
|
|
3318
3324
|
"experimental_thread.events": [],
|
|
3325
|
+
"experimental_thread.parentChanged": [],
|
|
3319
3326
|
"experimental_terminal.input": [],
|
|
3320
3327
|
"experimental_host.deleted": [],
|
|
3321
3328
|
"experimental_environment.removed": [],
|
|
@@ -3755,6 +3762,7 @@ function createFakePluginHostInternal(options, sharedState) {
|
|
|
3755
3762
|
get threadEventHandlers() {
|
|
3756
3763
|
return {
|
|
3757
3764
|
"experimental_thread.events": threadEventHandlers["experimental_thread.events"].length,
|
|
3765
|
+
"experimental_thread.parentChanged": threadEventHandlers["experimental_thread.parentChanged"].length,
|
|
3758
3766
|
"experimental_terminal.input": threadEventHandlers["experimental_terminal.input"].length,
|
|
3759
3767
|
"experimental_environment.removed": threadEventHandlers["experimental_environment.removed"].length,
|
|
3760
3768
|
"experimental_host.deleted": threadEventHandlers["experimental_host.deleted"].length,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@get-bb/plugin-sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.42",
|
|
4
4
|
"homepage": "https://github.com/get-bb/bb#readme",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/get-bb/bb/issues"
|
|
@@ -44,6 +44,12 @@
|
|
|
44
44
|
"import": "./dist/provider-bridge-acp.js",
|
|
45
45
|
"default": "./dist/provider-bridge-acp.js"
|
|
46
46
|
},
|
|
47
|
+
"./provider-bridge/acp-next": {
|
|
48
|
+
"source": "./src/provider-bridge-acp-next.ts",
|
|
49
|
+
"types": "./bundled-types/bb-plugin-sdk-provider-bridge-acp-next.d.ts",
|
|
50
|
+
"import": "./dist/provider-bridge-acp-next.js",
|
|
51
|
+
"default": "./dist/provider-bridge-acp-next.js"
|
|
52
|
+
},
|
|
47
53
|
"./environment-provider": {
|
|
48
54
|
"source": "./src/environment-provider.ts",
|
|
49
55
|
"types": "./bundled-types/bb-plugin-sdk-environment-provider.d.ts",
|
|
@@ -141,6 +147,7 @@
|
|
|
141
147
|
"@bb/domain": "workspace:*",
|
|
142
148
|
"@bb/process-utils": "workspace:*",
|
|
143
149
|
"@bb/provider-bridge-acp": "workspace:*",
|
|
150
|
+
"@bb/provider-bridge-acp-next": "workspace:*",
|
|
144
151
|
"@bb/provider-bridge-protocol": "workspace:*",
|
|
145
152
|
"@bb/sdk": "workspace:*",
|
|
146
153
|
"@bb/server-contract": "workspace:*",
|