booths 0.0.0 → 0.0.1
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/dist/index.js +8 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -766,7 +766,7 @@ class w {
|
|
|
766
766
|
return !1;
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function _(i) {
|
|
770
770
|
const t = i.getAllBooths(), o = Object.values(t).map(
|
|
771
771
|
(r) => `- ${r.id}: ${r.role}
|
|
772
772
|
Examples:
|
|
@@ -811,7 +811,7 @@ ${o}`,
|
|
|
811
811
|
}
|
|
812
812
|
};
|
|
813
813
|
}
|
|
814
|
-
class
|
|
814
|
+
class R {
|
|
815
815
|
description = "A plugin to ensure the interaction loop can be finished.";
|
|
816
816
|
id = "finish-turn-plugin";
|
|
817
817
|
name = "Finish Turn Plugin";
|
|
@@ -841,6 +841,8 @@ class _ {
|
|
|
841
841
|
* @returns A boolean indicating whether the loop should end.
|
|
842
842
|
*/
|
|
843
843
|
async shouldEndInteractionLoop(t, o, e) {
|
|
844
|
+
if (!e.output_text)
|
|
845
|
+
return !1;
|
|
844
846
|
const r = e.output_text.includes("__awaiting_user_response__"), n = e.status === "failed" || e.error !== null;
|
|
845
847
|
return r || n;
|
|
846
848
|
}
|
|
@@ -916,13 +918,13 @@ class B {
|
|
|
916
918
|
*/
|
|
917
919
|
constructor(t) {
|
|
918
920
|
this.boothPluginRegistry = t.boothPlugins, this.boothRegistry = t.booths, this.toolRegistry = t.tools;
|
|
919
|
-
const o =
|
|
921
|
+
const o = _(this.boothRegistry);
|
|
920
922
|
this.toolRegistry.registerTools([o]), this.systemPluginsRegistry = new g(), this.systemPluginsRegistry.registerPlugins([
|
|
921
923
|
new p(),
|
|
922
924
|
new f(),
|
|
923
925
|
new y(),
|
|
924
926
|
new w(),
|
|
925
|
-
new
|
|
927
|
+
new R()
|
|
926
928
|
]), this.systemPluginsRegistry.registerPlugins(this.boothPluginRegistry.getPlugins()), this.callProcessor = new d(
|
|
927
929
|
this.boothRegistry,
|
|
928
930
|
this.systemPluginsRegistry,
|
|
@@ -937,10 +939,10 @@ export {
|
|
|
937
939
|
f as ContextProviderPlugin,
|
|
938
940
|
p as ConversationHistoryPlugin,
|
|
939
941
|
B as CoreBooth,
|
|
940
|
-
|
|
942
|
+
R as FinishTurnPlugin,
|
|
941
943
|
d as InteractionProcessor,
|
|
942
944
|
w as ToolExecutorPlugin,
|
|
943
945
|
y as ToolProviderPlugin,
|
|
944
946
|
m as ToolRegistry,
|
|
945
|
-
|
|
947
|
+
_ as createRouteToBoothTool
|
|
946
948
|
};
|