@yanlinglabs/winter-agent-runtime 0.0.33 → 0.0.35

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,15 +1,15 @@
1
- import"./index-tk2cfedd.js";
1
+ import"./index-q5jpx2mz.js";
2
2
  import {
3
3
  liveProcessGroups,
4
4
  onProcessGroupChange
5
- } from "./index-6edffgta.js";
6
- import"./index-z6s3r4xm.js";
7
- import"./index-bgeqc7ax.js";
5
+ } from "./index-1hef2gff.js";
6
+ import"./index-mwew595z.js";
7
+ import"./index-2wgfv0pa.js";
8
8
  import"./index-bef62z3r.js";
9
- import"./index-d2yr5j8d.js";
9
+ import"./index-838n35xx.js";
10
10
  import {
11
11
  runEmbeddedSession2
12
- } from "./index-vq1x7nc4.js";
12
+ } from "./index-91rvsndj.js";
13
13
  import {
14
14
  Queue
15
15
  } from "./index-97t2rmtf.js";
package/dist/embedded.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  runEmbeddedSession2
3
- } from "./index-vq1x7nc4.js";
4
- import"./index-d2yr5j8d.js";
5
- import"./index-tk2cfedd.js";
6
- import"./index-bgeqc7ax.js";
3
+ } from "./index-91rvsndj.js";
4
+ import"./index-838n35xx.js";
5
+ import"./index-q5jpx2mz.js";
6
+ import"./index-2wgfv0pa.js";
7
7
  import"./index-bef62z3r.js";
8
- import"./index-6edffgta.js";
9
- import"./index-z6s3r4xm.js";
8
+ import"./index-1hef2gff.js";
9
+ import"./index-mwew595z.js";
10
10
  export {
11
11
  runEmbeddedSession2 as runEmbeddedSession
12
12
  };
@@ -4,7 +4,7 @@ import {
4
4
  MCP_OAUTH_SESSION_CACHE_MS2,
5
5
  readTokenRecordLenient,
6
6
  refreshMcpOAuthToken2
7
- } from "./index-z6s3r4xm.js";
7
+ } from "./index-mwew595z.js";
8
8
 
9
9
  // src/process-groups.ts
10
10
  var live = new Map;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  evaluateMcpAuthUrl2,
3
3
  isLoopbackMcpServer
4
- } from "./index-z6s3r4xm.js";
4
+ } from "./index-mwew595z.js";
5
5
 
6
6
  // src/mcp-auth/config.ts
7
7
  var OAUTH_KEYS = new Set(["clientId", "clientSecretRef", "callbackPort", "authServerMetadataUrl", "scopes"]);
@@ -85,7 +85,7 @@ import {
85
85
  providerCredentialRef2,
86
86
  createModelClassifier2,
87
87
  selectClassifierRoute2
88
- } from "./index-tk2cfedd.js";
88
+ } from "./index-q5jpx2mz.js";
89
89
  import {
90
90
  createKeychainCredentialStore,
91
91
  createKeychainSecretReader,
@@ -95,7 +95,7 @@ import {
95
95
  mcpOAuthTestStoreEnvName,
96
96
  resolveSessionMcpOAuthStore,
97
97
  createHostBrokeredMcpOAuthStore
98
- } from "./index-z6s3r4xm.js";
98
+ } from "./index-mwew595z.js";
99
99
  import {
100
100
  createInMemoryChannel2
101
101
  } from "./index-97t2rmtf.js";
@@ -9,14 +9,14 @@ import {
9
9
  resolveEngineSession2,
10
10
  resolveProductionWinterHome2,
11
11
  resolveProductionStoreHome
12
- } from "./index-tk2cfedd.js";
12
+ } from "./index-q5jpx2mz.js";
13
13
  import {
14
14
  registerDefaultChildEngineFactory,
15
15
  loadResumedChain,
16
16
  buildProductionWiring,
17
17
  withAutoSkillPermissions,
18
18
  restoreChildRoster
19
- } from "./index-d2yr5j8d.js";
19
+ } from "./index-838n35xx.js";
20
20
 
21
21
  // src/embedded.ts
22
22
  import { splitFrames, encodeFrame } from "@yanlinglabs/winter-agent-sdk";
