@get-bb/plugin-sdk 0.6.116 → 0.6.125
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/README.md +3 -1
- package/bundled-types/bb-plugin-sdk-app.d.ts +381 -163
- package/bundled-types/bb-plugin-sdk-internal-file-navigation-validation.d.ts +5 -1
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +68 -1
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +1 -2
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp-next.d.ts +1 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp.d.ts +1 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +6 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +5 -0
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +8 -4
- package/bundled-types/bb-plugin-sdk.d.ts +390 -164
- package/dist/app.js +4 -0
- package/dist/internal/file-navigation-validation.js +13 -0
- package/dist/internal/host-policy.js +3 -5
- package/dist/internal/plugin-app-collector.js +2 -13
- package/dist/internal/rpc-query-host.js +9 -5
- package/dist/provider-bridge-acp-next.js +3 -0
- package/dist/provider-bridge-acp.js +3 -0
- package/dist/provider-bridge-testing.js +5 -0
- package/dist/provider-bridge.js +3 -0
- package/dist/testing/app.js +17 -18
- package/dist/testing/index.js +5 -5
- package/package.json +1 -1
package/dist/app.js
CHANGED
|
@@ -287,6 +287,9 @@ var experimental_SourceCode = runtimeComponent(
|
|
|
287
287
|
"experimental_SourceCode"
|
|
288
288
|
);
|
|
289
289
|
var experimental_Diff = runtimeComponent("experimental_Diff");
|
|
290
|
+
var experimental_FilePreview = runtimeComponent(
|
|
291
|
+
"experimental_FilePreview"
|
|
292
|
+
);
|
|
290
293
|
var experimental_InfoSection = runtimeComponent(
|
|
291
294
|
"experimental_InfoSection"
|
|
292
295
|
);
|
|
@@ -493,6 +496,7 @@ export {
|
|
|
493
496
|
experimental_Diff,
|
|
494
497
|
experimental_FailedVoiceRecordings,
|
|
495
498
|
experimental_FileLink,
|
|
499
|
+
experimental_FilePreview,
|
|
496
500
|
experimental_Icon,
|
|
497
501
|
experimental_ImageLightbox,
|
|
498
502
|
experimental_InfoList,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/internal/composer-customization-validation.ts
|
|
2
|
+
var PLUGIN_SLOT_ID_PATTERN = /^[a-zA-Z0-9_-]+$/;
|
|
3
|
+
|
|
1
4
|
// src/internal/file-navigation-validation.ts
|
|
2
5
|
var FILE_PATH_MAX_LENGTH = 32768;
|
|
3
6
|
var WINDOWS_DRIVE_ABSOLUTE_PATH = /^[A-Za-z]:[\\/]/u;
|
|
@@ -139,8 +142,18 @@ function normalizeExperimentalFileOpenOptions(value) {
|
|
|
139
142
|
if (target === null || location === void 0) return null;
|
|
140
143
|
return { target, location };
|
|
141
144
|
}
|
|
145
|
+
function normalizeExperimentalFilePreviewOptions(value) {
|
|
146
|
+
if (!isJsonObject(value)) return null;
|
|
147
|
+
const { opener = null, ...rest } = value;
|
|
148
|
+
if (opener !== null && (typeof opener !== "string" || !PLUGIN_SLOT_ID_PATTERN.test(opener))) {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
const options = normalizeExperimentalFileOpenOptions(rest);
|
|
152
|
+
return options === null ? null : { options, opener };
|
|
153
|
+
}
|
|
142
154
|
export {
|
|
143
155
|
normalizeExperimentalFileLocation,
|
|
144
156
|
normalizeExperimentalFileOpenOptions,
|
|
157
|
+
normalizeExperimentalFilePreviewOptions,
|
|
145
158
|
normalizeExperimentalLiveFileTarget
|
|
146
159
|
};
|
|
@@ -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
|
|
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}$/;
|
|
@@ -2693,10 +2693,7 @@ function normalizePluginAgentConfiguration(args) {
|
|
|
2693
2693
|
if (output.instructions !== void 0 && typeof output.instructions !== "string") {
|
|
2694
2694
|
throw new Error("configure() output.instructions must be a string");
|
|
2695
2695
|
}
|
|
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;
|
|
2696
|
+
const instructions = typeof output.instructions === "string" && output.instructions.trim().length > 0 ? output.instructions.slice(0, PLUGIN_DYNAMIC_INSTRUCTIONS_MAX_CHARS) : null;
|
|
2700
2697
|
const toolSelections = normalizePluginAgentToolSelections({
|
|
2701
2698
|
knownIds: args.knownToolIds,
|
|
2702
2699
|
pluginId: args.pluginId,
|
|
@@ -2832,6 +2829,7 @@ export {
|
|
|
2832
2829
|
KV_VALUE_MAX_BYTES,
|
|
2833
2830
|
MACHINE_PROVIDER_DESCRIPTION_MAX_CHARS,
|
|
2834
2831
|
PLUGIN_AGENT_STATUS_LABEL_MAX_CHARS,
|
|
2832
|
+
PLUGIN_DYNAMIC_INSTRUCTIONS_MAX_CHARS,
|
|
2835
2833
|
PLUGIN_MENTION_TRIGGER_VALUES,
|
|
2836
2834
|
PLUGIN_PROVIDER_BRIDGE_OPTIONS_MAX_BYTES,
|
|
2837
2835
|
PLUGIN_PROVIDER_COMPOSER_ACTION_VALUES,
|
|
@@ -484,7 +484,6 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
|
|
|
484
484
|
homepageSections: [],
|
|
485
485
|
settingsSections: [],
|
|
486
486
|
appOverlays: [],
|
|
487
|
-
setupGuideSections: [],
|
|
488
487
|
navPanels: [],
|
|
489
488
|
tabs: [],
|
|
490
489
|
get threadPanelActions() {
|
|
@@ -529,7 +528,6 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
|
|
|
529
528
|
homepageSection: /* @__PURE__ */ new Set(),
|
|
530
529
|
settingsSection: /* @__PURE__ */ new Set(),
|
|
531
530
|
appOverlay: /* @__PURE__ */ new Set(),
|
|
532
|
-
setupGuideSection: /* @__PURE__ */ new Set(),
|
|
533
531
|
navPanel: /* @__PURE__ */ new Set(),
|
|
534
532
|
tab: /* @__PURE__ */ new Set(),
|
|
535
533
|
newThreadPanelAction: /* @__PURE__ */ new Set(),
|
|
@@ -732,15 +730,6 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
|
|
|
732
730
|
component: requireComponent(kind, registration.component)
|
|
733
731
|
});
|
|
734
732
|
},
|
|
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
|
-
},
|
|
744
733
|
navPanel(registration) {
|
|
745
734
|
const kind = "slots.navPanel";
|
|
746
735
|
const id = requireSlotId(kind, registration?.id);
|
|
@@ -1029,9 +1018,9 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
|
|
|
1029
1018
|
const id = requireSlotId(kind, registration?.id);
|
|
1030
1019
|
requireUniqueId(kind, seenIds.fileOpener, id);
|
|
1031
1020
|
const rawExtensions = registration?.extensions;
|
|
1032
|
-
if (!Array.isArray(rawExtensions)
|
|
1021
|
+
if (!Array.isArray(rawExtensions)) {
|
|
1033
1022
|
throw new Error(
|
|
1034
|
-
`${kind}: "extensions" must be
|
|
1023
|
+
`${kind}: "extensions" must be an array of lowercase extensions without the dot`
|
|
1035
1024
|
);
|
|
1036
1025
|
}
|
|
1037
1026
|
const extensions = rawExtensions.map((extension) => {
|
|
@@ -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,
|
|
@@ -1933,6 +1936,7 @@ var threadQueuedMessageSchema = z16.object({
|
|
|
1933
1936
|
*/
|
|
1934
1937
|
failureReason: queuedMessageFailureReasonSchema.nullable(),
|
|
1935
1938
|
payload: queuedMessagePayloadSchema,
|
|
1939
|
+
systemNotice: queuedMessageSystemNoticeSchema.nullable(),
|
|
1936
1940
|
/**
|
|
1937
1941
|
* Whether the sender may still rewrite this row's input. Not derivable from
|
|
1938
1942
|
* `payload` alone: a `retry` row is never editable, and an `inline` row
|
|
@@ -2005,7 +2009,8 @@ var THREAD_CHANGE_KINDS = [
|
|
|
2005
2009
|
"environment-changed",
|
|
2006
2010
|
"read-state-changed",
|
|
2007
2011
|
"tabs-changed",
|
|
2008
|
-
"terminals-changed"
|
|
2012
|
+
"terminals-changed",
|
|
2013
|
+
"storage-changed"
|
|
2009
2014
|
];
|
|
2010
2015
|
var PROJECT_CHANGE_KINDS = [
|
|
2011
2016
|
"project-created",
|
|
@@ -2021,15 +2026,14 @@ var ENVIRONMENT_CHANGE_KINDS = [
|
|
|
2021
2026
|
"metadata-changed",
|
|
2022
2027
|
"status-changed",
|
|
2023
2028
|
"work-status-changed",
|
|
2024
|
-
"git-refs-changed"
|
|
2025
|
-
"thread-storage-changed",
|
|
2026
|
-
"diff-viewed-changed"
|
|
2029
|
+
"git-refs-changed"
|
|
2027
2030
|
];
|
|
2028
2031
|
var HOST_CHANGE_KINDS = [
|
|
2029
2032
|
"host-connected",
|
|
2030
2033
|
"host-disconnected",
|
|
2031
2034
|
"provider-model-catalog-changed",
|
|
2032
|
-
"provider-commands-changed"
|
|
2035
|
+
"provider-commands-changed",
|
|
2036
|
+
"provider-cli-status-changed"
|
|
2033
2037
|
];
|
|
2034
2038
|
var SYSTEM_CHANGE_KINDS = [
|
|
2035
2039
|
"config-changed",
|
|
@@ -1272,6 +1272,7 @@ import { z as z10 } from "zod";
|
|
|
1272
1272
|
var systemMessageKindValues = [
|
|
1273
1273
|
"ownership-assigned",
|
|
1274
1274
|
"ownership-removed",
|
|
1275
|
+
"ownership-batch",
|
|
1275
1276
|
"child-needs-attention",
|
|
1276
1277
|
"child-completed",
|
|
1277
1278
|
"child-failed",
|
|
@@ -2423,6 +2424,7 @@ var threadEventItemSchema = z18.discriminatedUnion("type", [
|
|
|
2423
2424
|
id: z18.string(),
|
|
2424
2425
|
command: z18.string(),
|
|
2425
2426
|
cwd: z18.string(),
|
|
2427
|
+
description: z18.string().optional(),
|
|
2426
2428
|
status: threadEventItemStatusSchema,
|
|
2427
2429
|
approvalStatus: threadEventItemApprovalStatusSchema,
|
|
2428
2430
|
aggregatedOutput: z18.string().optional(),
|
|
@@ -3506,6 +3508,7 @@ var deltaItemShapeSchema = z31.discriminatedUnion("type", [
|
|
|
3506
3508
|
type: z31.literal("command"),
|
|
3507
3509
|
command: z31.string(),
|
|
3508
3510
|
cwd: z31.string(),
|
|
3511
|
+
description: z31.string().optional(),
|
|
3509
3512
|
aggregatedOutput: z31.string().optional(),
|
|
3510
3513
|
exitCode: z31.number().optional(),
|
|
3511
3514
|
durationMs: z31.number().optional()
|
|
@@ -1272,6 +1272,7 @@ import { z as z10 } from "zod";
|
|
|
1272
1272
|
var systemMessageKindValues = [
|
|
1273
1273
|
"ownership-assigned",
|
|
1274
1274
|
"ownership-removed",
|
|
1275
|
+
"ownership-batch",
|
|
1275
1276
|
"child-needs-attention",
|
|
1276
1277
|
"child-completed",
|
|
1277
1278
|
"child-failed",
|
|
@@ -2423,6 +2424,7 @@ var threadEventItemSchema = z18.discriminatedUnion("type", [
|
|
|
2423
2424
|
id: z18.string(),
|
|
2424
2425
|
command: z18.string(),
|
|
2425
2426
|
cwd: z18.string(),
|
|
2427
|
+
description: z18.string().optional(),
|
|
2426
2428
|
status: threadEventItemStatusSchema,
|
|
2427
2429
|
approvalStatus: threadEventItemApprovalStatusSchema,
|
|
2428
2430
|
aggregatedOutput: z18.string().optional(),
|
|
@@ -3506,6 +3508,7 @@ var deltaItemShapeSchema = z31.discriminatedUnion("type", [
|
|
|
3506
3508
|
type: z31.literal("command"),
|
|
3507
3509
|
command: z31.string(),
|
|
3508
3510
|
cwd: z31.string(),
|
|
3511
|
+
description: z31.string().optional(),
|
|
3509
3512
|
aggregatedOutput: z31.string().optional(),
|
|
3510
3513
|
exitCode: z31.number().optional(),
|
|
3511
3514
|
durationMs: z31.number().optional()
|
|
@@ -342,6 +342,7 @@ import { z as z8 } from "zod";
|
|
|
342
342
|
var systemMessageKindValues = [
|
|
343
343
|
"ownership-assigned",
|
|
344
344
|
"ownership-removed",
|
|
345
|
+
"ownership-batch",
|
|
345
346
|
"child-needs-attention",
|
|
346
347
|
"child-completed",
|
|
347
348
|
"child-failed",
|
|
@@ -1513,6 +1514,7 @@ var threadEventItemSchema = z16.discriminatedUnion("type", [
|
|
|
1513
1514
|
id: z16.string(),
|
|
1514
1515
|
command: z16.string(),
|
|
1515
1516
|
cwd: z16.string(),
|
|
1517
|
+
description: z16.string().optional(),
|
|
1516
1518
|
status: threadEventItemStatusSchema,
|
|
1517
1519
|
approvalStatus: threadEventItemApprovalStatusSchema,
|
|
1518
1520
|
aggregatedOutput: z16.string().optional(),
|
|
@@ -2141,6 +2143,7 @@ var deltaItemShapeSchema = z20.discriminatedUnion("type", [
|
|
|
2141
2143
|
type: z20.literal("command"),
|
|
2142
2144
|
command: z20.string(),
|
|
2143
2145
|
cwd: z20.string(),
|
|
2146
|
+
description: z20.string().optional(),
|
|
2144
2147
|
aggregatedOutput: z20.string().optional(),
|
|
2145
2148
|
exitCode: z20.number().optional(),
|
|
2146
2149
|
durationMs: z20.number().optional()
|
|
@@ -3046,6 +3049,7 @@ function createDeltaAssembler(options) {
|
|
|
3046
3049
|
id: bbItemId,
|
|
3047
3050
|
command: shape.command,
|
|
3048
3051
|
cwd: shape.cwd,
|
|
3052
|
+
...shape.description === void 0 ? {} : { description: shape.description },
|
|
3049
3053
|
...shape.aggregatedOutput === void 0 ? {} : { aggregatedOutput: shape.aggregatedOutput },
|
|
3050
3054
|
...shape.exitCode === void 0 ? {} : { exitCode: shape.exitCode },
|
|
3051
3055
|
...shape.durationMs === void 0 ? {} : { durationMs: shape.durationMs },
|
|
@@ -3273,6 +3277,7 @@ function createDeltaAssembler(options) {
|
|
|
3273
3277
|
id: bbItemId,
|
|
3274
3278
|
command: shape.command,
|
|
3275
3279
|
cwd: shape.cwd,
|
|
3280
|
+
...shape.description === void 0 ? {} : { description: shape.description },
|
|
3276
3281
|
...aggregatedOutput === void 0 ? {} : { aggregatedOutput },
|
|
3277
3282
|
...exitCode === void 0 ? {} : { exitCode },
|
|
3278
3283
|
...shape.durationMs === void 0 ? {} : { durationMs: shape.durationMs },
|
package/dist/provider-bridge.js
CHANGED
|
@@ -1778,6 +1778,7 @@ import { z as z12 } from "zod";
|
|
|
1778
1778
|
var systemMessageKindValues = [
|
|
1779
1779
|
"ownership-assigned",
|
|
1780
1780
|
"ownership-removed",
|
|
1781
|
+
"ownership-batch",
|
|
1781
1782
|
"child-needs-attention",
|
|
1782
1783
|
"child-completed",
|
|
1783
1784
|
"child-failed",
|
|
@@ -2943,6 +2944,7 @@ var threadEventItemSchema = z20.discriminatedUnion("type", [
|
|
|
2943
2944
|
id: z20.string(),
|
|
2944
2945
|
command: z20.string(),
|
|
2945
2946
|
cwd: z20.string(),
|
|
2947
|
+
description: z20.string().optional(),
|
|
2946
2948
|
status: threadEventItemStatusSchema,
|
|
2947
2949
|
approvalStatus: threadEventItemApprovalStatusSchema,
|
|
2948
2950
|
aggregatedOutput: z20.string().optional(),
|
|
@@ -12425,6 +12427,7 @@ var deltaItemShapeSchema = z37.discriminatedUnion("type", [
|
|
|
12425
12427
|
type: z37.literal("command"),
|
|
12426
12428
|
command: z37.string(),
|
|
12427
12429
|
cwd: z37.string(),
|
|
12430
|
+
description: z37.string().optional(),
|
|
12428
12431
|
aggregatedOutput: z37.string().optional(),
|
|
12429
12432
|
exitCode: z37.number().optional(),
|
|
12430
12433
|
durationMs: z37.number().optional()
|
package/dist/testing/app.js
CHANGED
|
@@ -1699,6 +1699,7 @@ import { z as z8 } from "zod";
|
|
|
1699
1699
|
var systemMessageKindValues = [
|
|
1700
1700
|
"ownership-assigned",
|
|
1701
1701
|
"ownership-removed",
|
|
1702
|
+
"ownership-batch",
|
|
1702
1703
|
"child-needs-attention",
|
|
1703
1704
|
"child-completed",
|
|
1704
1705
|
"child-failed",
|
|
@@ -1755,6 +1756,7 @@ var queuedMessageWaitingOnKindValues = [
|
|
|
1755
1756
|
"provisioning",
|
|
1756
1757
|
"host-offline",
|
|
1757
1758
|
"interaction",
|
|
1759
|
+
"app-update",
|
|
1758
1760
|
"plugin",
|
|
1759
1761
|
"superseded"
|
|
1760
1762
|
];
|
|
@@ -1775,6 +1777,7 @@ var queuedMessageWaitingOnSchema = z9.discriminatedUnion("kind", [
|
|
|
1775
1777
|
hostName: queuedMessageWaitHostNameSchema
|
|
1776
1778
|
}),
|
|
1777
1779
|
z9.object({ kind: z9.literal("interaction") }),
|
|
1780
|
+
z9.object({ kind: z9.literal("app-update") }),
|
|
1778
1781
|
z9.object({
|
|
1779
1782
|
kind: z9.literal("plugin"),
|
|
1780
1783
|
pluginId: pluginIdSchema,
|
|
@@ -1936,6 +1939,7 @@ var threadQueuedMessageSchema = z16.object({
|
|
|
1936
1939
|
*/
|
|
1937
1940
|
failureReason: queuedMessageFailureReasonSchema.nullable(),
|
|
1938
1941
|
payload: queuedMessagePayloadSchema,
|
|
1942
|
+
systemNotice: queuedMessageSystemNoticeSchema.nullable(),
|
|
1939
1943
|
/**
|
|
1940
1944
|
* Whether the sender may still rewrite this row's input. Not derivable from
|
|
1941
1945
|
* `payload` alone: a `retry` row is never editable, and an `inline` row
|
|
@@ -2008,7 +2012,8 @@ var THREAD_CHANGE_KINDS = [
|
|
|
2008
2012
|
"environment-changed",
|
|
2009
2013
|
"read-state-changed",
|
|
2010
2014
|
"tabs-changed",
|
|
2011
|
-
"terminals-changed"
|
|
2015
|
+
"terminals-changed",
|
|
2016
|
+
"storage-changed"
|
|
2012
2017
|
];
|
|
2013
2018
|
var PROJECT_CHANGE_KINDS = [
|
|
2014
2019
|
"project-created",
|
|
@@ -2024,15 +2029,14 @@ var ENVIRONMENT_CHANGE_KINDS = [
|
|
|
2024
2029
|
"metadata-changed",
|
|
2025
2030
|
"status-changed",
|
|
2026
2031
|
"work-status-changed",
|
|
2027
|
-
"git-refs-changed"
|
|
2028
|
-
"thread-storage-changed",
|
|
2029
|
-
"diff-viewed-changed"
|
|
2032
|
+
"git-refs-changed"
|
|
2030
2033
|
];
|
|
2031
2034
|
var HOST_CHANGE_KINDS = [
|
|
2032
2035
|
"host-connected",
|
|
2033
2036
|
"host-disconnected",
|
|
2034
2037
|
"provider-model-catalog-changed",
|
|
2035
|
-
"provider-commands-changed"
|
|
2038
|
+
"provider-commands-changed",
|
|
2039
|
+
"provider-cli-status-changed"
|
|
2036
2040
|
];
|
|
2037
2041
|
var SYSTEM_CHANGE_KINDS = [
|
|
2038
2042
|
"config-changed",
|
|
@@ -3944,7 +3948,6 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
|
|
|
3944
3948
|
homepageSections: [],
|
|
3945
3949
|
settingsSections: [],
|
|
3946
3950
|
appOverlays: [],
|
|
3947
|
-
setupGuideSections: [],
|
|
3948
3951
|
navPanels: [],
|
|
3949
3952
|
tabs: [],
|
|
3950
3953
|
get threadPanelActions() {
|
|
@@ -3989,7 +3992,6 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
|
|
|
3989
3992
|
homepageSection: /* @__PURE__ */ new Set(),
|
|
3990
3993
|
settingsSection: /* @__PURE__ */ new Set(),
|
|
3991
3994
|
appOverlay: /* @__PURE__ */ new Set(),
|
|
3992
|
-
setupGuideSection: /* @__PURE__ */ new Set(),
|
|
3993
3995
|
navPanel: /* @__PURE__ */ new Set(),
|
|
3994
3996
|
tab: /* @__PURE__ */ new Set(),
|
|
3995
3997
|
newThreadPanelAction: /* @__PURE__ */ new Set(),
|
|
@@ -4192,15 +4194,6 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
|
|
|
4192
4194
|
component: requireComponent(kind, registration.component)
|
|
4193
4195
|
});
|
|
4194
4196
|
},
|
|
4195
|
-
internal_DO_NOT_USE_setupGuideSection(registration) {
|
|
4196
|
-
const kind = "slots.internal_DO_NOT_USE_setupGuideSection";
|
|
4197
|
-
const id = requireSlotId(kind, registration?.id);
|
|
4198
|
-
requireUniqueId(kind, seenIds.setupGuideSection, id);
|
|
4199
|
-
collected.setupGuideSections.push({
|
|
4200
|
-
id,
|
|
4201
|
-
component: requireComponent(kind, registration.component)
|
|
4202
|
-
});
|
|
4203
|
-
},
|
|
4204
4197
|
navPanel(registration) {
|
|
4205
4198
|
const kind = "slots.navPanel";
|
|
4206
4199
|
const id = requireSlotId(kind, registration?.id);
|
|
@@ -4489,9 +4482,9 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
|
|
|
4489
4482
|
const id = requireSlotId(kind, registration?.id);
|
|
4490
4483
|
requireUniqueId(kind, seenIds.fileOpener, id);
|
|
4491
4484
|
const rawExtensions = registration?.extensions;
|
|
4492
|
-
if (!Array.isArray(rawExtensions)
|
|
4485
|
+
if (!Array.isArray(rawExtensions)) {
|
|
4493
4486
|
throw new Error(
|
|
4494
|
-
`${kind}: "extensions" must be
|
|
4487
|
+
`${kind}: "extensions" must be an array of lowercase extensions without the dot`
|
|
4495
4488
|
);
|
|
4496
4489
|
}
|
|
4497
4490
|
const extensions = rawExtensions.map((extension) => {
|
|
@@ -5534,6 +5527,10 @@ function TestVoiceInputTextarea({
|
|
|
5534
5527
|
}
|
|
5535
5528
|
);
|
|
5536
5529
|
}
|
|
5530
|
+
function TestFilePreview({ target, renderPreview }) {
|
|
5531
|
+
const file = useSlotEnv("experimental_FilePreview").filePreview(target);
|
|
5532
|
+
return /* @__PURE__ */ jsx("div", { "data-testid": "bb-file-preview", "data-path": target.path, children: file === null ? null : renderPreview(file) });
|
|
5533
|
+
}
|
|
5537
5534
|
function TestSourceCode({
|
|
5538
5535
|
content,
|
|
5539
5536
|
path,
|
|
@@ -5829,6 +5826,7 @@ var testPluginSdkApp = {
|
|
|
5829
5826
|
return useSlotEnv("experimental_useCheckoutState").checkoutState;
|
|
5830
5827
|
},
|
|
5831
5828
|
experimental_SourceCode: TestSourceCode,
|
|
5829
|
+
experimental_FilePreview: TestFilePreview,
|
|
5832
5830
|
experimental_Diff: TestDiff,
|
|
5833
5831
|
experimental_InfoSection: TestInfoSection,
|
|
5834
5832
|
experimental_DetailRow: TestDetailRow,
|
|
@@ -6844,6 +6842,7 @@ ${block}
|
|
|
6844
6842
|
providers,
|
|
6845
6843
|
codeTheme,
|
|
6846
6844
|
canOpenFileExternally: options.canOpenFileExternally ?? (() => false),
|
|
6845
|
+
filePreview: options.filePreview ?? (() => null),
|
|
6847
6846
|
tabVisible: options.tabVisible ?? true,
|
|
6848
6847
|
servers: options.servers ?? null,
|
|
6849
6848
|
branchesState: {
|
package/dist/testing/index.js
CHANGED
|
@@ -491,7 +491,7 @@ function validatePluginProviderEnvEntries(value) {
|
|
|
491
491
|
var PLUGIN_AGENT_STATIC_INSTRUCTIONS_MAX_CHARS = 4096;
|
|
492
492
|
var PLUGIN_AGENT_STATUS_LABEL_MAX_CHARS = 80;
|
|
493
493
|
var PLUGIN_AGENT_SELECTION_MAX_IDS = 256;
|
|
494
|
-
var
|
|
494
|
+
var PLUGIN_DYNAMIC_INSTRUCTIONS_MAX_CHARS = 32768;
|
|
495
495
|
var PLUGIN_AGENT_TOOL_PARAMETERS_MAX_BYTES = 128 * 1024;
|
|
496
496
|
var MENTION_PROVIDER_ID_PATTERN = /^[a-zA-Z0-9_-]+$/;
|
|
497
497
|
var PROVIDER_ID_PATTERN = /^[a-z0-9][a-z0-9-]{1,63}$/;
|
|
@@ -2814,10 +2814,7 @@ function normalizePluginAgentConfiguration(args) {
|
|
|
2814
2814
|
if (output.instructions !== void 0 && typeof output.instructions !== "string") {
|
|
2815
2815
|
throw new Error("configure() output.instructions must be a string");
|
|
2816
2816
|
}
|
|
2817
|
-
const instructions = typeof output.instructions === "string" && output.instructions.trim().length > 0 ? output.instructions.slice(
|
|
2818
|
-
0,
|
|
2819
|
-
PLUGIN_AGENT_DYNAMIC_INSTRUCTIONS_MAX_CHARS
|
|
2820
|
-
) : null;
|
|
2817
|
+
const instructions = typeof output.instructions === "string" && output.instructions.trim().length > 0 ? output.instructions.slice(0, PLUGIN_DYNAMIC_INSTRUCTIONS_MAX_CHARS) : null;
|
|
2821
2818
|
const toolSelections = normalizePluginAgentToolSelections({
|
|
2822
2819
|
knownIds: args.knownToolIds,
|
|
2823
2820
|
pluginId: args.pluginId,
|
|
@@ -3531,6 +3528,7 @@ function createFakePluginHostInternal(options, sharedState) {
|
|
|
3531
3528
|
const threadEventHandlers = {
|
|
3532
3529
|
"experimental_thread.events": [],
|
|
3533
3530
|
"experimental_thread.parentChanged": [],
|
|
3531
|
+
"experimental_thread.read": [],
|
|
3534
3532
|
"experimental_terminal.input": [],
|
|
3535
3533
|
"experimental_host.deleted": [],
|
|
3536
3534
|
"experimental_environment.removed": [],
|
|
@@ -4013,6 +4011,7 @@ function createFakePluginHostInternal(options, sharedState) {
|
|
|
4013
4011
|
return {
|
|
4014
4012
|
"experimental_thread.events": threadEventHandlers["experimental_thread.events"].length,
|
|
4015
4013
|
"experimental_thread.parentChanged": threadEventHandlers["experimental_thread.parentChanged"].length,
|
|
4014
|
+
"experimental_thread.read": threadEventHandlers["experimental_thread.read"].length,
|
|
4016
4015
|
"experimental_terminal.input": threadEventHandlers["experimental_terminal.input"].length,
|
|
4017
4016
|
"experimental_environment.removed": threadEventHandlers["experimental_environment.removed"].length,
|
|
4018
4017
|
"experimental_host.deleted": threadEventHandlers["experimental_host.deleted"].length,
|
|
@@ -4737,6 +4736,7 @@ function makeQueueEntry(overrides = {}) {
|
|
|
4737
4736
|
},
|
|
4738
4737
|
failureReason: null,
|
|
4739
4738
|
payload: { kind: "inline" },
|
|
4739
|
+
systemNotice: null,
|
|
4740
4740
|
editable: true,
|
|
4741
4741
|
createdAt: 0,
|
|
4742
4742
|
updatedAt: 0,
|