@get-bb/plugin-sdk 0.6.9 → 0.6.15
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 +218 -89
- package/bundled-types/bb-plugin-sdk-host.d.ts +4 -2
- package/bundled-types/bb-plugin-sdk-internal-composer-customization-validation.d.ts +1 -1
- package/bundled-types/bb-plugin-sdk-internal-composer-handle.d.ts +17 -10
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +8 -12
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +9 -4
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp.d.ts +6 -4
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +1 -4
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +38 -31
- package/bundled-types/bb-plugin-sdk-testing.d.ts +4 -2
- package/bundled-types/bb-plugin-sdk.d.ts +222 -91
- package/dist/host.js +17 -14
- package/dist/internal/composer-customization-validation.js +20 -6
- package/dist/internal/composer-handle.js +2 -0
- package/dist/internal/host-policy.js +1 -0
- package/dist/internal/plugin-app-collector.js +44 -13
- package/dist/provider-bridge-acp.js +7662 -314
- package/dist/provider-bridge-testing.js +21 -6
- package/dist/provider-bridge-worker-entry.mjs +7 -2
- package/dist/provider-bridge.js +7401 -169
- package/dist/replay-provider-child.mjs +72 -0
- package/dist/testing/app.js +47 -14
- package/dist/testing/index.js +1 -0
- package/package.json +1 -1
|
@@ -57,7 +57,7 @@ var reasoningLevelValues = [
|
|
|
57
57
|
"ultra"
|
|
58
58
|
];
|
|
59
59
|
var reasoningLevelSchema = z3.enum(reasoningLevelValues);
|
|
60
|
-
var serviceTierSchema = z3.
|
|
60
|
+
var serviceTierSchema = z3.string().min(1);
|
|
61
61
|
var instructionModeValues = ["append", "replace"];
|
|
62
62
|
var instructionModeSchema = z3.enum(instructionModeValues);
|
|
63
63
|
var permissionModeValues = ["accept-edits", "auto", "full"];
|
|
@@ -1900,6 +1900,11 @@ var modelReasoningEffortSchema = z16.object({
|
|
|
1900
1900
|
reasoningEffort: reasoningLevelSchema,
|
|
1901
1901
|
description: z16.string()
|
|
1902
1902
|
});
|
|
1903
|
+
var modelServiceTierSchema = z16.object({
|
|
1904
|
+
id: serviceTierSchema,
|
|
1905
|
+
label: z16.string().min(1).optional(),
|
|
1906
|
+
description: z16.string().min(1).optional()
|
|
1907
|
+
});
|
|
1903
1908
|
var availableModelSchema = z16.object({
|
|
1904
1909
|
id: z16.string(),
|
|
1905
1910
|
model: z16.string(),
|
|
@@ -1908,6 +1913,7 @@ var availableModelSchema = z16.object({
|
|
|
1908
1913
|
description: z16.string(),
|
|
1909
1914
|
supportedReasoningEfforts: z16.array(modelReasoningEffortSchema),
|
|
1910
1915
|
defaultReasoningEffort: reasoningLevelSchema,
|
|
1916
|
+
supportedServiceTiers: z16.array(modelServiceTierSchema).optional(),
|
|
1911
1917
|
isDefault: z16.boolean()
|
|
1912
1918
|
});
|
|
1913
1919
|
var providerModelCatalogScopeSchema = z16.enum(["host", "workspace"]);
|
|
@@ -6219,7 +6225,7 @@ import {
|
|
|
6219
6225
|
} from "node:fs";
|
|
6220
6226
|
import { tmpdir } from "node:os";
|
|
6221
6227
|
import { isAbsolute, join as join2, resolve as resolve2 } from "node:path";
|
|
6222
|
-
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
6228
|
+
import { fileURLToPath as fileURLToPath2, pathToFileURL } from "node:url";
|
|
6223
6229
|
|
|
6224
6230
|
// ../provider-bridge-protocol/src/bridge-kit/bounded-line-reader.ts
|
|
6225
6231
|
import { StringDecoder } from "node:string_decoder";
|
|
@@ -6391,6 +6397,8 @@ function listRecordedCells(root) {
|
|
|
6391
6397
|
}
|
|
6392
6398
|
|
|
6393
6399
|
// ../provider-bridge-protocol/src/testing/parity.ts
|
|
6400
|
+
var REPLAY_CLEANUP_RETRIES = 20;
|
|
6401
|
+
var REPLAY_CLEANUP_RETRY_DELAY_MS = 100;
|
|
6394
6402
|
var SOURCE_BOOTSTRAP = fileURLToPath2(
|
|
6395
6403
|
new URL("../bridge-worker-entry.ts", import.meta.url)
|
|
6396
6404
|
);
|
|
@@ -6568,7 +6576,7 @@ async function replayRecording(options) {
|
|
|
6568
6576
|
[
|
|
6569
6577
|
"#!/usr/bin/env node",
|
|
6570
6578
|
`process.argv.splice(2, 0, ${JSON.stringify(replayCommand.slice(2)).slice(1, -1)});`,
|
|
6571
|
-
`await import(${JSON.stringify(REPLAY_CHILD_PATH)});`,
|
|
6579
|
+
`await import(${JSON.stringify(pathToFileURL(REPLAY_CHILD_PATH).href)});`,
|
|
6572
6580
|
""
|
|
6573
6581
|
].join("\n"),
|
|
6574
6582
|
{ mode: 493 }
|
|
@@ -6585,7 +6593,8 @@ async function replayRecording(options) {
|
|
|
6585
6593
|
stdio: ["pipe", "pipe", "pipe"]
|
|
6586
6594
|
});
|
|
6587
6595
|
const recordedCwd = recordedWorkspaceDir(recording);
|
|
6588
|
-
const
|
|
6596
|
+
const jsonText = (value) => JSON.stringify(value).slice(1, -1);
|
|
6597
|
+
const restoreRecordedWorkspace = (line) => recordedCwd === null || recordedCwd === workspaceDir ? line : line.split(jsonText(workspaceDir)).join(jsonText(recordedCwd));
|
|
6589
6598
|
const initializeId = PARITY_INITIALIZE_ID;
|
|
6590
6599
|
const startedAt = Date.now();
|
|
6591
6600
|
const lines = [];
|
|
@@ -6823,8 +6832,14 @@ async function replayRecording(options) {
|
|
|
6823
6832
|
return null;
|
|
6824
6833
|
})
|
|
6825
6834
|
]);
|
|
6826
|
-
|
|
6827
|
-
|
|
6835
|
+
for (const directory of [stateDir, workspaceDir]) {
|
|
6836
|
+
rmSync(directory, {
|
|
6837
|
+
force: true,
|
|
6838
|
+
maxRetries: REPLAY_CLEANUP_RETRIES,
|
|
6839
|
+
recursive: true,
|
|
6840
|
+
retryDelay: REPLAY_CLEANUP_RETRY_DELAY_MS
|
|
6841
|
+
});
|
|
6842
|
+
}
|
|
6828
6843
|
return {
|
|
6829
6844
|
providerId,
|
|
6830
6845
|
recordingDir: options.recordingDir,
|
|
@@ -542,6 +542,9 @@ import { rmSync } from "node:fs";
|
|
|
542
542
|
import { isAbsolute } from "node:path";
|
|
543
543
|
import { pathToFileURL } from "node:url";
|
|
544
544
|
|
|
545
|
+
// ../process-utils/src/spawn.ts
|
|
546
|
+
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
547
|
+
|
|
545
548
|
// ../process-utils/src/plugin-process-paths.ts
|
|
546
549
|
import { mkdir, mkdtemp } from "node:fs/promises";
|
|
547
550
|
import { tmpdir } from "node:os";
|
|
@@ -555,8 +558,10 @@ async function createPluginProcessTempDir(args) {
|
|
|
555
558
|
);
|
|
556
559
|
}
|
|
557
560
|
|
|
558
|
-
// ../process-utils/src/
|
|
559
|
-
|
|
561
|
+
// ../process-utils/src/process-info.ts
|
|
562
|
+
import { execFile } from "node:child_process";
|
|
563
|
+
import { promisify } from "node:util";
|
|
564
|
+
var execFileAsync = promisify(execFile);
|
|
560
565
|
|
|
561
566
|
// ../provider-bridge-protocol/src/bridge-kit/bounded-line-reader.ts
|
|
562
567
|
import { StringDecoder } from "node:string_decoder";
|