@suveren/gateway 0.3.9 → 0.3.11
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/control-plane/index.mjs +2 -2
- package/dist/mcp-server/http.mjs +9 -4
- package/dist/ui/assets/index-Sa6P3FDC.js +105 -0
- package/dist/ui/index.html +1 -1
- package/node_modules/hono/dist/adapter/aws-lambda/handler.js +1 -1
- package/node_modules/hono/dist/adapter/bun/websocket.js +3 -1
- package/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +1 -1
- package/node_modules/hono/dist/cjs/adapter/bun/websocket.js +3 -1
- package/node_modules/hono/dist/cjs/middleware/serve-static/index.js +1 -1
- package/node_modules/hono/dist/cjs/utils/body.js +12 -4
- package/node_modules/hono/dist/cjs/utils/buffer.js +2 -1
- package/node_modules/hono/dist/cjs/validator/validator.js +3 -3
- package/node_modules/hono/dist/middleware/serve-static/index.js +1 -1
- package/node_modules/hono/dist/types/middleware/context-storage/index.d.ts +2 -2
- package/node_modules/hono/dist/types/utils/body.d.ts +1 -1
- package/node_modules/hono/dist/utils/body.js +12 -4
- package/node_modules/hono/dist/utils/buffer.js +2 -1
- package/node_modules/hono/dist/validator/validator.js +3 -3
- package/node_modules/hono/package.json +8 -7
- package/package.json +1 -1
- package/dist/ui/assets/index-Y2L3iwZu.js +0 -105
- package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +0 -1
|
@@ -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
|
}
|
|
@@ -824,7 +825,7 @@ import { readFileSync as readFileSync3, existsSync as existsSync3 } from "fs";
|
|
|
824
825
|
import { homedir as homedir3 } from "os";
|
|
825
826
|
import { join as join3 } from "path";
|
|
826
827
|
var DEFAULT_DIR3 = process.env.SUVEREN_DATA_DIR ?? join3(homedir3(), ".suveren");
|
|
827
|
-
var BRIEF_MAX_CHARS =
|
|
828
|
+
var BRIEF_MAX_CHARS = 16 * 1024;
|
|
828
829
|
function readContextFile(dataDir) {
|
|
829
830
|
const dir = dataDir ?? DEFAULT_DIR3;
|
|
830
831
|
const filePath = join3(dir, "context.md");
|
|
@@ -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}`);
|