@get-bb/plugin-sdk 0.4.17 → 0.4.20
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-internal-host-policy.d.ts +4 -3
- package/bundled-types/bb-plugin-sdk.d.ts +5 -3
- package/dist/internal/host-policy.js +13 -1
- package/dist/provider-bridge-acp.js +1191 -1077
- package/dist/provider-bridge-testing.js +2 -2
- package/dist/testing/index.js +14 -6
- package/package.json +1 -1
|
@@ -6556,7 +6556,7 @@ function describeCalibrationEvents(events) {
|
|
|
6556
6556
|
|
|
6557
6557
|
// ../provider-bridge-protocol/src/testing/parity.ts
|
|
6558
6558
|
import { spawn } from "node:child_process";
|
|
6559
|
-
import { existsSync as existsSync2, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
6559
|
+
import { existsSync as existsSync2, mkdtempSync, realpathSync, rmSync, writeFileSync } from "node:fs";
|
|
6560
6560
|
import { tmpdir } from "node:os";
|
|
6561
6561
|
import { isAbsolute, join as join2, resolve as resolve2 } from "node:path";
|
|
6562
6562
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
@@ -6883,7 +6883,7 @@ async function replayRecording(options) {
|
|
|
6883
6883
|
const profile = options.profile ?? DEFAULT_REPLAY_PROFILE;
|
|
6884
6884
|
const recording = readBridgeRecording(options.recordingDir);
|
|
6885
6885
|
const stateDir = mkdtempSync(join2(tmpdir(), "bb-parity-replay-"));
|
|
6886
|
-
const workspaceDir = mkdtempSync(join2(tmpdir(), "bb-parity-ws-"));
|
|
6886
|
+
const workspaceDir = realpathSync(mkdtempSync(join2(tmpdir(), "bb-parity-ws-")));
|
|
6887
6887
|
const replayCommand = [
|
|
6888
6888
|
process.execPath,
|
|
6889
6889
|
REPLAY_CHILD_PATH,
|
package/dist/testing/index.js
CHANGED
|
@@ -37,16 +37,23 @@ function parseNamespacedGlyph(glyph) {
|
|
|
37
37
|
// ../domain/src/plugin-cli.ts
|
|
38
38
|
var RESERVED_BB_CLI_COMMANDS = [
|
|
39
39
|
"environment",
|
|
40
|
+
"file",
|
|
40
41
|
"guide",
|
|
41
42
|
"help",
|
|
43
|
+
"machine",
|
|
42
44
|
"manager",
|
|
45
|
+
"marketplace",
|
|
43
46
|
"plugin",
|
|
44
47
|
"project",
|
|
45
48
|
"provider",
|
|
49
|
+
"settings",
|
|
46
50
|
"skill",
|
|
47
51
|
"status",
|
|
52
|
+
"terminal",
|
|
48
53
|
"theme",
|
|
49
|
-
"thread"
|
|
54
|
+
"thread",
|
|
55
|
+
"updates",
|
|
56
|
+
"voice"
|
|
50
57
|
];
|
|
51
58
|
|
|
52
59
|
// ../domain/src/provider-fork.ts
|
|
@@ -265,6 +272,10 @@ var providerNativeRootSetSchema = z2.object({
|
|
|
265
272
|
var PLUGIN_CLI_OUTPUT_MAX_BYTES = 1024 * 1024;
|
|
266
273
|
|
|
267
274
|
// src/internal/host-policy.ts
|
|
275
|
+
function pluginCliCollisionWarning(pluginId, commandName) {
|
|
276
|
+
if (!RESERVED_BB_CLI_COMMANDS.includes(commandName)) return null;
|
|
277
|
+
return `CLI command "${commandName}" collides with core command "bb ${commandName}"; core keeps the short form. Use "bb plugin run ${pluginId}" to invoke this plugin.`;
|
|
278
|
+
}
|
|
268
279
|
var RESERVED_AGENT_TOOL_NAMES = [
|
|
269
280
|
"update_environment_directory"
|
|
270
281
|
];
|
|
@@ -2265,11 +2276,6 @@ function createFakePluginHostInternal(options, sharedState) {
|
|
|
2265
2276
|
`invalid cli command name ${JSON.stringify(name)} \u2014 use lowercase letters, digits, and "-"`
|
|
2266
2277
|
);
|
|
2267
2278
|
}
|
|
2268
|
-
if (RESERVED_BB_CLI_COMMANDS.includes(name)) {
|
|
2269
|
-
throw new Error(
|
|
2270
|
-
`cli command name "${name}" is reserved by the bb CLI \u2014 pick another name`
|
|
2271
|
-
);
|
|
2272
|
-
}
|
|
2273
2279
|
if (typeof registration.summary !== "string" || registration.summary.trim().length === 0) {
|
|
2274
2280
|
throw new Error(`cli command "${name}" must provide a summary`);
|
|
2275
2281
|
}
|
|
@@ -2300,6 +2306,8 @@ function createFakePluginHostInternal(options, sharedState) {
|
|
|
2300
2306
|
commands: validatedCommands,
|
|
2301
2307
|
run: registration.run.bind(registration)
|
|
2302
2308
|
};
|
|
2309
|
+
const warning = pluginCliCollisionWarning(pluginId, name);
|
|
2310
|
+
if (warning) emitLog("warn", warning);
|
|
2303
2311
|
}
|
|
2304
2312
|
};
|
|
2305
2313
|
const agentTools = [];
|