@yanlinglabs/winter-agent-runtime 0.0.40 → 0.0.41
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/embedded-worker.js +3 -3
- package/dist/embedded.js +3 -3
- package/dist/{index-r7yjcppm.js → index-ey5c52j3.js} +2 -2
- package/dist/{index-rhxkckyn.js → index-hdvvezf8.js} +1 -1
- package/dist/{index-a8j104mg.js → index-z9yngxj4.js} +17 -3
- package/dist/index.js +1 -1
- package/dist/store/dialect.d.ts +1 -1
- package/dist/testing.js +2 -2
- package/dist/tools/registry.d.ts +12 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
package/dist/embedded-worker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-z9yngxj4.js";
|
|
2
2
|
import {
|
|
3
3
|
liveProcessGroups,
|
|
4
4
|
onProcessGroupChange
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
import"./index-mwew595z.js";
|
|
7
7
|
import"./index-2wgfv0pa.js";
|
|
8
8
|
import"./index-bef62z3r.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-hdvvezf8.js";
|
|
10
10
|
import {
|
|
11
11
|
runEmbeddedSession2
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-ey5c52j3.js";
|
|
13
13
|
import {
|
|
14
14
|
Queue
|
|
15
15
|
} from "./index-97t2rmtf.js";
|
package/dist/embedded.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runEmbeddedSession2
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
5
|
-
import"./index-
|
|
3
|
+
} from "./index-ey5c52j3.js";
|
|
4
|
+
import"./index-hdvvezf8.js";
|
|
5
|
+
import"./index-z9yngxj4.js";
|
|
6
6
|
import"./index-2wgfv0pa.js";
|
|
7
7
|
import"./index-bef62z3r.js";
|
|
8
8
|
import"./index-1hef2gff.js";
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
resolveEngineSession2,
|
|
10
10
|
resolveProductionWinterHome2,
|
|
11
11
|
resolveProductionStoreHome
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-z9yngxj4.js";
|
|
13
13
|
import {
|
|
14
14
|
registerDefaultChildEngineFactory,
|
|
15
15
|
loadResumedChain,
|
|
16
16
|
buildProductionWiring,
|
|
17
17
|
withAutoSkillPermissions,
|
|
18
18
|
restoreChildRoster
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-hdvvezf8.js";
|
|
20
20
|
|
|
21
21
|
// src/embedded.ts
|
|
22
22
|
import { splitFrames, encodeFrame } from "@yanlinglabs/winter-agent-sdk";
|
|
@@ -1187,6 +1187,11 @@ var CONCURRENCY_LANE = /^[A-Za-z0-9_.:-]{1,64}$/;
|
|
|
1187
1187
|
function isValidConcurrencyLane(lane) {
|
|
1188
1188
|
return typeof lane === "string" && CONCURRENCY_LANE.test(lane);
|
|
1189
1189
|
}
|
|
1190
|
+
function concurrentToolSet(raw) {
|
|
1191
|
+
if (!Array.isArray(raw))
|
|
1192
|
+
return new Set;
|
|
1193
|
+
return new Set(raw.filter((name) => typeof name === "string"));
|
|
1194
|
+
}
|
|
1190
1195
|
function registerMcpServerTools(server, incomingTools, opts) {
|
|
1191
1196
|
if (RESERVED_MCP_SERVER_NAMES.has(server)) {
|
|
1192
1197
|
throw new Error(`registerMcpServerTools: "${server}" is a RESERVED server name -- the standing Winter server ` + `(its name is defined in mcp/winter-server.ts) owns this identity and is registry-native; it is never installed through ` + `this live-mutation function, and nothing else may register live tools under it either.`);
|
|
@@ -1238,12 +1243,13 @@ function registerMcpServerTools(server, incomingTools, opts) {
|
|
|
1238
1243
|
}
|
|
1239
1244
|
}
|
|
1240
1245
|
const nowOwned = new Set;
|
|
1246
|
+
const concurrent = concurrentToolSet(opts.concurrentTools);
|
|
1241
1247
|
for (const tool of tools) {
|
|
1242
1248
|
const canonicalName = registeredName(tool);
|
|
1243
1249
|
const existingEntry = registry.get(canonicalName);
|
|
1244
1250
|
const built = buildMcpToolDescriptor(server, tool, opts, plainNameFor(tool));
|
|
1245
1251
|
const lane = opts.toolLanes !== undefined && Object.hasOwn(opts.toolLanes, tool.name) ? opts.toolLanes[tool.name] : undefined;
|
|
1246
|
-
const descriptor = isValidConcurrencyLane(lane) ? { ...built, concurrencyLane: lane } : built;
|
|
1252
|
+
const descriptor = isValidConcurrencyLane(lane) ? { ...built, concurrencyLane: lane } : concurrent.has(tool.name) ? { ...built, concurrencySafe: true } : built;
|
|
1247
1253
|
registry.set(canonicalName, existingEntry ? { ...existingEntry, descriptor } : { descriptor });
|
|
1248
1254
|
mcpToolOwner.set(canonicalName, server);
|
|
1249
1255
|
nowOwned.add(canonicalName);
|
|
@@ -24077,6 +24083,8 @@ function schedulingForCall(name, input, bash) {
|
|
|
24077
24083
|
return { kind: "concurrent" };
|
|
24078
24084
|
if (descriptor.concurrencyLane !== undefined)
|
|
24079
24085
|
return { kind: "lane", lane: descriptor.concurrencyLane };
|
|
24086
|
+
if (descriptor.concurrencySafe === true)
|
|
24087
|
+
return { kind: "concurrent" };
|
|
24080
24088
|
}
|
|
24081
24089
|
return { kind: "serial" };
|
|
24082
24090
|
}
|
|
@@ -25519,7 +25527,13 @@ ${escapeAttributionText(msg.body)}
|
|
|
25519
25527
|
const toolDefs = serverCfg.tools;
|
|
25520
25528
|
const toolNames = serverCfg.toolNames;
|
|
25521
25529
|
const toolLanes = serverCfg.toolLanes;
|
|
25522
|
-
|
|
25530
|
+
const concurrentTools = serverCfg.concurrentTools;
|
|
25531
|
+
registerMcpServerTools(serverName, toolDefs, {
|
|
25532
|
+
deferredDefault: true,
|
|
25533
|
+
...toolNames !== undefined ? { toolNames } : {},
|
|
25534
|
+
...toolLanes !== undefined ? { toolLanes } : {},
|
|
25535
|
+
...concurrentTools !== undefined ? { concurrentTools } : {}
|
|
25536
|
+
});
|
|
25523
25537
|
sdkMcpServerNames.push(serverName);
|
|
25524
25538
|
const perServerTimeoutMs = serverCfg.timeout;
|
|
25525
25539
|
for (const tool of toolDefs) {
|
|
@@ -29513,7 +29527,7 @@ class TranscriptWriter2 {
|
|
|
29513
29527
|
return entries;
|
|
29514
29528
|
}
|
|
29515
29529
|
}
|
|
29516
|
-
var RUNTIME_ENGINE_VERSION2 = "0.0.
|
|
29530
|
+
var RUNTIME_ENGINE_VERSION2 = "0.0.41";
|
|
29517
29531
|
function withPermissionJournal(writer, location) {
|
|
29518
29532
|
return {
|
|
29519
29533
|
transcriptPath: join27(location.winterHome, "projects", location.projectKey, `${location.sessionId}.jsonl`),
|
package/dist/index.js
CHANGED
package/dist/store/dialect.d.ts
CHANGED
|
@@ -478,7 +478,7 @@ export declare class TranscriptWriter implements SessionPersistence {
|
|
|
478
478
|
private dialectRecord;
|
|
479
479
|
static readBack(store: SessionStore, key: SessionKey): Promise<SessionStoreEntry[]>;
|
|
480
480
|
}
|
|
481
|
-
export declare const RUNTIME_ENGINE_VERSION = "0.0.
|
|
481
|
+
export declare const RUNTIME_ENGINE_VERSION = "0.0.41";
|
|
482
482
|
export interface ResolvedEngineSession {
|
|
483
483
|
config: RuntimeConfig;
|
|
484
484
|
store: SessionPersistence | undefined;
|
package/dist/testing.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
runEngine2,
|
|
4
4
|
echoProvider2,
|
|
5
5
|
resolveEngineSession2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-z9yngxj4.js";
|
|
7
7
|
import"./index-1hef2gff.js";
|
|
8
8
|
import"./index-mwew595z.js";
|
|
9
9
|
import"./index-2wgfv0pa.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
buildProductionWiring,
|
|
15
15
|
withAutoSkillPermissions,
|
|
16
16
|
restoreChildRoster
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-hdvvezf8.js";
|
|
18
18
|
import {
|
|
19
19
|
Queue
|
|
20
20
|
} from "./index-97t2rmtf.js";
|
package/dist/tools/registry.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export interface ToolDescriptor {
|
|
|
63
63
|
versionIntroduced?: string;
|
|
64
64
|
deferred?: boolean | readonly PermissionMode[];
|
|
65
65
|
concurrencyLane?: string;
|
|
66
|
+
concurrencySafe?: true;
|
|
66
67
|
alwaysLoad?: boolean;
|
|
67
68
|
_meta?: Record<string, unknown>;
|
|
68
69
|
interaction?: "required";
|
|
@@ -363,11 +364,22 @@ export declare function rebrandStandingServerTools(renames: ReadonlyArray<{
|
|
|
363
364
|
export type McpServerToolLanes = Readonly<Record<string, string>>;
|
|
364
365
|
/** Whether `lane` is a usable concurrency-lane key. */
|
|
365
366
|
export declare function isValidConcurrencyLane(lane: unknown): lane is string;
|
|
367
|
+
/**
|
|
368
|
+
* SDK 0.0.41: a HOST's concurrency-safe tools of one in-process server (`McpSdkServerConfig.concurrentTools`):
|
|
369
|
+
* server tool names whose calls may run BESIDE the round's other concurrent calls although the tool is not
|
|
370
|
+
* read-only (Winter's `SpawnSession`: each call starts its own session). A scheduling fact only -- it never
|
|
371
|
+
* sets `annotations.readOnlyHint`, so nothing that asks "is this read-only" sees it. A tool that is also in
|
|
372
|
+
* a lane stays in its lane (the stricter answer). Only an in-process (`sdk`) server carries it. Read
|
|
373
|
+
* defensively: anything that is not an array of strings counts as empty, and a name the server does not
|
|
374
|
+
* list is ignored.
|
|
375
|
+
*/
|
|
376
|
+
export type McpServerConcurrentTools = readonly string[];
|
|
366
377
|
export declare function registerMcpServerTools(server: string, incomingTools: readonly McpToolDefinition[], opts: {
|
|
367
378
|
alwaysLoad?: boolean;
|
|
368
379
|
deferredDefault: boolean | readonly PermissionMode[];
|
|
369
380
|
toolNames?: McpServerToolNames;
|
|
370
381
|
toolLanes?: McpServerToolLanes;
|
|
382
|
+
concurrentTools?: McpServerConcurrentTools;
|
|
371
383
|
}): void;
|
|
372
384
|
/**
|
|
373
385
|
* Fix round 20: the live MCP server that registered `canonicalName` through `registerMcpServerTools`,
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const RUNTIME_VERSION = "0.0.
|
|
1
|
+
export declare const RUNTIME_VERSION = "0.0.41";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yanlinglabs/winter-agent-runtime",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.41",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"@modelcontextprotocol/client": "^2.1.0",
|
|
74
74
|
"ajv": "^8.20.0",
|
|
75
75
|
"ignore": "7.0.5",
|
|
76
|
-
"@yanlinglabs/winter-
|
|
77
|
-
"@yanlinglabs/winter-provider-
|
|
78
|
-
"@yanlinglabs/winter-
|
|
76
|
+
"@yanlinglabs/winter-agent-sdk": "0.0.41",
|
|
77
|
+
"@yanlinglabs/winter-provider-catalog": "0.0.41",
|
|
78
|
+
"@yanlinglabs/winter-provider-runtime": "0.0.41"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@modelcontextprotocol/server": "^2.1.0"
|