@hachej/boring-core 0.1.79 → 0.1.81
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/app/server/index.js +20 -3
- package/package.json +4 -4
package/dist/app/server/index.js
CHANGED
|
@@ -773,19 +773,36 @@ async function createCoreWorkspaceAgentServer(options = {}) {
|
|
|
773
773
|
async resolve(actor, resolveOptions) {
|
|
774
774
|
if (!workspaceAgentDispatcherResolver) throw new Error("workspace agent dispatcher is not ready");
|
|
775
775
|
return await workspaceAgentDispatcherResolver.resolve(actor, resolveOptions);
|
|
776
|
+
},
|
|
777
|
+
async resolveWithWorkspace(actor, resolveOptions) {
|
|
778
|
+
if (!workspaceAgentDispatcherResolver?.resolveWithWorkspace) {
|
|
779
|
+
throw new Error("workspace agent dispatcher binding is not ready");
|
|
780
|
+
}
|
|
781
|
+
return await workspaceAgentDispatcherResolver.resolveWithWorkspace(actor, resolveOptions);
|
|
776
782
|
}
|
|
777
783
|
};
|
|
778
784
|
const basePluginResolveContext = {
|
|
779
785
|
workspaceRoot: pluginWorkspaceRoot,
|
|
780
786
|
bridge: createUnavailableCorePluginBridge()
|
|
781
787
|
};
|
|
782
|
-
const
|
|
788
|
+
const trustedPluginActorResolver = options.trustedPluginActorResolver ?? (async (request) => {
|
|
789
|
+
const workspaceId = await resolveAuthorizedWorkspaceId(request, workspaceStore);
|
|
790
|
+
const userId = request.user?.id;
|
|
791
|
+
if (!userId) throw httpError("authentication required", 401);
|
|
792
|
+
return { workspaceId, userId };
|
|
793
|
+
});
|
|
794
|
+
const trustedPluginResolveContext = {
|
|
783
795
|
...basePluginResolveContext,
|
|
784
796
|
trusted: {
|
|
785
797
|
workspaceAgentDispatcherResolver: trustedDispatcherProxy,
|
|
786
|
-
actorResolver:
|
|
798
|
+
actorResolver: trustedPluginActorResolver,
|
|
799
|
+
sql,
|
|
800
|
+
actorVerifier: async (actor) => Boolean(
|
|
801
|
+
await workspaceStore.get(actor.workspaceId) && await workspaceStore.isMember(actor.workspaceId, actor.userId) && await userStore.getById(actor.userId)
|
|
802
|
+
),
|
|
803
|
+
hostedAutomationTriggerToken: process.env.BORING_AUTOMATION_TRIGGER_TOKEN
|
|
787
804
|
}
|
|
788
|
-
}
|
|
805
|
+
};
|
|
789
806
|
const resolvedPlugins = await Promise.all(
|
|
790
807
|
pluginEntries.map(async (entry) => {
|
|
791
808
|
const plugin = await resolveOnePluginEntry(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hachej/boring-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.81",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Foundation package for boring-ui-v2 apps: DB, auth, config, HTTP app factory, and frontend app shell.",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"react-router-dom": "^7.18.0",
|
|
80
80
|
"smol-toml": "^1.7.0",
|
|
81
81
|
"zod": "^3.25.76",
|
|
82
|
-
"@hachej/boring-agent": "0.1.
|
|
83
|
-
"@hachej/boring-
|
|
84
|
-
"@hachej/boring-
|
|
82
|
+
"@hachej/boring-agent": "0.1.81",
|
|
83
|
+
"@hachej/boring-workspace": "0.1.81",
|
|
84
|
+
"@hachej/boring-ui-kit": "0.1.81"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@testing-library/jest-dom": "^6.9.1",
|