@suveren/gateway 0.3.9 → 0.3.10
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.
|
@@ -2009,8 +2009,8 @@ app.get("/active-authorizations", authGuard, async (_req, res) => {
|
|
|
2009
2009
|
});
|
|
2010
2010
|
app.post("/gate-content", jsonParser, authGuard, async (req, res) => {
|
|
2011
2011
|
try {
|
|
2012
|
-
const { authorizationId, boundsHash, contextHash, context, path, gateContent } = req.body;
|
|
2013
|
-
await pushGateContent({ authorizationId, boundsHash, contextHash, context, path, gateContent });
|
|
2012
|
+
const { authorizationId, boundsHash, contextHash, context, contextLabels, path, gateContent } = req.body;
|
|
2013
|
+
await pushGateContent({ authorizationId, boundsHash, contextHash, context, contextLabels, path, gateContent });
|
|
2014
2014
|
res.json({ ok: true });
|
|
2015
2015
|
} catch (err) {
|
|
2016
2016
|
console.error("[Control Plane] Gate content forward error:", err);
|
package/dist/mcp-server/http.mjs
CHANGED
|
@@ -729,6 +729,7 @@ var SharedState = class {
|
|
|
729
729
|
profileId,
|
|
730
730
|
gateContent: content,
|
|
731
731
|
context: opts?.context,
|
|
732
|
+
contextLabels: opts?.contextLabels,
|
|
732
733
|
storedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
733
734
|
});
|
|
734
735
|
}
|
|
@@ -2502,7 +2503,7 @@ app.post("/internal/configure", internalOnly, (req, res) => {
|
|
|
2502
2503
|
});
|
|
2503
2504
|
app.post("/internal/gate-content", internalOnly, async (req, res) => {
|
|
2504
2505
|
try {
|
|
2505
|
-
const { authorizationId, boundsHash, contextHash, context, path: rawPath, gateContent } = req.body;
|
|
2506
|
+
const { authorizationId, boundsHash, contextHash, context, contextLabels, path: rawPath, gateContent } = req.body;
|
|
2506
2507
|
const hasIntent = !!gateContent?.intent;
|
|
2507
2508
|
const legacy = gateContent;
|
|
2508
2509
|
const hasLegacy = !!legacy?.problem && !!legacy?.objective && !!legacy?.tradeoffs;
|
|
@@ -2524,7 +2525,8 @@ app.post("/internal/gate-content", internalOnly, async (req, res) => {
|
|
|
2524
2525
|
state.setGateContent(path, authorizationId, auth.profileId, gateContent, {
|
|
2525
2526
|
boundsHash,
|
|
2526
2527
|
contextHash,
|
|
2527
|
-
context
|
|
2528
|
+
context,
|
|
2529
|
+
contextLabels
|
|
2528
2530
|
});
|
|
2529
2531
|
console.error(`[Suveren MCP] Gate content accepted for ${path}`);
|
|
2530
2532
|
for (const [sessionId, session] of activeSessions) {
|
|
@@ -2583,7 +2585,10 @@ app.post("/internal/resync-gates", internalOnly, async (_req, res) => {
|
|
|
2583
2585
|
state.setGateContent(auth.path, authzId, auth.profileId, gate.gateContent, {
|
|
2584
2586
|
boundsHash: gate.boundsHash,
|
|
2585
2587
|
contextHash: gate.contextHash,
|
|
2586
|
-
context: gate.context
|
|
2588
|
+
context: gate.context,
|
|
2589
|
+
// Preserve discovered display names across resyncs — the AS never
|
|
2590
|
+
// sees them, so the local copy is the only one.
|
|
2591
|
+
contextLabels: gate.contextLabels
|
|
2587
2592
|
});
|
|
2588
2593
|
synced++;
|
|
2589
2594
|
console.error(`[Suveren MCP] Re-synced gate: ${gate.path}`);
|