@@ -421,8 +421,39 @@ import { DEFAULT_KEYCHAIN_SERVICE as DEFAULT_KEYCHAIN_SERVICE2, envName, WINTER_
421
421
 
422
422
  // src/provider/keychain-store.ts
423
423
  import { CredentialResolutionError, redactRef } from "@yanlinglabs/winter-provider-runtime";
424
- import { DEFAULT_KEYCHAIN_SERVICE } from "@yanlinglabs/winter-agent-sdk";
424
+ import { DEFAULT_KEYCHAIN_SERVICE, TEST_KEYCHAIN_ENV, TEST_KEYCHAIN_MEMORY } from "@yanlinglabs/winter-agent-sdk";
425
+ var memorySecrets = new Map;
426
+ var memoryKey = (service, name) => `${service}\x00${name}`;
427
+ var MEMORY_SECRETS_BACKEND = {
428
+ async get({ service, name }) {
429
+ return memorySecrets.get(memoryKey(service, name)) ?? null;
430
+ },
431
+ async set({ service, name, value }) {
432
+ memorySecrets.set(memoryKey(service, name), value);
433
+ },
434
+ async delete({ service, name }) {
435
+ return memorySecrets.delete(memoryKey(service, name));
436
+ }
437
+ };
438
+ var memoryBackendAnnounced = false;
439
+ function announceMemoryBackend() {
440
+ if (memoryBackendAnnounced)
441
+ return;
442
+ memoryBackendAnnounced = true;
443
+ try {
444
+ process.stderr.write(`winter: ${TEST_KEYCHAIN_ENV}=${TEST_KEYCHAIN_MEMORY} -- the Keychain is replaced by an in-memory store for this process (test runs only)
445
+ `);
446
+ } catch {}
447
+ }
425
448
  function defaultSecretsBackend() {
449
+ const redirect = process.env[TEST_KEYCHAIN_ENV];
450
+ if (redirect !== undefined && redirect !== "") {
451
+ if (redirect === TEST_KEYCHAIN_MEMORY) {
452
+ announceMemoryBackend();
453
+ return MEMORY_SECRETS_BACKEND;
454
+ }
455
+ throw new CredentialResolutionError("io", `${TEST_KEYCHAIN_ENV} is set to an unrecognized value; the only accepted value is "${TEST_KEYCHAIN_MEMORY}" (test runs only) -- unset it to use the Keychain`);
456
+ }
426
457
  const secrets = globalThis.Bun?.secrets;
427
458
  if (secrets === undefined) {
428
459
  throw new CredentialResolutionError("unsupported", "the Keychain credential store requires Bun.secrets, which is unavailable in this runtime");
@@ -7,7 +7,7 @@ import {
7
7
  connectMcpServer2,
8
8
  insufficientScopeOf,
9
9
  classifyMcpAuthFailure
10
- } from "./index-6edffgta.js";
10
+ } from "./index-1hef2gff.js";
11
11
  import {
12
12
  promptKey,
13
13
  RunJournal,
@@ -20,10 +20,10 @@ import {
20
20
  } from "./index-bef62z3r.js";
21
21
  import {
22
22
  keychainAccountName
23
- } from "./index-z6s3r4xm.js";
23
+ } from "./index-mwew595z.js";
24
24
  import {
25
25
  validateMcpOAuthConfig2
26
- } from "./index-bgeqc7ax.js";
26
+ } from "./index-2wgfv0pa.js";
27
27
  import {
28
28
  Queue
29
29
  } from "./index-97t2rmtf.js";
@@ -26662,7 +26662,7 @@ class TranscriptWriter2 {
26662
26662
  return entries;
26663
26663
  }
26664
26664
  }
