@yanlinglabs/winter-agent-runtime 0.0.31 → 0.0.32

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.
@@ -1,4 +1,4 @@
1
- import"./index-d4pmmr27.js";
1
+ import"./index-qdang0ag.js";
2
2
  import {
3
3
  liveProcessGroups,
4
4
  onProcessGroupChange
@@ -6,10 +6,10 @@ import {
6
6
  import"./index-z6s3r4xm.js";
7
7
  import"./index-bgeqc7ax.js";
8
8
  import"./index-bef62z3r.js";
9
- import"./index-0xqzk1hm.js";
9
+ import"./index-yg5ve6sg.js";
10
10
  import {
11
11
  runEmbeddedSession2
12
- } from "./index-c7kq6erg.js";
12
+ } from "./index-y8vfq85w.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-c7kq6erg.js";
4
- import"./index-0xqzk1hm.js";
5
- import"./index-d4pmmr27.js";
3
+ } from "./index-y8vfq85w.js";
4
+ import"./index-yg5ve6sg.js";
5
+ import"./index-qdang0ag.js";
6
6
  import"./index-bgeqc7ax.js";
7
7
  import"./index-bef62z3r.js";
8
8
  import"./index-9s68t0pd.js";
@@ -23212,6 +23212,7 @@ ${escapeAttributionText(msg.body)}
23212
23212
  const notifications = notificationQueueFor(config.sessionId);
23213
23213
  let turnActive = false;
23214
23214
  let controlCompaction;
23215
+ let mcpControlChain = Promise.resolve();
23215
23216
  let compactOnControl;
23216
23217
  let turnStartedByNotification = false;
23217
23218
  let userFramesEnded = false;
@@ -23680,8 +23681,18 @@ ${escapeAttributionText(msg.body)}
23680
23681
  }
23681
23682
  if (cf.subtype === "mcp_status" || cf.subtype === "mcp_reconnect" || cf.subtype === "mcp_toggle" || cf.subtype === "mcp_set_servers") {
23682
23683
  const mcpDeps = { ...effectiveMcpStateSource !== undefined ? { stateSource: effectiveMcpStateSource } : {}, ...effectiveMcpControlSeam !== undefined ? { controlSeam: effectiveMcpControlSeam } : {} };
23683
- const result = cf.subtype === "mcp_status" ? await handleMcpStatus(mcpDeps) : cf.subtype === "mcp_reconnect" ? await handleMcpReconnect(mcpDeps, cf.payload) : cf.subtype === "mcp_toggle" ? await handleMcpToggle(mcpDeps, cf.payload) : await handleMcpSetServers(mcpDeps, cf.payload);
23684
- output.write(result.ok ? { type: "control_response", requestId: cf.requestId, ok: true, ...result.payload !== undefined ? { payload: result.payload } : {} } : { type: "control_response", requestId: cf.requestId, ok: false, error: result.error });
23684
+ const subtype = cf.subtype;
23685
+ const requestId = cf.requestId;
23686
+ const payload = cf.payload;
23687
+ mcpControlChain = mcpControlChain.then(async () => {
23688
+ let result;
23689
+ try {
23690
+ result = subtype === "mcp_status" ? await handleMcpStatus(mcpDeps) : subtype === "mcp_reconnect" ? await handleMcpReconnect(mcpDeps, payload) : subtype === "mcp_toggle" ? await handleMcpToggle(mcpDeps, payload) : await handleMcpSetServers(mcpDeps, payload);
23691
+ } catch (err) {
23692
+ result = { ok: false, error: { code: `${subtype}_failed`, message: err instanceof Error ? err.message : String(err) } };
23693
+ }
23694
+ output.write(result.ok ? { type: "control_response", requestId, ok: true, ...result.payload !== undefined ? { payload: result.payload } : {} } : { type: "control_response", requestId, ok: false, error: result.error });
23695
+ }).catch(() => {});
23685
23696
  continue;
23686
23697
  }
