@hachej/boring-core 0.1.79 → 0.1.80

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.
@@ -773,19 +773,32 @@ 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 trustedPluginResolveContext = options.trustedPluginActorResolver ? {
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: options.trustedPluginActorResolver
798
+ actorResolver: trustedPluginActorResolver,
799
+ sql
787
800
  }
788
- } : basePluginResolveContext;
801
+ };
789
802
  const resolvedPlugins = await Promise.all(
790
803
  pluginEntries.map(async (entry) => {
791
804
  const plugin = await resolveOnePluginEntry(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hachej/boring-core",
3
- "version": "0.1.79",
3
+ "version": "0.1.80",
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.79",
83
- "@hachej/boring-ui-kit": "0.1.79",
84
- "@hachej/boring-workspace": "0.1.79"
82
+ "@hachej/boring-agent": "0.1.80",
83
+ "@hachej/boring-workspace": "0.1.80",
84
+ "@hachej/boring-ui-kit": "0.1.80"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@testing-library/jest-dom": "^6.9.1",