@get-bb/plugin-sdk 0.4.22 → 0.4.27
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 +6 -7
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +0 -25
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp.d.ts +0 -200
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +0 -440
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +0 -665
- package/bundled-types/bb-plugin-sdk-testing.d.ts +0 -16
- package/bundled-types/bb-plugin-sdk.d.ts +31 -284
- package/dist/ai-services.js +5 -1
- package/dist/internal/host-policy.js +95 -108
- package/dist/provider-bridge-acp.js +113 -623
- package/dist/provider-bridge-testing.js +175 -580
- package/dist/provider-bridge-worker-entry.mjs +15 -9
- package/dist/provider-bridge.js +62 -557
- package/dist/testing/index.js +133 -114
- package/package.json +1 -1
|
@@ -610,12 +610,7 @@ function readBoundedLines(args) {
|
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
// ../provider-bridge-protocol/src/bridge-kit/bridge-recorder.ts
|
|
613
|
-
import {
|
|
614
|
-
closeSync,
|
|
615
|
-
mkdirSync,
|
|
616
|
-
openSync,
|
|
617
|
-
writeSync
|
|
618
|
-
} from "node:fs";
|
|
613
|
+
import { closeSync, mkdirSync, openSync, writeSync } from "node:fs";
|
|
619
614
|
import { join as join2, resolve } from "node:path";
|
|
620
615
|
import { StringDecoder as StringDecoder2 } from "node:string_decoder";
|
|
621
616
|
var PROVIDER_BRIDGE_RECORD_DIR_ENV = "BB_PROVIDER_BRIDGE_RECORD_DIR";
|
|
@@ -698,7 +693,10 @@ function createBridgeRecorder(args) {
|
|
|
698
693
|
}
|
|
699
694
|
const scopeDir = join2(dir, scope);
|
|
700
695
|
mkdirSync(scopeDir, { recursive: true });
|
|
701
|
-
const fd = openSync(
|
|
696
|
+
const fd = openSync(
|
|
697
|
+
join2(scopeDir, bridgeRecordingFileName(direction)),
|
|
698
|
+
"a"
|
|
699
|
+
);
|
|
702
700
|
fds.set(key, fd);
|
|
703
701
|
return fd;
|
|
704
702
|
}
|
|
@@ -749,13 +747,21 @@ function createBridgeRecorder(args) {
|
|
|
749
747
|
const { stdin, stdout } = child;
|
|
750
748
|
if (stdout) {
|
|
751
749
|
const splitter = createRecordingLineSplitter(
|
|
752
|
-
(line) => record({
|
|
750
|
+
(line) => record({
|
|
751
|
+
direction: "provider\u2192bridge",
|
|
752
|
+
line,
|
|
753
|
+
threadId: scope.threadId
|
|
754
|
+
})
|
|
753
755
|
);
|
|
754
756
|
stdout.on("data", (chunk) => splitter.push(chunk));
|
|
755
757
|
}
|
|
756
758
|
if (stdin) {
|
|
757
759
|
const splitter = createRecordingLineSplitter(
|
|
758
|
-
(line) => record({
|
|
760
|
+
(line) => record({
|
|
761
|
+
direction: "bridge\u2192provider",
|
|
762
|
+
line,
|
|
763
|
+
threadId: scope.threadId
|
|
764
|
+
})
|
|
759
765
|
);
|
|
760
766
|
const originalWrite = stdin.write.bind(stdin);
|
|
761
767
|
stdin.write = ((chunk, ...rest) => {
|