23687
23698
  const resp = {
@@ -25403,6 +25414,7 @@ ${reason}` : ""}` : `${promptStop.hookName} hook stopped continuation${reason.le
25403
25414
  await fireObservationalHook("SessionEnd", { payload: { reason: "other" } });
25404
25415
  stopReading();
25405
25416
  await pump.catch(() => {});
25417
+ await mcpControlChain;
25406
25418
  for (const serverName of sdkMcpServerNames) {
25407
25419
  unregisterMcpServerTools(serverName);
25408
25420
  }
@@ -26534,7 +26546,7 @@ class TranscriptWriter2 {
26534
26546
  return entries;
26535
26547
  }
26536
26548
  }
26537
- var RUNTIME_ENGINE_VERSION2 = "0.0.31";
26549
+ var RUNTIME_ENGINE_VERSION2 = "0.0.32";
26538
26550
  function withPermissionJournal(writer, location) {
26539
26551
  return {
26540
26552
  transcriptPath: join25(location.winterHome, "projects", location.projectKey, `${location.sessionId}.jsonl`),
@@ -9,14 +9,14 @@ import {
9
9
  resolveEngineSession2,
10
10
  resolveProductionWinterHome2,
11
11
  resolveProductionStoreHome
12
- } from "./index-d4pmmr27.js";
12
+ } from "./index-qdang0ag.js";
13
13
  import {
14
14
  registerDefaultChildEngineFactory,
15
15
  loadResumedChain,
16
16
  buildProductionWiring,
17
17
  withAutoSkillPermissions,
18
18
  restoreChildRoster
19
- } from "./index-0xqzk1hm.js";
19
+ } from "./index-yg5ve6sg.js";
20
20
 
21
21
  // src/embedded.ts
22
22
  import { splitFrames, encodeFrame } from "@yanlinglabs/winter-agent-sdk";
@@ -85,7 +85,7 @@ import {
85
85
  providerCredentialRef2,
86
86
  createModelClassifier2,
87
87
  selectClassifierRoute2
88
- } from "./index-d4pmmr27.js";
88
+ } from "./index-qdang0ag.js";
89
89
  import {
90
90
  createKeychainCredentialStore,
91
91
  createKeychainSecretReader,
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ import {
53
53
  DEFAULT_CLASSIFIER_TIMEOUT_MS2,
54
54
  createModelClassifier2,
55
55
  selectClassifierRoute2
56
- } from "./index-d4pmmr27.js";
56
+ } from "./index-qdang0ag.js";
57
57
  import"./index-9s68t0pd.js";
58
58
  import"./index-z6s3r4xm.js";
59
59
  import"./index-bgeqc7ax.js";
@@ -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.31";
481
+ export declare const RUNTIME_ENGINE_VERSION = "0.0.32";
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-d4pmmr27.js";
6
+ } from "./index-qdang0ag.js";
7
7
  import"./index-9s68t0pd.js";
8
8
  import"./index-z6s3r4xm.js";
9
9
  import"./index-bgeqc7ax.js";
@@ -14,7 +14,7 @@ import {
14
14
  buildProductionWiring,
15
15
  withAutoSkillPermissions,
16
16
  restoreChildRoster
17
- } from "./index-0xqzk1hm.js";
17
+ } from "./index-yg5ve6sg.js";
18
18
  import {
19
19
  Queue
20
20
  } from "./index-97t2rmtf.js";
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const RUNTIME_VERSION = "0.0.31";
1
+ export declare const RUNTIME_VERSION = "0.0.32";
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var RUNTIME_VERSION = "0.0.31";
2
+ var RUNTIME_VERSION = "0.0.32";
3
3
  export {
4
4
  RUNTIME_VERSION
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yanlinglabs/winter-agent-runtime",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
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-provider-runtime": "0.0.31",
77
- "@yanlinglabs/winter-agent-sdk": "0.0.31",
78
- "@yanlinglabs/winter-provider-catalog": "0.0.31"
76
+ "@yanlinglabs/winter-agent-sdk": "0.0.32",
77
+ "@yanlinglabs/winter-provider-runtime": "0.0.32",
78
+ "@yanlinglabs/winter-provider-catalog": "0.0.32"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@modelcontextprotocol/server": "^2.1.0"