26665
- var RUNTIME_ENGINE_VERSION2 = "0.0.33";
26665
+ var RUNTIME_ENGINE_VERSION2 = "0.0.35";
26666
26666
  function withPermissionJournal(writer, location) {
26667
26667
  return {
26668
26668
  transcriptPath: join25(location.winterHome, "projects", location.projectKey, `${location.sessionId}.jsonl`),
package/dist/index.js CHANGED
@@ -55,10 +55,10 @@ import {
55
55
  DEFAULT_CLASSIFIER_TIMEOUT_MS2,
56
56
  createModelClassifier2,
57
57
  selectClassifierRoute2
58
- } from "./index-tk2cfedd.js";
59
- import"./index-6edffgta.js";
60
- import"./index-z6s3r4xm.js";
61
- import"./index-bgeqc7ax.js";
58
+ } from "./index-q5jpx2mz.js";
59
+ import"./index-1hef2gff.js";
60
+ import"./index-mwew595z.js";
61
+ import"./index-2wgfv0pa.js";
62
62
  import"./index-bef62z3r.js";
63
63
  import {
64
64
  createInMemoryChannel2
package/dist/mcp-auth.js CHANGED
@@ -38,10 +38,10 @@ import {
38
38
  MCP_OAUTH_HOST_HELD_REFRESH_TOKEN2,
39
39
  toSessionMcpTokenRecord2,
40
40
  refreshMcpOAuthToken2
41
- } from "./index-z6s3r4xm.js";
41
+ } from "./index-mwew595z.js";
42
42
  import {
43
43
  validateMcpOAuthConfig2
44
- } from "./index-bgeqc7ax.js";
44
+ } from "./index-2wgfv0pa.js";
45
45
  // src/mcp-auth/login.ts
46
46
  import { auth, computeScopeUnion, exchangeAuthorization, OAuthError, OAuthErrorCode } from "@modelcontextprotocol/client";
47
47
  import { randomBytes, timingSafeEqual } from "node:crypto";
@@ -5,8 +5,8 @@ import {
5
5
  McpConnectError2,
6
6
  resolveVersionNegotiation2,
7
7
  connectMcpServer2
8
- } from "./index-6edffgta.js";
9
- import"./index-z6s3r4xm.js";
8
+ } from "./index-1hef2gff.js";
9
+ import"./index-mwew595z.js";
10
10
 
11
11
  // src/mcp-client.ts
12
12
  import { WINTER_BRAND } from "@yanlinglabs/winter-agent-sdk";
@@ -1,6 +1,6 @@
1
1
  import type { CredentialMaterial, CredentialStore } from "@yanlinglabs/winter-provider-runtime";
2
- import { DEFAULT_KEYCHAIN_SERVICE, type CredentialRef } from "@yanlinglabs/winter-agent-sdk";
3
- export { DEFAULT_KEYCHAIN_SERVICE };
2
+ import { DEFAULT_KEYCHAIN_SERVICE, TEST_KEYCHAIN_ENV, TEST_KEYCHAIN_MEMORY, type CredentialRef } from "@yanlinglabs/winter-agent-sdk";
3
+ export { DEFAULT_KEYCHAIN_SERVICE, TEST_KEYCHAIN_ENV, TEST_KEYCHAIN_MEMORY };
4
4
  /**
5
5
  * The shape this store needs from a secrets backend.
6
6
  *
@@ -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.33";
481
+ export declare const RUNTIME_ENGINE_VERSION = "0.0.35";
482
482
  export interface ResolvedEngineSession {
483
483
  config: RuntimeConfig;
484
484
  store: SessionPersistence | undefined;
package/dist/testing.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  runEngine2,
4
4
  echoProvider2,
5
5
  resolveEngineSession2
6
- } from "./index-tk2cfedd.js";
7
- import"./index-6edffgta.js";
8
- import"./index-z6s3r4xm.js";
9
- import"./index-bgeqc7ax.js";
6
+ } from "./index-q5jpx2mz.js";
7
+ import"./index-1hef2gff.js";
8
+ import"./index-mwew595z.js";
9
+ import"./index-2wgfv0pa.js";
10
10
  import"./index-bef62z3r.js";
11
11
  import {
12
12
  registerDefaultChildEngineFactory,
@@ -14,7 +14,7 @@ import {
14
14
  buildProductionWiring,
15
15
  withAutoSkillPermissions,
16
16
  restoreChildRoster
17
- } from "./index-d2yr5j8d.js";
17
+ } from "./index-838n35xx.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.33";
1
+ export declare const RUNTIME_VERSION = "0.0.35";
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var RUNTIME_VERSION = "0.0.33";
2
+ var RUNTIME_VERSION = "0.0.35";
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.33",
3
+ "version": "0.0.35",
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-agent-sdk": "0.0.33",
77
- "@yanlinglabs/winter-provider-runtime": "0.0.33",
78
- "@yanlinglabs/winter-provider-catalog": "0.0.33"
76
+ "@yanlinglabs/winter-agent-sdk": "0.0.35",
77
+ "@yanlinglabs/winter-provider-catalog": "0.0.35",
78
+ "@yanlinglabs/winter-provider-runtime": "0.0.35"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@modelcontextprotocol/server": "^2.1.0"