fix: connect Page Data sandbox to user PostgreSQL
Memind CI / Test, build, and release guards (pull_request) Failing after 15m29s
Memind CI / Test, build, and release guards (pull_request) Failing after 15m29s
This commit is contained in:
+14
-1
@@ -1870,7 +1870,7 @@ export function createUserAuth(pool, options = {}) {
|
||||
);
|
||||
// Wire up the sandbox MCP for user workspace tools and the private data space.
|
||||
// File operations are OS-bound to the user's workspace; private_data_* tools
|
||||
// only touch the user's single SQLite data space inside that workspace.
|
||||
// only touch the user's isolated PostgreSQL schema.
|
||||
let sandboxMcp = null;
|
||||
if (effectiveCapabilities.static_publish || effectiveCapabilities.private_data_space) {
|
||||
try {
|
||||
@@ -1879,6 +1879,13 @@ export function createUserAuth(pool, options = {}) {
|
||||
env,
|
||||
user,
|
||||
});
|
||||
const containerFlag = String(env.GOOSED_MCP_CONTAINERIZED ?? '').trim();
|
||||
const containerized = containerFlag
|
||||
? containerFlag === '1'
|
||||
: Boolean(
|
||||
env.GOOSED_MCP_NODE_PATH &&
|
||||
path.resolve(env.GOOSED_MCP_NODE_PATH) !== path.resolve(process.execPath),
|
||||
);
|
||||
sandboxMcp = {
|
||||
// When goosed runs in a container its filesystem is split from the portal's,
|
||||
// so the host paths the portal would otherwise send (node binary, MCP script)
|
||||
@@ -1891,6 +1898,12 @@ export function createUserAuth(pool, options = {}) {
|
||||
workspaceRef: workspaceCapability.workspaceRef,
|
||||
userId: user.id,
|
||||
nodeExecPath: env.GOOSED_MCP_NODE_PATH,
|
||||
containerized,
|
||||
userDataBackend: env.MINDSPACE_USERDATA_BACKEND,
|
||||
userDataPgUrl: env.MINDSPACE_USERDATA_PG_URL,
|
||||
userDataMcpPgUrl: env.MINDSPACE_USERDATA_MCP_PG_URL,
|
||||
userDataPgHostGateway: env.MINDSPACE_USERDATA_MCP_PG_HOST,
|
||||
userDataAutoProvision: env.MINDSPACE_USERDATA_AUTO_PROVISION,
|
||||
};
|
||||
} catch (err) {
|
||||
console.warn('[getAgentSessionPolicy] sandbox MCP setup failed, falling back:', err?.message);
|
||||
|
||||
Reference in New Issue
Block a user