@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/bundled-types/bb-plugin-sdk-app.d.ts +512 -65
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +78 -2
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +2 -1
- package/bundled-types/bb-plugin-sdk-internal-thread-status.d.ts +2 -3
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +7 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +2 -0
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +8 -1
- package/bundled-types/bb-plugin-sdk-testing.d.ts +10 -1
- package/bundled-types/bb-plugin-sdk.d.ts +525 -70
- package/dist/app.js +10 -6
- package/dist/internal/host-policy.js +10 -5
- package/dist/internal/plugin-app-collector.js +11 -0
- package/dist/internal/rpc-query-host.js +8 -4
- package/dist/internal/thread-status.js +2 -6
- package/dist/provider-bridge-acp-next.js +212 -450
- package/dist/provider-bridge-acp.js +212 -450
- package/dist/provider-bridge-testing.js +18 -11
- package/dist/provider-bridge.js +64 -29
- package/dist/testing/app.js +49 -10
- package/dist/testing/index.js +11 -5
- package/package.json +18 -18
|
@@ -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",
|
|
@@ -721,6 +722,19 @@ var pluginExtensionInteractionResolutionSchema = z11.object({
|
|
|
721
722
|
kind: z11.literal("request_answer"),
|
|
722
723
|
value: jsonValueSchema
|
|
723
724
|
});
|
|
725
|
+
var resolutionDiscriminatorKeys = /* @__PURE__ */ new Set(["decision", "kind"]);
|
|
726
|
+
function pendingInteractionResolutionError(issue) {
|
|
727
|
+
if (issue.code !== "invalid_union") {
|
|
728
|
+
return approvalDecisionDiscriminatorError;
|
|
729
|
+
}
|
|
730
|
+
for (const branch of issue.errors) {
|
|
731
|
+
const first = branch[0];
|
|
732
|
+
if (first !== void 0 && !resolutionDiscriminatorKeys.has(first.path[0] ?? "")) {
|
|
733
|
+
return first.message;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
return approvalDecisionDiscriminatorError;
|
|
737
|
+
}
|
|
724
738
|
var pendingInteractionResolutionSchema = z11.union(
|
|
725
739
|
[
|
|
726
740
|
approvalPendingInteractionResolutionSchema,
|
|
@@ -728,7 +742,7 @@ var pendingInteractionResolutionSchema = z11.union(
|
|
|
728
742
|
pluginPendingInteractionResolutionSchema,
|
|
729
743
|
pluginExtensionInteractionResolutionSchema
|
|
730
744
|
],
|
|
731
|
-
|
|
745
|
+
{ error: pendingInteractionResolutionError }
|
|
732
746
|
);
|
|
733
747
|
var approvalInteractionOutcomeSchema = z11.object({
|
|
734
748
|
payload: approvalPendingInteractionPayloadSchema,
|
|
@@ -1219,15 +1233,6 @@ var threadTimelineGoalStatusSchema = z14.enum([
|
|
|
1219
1233
|
"budgetLimited",
|
|
1220
1234
|
"complete"
|
|
1221
1235
|
]);
|
|
1222
|
-
var threadTimelineGoalSchema = z14.object({
|
|
1223
|
-
sourceSeq: z14.number().int().nonnegative(),
|
|
1224
|
-
updatedAt: z14.number(),
|
|
1225
|
-
objective: z14.string(),
|
|
1226
|
-
status: threadTimelineGoalStatusSchema,
|
|
1227
|
-
tokenBudget: z14.number().nullable(),
|
|
1228
|
-
tokensUsed: z14.number(),
|
|
1229
|
-
timeUsedSeconds: z14.number()
|
|
1230
|
-
});
|
|
1231
1236
|
|
|
1232
1237
|
// ../domain/src/thread-usage-cost.ts
|
|
1233
1238
|
import { z as z15 } from "zod";
|
|
@@ -1490,6 +1495,7 @@ var threadEventBackgroundTaskItemSchema = z16.object({
|
|
|
1490
1495
|
summary: z16.string().optional(),
|
|
1491
1496
|
error: z16.string().optional(),
|
|
1492
1497
|
outputFile: z16.string().optional(),
|
|
1498
|
+
ownerStopped: z16.literal(true).optional(),
|
|
1493
1499
|
...itemPresentationField,
|
|
1494
1500
|
parentToolCallId: z16.string().optional()
|
|
1495
1501
|
});
|
|
@@ -4505,7 +4511,8 @@ var providerHealthSchema = z26.object({
|
|
|
4505
4511
|
canInstall: z26.boolean(),
|
|
4506
4512
|
canUpdate: z26.boolean(),
|
|
4507
4513
|
loginCommand: z26.string().min(1).nullable(),
|
|
4508
|
-
localLoginCommand: z26.string().min(1).nullable().optional()
|
|
4514
|
+
localLoginCommand: z26.string().min(1).nullable().optional(),
|
|
4515
|
+
internal_DO_NOT_USE_setupGuidePlanLabel: z26.string().min(1).nullable().optional()
|
|
4509
4516
|
}).passthrough();
|
|
4510
4517
|
var providerUsageWindowSchema = z26.object({
|
|
4511
4518
|
label: z26.string().min(1),
|
package/dist/provider-bridge.js
CHANGED
|
@@ -28,9 +28,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
mod
|
|
29
29
|
));
|
|
30
30
|
|
|
31
|
-
// ../../node_modules/.pnpm/semver@7.8.
|
|
31
|
+
// ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/debug.js
|
|
32
32
|
var require_debug = __commonJS({
|
|
33
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
33
|
+
"../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/debug.js"(exports, module) {
|
|
34
34
|
"use strict";
|
|
35
35
|
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
36
36
|
};
|
|
@@ -38,9 +38,9 @@ var require_debug = __commonJS({
|
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
// ../../node_modules/.pnpm/semver@7.8.
|
|
41
|
+
// ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/constants.js
|
|
42
42
|
var require_constants = __commonJS({
|
|
43
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
43
|
+
"../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/constants.js"(exports, module) {
|
|
44
44
|
"use strict";
|
|
45
45
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
46
46
|
var MAX_LENGTH = 256;
|
|
@@ -48,6 +48,33 @@ var require_constants = __commonJS({
|
|
|
48
48
|
9007199254740991;
|
|
49
49
|
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
50
50
|
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
51
|
+
var WHITESPACE_CHARACTERS = [
|
|
52
|
+
" ",
|
|
53
|
+
"\n",
|
|
54
|
+
"\v",
|
|
55
|
+
"\f",
|
|
56
|
+
"\r",
|
|
57
|
+
" ",
|
|
58
|
+
"\xA0",
|
|
59
|
+
"\u1680",
|
|
60
|
+
"\u2000",
|
|
61
|
+
"\u2001",
|
|
62
|
+
"\u2002",
|
|
63
|
+
"\u2003",
|
|
64
|
+
"\u2004",
|
|
65
|
+
"\u2005",
|
|
66
|
+
"\u2006",
|
|
67
|
+
"\u2007",
|
|
68
|
+
"\u2008",
|
|
69
|
+
"\u2009",
|
|
70
|
+
"\u200A",
|
|
71
|
+
"\u2028",
|
|
72
|
+
"\u2029",
|
|
73
|
+
"\u202F",
|
|
74
|
+
"\u205F",
|
|
75
|
+
"\u3000",
|
|
76
|
+
"\uFEFF"
|
|
77
|
+
];
|
|
51
78
|
var RELEASE_TYPES = [
|
|
52
79
|
"major",
|
|
53
80
|
"premajor",
|
|
@@ -62,6 +89,7 @@ var require_constants = __commonJS({
|
|
|
62
89
|
MAX_SAFE_COMPONENT_LENGTH,
|
|
63
90
|
MAX_SAFE_BUILD_LENGTH,
|
|
64
91
|
MAX_SAFE_INTEGER,
|
|
92
|
+
WHITESPACE_CHARACTERS,
|
|
65
93
|
RELEASE_TYPES,
|
|
66
94
|
SEMVER_SPEC_VERSION,
|
|
67
95
|
FLAG_INCLUDE_PRERELEASE: 1,
|
|
@@ -70,9 +98,9 @@ var require_constants = __commonJS({
|
|
|
70
98
|
}
|
|
71
99
|
});
|
|
72
100
|
|
|
73
|
-
// ../../node_modules/.pnpm/semver@7.8.
|
|
101
|
+
// ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/re.js
|
|
74
102
|
var require_re = __commonJS({
|
|
75
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
103
|
+
"../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/re.js"(exports, module) {
|
|
76
104
|
"use strict";
|
|
77
105
|
var {
|
|
78
106
|
MAX_SAFE_COMPONENT_LENGTH,
|
|
@@ -158,9 +186,9 @@ var require_re = __commonJS({
|
|
|
158
186
|
}
|
|
159
187
|
});
|
|
160
188
|
|
|
161
|
-
// ../../node_modules/.pnpm/semver@7.8.
|
|
189
|
+
// ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/parse-options.js
|
|
162
190
|
var require_parse_options = __commonJS({
|
|
163
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
191
|
+
"../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/parse-options.js"(exports, module) {
|
|
164
192
|
"use strict";
|
|
165
193
|
var looseOption = Object.freeze({ loose: true });
|
|
166
194
|
var emptyOpts = Object.freeze({});
|
|
@@ -177,9 +205,9 @@ var require_parse_options = __commonJS({
|
|
|
177
205
|
}
|
|
178
206
|
});
|
|
179
207
|
|
|
180
|
-
// ../../node_modules/.pnpm/semver@7.8.
|
|
208
|
+
// ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/identifiers.js
|
|
181
209
|
var require_identifiers = __commonJS({
|
|
182
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
210
|
+
"../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/internal/identifiers.js"(exports, module) {
|
|
183
211
|
"use strict";
|
|
184
212
|
var numeric = /^[0-9]+$/;
|
|
185
213
|
var compareIdentifiers = (a2, b) => {
|
|
@@ -202,9 +230,9 @@ var require_identifiers = __commonJS({
|
|
|
202
230
|
}
|
|
203
231
|
});
|
|
204
232
|
|
|
205
|
-
// ../../node_modules/.pnpm/semver@7.8.
|
|
233
|
+
// ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/classes/semver.js
|
|
206
234
|
var require_semver = __commonJS({
|
|
207
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
235
|
+
"../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/classes/semver.js"(exports, module) {
|
|
208
236
|
"use strict";
|
|
209
237
|
var debug = require_debug();
|
|
210
238
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
@@ -494,9 +522,9 @@ var require_semver = __commonJS({
|
|
|
494
522
|
}
|
|
495
523
|
});
|
|
496
524
|
|
|
497
|
-
// ../../node_modules/.pnpm/semver@7.8.
|
|
525
|
+
// ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/compare.js
|
|
498
526
|
var require_compare = __commonJS({
|
|
499
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
527
|
+
"../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/compare.js"(exports, module) {
|
|
500
528
|
"use strict";
|
|
501
529
|
var SemVer = require_semver();
|
|
502
530
|
var compare = (a2, b, loose) => new SemVer(a2, loose).compare(new SemVer(b, loose));
|
|
@@ -504,9 +532,9 @@ var require_compare = __commonJS({
|
|
|
504
532
|
}
|
|
505
533
|
});
|
|
506
534
|
|
|
507
|
-
// ../../node_modules/.pnpm/semver@7.8.
|
|
535
|
+
// ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/parse.js
|
|
508
536
|
var require_parse = __commonJS({
|
|
509
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
537
|
+
"../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/parse.js"(exports, module) {
|
|
510
538
|
"use strict";
|
|
511
539
|
var SemVer = require_semver();
|
|
512
540
|
var parse2 = (version, options, throwErrors = false) => {
|
|
@@ -526,9 +554,9 @@ var require_parse = __commonJS({
|
|
|
526
554
|
}
|
|
527
555
|
});
|
|
528
556
|
|
|
529
|
-
// ../../node_modules/.pnpm/semver@7.8.
|
|
557
|
+
// ../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/valid.js
|
|
530
558
|
var require_valid = __commonJS({
|
|
531
|
-
"../../node_modules/.pnpm/semver@7.8.
|
|
559
|
+
"../../node_modules/.pnpm/semver@7.8.6/node_modules/semver/functions/valid.js"(exports, module) {
|
|
532
560
|
"use strict";
|
|
533
561
|
var parse2 = require_parse();
|
|
534
562
|
var valid = (version, options) => {
|
|
@@ -1778,6 +1806,7 @@ import { z as z12 } from "zod";
|
|
|
1778
1806
|
var systemMessageKindValues = [
|
|
1779
1807
|
"ownership-assigned",
|
|
1780
1808
|
"ownership-removed",
|
|
1809
|
+
"ownership-batch",
|
|
1781
1810
|
"child-needs-attention",
|
|
1782
1811
|
"child-completed",
|
|
1783
1812
|
"child-failed",
|
|
@@ -2168,6 +2197,19 @@ var pluginExtensionInteractionResolutionSchema = z15.object({
|
|
|
2168
2197
|
kind: z15.literal("request_answer"),
|
|
2169
2198
|
value: jsonValueSchema
|
|
2170
2199
|
});
|
|
2200
|
+
var resolutionDiscriminatorKeys = /* @__PURE__ */ new Set(["decision", "kind"]);
|
|
2201
|
+
function pendingInteractionResolutionError(issue) {
|
|
2202
|
+
if (issue.code !== "invalid_union") {
|
|
2203
|
+
return approvalDecisionDiscriminatorError;
|
|
2204
|
+
}
|
|
2205
|
+
for (const branch of issue.errors) {
|
|
2206
|
+
const first = branch[0];
|
|
2207
|
+
if (first !== void 0 && !resolutionDiscriminatorKeys.has(first.path[0] ?? "")) {
|
|
2208
|
+
return first.message;
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
return approvalDecisionDiscriminatorError;
|
|
2212
|
+
}
|
|
2171
2213
|
var pendingInteractionResolutionSchema = z15.union(
|
|
2172
2214
|
[
|
|
2173
2215
|
approvalPendingInteractionResolutionSchema,
|
|
@@ -2175,7 +2217,7 @@ var pendingInteractionResolutionSchema = z15.union(
|
|
|
2175
2217
|
pluginPendingInteractionResolutionSchema,
|
|
2176
2218
|
pluginExtensionInteractionResolutionSchema
|
|
2177
2219
|
],
|
|
2178
|
-
|
|
2220
|
+
{ error: pendingInteractionResolutionError }
|
|
2179
2221
|
);
|
|
2180
2222
|
function isApprovalPendingInteractionResolution(resolution) {
|
|
2181
2223
|
return "decision" in resolution;
|
|
@@ -2649,15 +2691,6 @@ var threadTimelineGoalStatusSchema = z18.enum([
|
|
|
2649
2691
|
"budgetLimited",
|
|
2650
2692
|
"complete"
|
|
2651
2693
|
]);
|
|
2652
|
-
var threadTimelineGoalSchema = z18.object({
|
|
2653
|
-
sourceSeq: z18.number().int().nonnegative(),
|
|
2654
|
-
updatedAt: z18.number(),
|
|
2655
|
-
objective: z18.string(),
|
|
2656
|
-
status: threadTimelineGoalStatusSchema,
|
|
2657
|
-
tokenBudget: z18.number().nullable(),
|
|
2658
|
-
tokensUsed: z18.number(),
|
|
2659
|
-
timeUsedSeconds: z18.number()
|
|
2660
|
-
});
|
|
2661
2694
|
|
|
2662
2695
|
// ../domain/src/thread-usage-cost.ts
|
|
2663
2696
|
import { z as z19 } from "zod";
|
|
@@ -2920,6 +2953,7 @@ var threadEventBackgroundTaskItemSchema = z20.object({
|
|
|
2920
2953
|
summary: z20.string().optional(),
|
|
2921
2954
|
error: z20.string().optional(),
|
|
2922
2955
|
outputFile: z20.string().optional(),
|
|
2956
|
+
ownerStopped: z20.literal(true).optional(),
|
|
2923
2957
|
...itemPresentationField,
|
|
2924
2958
|
parentToolCallId: z20.string().optional()
|
|
2925
2959
|
});
|
|
@@ -12116,7 +12150,8 @@ var providerHealthSchema = z34.object({
|
|
|
12116
12150
|
canInstall: z34.boolean(),
|
|
12117
12151
|
canUpdate: z34.boolean(),
|
|
12118
12152
|
loginCommand: z34.string().min(1).nullable(),
|
|
12119
|
-
localLoginCommand: z34.string().min(1).nullable().optional()
|
|
12153
|
+
localLoginCommand: z34.string().min(1).nullable().optional(),
|
|
12154
|
+
internal_DO_NOT_USE_setupGuidePlanLabel: z34.string().min(1).nullable().optional()
|
|
12120
12155
|
}).passthrough();
|
|
12121
12156
|
var providerUsageWindowSchema = z34.object({
|
|
12122
12157
|
label: z34.string().min(1),
|
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,
|
|
@@ -1888,8 +1891,7 @@ var threadActivityStateSchema = z15.object({
|
|
|
1888
1891
|
activeWorkflowCount: z15.number().int().nonnegative(),
|
|
1889
1892
|
activeBackgroundAgentCount: z15.number().int().nonnegative(),
|
|
1890
1893
|
activeBackgroundCommandCount: z15.number().int().nonnegative(),
|
|
1891
|
-
activePlanModeCount: z15.number().int().nonnegative()
|
|
1892
|
-
activeGoalCount: z15.number().int().nonnegative()
|
|
1894
|
+
activePlanModeCount: z15.number().int().nonnegative()
|
|
1893
1895
|
});
|
|
1894
1896
|
|
|
1895
1897
|
// ../domain/src/thread.ts
|
|
@@ -1936,6 +1938,7 @@ var threadQueuedMessageSchema = z16.object({
|
|
|
1936
1938
|
*/
|
|
1937
1939
|
failureReason: queuedMessageFailureReasonSchema.nullable(),
|
|
1938
1940
|
payload: queuedMessagePayloadSchema,
|
|
1941
|
+
systemNotice: queuedMessageSystemNoticeSchema.nullable(),
|
|
1939
1942
|
/**
|
|
1940
1943
|
* Whether the sender may still rewrite this row's input. Not derivable from
|
|
1941
1944
|
* `payload` alone: a `retry` row is never editable, and an `inline` row
|
|
@@ -2008,7 +2011,8 @@ var THREAD_CHANGE_KINDS = [
|
|
|
2008
2011
|
"environment-changed",
|
|
2009
2012
|
"read-state-changed",
|
|
2010
2013
|
"tabs-changed",
|
|
2011
|
-
"terminals-changed"
|
|
2014
|
+
"terminals-changed",
|
|
2015
|
+
"storage-changed"
|
|
2012
2016
|
];
|
|
2013
2017
|
var PROJECT_CHANGE_KINDS = [
|
|
2014
2018
|
"project-created",
|
|
@@ -2025,7 +2029,7 @@ var ENVIRONMENT_CHANGE_KINDS = [
|
|
|
2025
2029
|
"status-changed",
|
|
2026
2030
|
"work-status-changed",
|
|
2027
2031
|
"git-refs-changed",
|
|
2028
|
-
"
|
|
2032
|
+
"git-branches-changed"
|
|
2029
2033
|
];
|
|
2030
2034
|
var HOST_CHANGE_KINDS = [
|
|
2031
2035
|
"host-connected",
|
|
@@ -3593,7 +3597,6 @@ var INDICATOR_LABELS = {
|
|
|
3593
3597
|
"background-agent": "Background agent running",
|
|
3594
3598
|
"background-command": "Background command running",
|
|
3595
3599
|
"plan-mode": "Plan mode active",
|
|
3596
|
-
goal: "Goal active",
|
|
3597
3600
|
runtime: "Thread working",
|
|
3598
3601
|
"queued-failed": "Queued message failed to send",
|
|
3599
3602
|
"queued-waiting": "Thread has a message waiting to send",
|
|
@@ -3638,14 +3641,12 @@ function addThreadFlags(flags, thread) {
|
|
|
3638
3641
|
flags.backgroundAgent ||= thread.activity.backgroundAgents > 0;
|
|
3639
3642
|
flags.backgroundCommand ||= thread.activity.backgroundCommands > 0;
|
|
3640
3643
|
flags.planMode ||= thread.activity.planMode > 0;
|
|
3641
|
-
flags.goal ||= thread.activity.goals > 0;
|
|
3642
3644
|
}
|
|
3643
3645
|
function resolveIndicator(flags, queuedWork, hasUnsubmittedDraft, isWorking) {
|
|
3644
3646
|
if (flags.unreadError) return "unread-error";
|
|
3645
3647
|
if (flags.pending) return "waiting-for-input";
|
|
3646
3648
|
if (hasUnsubmittedDraft && isWorking) return "working-draft";
|
|
3647
3649
|
if (flags.planMode) return "plan-mode";
|
|
3648
|
-
if (flags.goal) return "goal";
|
|
3649
3650
|
if (flags.runtime) return "runtime";
|
|
3650
3651
|
if (flags.workflow) return "workflow";
|
|
3651
3652
|
if (queuedWork === "failed") return "queued-failed";
|
|
@@ -3670,12 +3671,11 @@ function experimental_resolveThreadStatus({
|
|
|
3670
3671
|
workflow: false,
|
|
3671
3672
|
backgroundAgent: false,
|
|
3672
3673
|
backgroundCommand: false,
|
|
3673
|
-
planMode: false
|
|
3674
|
-
goal: false
|
|
3674
|
+
planMode: false
|
|
3675
3675
|
};
|
|
3676
3676
|
if (thread !== null) addThreadFlags(flags, thread);
|
|
3677
3677
|
for (const hiddenThread of hiddenThreads) addThreadFlags(flags, hiddenThread);
|
|
3678
|
-
const isThreadWorking = flags.runtime || flags.workflow || flags.backgroundAgent || flags.backgroundCommand || flags.planMode
|
|
3678
|
+
const isThreadWorking = flags.runtime || flags.workflow || flags.backgroundAgent || flags.backgroundCommand || flags.planMode;
|
|
3679
3679
|
const indicator = resolveIndicator(
|
|
3680
3680
|
flags,
|
|
3681
3681
|
thread?.queuedWork ?? "none",
|
|
@@ -3944,6 +3944,7 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
|
|
|
3944
3944
|
homepageSections: [],
|
|
3945
3945
|
settingsSections: [],
|
|
3946
3946
|
appOverlays: [],
|
|
3947
|
+
setupGuideSections: [],
|
|
3947
3948
|
navPanels: [],
|
|
3948
3949
|
tabs: [],
|
|
3949
3950
|
get threadPanelActions() {
|
|
@@ -3988,6 +3989,7 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
|
|
|
3988
3989
|
homepageSection: /* @__PURE__ */ new Set(),
|
|
3989
3990
|
settingsSection: /* @__PURE__ */ new Set(),
|
|
3990
3991
|
appOverlay: /* @__PURE__ */ new Set(),
|
|
3992
|
+
setupGuideSection: /* @__PURE__ */ new Set(),
|
|
3991
3993
|
navPanel: /* @__PURE__ */ new Set(),
|
|
3992
3994
|
tab: /* @__PURE__ */ new Set(),
|
|
3993
3995
|
newThreadPanelAction: /* @__PURE__ */ new Set(),
|
|
@@ -4190,6 +4192,15 @@ function collectPluginAppRegistrations(definition, onWarning = (message) => cons
|
|
|
4190
4192
|
component: requireComponent(kind, registration.component)
|
|
4191
4193
|
});
|
|
4192
4194
|
},
|
|
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
|
+
},
|
|
4193
4204
|
navPanel(registration) {
|
|
4194
4205
|
const kind = "slots.navPanel";
|
|
4195
4206
|
const id = requireSlotId(kind, registration?.id);
|
|
@@ -5586,6 +5597,29 @@ function TestInfoSection({
|
|
|
5586
5597
|
children
|
|
5587
5598
|
] });
|
|
5588
5599
|
}
|
|
5600
|
+
function TestCollapsibleStackCard({
|
|
5601
|
+
label,
|
|
5602
|
+
title,
|
|
5603
|
+
icon,
|
|
5604
|
+
isActive,
|
|
5605
|
+
dismiss,
|
|
5606
|
+
children
|
|
5607
|
+
}) {
|
|
5608
|
+
return /* @__PURE__ */ jsxs(
|
|
5609
|
+
"section",
|
|
5610
|
+
{
|
|
5611
|
+
"aria-label": label,
|
|
5612
|
+
"data-testid": "bb-collapsible-stack-card",
|
|
5613
|
+
"data-icon": icon,
|
|
5614
|
+
"data-active": isActive ? "true" : "false",
|
|
5615
|
+
children: [
|
|
5616
|
+
/* @__PURE__ */ jsx("h3", { children: title }),
|
|
5617
|
+
dismiss === void 0 ? null : /* @__PURE__ */ jsx("button", { type: "button", onClick: () => void dismiss.onDismiss(), children: dismiss.label }),
|
|
5618
|
+
children
|
|
5619
|
+
]
|
|
5620
|
+
}
|
|
5621
|
+
);
|
|
5622
|
+
}
|
|
5589
5623
|
function TestDetailRow({ label, icon, children }) {
|
|
5590
5624
|
return /* @__PURE__ */ jsxs("div", { "data-testid": "bb-detail-row", "data-icon": icon, children: [
|
|
5591
5625
|
/* @__PURE__ */ jsx("dt", { children: label }),
|
|
@@ -5710,6 +5744,9 @@ var testPluginSdkApp = {
|
|
|
5710
5744
|
experimental_useThreadContextKind() {
|
|
5711
5745
|
return useSlotEnv("experimental_useThreadContextKind").threadContextKind;
|
|
5712
5746
|
},
|
|
5747
|
+
experimental_useThreadExtensionState(threadId, kind) {
|
|
5748
|
+
return useSlotEnv("experimental_useThreadExtensionState").threadExtensionStates[threadId]?.[kind] ?? null;
|
|
5749
|
+
},
|
|
5713
5750
|
useBbContext() {
|
|
5714
5751
|
return useSlotEnv("useBbContext").bbContext;
|
|
5715
5752
|
},
|
|
@@ -5825,6 +5862,7 @@ var testPluginSdkApp = {
|
|
|
5825
5862
|
experimental_FilePreview: TestFilePreview,
|
|
5826
5863
|
experimental_Diff: TestDiff,
|
|
5827
5864
|
experimental_InfoSection: TestInfoSection,
|
|
5865
|
+
experimental_CollapsibleStackCard: TestCollapsibleStackCard,
|
|
5828
5866
|
experimental_DetailRow: TestDetailRow,
|
|
5829
5867
|
experimental_ThreadContextCardRow: TestThreadContextCardRow,
|
|
5830
5868
|
experimental_PanelTabIcon: TestPanelTabIcon,
|
|
@@ -6828,6 +6866,7 @@ ${block}
|
|
|
6828
6866
|
sidebarDraftThreadIds,
|
|
6829
6867
|
experiments: new Set(options.experiments ?? []),
|
|
6830
6868
|
threadContextKind: options.threadContextKind ?? "banner",
|
|
6869
|
+
threadExtensionStates: options.threadExtensionStates ?? {},
|
|
6831
6870
|
sidebarRowStatuses,
|
|
6832
6871
|
sidebarShortcuts,
|
|
6833
6872
|
sidebarSplitLayout: options.sidebarSplitLayout ?? null,
|
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}$/;
|
|
@@ -1529,6 +1529,12 @@ function validatePluginProviderDeclaration(declaration) {
|
|
|
1529
1529
|
`provider "${id}" experimental_resolvesNativeRoots must be a boolean`
|
|
1530
1530
|
);
|
|
1531
1531
|
}
|
|
1532
|
+
const guidedSignIn = declaration.internal_DO_NOT_USE_guidedSignIn;
|
|
1533
|
+
if (guidedSignIn !== void 0 && typeof guidedSignIn !== "boolean") {
|
|
1534
|
+
throw new Error(
|
|
1535
|
+
`provider "${id}" internal_DO_NOT_USE_guidedSignIn must be a boolean`
|
|
1536
|
+
);
|
|
1537
|
+
}
|
|
1532
1538
|
const deriveProviderOptions = declaration.deriveProviderOptions;
|
|
1533
1539
|
if (deriveProviderOptions !== void 0 && typeof deriveProviderOptions !== "function") {
|
|
1534
1540
|
throw new Error(
|
|
@@ -1558,6 +1564,7 @@ function validatePluginProviderDeclaration(declaration) {
|
|
|
1558
1564
|
...nativeSkillRoots === void 0 ? {} : { experimental_nativeSkillRoots: nativeSkillRoots },
|
|
1559
1565
|
...nativeCommandRoots === void 0 ? {} : { experimental_nativeCommandRoots: nativeCommandRoots },
|
|
1560
1566
|
experimental_resolvesNativeRoots: resolvesNativeRoots ?? false,
|
|
1567
|
+
internal_DO_NOT_USE_guidedSignIn: guidedSignIn ?? false,
|
|
1561
1568
|
...deriveProviderOptions === void 0 ? {} : { deriveProviderOptions }
|
|
1562
1569
|
});
|
|
1563
1570
|
}
|
|
@@ -2814,10 +2821,7 @@ function normalizePluginAgentConfiguration(args) {
|
|
|
2814
2821
|
if (output.instructions !== void 0 && typeof output.instructions !== "string") {
|
|
2815
2822
|
throw new Error("configure() output.instructions must be a string");
|
|
2816
2823
|
}
|
|
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;
|
|
2824
|
+
const instructions = typeof output.instructions === "string" && output.instructions.trim().length > 0 ? output.instructions.slice(0, PLUGIN_DYNAMIC_INSTRUCTIONS_MAX_CHARS) : null;
|
|
2821
2825
|
const toolSelections = normalizePluginAgentToolSelections({
|
|
2822
2826
|
knownIds: args.knownToolIds,
|
|
2823
2827
|
pluginId: args.pluginId,
|
|
@@ -3179,6 +3183,7 @@ function createFakePluginHostInternal(options, sharedState) {
|
|
|
3179
3183
|
assertLive();
|
|
3180
3184
|
if (!databaseHandle?.open) {
|
|
3181
3185
|
databaseHandle = new Database(join(storageRoot, "data.db"));
|
|
3186
|
+
databaseHandle.pragma("auto_vacuum = INCREMENTAL");
|
|
3182
3187
|
databaseHandle.pragma("journal_mode = WAL");
|
|
3183
3188
|
databaseHandle.pragma("busy_timeout = 5000");
|
|
3184
3189
|
}
|
|
@@ -4739,6 +4744,7 @@ function makeQueueEntry(overrides = {}) {
|
|
|
4739
4744
|
},
|
|
4740
4745
|
failureReason: null,
|
|
4741
4746
|
payload: { kind: "inline" },
|
|
4747
|
+
systemNotice: null,
|
|
4742
4748
|
editable: true,
|
|
4743
4749
|
createdAt: 0,
|
|
4744
4750
|
updatedAt: 0,
|
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.132",
|
|
4
4
|
"homepage": "https://github.com/get-bb/bb#readme",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/get-bb/bb/issues"
|
|
@@ -164,36 +164,36 @@
|
|
|
164
164
|
"typecheck": "tsrs --noEmit"
|
|
165
165
|
},
|
|
166
166
|
"dependencies": {
|
|
167
|
-
"@tanstack/react-query": "^5.
|
|
167
|
+
"@tanstack/react-query": "^5.106.1",
|
|
168
168
|
"cross-spawn": "^7.0.6",
|
|
169
|
-
"zod": "^4.6.
|
|
169
|
+
"zod": "^4.6.7"
|
|
170
170
|
},
|
|
171
171
|
"devDependencies": {
|
|
172
172
|
"@bb/domain": "workspace:*",
|
|
173
173
|
"@bb/process-utils": "workspace:*",
|
|
174
174
|
"@bb/provider-bridge-acp": "workspace:*",
|
|
175
175
|
"@bb/provider-bridge-protocol": "workspace:*",
|
|
176
|
+
"@bb/query-tags": "workspace:*",
|
|
176
177
|
"@bb/sdk": "workspace:*",
|
|
177
178
|
"@bb/server-contract": "workspace:*",
|
|
178
179
|
"@bb/skill-index": "workspace:*",
|
|
179
180
|
"@bb/tsconfig": "workspace:*",
|
|
180
|
-
"@testing-library/react": "^16.3.
|
|
181
|
-
"@types/better-sqlite3": "^7.6.
|
|
182
|
-
"@types/node": "^22.
|
|
183
|
-
"@types/react": "^19.
|
|
184
|
-
"better-sqlite3": "12.
|
|
185
|
-
"cron-parser": "^5.
|
|
186
|
-
"esbuild": "^0.28.
|
|
187
|
-
"hono": "4.
|
|
188
|
-
"jsdom": "^29.
|
|
189
|
-
"react": "^19.
|
|
190
|
-
"react-dom": "^19.
|
|
191
|
-
"rollup": "^4.
|
|
192
|
-
"rollup-plugin-dts": "^6.
|
|
181
|
+
"@testing-library/react": "^16.3.3",
|
|
182
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
183
|
+
"@types/node": "^22.20.5",
|
|
184
|
+
"@types/react": "^19.3.0",
|
|
185
|
+
"better-sqlite3": "12.11.1",
|
|
186
|
+
"cron-parser": "^5.10.3",
|
|
187
|
+
"esbuild": "^0.28.2",
|
|
188
|
+
"hono": "4.13.16",
|
|
189
|
+
"jsdom": "^29.1.1",
|
|
190
|
+
"react": "^19.3.1",
|
|
191
|
+
"react-dom": "^19.3.1",
|
|
192
|
+
"rollup": "^4.67.5",
|
|
193
|
+
"rollup-plugin-dts": "^6.5.1",
|
|
193
194
|
"tsrs": "0.18.0-ts7.1.0-dev.20260929",
|
|
194
195
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
195
|
-
"vitest": "^4.1.
|
|
196
|
-
"@bb/query-tags": "workspace:*"
|
|
196
|
+
"vitest": "^4.1.12"
|
|
197
197
|
},
|
|
198
198
|
"peerDependencies": {
|
|
199
199
|
"@testing-library/react": "^16.3.2",
|