@rulvar/core 1.81.0 → 1.81.2
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/index.d.ts +2 -1
- package/dist/index.js +10 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6402,7 +6402,8 @@ type FencedCodeMode = "counted" | "excluded";
|
|
|
6402
6402
|
* fence opens at a line starting (after at most three spaces) with
|
|
6403
6403
|
* three or more backticks or tildes, an optional info string allowed;
|
|
6404
6404
|
* it closes at the next line carrying only at least as many of the
|
|
6405
|
-
* SAME character
|
|
6405
|
+
* SAME character (a trailing carriage return from CRLF text does not
|
|
6406
|
+
* keep a fence open); an unclosed fence runs to the end of the text.
|
|
6406
6407
|
* Indented (four space) code blocks are not treated as code. This is
|
|
6407
6408
|
* the exact exclusion the `fencedCode: 'excluded'` validator option
|
|
6408
6409
|
* applies, exported so custom host validators can stay symmetric.
|
package/dist/index.js
CHANGED
|
@@ -3490,6 +3490,7 @@ function mcp(cfg) {
|
|
|
3490
3490
|
validateConfig(cfg);
|
|
3491
3491
|
let clientPromise;
|
|
3492
3492
|
let cache;
|
|
3493
|
+
let generation = 0;
|
|
3493
3494
|
const connect = async () => {
|
|
3494
3495
|
const client = new Client({
|
|
3495
3496
|
name: "rulvar",
|
|
@@ -3515,6 +3516,7 @@ function mcp(cfg) {
|
|
|
3515
3516
|
throw error;
|
|
3516
3517
|
}
|
|
3517
3518
|
client.setNotificationHandler(ToolListChangedNotificationSchema, () => {
|
|
3519
|
+
generation += 1;
|
|
3518
3520
|
cache = void 0;
|
|
3519
3521
|
});
|
|
3520
3522
|
return client;
|
|
@@ -3526,7 +3528,7 @@ function mcp(cfg) {
|
|
|
3526
3528
|
const page = await client.listTools(cursor === void 0 ? {} : { cursor });
|
|
3527
3529
|
tools.push(...page.tools);
|
|
3528
3530
|
cursor = page.nextCursor;
|
|
3529
|
-
} while (cursor !== void 0);
|
|
3531
|
+
} while (cursor !== void 0 && cursor !== "");
|
|
3530
3532
|
return tools;
|
|
3531
3533
|
};
|
|
3532
3534
|
const needsApprovalFor = (originalName) => {
|
|
@@ -3567,11 +3569,13 @@ function mcp(cfg) {
|
|
|
3567
3569
|
if (cache !== void 0) return cache;
|
|
3568
3570
|
clientPromise ??= connect();
|
|
3569
3571
|
const client = await clientPromise;
|
|
3572
|
+
const fetchedAt = generation;
|
|
3570
3573
|
const wireTools = await listAll(client);
|
|
3571
3574
|
const denySet = new Set(cfg.deny ?? []);
|
|
3572
3575
|
const allowSet = cfg.allow === void 0 ? void 0 : new Set(cfg.allow);
|
|
3573
|
-
|
|
3574
|
-
|
|
3576
|
+
const defs = wireTools.filter((wire) => !denySet.has(wire.name) && (allowSet === void 0 || allowSet.has(wire.name))).map((wire) => toDef(client, wire));
|
|
3577
|
+
if (generation === fetchedAt) cache = defs;
|
|
3578
|
+
return defs;
|
|
3575
3579
|
},
|
|
3576
3580
|
close: async () => {
|
|
3577
3581
|
const pending = clientPromise;
|
|
@@ -15394,7 +15398,7 @@ function requireNonEmptyStrings(values, what) {
|
|
|
15394
15398
|
return [...values];
|
|
15395
15399
|
}
|
|
15396
15400
|
const FENCE_OPEN = /^ {0,3}(`{3,}|~{3,})/;
|
|
15397
|
-
const FENCE_CLOSE = /^ {0,3}(`{3,}|~{3,})[ \t]
|
|
15401
|
+
const FENCE_CLOSE = /^ {0,3}(`{3,}|~{3,})[ \t]*\r?$/;
|
|
15398
15402
|
/**
|
|
15399
15403
|
* Removes fenced code blocks from a text, the delimiter lines
|
|
15400
15404
|
* included, and returns the remaining lines joined by newlines. The
|
|
@@ -15402,7 +15406,8 @@ const FENCE_CLOSE = /^ {0,3}(`{3,}|~{3,})[ \t]*$/;
|
|
|
15402
15406
|
* fence opens at a line starting (after at most three spaces) with
|
|
15403
15407
|
* three or more backticks or tildes, an optional info string allowed;
|
|
15404
15408
|
* it closes at the next line carrying only at least as many of the
|
|
15405
|
-
* SAME character
|
|
15409
|
+
* SAME character (a trailing carriage return from CRLF text does not
|
|
15410
|
+
* keep a fence open); an unclosed fence runs to the end of the text.
|
|
15406
15411
|
* Indented (four space) code blocks are not treated as code. This is
|
|
15407
15412
|
* the exact exclusion the `fencedCode: 'excluded'` validator option
|
|
15408
15413
|
* applies, exported so custom host validators can stay symmetric.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/core",
|
|
3
|
-
"version": "1.81.
|
|
3
|
+
"version": "1.81.2",
|
|
4
4
|
"description": "Rulvar core: L0 contracts, journal kernel, ctx primitives, agent runtime, model router, tool system, dynamic orchestrator, InMemory and JSONL stores, event stream.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|