@yanlinglabs/winter-agent-runtime 0.0.33 → 0.0.34
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 +6 -6
- package/dist/embedded.js +6 -6
- package/dist/{index-vq1x7nc4.js → index-1bcfabm4.js} +2 -2
- package/dist/{index-6edffgta.js → index-1hef2gff.js} +1 -1
- package/dist/{index-bgeqc7ax.js → index-2wgfv0pa.js} +1 -1
- package/dist/{index-d2yr5j8d.js → index-dske1c00.js} +2 -2
- package/dist/{index-z6s3r4xm.js → index-mwew595z.js} +32 -1
- package/dist/{index-tk2cfedd.js → index-rprst8z5.js} +4 -4
- package/dist/index.js +4 -4
- package/dist/mcp-auth.js +2 -2
- package/dist/mcp-client.js +2 -2
- package/dist/provider/keychain-store.d.ts +2 -2
- package/dist/store/dialect.d.ts +1 -1
- package/dist/testing.js +5 -5
- 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,15 +1,15 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-rprst8z5.js";
|
|
2
2
|
import {
|
|
3
3
|
liveProcessGroups,
|
|
4
4
|
onProcessGroupChange
|
|
5
|
-
} from "./index-
|
|
6
|
-
import"./index-
|
|
7
|
-
import"./index-
|
|
5
|
+
} from "./index-1hef2gff.js";
|
|
6
|
+
import"./index-mwew595z.js";
|
|
7
|
+
import"./index-2wgfv0pa.js";
|
|
8
8
|
import"./index-bef62z3r.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-dske1c00.js";
|
|
10
10
|
import {
|
|
11
11
|
runEmbeddedSession2
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-1bcfabm4.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-
|
|
4
|
-
import"./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
3
|
+
} from "./index-1bcfabm4.js";
|
|
4
|
+
import"./index-dske1c00.js";
|
|
5
|
+
import"./index-rprst8z5.js";
|
|
6
|
+
import"./index-2wgfv0pa.js";
|
|
7
7
|
import"./index-bef62z3r.js";
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
import"./index-1hef2gff.js";
|
|
9
|
+
import"./index-mwew595z.js";
|
|
10
10
|
export {
|
|
11
11
|
runEmbeddedSession2 as runEmbeddedSession
|
|
12
12
|
};
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
resolveEngineSession2,
|
|
10
10
|
resolveProductionWinterHome2,
|
|
11
11
|
resolveProductionStoreHome
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-rprst8z5.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-dske1c00.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-
|
|
88
|
+
} from "./index-rprst8z5.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-
|
|
98
|
+
} from "./index-mwew595z.js";
|
|
99
99
|
import {
|
|
100
100
|
createInMemoryChannel2
|
|
101
101
|
} from "./index-97t2rmtf.js";
|
|
@@ -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-
|
|
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-
|
|
23
|
+
} from "./index-mwew595z.js";
|
|
24
24
|
import {
|
|
25
25
|
validateMcpOAuthConfig2
|
|
26
|
-
} from "./index-
|
|
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.
|
|
26665
|
+
var RUNTIME_ENGINE_VERSION2 = "0.0.34";
|
|
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-
|
|
59
|
-
import"./index-
|
|
60
|
-
import"./index-
|
|
61
|
-
import"./index-
|
|
58
|
+
} from "./index-rprst8z5.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-
|
|
41
|
+
} from "./index-mwew595z.js";
|
|
42
42
|
import {
|
|
43
43
|
validateMcpOAuthConfig2
|
|
44
|
-
} from "./index-
|
|
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";
|
package/dist/mcp-client.js
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
McpConnectError2,
|
|
6
6
|
resolveVersionNegotiation2,
|
|
7
7
|
connectMcpServer2
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-
|
|
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
|
*
|
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.34";
|
|
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-
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
6
|
+
} from "./index-rprst8z5.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-
|
|
17
|
+
} from "./index-dske1c00.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.
|
|
1
|
+
export declare const RUNTIME_VERSION = "0.0.34";
|
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.34",
|
|
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.
|
|
77
|
-
"@yanlinglabs/winter-provider-runtime": "0.0.
|
|
78
|
-
"@yanlinglabs/winter-provider-catalog": "0.0.
|
|
76
|
+
"@yanlinglabs/winter-agent-sdk": "0.0.34",
|
|
77
|
+
"@yanlinglabs/winter-provider-runtime": "0.0.34",
|
|
78
|
+
"@yanlinglabs/winter-provider-catalog": "0.0.34"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@modelcontextprotocol/server": "^2.1.0"
|