@xiuper/mpp-core 0.0.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/Kotlin-DateTime-library-kotlinx-datetime.js +7836 -0
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -0
- package/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js +1241 -0
- package/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js.map +1 -0
- package/Xiuper-mpp-codegraph.js +1471 -0
- package/Xiuper-mpp-codegraph.js.map +1 -0
- package/annotations.js +15 -0
- package/annotations.js.map +1 -0
- package/autodev-mpp-core.d.ts +1312 -0
- package/autodev-mpp-core.js +86483 -0
- package/autodev-mpp-core.js.map +1 -0
- package/kaml.js +3387 -0
- package/kaml.js.map +1 -0
- package/koog-agents-agents-core.js +22927 -0
- package/koog-agents-agents-core.js.map +1 -0
- package/koog-agents-agents-ext.js +15 -0
- package/koog-agents-agents-ext.js.map +1 -0
- package/koog-agents-agents-features-agents-features-event-handler.js +15 -0
- package/koog-agents-agents-features-agents-features-event-handler.js.map +1 -0
- package/koog-agents-agents-features-agents-features-memory.js +15 -0
- package/koog-agents-agents-features-agents-features-memory.js.map +1 -0
- package/koog-agents-agents-features-agents-features-opentelemetry.js +15 -0
- package/koog-agents-agents-features-agents-features-opentelemetry.js.map +1 -0
- package/koog-agents-agents-features-agents-features-snapshot.js +15 -0
- package/koog-agents-agents-features-agents-features-snapshot.js.map +1 -0
- package/koog-agents-agents-features-agents-features-tokenizer.js +15 -0
- package/koog-agents-agents-features-agents-features-tokenizer.js.map +1 -0
- package/koog-agents-agents-features-agents-features-trace.js +15 -0
- package/koog-agents-agents-features-agents-features-trace.js.map +1 -0
- package/koog-agents-agents-mcp.js +15 -0
- package/koog-agents-agents-mcp.js.map +1 -0
- package/koog-agents-agents-tools.js +322 -0
- package/koog-agents-agents-tools.js.map +1 -0
- package/koog-agents-agents-utils.js +232 -0
- package/koog-agents-agents-utils.js.map +1 -0
- package/koog-embeddings-embeddings-base.js +15 -0
- package/koog-embeddings-embeddings-base.js.map +1 -0
- package/koog-embeddings-embeddings-llm.js +15 -0
- package/koog-embeddings-embeddings-llm.js.map +1 -0
- package/koog-http-client-http-client-core.js +57 -0
- package/koog-http-client-http-client-core.js.map +1 -0
- package/koog-http-client-http-client-ktor.js +703 -0
- package/koog-http-client-http-client-ktor.js.map +1 -0
- package/koog-koog-agents.js +15 -0
- package/koog-koog-agents.js.map +1 -0
- package/koog-prompt-prompt-cache-prompt-cache-files.js +15 -0
- package/koog-prompt-prompt-cache-prompt-cache-files.js.map +1 -0
- package/koog-prompt-prompt-cache-prompt-cache-model.js +15 -0
- package/koog-prompt-prompt-cache-prompt-cache-model.js.map +1 -0
- package/koog-prompt-prompt-cache-prompt-cache-redis.js +15 -0
- package/koog-prompt-prompt-cache-prompt-cache-redis.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-cached.js +15 -0
- package/koog-prompt-prompt-executor-prompt-executor-cached.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-anthropic-client.js +4991 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-anthropic-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-bedrock-client.js +15 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-bedrock-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-dashscope-client.js +15 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-dashscope-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client.js +1249 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client.js +4675 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-mistralai-client.js +15 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-mistralai-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-ollama-client.js +2343 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-ollama-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base.js +6613 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client.js +19901 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client.js +2313 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients.js +222 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-llms-all.js +70 -0
- package/koog-prompt-prompt-executor-prompt-executor-llms-all.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-llms.js +134 -0
- package/koog-prompt-prompt-executor-prompt-executor-llms.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-model.js +42 -0
- package/koog-prompt-prompt-executor-prompt-executor-model.js.map +1 -0
- package/koog-prompt-prompt-llm.js +1710 -0
- package/koog-prompt-prompt-llm.js.map +1 -0
- package/koog-prompt-prompt-markdown.js +122 -0
- package/koog-prompt-prompt-markdown.js.map +1 -0
- package/koog-prompt-prompt-model.js +5848 -0
- package/koog-prompt-prompt-model.js.map +1 -0
- package/koog-prompt-prompt-structure.js +1513 -0
- package/koog-prompt-prompt-structure.js.map +1 -0
- package/koog-prompt-prompt-tokenizer.js +15 -0
- package/koog-prompt-prompt-tokenizer.js.map +1 -0
- package/koog-prompt-prompt-xml.js +15 -0
- package/koog-prompt-prompt-xml.js.map +1 -0
- package/koog-rag-rag-base.js +15 -0
- package/koog-rag-rag-base.js.map +1 -0
- package/koog-rag-vector-storage.js +15 -0
- package/koog-rag-vector-storage.js.map +1 -0
- package/koog-utils.js +63 -0
- package/koog-utils.js.map +1 -0
- package/kotlin-kotlin-stdlib.js +18965 -0
- package/kotlin-kotlin-stdlib.js.map +1 -0
- package/kotlin-logging.js +509 -0
- package/kotlin-logging.js.map +1 -0
- package/kotlin-sdk-kotlin-sdk-client.js +1340 -0
- package/kotlin-sdk-kotlin-sdk-client.js.map +1 -0
- package/kotlin-sdk-kotlin-sdk-core.js +15195 -0
- package/kotlin-sdk-kotlin-sdk-core.js.map +1 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
- package/kotlinx-atomicfu.js +259 -0
- package/kotlinx-atomicfu.js.map +1 -0
- package/kotlinx-coroutines-core.js +13742 -0
- package/kotlinx-coroutines-core.js.map +1 -0
- package/kotlinx-io-kotlinx-io-bytestring.js +214 -0
- package/kotlinx-io-kotlinx-io-bytestring.js.map +1 -0
- package/kotlinx-io-kotlinx-io-core.js +2892 -0
- package/kotlinx-io-kotlinx-io-core.js.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-core.js +6563 -0
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-json-io.js +15 -0
- package/kotlinx-serialization-kotlinx-serialization-json-io.js.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-json.js +5927 -0
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -0
- package/ktor-ktor-client-content-negotiation.js +775 -0
- package/ktor-ktor-client-content-negotiation.js.map +1 -0
- package/ktor-ktor-client-core.js +11110 -0
- package/ktor-ktor-client-core.js.map +1 -0
- package/ktor-ktor-client-logging.js +15 -0
- package/ktor-ktor-client-logging.js.map +1 -0
- package/ktor-ktor-events.js +126 -0
- package/ktor-ktor-events.js.map +1 -0
- package/ktor-ktor-http-cio.js +4257 -0
- package/ktor-ktor-http-cio.js.map +1 -0
- package/ktor-ktor-http.js +3671 -0
- package/ktor-ktor-http.js.map +1 -0
- package/ktor-ktor-io.js +4114 -0
- package/ktor-ktor-io.js.map +1 -0
- package/ktor-ktor-network.js +1399 -0
- package/ktor-ktor-network.js.map +1 -0
- package/ktor-ktor-serialization-kotlinx-json.js +67 -0
- package/ktor-ktor-serialization-kotlinx-json.js.map +1 -0
- package/ktor-ktor-serialization-kotlinx.js +881 -0
- package/ktor-ktor-serialization-kotlinx.js.map +1 -0
- package/ktor-ktor-serialization.js +388 -0
- package/ktor-ktor-serialization.js.map +1 -0
- package/ktor-ktor-server-cio.js +3735 -0
- package/ktor-ktor-server-cio.js.map +1 -0
- package/ktor-ktor-server-core.js +8696 -0
- package/ktor-ktor-server-core.js.map +1 -0
- package/ktor-ktor-server-sse.js +668 -0
- package/ktor-ktor-server-sse.js.map +1 -0
- package/ktor-ktor-server-websockets.js +15 -0
- package/ktor-ktor-server-websockets.js.map +1 -0
- package/ktor-ktor-sse.js +161 -0
- package/ktor-ktor-sse.js.map +1 -0
- package/ktor-ktor-utils.js +3589 -0
- package/ktor-ktor-utils.js.map +1 -0
- package/ktor-ktor-websocket-serialization.js +15 -0
- package/ktor-ktor-websocket-serialization.js.map +1 -0
- package/ktor-ktor-websockets.js +450 -0
- package/ktor-ktor-websockets.js.map +1 -0
- package/markdown.js +5174 -0
- package/markdown.js.map +1 -0
- package/okio-parent-okio.js +2628 -0
- package/okio-parent-okio.js.map +1 -0
- package/package.json +18 -0
- package/snakeyaml-engine-kmp.js +7079 -0
- package/snakeyaml-engine-kmp.js.map +1 -0
- package/urlencoder-urlencoder-lib.js +322 -0
- package/urlencoder-urlencoder-lib.js.map +1 -0
- package/xiuper-mpp-core.d.ts +1312 -0
- package/xiuper-mpp-core.js +86483 -0
- package/xiuper-mpp-core.js.map +1 -0
|
@@ -0,0 +1,1340 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof define === 'function' && define.amd)
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js', './kotlin-sdk-kotlin-sdk-core.js', './Kotlin-Immutable-Collections-kotlinx-collections-immutable.js', './kotlinx-atomicfu.js', './kotlinx-serialization-kotlinx-serialization-json.js', './kotlin-logging.js', './ktor-ktor-http.js', './kotlinx-coroutines-core.js', './ktor-ktor-sse.js', './ktor-ktor-client-core.js', './kotlinx-serialization-kotlinx-serialization-core.js', './ktor-ktor-utils.js'], factory);
|
|
4
|
+
else if (typeof exports === 'object')
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlin-sdk-kotlin-sdk-core.js'), require('./Kotlin-Immutable-Collections-kotlinx-collections-immutable.js'), require('./kotlinx-atomicfu.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./kotlin-logging.js'), require('./ktor-ktor-http.js'), require('./kotlinx-coroutines-core.js'), require('./ktor-ktor-sse.js'), require('./ktor-ktor-client-core.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./ktor-ktor-utils.js'));
|
|
6
|
+
else {
|
|
7
|
+
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'kotlin-sdk-kotlin-sdk-client'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'kotlin-sdk-kotlin-sdk-client'.");
|
|
9
|
+
}
|
|
10
|
+
if (typeof globalThis['kotlin-sdk-kotlin-sdk-core'] === 'undefined') {
|
|
11
|
+
throw new Error("Error loading module 'kotlin-sdk-kotlin-sdk-client'. Its dependency 'kotlin-sdk-kotlin-sdk-core' was not found. Please, check whether 'kotlin-sdk-kotlin-sdk-core' is loaded prior to 'kotlin-sdk-kotlin-sdk-client'.");
|
|
12
|
+
}
|
|
13
|
+
if (typeof globalThis['Kotlin-Immutable-Collections-kotlinx-collections-immutable'] === 'undefined') {
|
|
14
|
+
throw new Error("Error loading module 'kotlin-sdk-kotlin-sdk-client'. Its dependency 'Kotlin-Immutable-Collections-kotlinx-collections-immutable' was not found. Please, check whether 'Kotlin-Immutable-Collections-kotlinx-collections-immutable' is loaded prior to 'kotlin-sdk-kotlin-sdk-client'.");
|
|
15
|
+
}
|
|
16
|
+
if (typeof globalThis['kotlinx-atomicfu'] === 'undefined') {
|
|
17
|
+
throw new Error("Error loading module 'kotlin-sdk-kotlin-sdk-client'. Its dependency 'kotlinx-atomicfu' was not found. Please, check whether 'kotlinx-atomicfu' is loaded prior to 'kotlin-sdk-kotlin-sdk-client'.");
|
|
18
|
+
}
|
|
19
|
+
if (typeof globalThis['kotlinx-serialization-kotlinx-serialization-json'] === 'undefined') {
|
|
20
|
+
throw new Error("Error loading module 'kotlin-sdk-kotlin-sdk-client'. Its dependency 'kotlinx-serialization-kotlinx-serialization-json' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-json' is loaded prior to 'kotlin-sdk-kotlin-sdk-client'.");
|
|
21
|
+
}
|
|
22
|
+
if (typeof globalThis['kotlin-logging'] === 'undefined') {
|
|
23
|
+
throw new Error("Error loading module 'kotlin-sdk-kotlin-sdk-client'. Its dependency 'kotlin-logging' was not found. Please, check whether 'kotlin-logging' is loaded prior to 'kotlin-sdk-kotlin-sdk-client'.");
|
|
24
|
+
}
|
|
25
|
+
if (typeof globalThis['ktor-ktor-http'] === 'undefined') {
|
|
26
|
+
throw new Error("Error loading module 'kotlin-sdk-kotlin-sdk-client'. Its dependency 'ktor-ktor-http' was not found. Please, check whether 'ktor-ktor-http' is loaded prior to 'kotlin-sdk-kotlin-sdk-client'.");
|
|
27
|
+
}
|
|
28
|
+
if (typeof globalThis['kotlinx-coroutines-core'] === 'undefined') {
|
|
29
|
+
throw new Error("Error loading module 'kotlin-sdk-kotlin-sdk-client'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'kotlin-sdk-kotlin-sdk-client'.");
|
|
30
|
+
}
|
|
31
|
+
if (typeof globalThis['ktor-ktor-sse'] === 'undefined') {
|
|
32
|
+
throw new Error("Error loading module 'kotlin-sdk-kotlin-sdk-client'. Its dependency 'ktor-ktor-sse' was not found. Please, check whether 'ktor-ktor-sse' is loaded prior to 'kotlin-sdk-kotlin-sdk-client'.");
|
|
33
|
+
}
|
|
34
|
+
if (typeof globalThis['ktor-ktor-client-core'] === 'undefined') {
|
|
35
|
+
throw new Error("Error loading module 'kotlin-sdk-kotlin-sdk-client'. Its dependency 'ktor-ktor-client-core' was not found. Please, check whether 'ktor-ktor-client-core' is loaded prior to 'kotlin-sdk-kotlin-sdk-client'.");
|
|
36
|
+
}
|
|
37
|
+
if (typeof globalThis['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {
|
|
38
|
+
throw new Error("Error loading module 'kotlin-sdk-kotlin-sdk-client'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core' is loaded prior to 'kotlin-sdk-kotlin-sdk-client'.");
|
|
39
|
+
}
|
|
40
|
+
if (typeof globalThis['ktor-ktor-utils'] === 'undefined') {
|
|
41
|
+
throw new Error("Error loading module 'kotlin-sdk-kotlin-sdk-client'. Its dependency 'ktor-ktor-utils' was not found. Please, check whether 'ktor-ktor-utils' is loaded prior to 'kotlin-sdk-kotlin-sdk-client'.");
|
|
42
|
+
}
|
|
43
|
+
globalThis['kotlin-sdk-kotlin-sdk-client'] = factory(typeof globalThis['kotlin-sdk-kotlin-sdk-client'] === 'undefined' ? {} : globalThis['kotlin-sdk-kotlin-sdk-client'], globalThis['kotlin-kotlin-stdlib'], globalThis['kotlin-sdk-kotlin-sdk-core'], globalThis['Kotlin-Immutable-Collections-kotlinx-collections-immutable'], globalThis['kotlinx-atomicfu'], globalThis['kotlinx-serialization-kotlinx-serialization-json'], globalThis['kotlin-logging'], globalThis['ktor-ktor-http'], globalThis['kotlinx-coroutines-core'], globalThis['ktor-ktor-sse'], globalThis['ktor-ktor-client-core'], globalThis['kotlinx-serialization-kotlinx-serialization-core'], globalThis['ktor-ktor-utils']);
|
|
44
|
+
}
|
|
45
|
+
}(function (_, kotlin_kotlin, kotlin_io_modelcontextprotocol_kotlin_sdk_core, kotlin_org_jetbrains_kotlinx_kotlinx_collections_immutable, kotlin_org_jetbrains_kotlinx_atomicfu, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_io_github_oshai_kotlin_logging, kotlin_io_ktor_ktor_http, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_io_ktor_ktor_sse, kotlin_io_ktor_ktor_client_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_io_ktor_ktor_utils) {
|
|
46
|
+
'use strict';
|
|
47
|
+
//region block: imports
|
|
48
|
+
var toList = kotlin_kotlin.$_$.gb;
|
|
49
|
+
var ListRootsResult = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.i1;
|
|
50
|
+
var CoroutineImpl = kotlin_kotlin.$_$.tc;
|
|
51
|
+
var Unit_instance = kotlin_kotlin.$_$.h6;
|
|
52
|
+
var protoOf = kotlin_kotlin.$_$.we;
|
|
53
|
+
var THROW_CCE = kotlin_kotlin.$_$.zk;
|
|
54
|
+
var ListRootsRequest = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.h1;
|
|
55
|
+
var RequestHandlerExtra = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.a1;
|
|
56
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.dc;
|
|
57
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.zd;
|
|
58
|
+
var VOID = kotlin_kotlin.$_$.h;
|
|
59
|
+
var Protocol = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.z;
|
|
60
|
+
var InitializeRequest = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.e1;
|
|
61
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.j2;
|
|
62
|
+
var get_SUPPORTED_PROTOCOL_VERSIONS = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.k1;
|
|
63
|
+
var contains = kotlin_kotlin.$_$.r7;
|
|
64
|
+
var InitializedNotification = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.f1;
|
|
65
|
+
var CancellationException = kotlin_kotlin.$_$.cc;
|
|
66
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.wd;
|
|
67
|
+
var persistentMapOf = kotlin_org_jetbrains_kotlinx_kotlinx_collections_immutable.$_$.a;
|
|
68
|
+
var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
|
|
69
|
+
var Defined_RootsList_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.q;
|
|
70
|
+
var getKClass = kotlin_kotlin.$_$.f;
|
|
71
|
+
var arrayOf = kotlin_kotlin.$_$.nl;
|
|
72
|
+
var createKType = kotlin_kotlin.$_$.c;
|
|
73
|
+
var Defined_Initialize_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.c;
|
|
74
|
+
var equals = kotlin_kotlin.$_$.md;
|
|
75
|
+
var Defined_Ping_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.i;
|
|
76
|
+
var toString = kotlin_kotlin.$_$.af;
|
|
77
|
+
var Defined_ToolsCall_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.s;
|
|
78
|
+
var Defined_ToolsList_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.t;
|
|
79
|
+
var Defined_ResourcesSubscribe_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.n;
|
|
80
|
+
var Defined_ResourcesList_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.l;
|
|
81
|
+
var Defined_ResourcesTemplatesList_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.o;
|
|
82
|
+
var Defined_ResourcesRead_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.m;
|
|
83
|
+
var Defined_ResourcesUnsubscribe_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.p;
|
|
84
|
+
var Defined_PromptsGet_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.j;
|
|
85
|
+
var Defined_PromptsList_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.k;
|
|
86
|
+
var Defined_CompletionComplete_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.a;
|
|
87
|
+
var Defined_LoggingSetLevel_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.d;
|
|
88
|
+
var Defined_NotificationsInitialized_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.f;
|
|
89
|
+
var Defined_NotificationsCancelled_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.e;
|
|
90
|
+
var Defined_NotificationsProgress_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.g;
|
|
91
|
+
var Defined_NotificationsRootsListChanged_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.h;
|
|
92
|
+
var Defined_ElicitationCreate_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.b;
|
|
93
|
+
var Defined_SamplingCreateMessage_getInstance = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.r;
|
|
94
|
+
var mapCapacity = kotlin_kotlin.$_$.v9;
|
|
95
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.b1;
|
|
96
|
+
var JsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.s;
|
|
97
|
+
var JsonNull_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.g;
|
|
98
|
+
var JsonElement = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.o;
|
|
99
|
+
var JsonPrimitive_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.u;
|
|
100
|
+
var JsonPrimitive_1 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.t;
|
|
101
|
+
var isNumber = kotlin_kotlin.$_$.le;
|
|
102
|
+
var JsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.r;
|
|
103
|
+
var CallToolRequest = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.b1;
|
|
104
|
+
var ListToolsRequest = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.j1;
|
|
105
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ud;
|
|
106
|
+
var ProtocolOptions = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.y;
|
|
107
|
+
var ClientCapabilities = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.c1;
|
|
108
|
+
var KotlinLogging_instance = kotlin_io_github_oshai_kotlin_logging.$_$.b;
|
|
109
|
+
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.fm;
|
|
110
|
+
var KProperty1 = kotlin_kotlin.$_$.tf;
|
|
111
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.rd;
|
|
112
|
+
var substring = kotlin_kotlin.$_$.vi;
|
|
113
|
+
var startsWith = kotlin_kotlin.$_$.ji;
|
|
114
|
+
var Url = kotlin_io_ktor_ktor_http.$_$.o1;
|
|
115
|
+
var FunctionAdapter = kotlin_kotlin.$_$.zc;
|
|
116
|
+
var isInterface = kotlin_kotlin.$_$.je;
|
|
117
|
+
var FlowCollector = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e1;
|
|
118
|
+
var hashCode = kotlin_kotlin.$_$.td;
|
|
119
|
+
var charSequenceLength = kotlin_kotlin.$_$.id;
|
|
120
|
+
var get_protocolWithAuthority = kotlin_io_ktor_ktor_http.$_$.l2;
|
|
121
|
+
var lastIndexOf = kotlin_kotlin.$_$.qh;
|
|
122
|
+
var take = kotlin_kotlin.$_$.yi;
|
|
123
|
+
var removeSuffix = kotlin_kotlin.$_$.xh;
|
|
124
|
+
var endsWith = kotlin_kotlin.$_$.ug;
|
|
125
|
+
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c2;
|
|
126
|
+
var ServerSentEvent = kotlin_io_ktor_ktor_sse.$_$.a;
|
|
127
|
+
var ensureActive = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n2;
|
|
128
|
+
var sseSession = kotlin_io_ktor_ktor_client_core.$_$.c;
|
|
129
|
+
var sseSession_0 = kotlin_io_ktor_ktor_client_core.$_$.b;
|
|
130
|
+
var SupervisorJob = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f2;
|
|
131
|
+
var CoroutineScope_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b2;
|
|
132
|
+
var CoroutineName = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a2;
|
|
133
|
+
var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q2;
|
|
134
|
+
var Exception = kotlin_kotlin.$_$.ok;
|
|
135
|
+
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.r;
|
|
136
|
+
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.j;
|
|
137
|
+
var url = kotlin_io_ktor_ktor_client_core.$_$.x;
|
|
138
|
+
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.i;
|
|
139
|
+
var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.d;
|
|
140
|
+
var append = kotlin_io_ktor_ktor_http.$_$.p1;
|
|
141
|
+
var get_McpJson = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.x;
|
|
142
|
+
var JSONRPCMessage = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.g1;
|
|
143
|
+
var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j4;
|
|
144
|
+
var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x3;
|
|
145
|
+
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.t5;
|
|
146
|
+
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.c1;
|
|
147
|
+
var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.x;
|
|
148
|
+
var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.b;
|
|
149
|
+
var HttpStatement = kotlin_io_ktor_ktor_client_core.$_$.z;
|
|
150
|
+
var bodyAsText = kotlin_io_ktor_ktor_client_core.$_$.f;
|
|
151
|
+
var isSuccess = kotlin_io_ktor_ktor_http.$_$.d2;
|
|
152
|
+
var SerializationException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a4;
|
|
153
|
+
var cancelAndJoin = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
|
|
154
|
+
var cancel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j2;
|
|
155
|
+
var AbstractTransport = kotlin_io_modelcontextprotocol_kotlin_sdk_core.$_$.w;
|
|
156
|
+
var AtomicBoolean = kotlin_kotlin.$_$.yb;
|
|
157
|
+
var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.x1;
|
|
158
|
+
var lazy = kotlin_kotlin.$_$.yl;
|
|
159
|
+
//endregion
|
|
160
|
+
//region block: pre-declaration
|
|
161
|
+
initMetadataForLambda(Client$slambda, CoroutineImpl, VOID, [2]);
|
|
162
|
+
initMetadataForCoroutine($connectCOROUTINE$, CoroutineImpl);
|
|
163
|
+
initMetadataForCoroutine($callToolCOROUTINE$, CoroutineImpl);
|
|
164
|
+
initMetadataForClass(Client, 'Client', VOID, Protocol, VOID, [1, 2, 4, 3, 0]);
|
|
165
|
+
initMetadataForClass(ClientOptions, 'ClientOptions', ClientOptions, ProtocolOptions);
|
|
166
|
+
initMetadataForClass(sam$kotlinx_coroutines_flow_FlowCollector$0, 'sam$kotlinx_coroutines_flow_FlowCollector$0', VOID, VOID, [FlowCollector, FunctionAdapter], [1]);
|
|
167
|
+
initMetadataForLambda(SseClientTransport$start$slambda, CoroutineImpl, VOID, [1]);
|
|
168
|
+
initMetadataForLambda(SseClientTransport$collectMessages$slambda, CoroutineImpl, VOID, [1]);
|
|
169
|
+
initMetadataForCoroutine($startCOROUTINE$, CoroutineImpl);
|
|
170
|
+
initMetadataForCoroutine($sendCOROUTINE$, CoroutineImpl);
|
|
171
|
+
initMetadataForCoroutine($collectMessagesCOROUTINE$, CoroutineImpl);
|
|
172
|
+
initMetadataForCoroutine($handleMessageCOROUTINE$, CoroutineImpl);
|
|
173
|
+
initMetadataForCoroutine($closeResourcesCOROUTINE$, CoroutineImpl);
|
|
174
|
+
initMetadataForClass(SseClientTransport, 'SseClientTransport', VOID, AbstractTransport, VOID, [0, 1]);
|
|
175
|
+
//endregion
|
|
176
|
+
function get_logger() {
|
|
177
|
+
_init_properties_Client_kt__a2ryqz();
|
|
178
|
+
return logger;
|
|
179
|
+
}
|
|
180
|
+
var logger;
|
|
181
|
+
function handleListRoots($this, $completion) {
|
|
182
|
+
var rootList = toList($this.agv_1.kotlinx$atomicfu$value.l2());
|
|
183
|
+
return new ListRootsResult(rootList);
|
|
184
|
+
}
|
|
185
|
+
function Client$lambda(this$0) {
|
|
186
|
+
return function () {
|
|
187
|
+
return 'Initializing MCP client with capabilities: ' + this$0.zgu_1.toString();
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
function Client$slambda(this$0, resultContinuation) {
|
|
191
|
+
this.jgv_1 = this$0;
|
|
192
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
193
|
+
}
|
|
194
|
+
protoOf(Client$slambda).mgv = function (_unused_var__etf5q3, _unused_var__etf5q3_0, $completion) {
|
|
195
|
+
var tmp = this.ngv(_unused_var__etf5q3, _unused_var__etf5q3_0, $completion);
|
|
196
|
+
tmp.z9_1 = Unit_instance;
|
|
197
|
+
tmp.aa_1 = null;
|
|
198
|
+
return tmp.fa();
|
|
199
|
+
};
|
|
200
|
+
protoOf(Client$slambda).sa = function (p1, p2, $completion) {
|
|
201
|
+
var tmp = p1 instanceof ListRootsRequest ? p1 : THROW_CCE();
|
|
202
|
+
return this.mgv(tmp, p2 instanceof RequestHandlerExtra ? p2 : THROW_CCE(), $completion);
|
|
203
|
+
};
|
|
204
|
+
protoOf(Client$slambda).fa = function () {
|
|
205
|
+
var suspendResult = this.z9_1;
|
|
206
|
+
$sm: do
|
|
207
|
+
try {
|
|
208
|
+
var tmp = this.x9_1;
|
|
209
|
+
switch (tmp) {
|
|
210
|
+
case 0:
|
|
211
|
+
this.y9_1 = 2;
|
|
212
|
+
this.x9_1 = 1;
|
|
213
|
+
suspendResult = handleListRoots(this.jgv_1, this);
|
|
214
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
215
|
+
return suspendResult;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
continue $sm;
|
|
219
|
+
case 1:
|
|
220
|
+
return suspendResult;
|
|
221
|
+
case 2:
|
|
222
|
+
throw this.aa_1;
|
|
223
|
+
}
|
|
224
|
+
} catch ($p) {
|
|
225
|
+
var e = $p;
|
|
226
|
+
if (this.y9_1 === 2) {
|
|
227
|
+
throw e;
|
|
228
|
+
} else {
|
|
229
|
+
this.x9_1 = this.y9_1;
|
|
230
|
+
this.aa_1 = e;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
while (true);
|
|
234
|
+
};
|
|
235
|
+
protoOf(Client$slambda).ngv = function (_unused_var__etf5q3, _unused_var__etf5q3_0, completion) {
|
|
236
|
+
var i = new Client$slambda(this.jgv_1, completion);
|
|
237
|
+
i.kgv_1 = _unused_var__etf5q3;
|
|
238
|
+
i.lgv_1 = _unused_var__etf5q3_0;
|
|
239
|
+
return i;
|
|
240
|
+
};
|
|
241
|
+
function Client$slambda_0(this$0, resultContinuation) {
|
|
242
|
+
var i = new Client$slambda(this$0, resultContinuation);
|
|
243
|
+
var l = function (_unused_var__etf5q3, _unused_var__etf5q3_0, $completion) {
|
|
244
|
+
return i.mgv(_unused_var__etf5q3, _unused_var__etf5q3_0, $completion);
|
|
245
|
+
};
|
|
246
|
+
l.$arity = 2;
|
|
247
|
+
return l;
|
|
248
|
+
}
|
|
249
|
+
function $connectCOROUTINE$(_this__u8e3s4, transport, resultContinuation) {
|
|
250
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
251
|
+
this.wgv_1 = _this__u8e3s4;
|
|
252
|
+
this.xgv_1 = transport;
|
|
253
|
+
}
|
|
254
|
+
protoOf($connectCOROUTINE$).fa = function () {
|
|
255
|
+
var suspendResult = this.z9_1;
|
|
256
|
+
$sm: do
|
|
257
|
+
try {
|
|
258
|
+
var tmp = this.x9_1;
|
|
259
|
+
switch (tmp) {
|
|
260
|
+
case 0:
|
|
261
|
+
this.y9_1 = 7;
|
|
262
|
+
this.x9_1 = 1;
|
|
263
|
+
suspendResult = protoOf(Protocol).sg9.call(this.wgv_1, this.xgv_1, this);
|
|
264
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
265
|
+
return suspendResult;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
continue $sm;
|
|
269
|
+
case 1:
|
|
270
|
+
this.y9_1 = 5;
|
|
271
|
+
this.ygv_1 = new InitializeRequest('2025-03-26', this.wgv_1.zgu_1, this.wgv_1.wgu_1);
|
|
272
|
+
this.x9_1 = 2;
|
|
273
|
+
suspendResult = this.wgv_1.zg9(this.ygv_1, VOID, this);
|
|
274
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
275
|
+
return suspendResult;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
continue $sm;
|
|
279
|
+
case 2:
|
|
280
|
+
this.zgv_1 = suspendResult;
|
|
281
|
+
if (!contains(get_SUPPORTED_PROTOCOL_VERSIONS(), this.zgv_1.ggm_1)) {
|
|
282
|
+
throw IllegalStateException_init_$Create$("Server's protocol version is not supported: " + this.zgv_1.ggm_1);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
this.wgv_1.xgu_1 = this.zgv_1.hgm_1;
|
|
286
|
+
this.wgv_1.ygu_1 = this.zgv_1.igm_1;
|
|
287
|
+
this.x9_1 = 3;
|
|
288
|
+
suspendResult = this.wgv_1.aga(new InitializedNotification(), this);
|
|
289
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
290
|
+
return suspendResult;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
continue $sm;
|
|
294
|
+
case 3:
|
|
295
|
+
this.y9_1 = 7;
|
|
296
|
+
this.x9_1 = 4;
|
|
297
|
+
continue $sm;
|
|
298
|
+
case 4:
|
|
299
|
+
this.y9_1 = 7;
|
|
300
|
+
return Unit_instance;
|
|
301
|
+
case 5:
|
|
302
|
+
this.y9_1 = 7;
|
|
303
|
+
var tmp_0 = this.aa_1;
|
|
304
|
+
if (tmp_0 instanceof Error) {
|
|
305
|
+
this.agw_1 = this.aa_1;
|
|
306
|
+
this.x9_1 = 6;
|
|
307
|
+
suspendResult = this.wgv_1.zc9(this);
|
|
308
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
309
|
+
return suspendResult;
|
|
310
|
+
}
|
|
311
|
+
continue $sm;
|
|
312
|
+
} else {
|
|
313
|
+
throw this.aa_1;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
case 6:
|
|
317
|
+
var tmp_1 = this.agw_1;
|
|
318
|
+
if (!(tmp_1 instanceof CancellationException)) {
|
|
319
|
+
throw IllegalStateException_init_$Create$('Error connecting to transport: ' + this.agw_1.message);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
throw this.agw_1;
|
|
323
|
+
case 7:
|
|
324
|
+
throw this.aa_1;
|
|
325
|
+
}
|
|
326
|
+
} catch ($p) {
|
|
327
|
+
var e = $p;
|
|
328
|
+
if (this.y9_1 === 7) {
|
|
329
|
+
throw e;
|
|
330
|
+
} else {
|
|
331
|
+
this.x9_1 = this.y9_1;
|
|
332
|
+
this.aa_1 = e;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
while (true);
|
|
336
|
+
};
|
|
337
|
+
function $callToolCOROUTINE$(_this__u8e3s4, request, compatibility, options, resultContinuation) {
|
|
338
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
339
|
+
this.jgw_1 = _this__u8e3s4;
|
|
340
|
+
this.kgw_1 = request;
|
|
341
|
+
this.lgw_1 = compatibility;
|
|
342
|
+
this.mgw_1 = options;
|
|
343
|
+
}
|
|
344
|
+
protoOf($callToolCOROUTINE$).fa = function () {
|
|
345
|
+
var suspendResult = this.z9_1;
|
|
346
|
+
$sm: do
|
|
347
|
+
try {
|
|
348
|
+
var tmp = this.x9_1;
|
|
349
|
+
switch (tmp) {
|
|
350
|
+
case 0:
|
|
351
|
+
this.y9_1 = 4;
|
|
352
|
+
if (this.lgw_1) {
|
|
353
|
+
this.x9_1 = 2;
|
|
354
|
+
suspendResult = this.jgw_1.yg9(this.kgw_1, this.mgw_1, this);
|
|
355
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
356
|
+
return suspendResult;
|
|
357
|
+
}
|
|
358
|
+
continue $sm;
|
|
359
|
+
} else {
|
|
360
|
+
this.x9_1 = 1;
|
|
361
|
+
suspendResult = this.jgw_1.yg9(this.kgw_1, this.mgw_1, this);
|
|
362
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
363
|
+
return suspendResult;
|
|
364
|
+
}
|
|
365
|
+
continue $sm;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
case 1:
|
|
369
|
+
this.ngw_1 = suspendResult;
|
|
370
|
+
this.x9_1 = 3;
|
|
371
|
+
continue $sm;
|
|
372
|
+
case 2:
|
|
373
|
+
this.ngw_1 = suspendResult;
|
|
374
|
+
this.x9_1 = 3;
|
|
375
|
+
continue $sm;
|
|
376
|
+
case 3:
|
|
377
|
+
return this.ngw_1;
|
|
378
|
+
case 4:
|
|
379
|
+
throw this.aa_1;
|
|
380
|
+
}
|
|
381
|
+
} catch ($p) {
|
|
382
|
+
var e = $p;
|
|
383
|
+
if (this.y9_1 === 4) {
|
|
384
|
+
throw e;
|
|
385
|
+
} else {
|
|
386
|
+
this.x9_1 = this.y9_1;
|
|
387
|
+
this.aa_1 = e;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
while (true);
|
|
391
|
+
};
|
|
392
|
+
function Client(clientInfo, options) {
|
|
393
|
+
options = options === VOID ? new ClientOptions() : options;
|
|
394
|
+
Protocol.call(this, options);
|
|
395
|
+
this.wgu_1 = clientInfo;
|
|
396
|
+
this.xgu_1 = null;
|
|
397
|
+
this.ygu_1 = null;
|
|
398
|
+
this.zgu_1 = options.qgw_1;
|
|
399
|
+
this.agv_1 = atomic$ref$1(persistentMapOf());
|
|
400
|
+
var tmp = get_logger();
|
|
401
|
+
tmp.o3i(Client$lambda(this));
|
|
402
|
+
if (!(this.zgu_1.kgo_1 == null)) {
|
|
403
|
+
var tmp2 = Defined_RootsList_getInstance();
|
|
404
|
+
// Inline function 'io.modelcontextprotocol.kotlin.sdk.shared.Protocol.setRequestHandler' call
|
|
405
|
+
var block = Client$slambda_0(this, null);
|
|
406
|
+
this.rg9(createKType(getKClass(ListRootsRequest), arrayOf([]), false), tmp2, block);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
protoOf(Client).sg9 = function (transport, $completion) {
|
|
410
|
+
var tmp = new $connectCOROUTINE$(this, transport, $completion);
|
|
411
|
+
tmp.z9_1 = Unit_instance;
|
|
412
|
+
tmp.aa_1 = null;
|
|
413
|
+
return tmp.fa();
|
|
414
|
+
};
|
|
415
|
+
protoOf(Client).lg9 = function (method) {
|
|
416
|
+
if (equals(method, Defined_LoggingSetLevel_getInstance())) {
|
|
417
|
+
var tmp1_safe_receiver = this.xgu_1;
|
|
418
|
+
if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zgp_1) == null) {
|
|
419
|
+
throw IllegalStateException_init_$Create$('Server does not support logging (required for ' + toString(method) + ')');
|
|
420
|
+
}
|
|
421
|
+
} else if (equals(method, Defined_PromptsGet_getInstance()) || (equals(method, Defined_PromptsList_getInstance()) || equals(method, Defined_CompletionComplete_getInstance()))) {
|
|
422
|
+
var tmp2_safe_receiver = this.xgu_1;
|
|
423
|
+
if ((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.agq_1) == null) {
|
|
424
|
+
throw IllegalStateException_init_$Create$('Server does not support prompts (required for ' + toString(method) + ')');
|
|
425
|
+
}
|
|
426
|
+
} else if (equals(method, Defined_ResourcesList_getInstance()) || equals(method, Defined_ResourcesTemplatesList_getInstance()) || (equals(method, Defined_ResourcesRead_getInstance()) || (equals(method, Defined_ResourcesSubscribe_getInstance()) || equals(method, Defined_ResourcesUnsubscribe_getInstance())))) {
|
|
427
|
+
var tmp3_safe_receiver = this.xgu_1;
|
|
428
|
+
var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.bgq_1;
|
|
429
|
+
var tmp;
|
|
430
|
+
if (tmp4_elvis_lhs == null) {
|
|
431
|
+
var message = 'Server does not support resources (required for ' + toString(method) + ')';
|
|
432
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
433
|
+
} else {
|
|
434
|
+
tmp = tmp4_elvis_lhs;
|
|
435
|
+
}
|
|
436
|
+
var resCaps = tmp;
|
|
437
|
+
if (equals(method, Defined_ResourcesSubscribe_getInstance()) && !(resCaps.qgp_1 === true)) {
|
|
438
|
+
throw IllegalStateException_init_$Create$('Server does not support resource subscriptions (required for ' + toString(method) + ')');
|
|
439
|
+
}
|
|
440
|
+
} else if (equals(method, Defined_ToolsCall_getInstance()) || equals(method, Defined_ToolsList_getInstance())) {
|
|
441
|
+
var tmp5_safe_receiver = this.xgu_1;
|
|
442
|
+
if ((tmp5_safe_receiver == null ? null : tmp5_safe_receiver.cgq_1) == null) {
|
|
443
|
+
throw IllegalStateException_init_$Create$('Server does not support tools (required for ' + toString(method) + ')');
|
|
444
|
+
}
|
|
445
|
+
} else
|
|
446
|
+
equals(method, Defined_Initialize_getInstance()) || equals(method, Defined_Ping_getInstance());
|
|
447
|
+
};
|
|
448
|
+
protoOf(Client).wg9 = function (method) {
|
|
449
|
+
if (equals(method, Defined_NotificationsRootsListChanged_getInstance())) {
|
|
450
|
+
var tmp1_safe_receiver = this.zgu_1.kgo_1;
|
|
451
|
+
if (!((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.fgo_1) === true)) {
|
|
452
|
+
throw IllegalStateException_init_$Create$('Client does not support roots list changed notifications (required for ' + toString(method) + ')');
|
|
453
|
+
}
|
|
454
|
+
} else
|
|
455
|
+
equals(method, Defined_NotificationsInitialized_getInstance()) || (equals(method, Defined_NotificationsCancelled_getInstance()) || equals(method, Defined_NotificationsProgress_getInstance()));
|
|
456
|
+
};
|
|
457
|
+
protoOf(Client).xg9 = function (method) {
|
|
458
|
+
if (equals(method, Defined_SamplingCreateMessage_getInstance())) {
|
|
459
|
+
if (this.zgu_1.jgo_1 == null) {
|
|
460
|
+
throw IllegalStateException_init_$Create$('Client does not support sampling capability (required for ' + toString(method) + ')');
|
|
461
|
+
}
|
|
462
|
+
} else if (equals(method, Defined_RootsList_getInstance())) {
|
|
463
|
+
if (this.zgu_1.kgo_1 == null) {
|
|
464
|
+
throw IllegalStateException_init_$Create$('Client does not support roots capability (required for ' + toString(method) + ')');
|
|
465
|
+
}
|
|
466
|
+
} else if (equals(method, Defined_ElicitationCreate_getInstance())) {
|
|
467
|
+
if (this.zgu_1.lgo_1 == null) {
|
|
468
|
+
throw IllegalStateException_init_$Create$('Client does not support elicitation capability (required for ' + toString(method) + ')');
|
|
469
|
+
}
|
|
470
|
+
} else
|
|
471
|
+
equals(method, Defined_Ping_getInstance());
|
|
472
|
+
};
|
|
473
|
+
protoOf(Client).rgw = function (name, arguments_0, compatibility, options, $completion) {
|
|
474
|
+
// Inline function 'kotlin.collections.mapValues' call
|
|
475
|
+
// Inline function 'kotlin.collections.mapValuesTo' call
|
|
476
|
+
var destination = LinkedHashMap_init_$Create$(mapCapacity(arguments_0.s()));
|
|
477
|
+
// Inline function 'kotlin.collections.associateByTo' call
|
|
478
|
+
var _iterator__ex2g4s = arguments_0.z().p();
|
|
479
|
+
while (_iterator__ex2g4s.q()) {
|
|
480
|
+
var element = _iterator__ex2g4s.r();
|
|
481
|
+
var tmp = element.a1();
|
|
482
|
+
// Inline function 'kotlin.collections.component2' call
|
|
483
|
+
var value = element.b1();
|
|
484
|
+
var tmp_0;
|
|
485
|
+
if (!(value == null) ? typeof value === 'string' : false) {
|
|
486
|
+
tmp_0 = JsonPrimitive(value);
|
|
487
|
+
} else {
|
|
488
|
+
if (isNumber(value)) {
|
|
489
|
+
tmp_0 = JsonPrimitive_1(value);
|
|
490
|
+
} else {
|
|
491
|
+
if (!(value == null) ? typeof value === 'boolean' : false) {
|
|
492
|
+
tmp_0 = JsonPrimitive_0(value);
|
|
493
|
+
} else {
|
|
494
|
+
if (value instanceof JsonElement) {
|
|
495
|
+
tmp_0 = value;
|
|
496
|
+
} else {
|
|
497
|
+
if (value == null) {
|
|
498
|
+
tmp_0 = JsonNull_getInstance();
|
|
499
|
+
} else {
|
|
500
|
+
tmp_0 = JsonPrimitive(toString(value));
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
var tmp$ret$2 = tmp_0;
|
|
507
|
+
destination.r2(tmp, tmp$ret$2);
|
|
508
|
+
}
|
|
509
|
+
var jsonArguments = destination;
|
|
510
|
+
var request = new CallToolRequest(name, new JsonObject(jsonArguments));
|
|
511
|
+
return this.sgw(request, compatibility, options, $completion);
|
|
512
|
+
};
|
|
513
|
+
protoOf(Client).sgw = function (request, compatibility, options, $completion) {
|
|
514
|
+
var tmp = new $callToolCOROUTINE$(this, request, compatibility, options, $completion);
|
|
515
|
+
tmp.z9_1 = Unit_instance;
|
|
516
|
+
tmp.aa_1 = null;
|
|
517
|
+
return tmp.fa();
|
|
518
|
+
};
|
|
519
|
+
protoOf(Client).tgw = function (request, options, $completion) {
|
|
520
|
+
return this.yg9(request, options, $completion);
|
|
521
|
+
};
|
|
522
|
+
protoOf(Client).ugw = function (request, options, $completion, $super) {
|
|
523
|
+
request = request === VOID ? new ListToolsRequest() : request;
|
|
524
|
+
options = options === VOID ? null : options;
|
|
525
|
+
return $super === VOID ? this.tgw(request, options, $completion) : $super.tgw.call(this, request, options, $completion);
|
|
526
|
+
};
|
|
527
|
+
function ClientOptions(capabilities, enforceStrictCapabilities) {
|
|
528
|
+
capabilities = capabilities === VOID ? new ClientCapabilities() : capabilities;
|
|
529
|
+
enforceStrictCapabilities = enforceStrictCapabilities === VOID ? true : enforceStrictCapabilities;
|
|
530
|
+
ProtocolOptions.call(this, enforceStrictCapabilities);
|
|
531
|
+
this.qgw_1 = capabilities;
|
|
532
|
+
}
|
|
533
|
+
function logger$lambda() {
|
|
534
|
+
_init_properties_Client_kt__a2ryqz();
|
|
535
|
+
return Unit_instance;
|
|
536
|
+
}
|
|
537
|
+
var properties_initialized_Client_kt_4npn83;
|
|
538
|
+
function _init_properties_Client_kt__a2ryqz() {
|
|
539
|
+
if (!properties_initialized_Client_kt_4npn83) {
|
|
540
|
+
properties_initialized_Client_kt_4npn83 = true;
|
|
541
|
+
var tmp = KotlinLogging_instance;
|
|
542
|
+
logger = tmp.a3j(logger$lambda);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
function _get_session__cmsix1($this) {
|
|
546
|
+
var tmp = $this.fgx_1;
|
|
547
|
+
if (!(tmp == null))
|
|
548
|
+
return tmp;
|
|
549
|
+
else {
|
|
550
|
+
throwUninitializedPropertyAccessException('session');
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
function _get_scope__bi2zur($this) {
|
|
554
|
+
var tmp = $this.ggx_1;
|
|
555
|
+
if (!(tmp == null))
|
|
556
|
+
return tmp;
|
|
557
|
+
else {
|
|
558
|
+
throwUninitializedPropertyAccessException('scope');
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
function _get_baseUrl__6ouw37($this) {
|
|
562
|
+
var tmp0 = $this.igx_1;
|
|
563
|
+
var tmp = KProperty1;
|
|
564
|
+
// Inline function 'kotlin.getValue' call
|
|
565
|
+
getPropertyCallableRef('baseUrl', 1, tmp, SseClientTransport$_get_baseUrl_$ref_zecqdl(), null);
|
|
566
|
+
return tmp0.b1();
|
|
567
|
+
}
|
|
568
|
+
function collectMessages($this, _this__u8e3s4, $completion) {
|
|
569
|
+
var tmp = new $collectMessagesCOROUTINE$($this, _this__u8e3s4, $completion);
|
|
570
|
+
tmp.z9_1 = Unit_instance;
|
|
571
|
+
tmp.aa_1 = null;
|
|
572
|
+
return tmp.fa();
|
|
573
|
+
}
|
|
574
|
+
function handleEndpoint($this, eventData) {
|
|
575
|
+
try {
|
|
576
|
+
var path = startsWith(eventData, '/') ? substring(eventData, 1) : eventData;
|
|
577
|
+
var endpointUrl = Url(_get_baseUrl__6ouw37($this) + '/' + path);
|
|
578
|
+
$this.egx_1.n24(endpointUrl.toString());
|
|
579
|
+
} catch ($p) {
|
|
580
|
+
if ($p instanceof Error) {
|
|
581
|
+
var e = $p;
|
|
582
|
+
$this.mga_1(e);
|
|
583
|
+
$this.egx_1.x24(e);
|
|
584
|
+
throw e;
|
|
585
|
+
} else {
|
|
586
|
+
throw $p;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
function handleMessage($this, data, $completion) {
|
|
591
|
+
var tmp = new $handleMessageCOROUTINE$($this, data, $completion);
|
|
592
|
+
tmp.z9_1 = Unit_instance;
|
|
593
|
+
tmp.aa_1 = null;
|
|
594
|
+
return tmp.fa();
|
|
595
|
+
}
|
|
596
|
+
function closeResources($this, $completion) {
|
|
597
|
+
var tmp = new $closeResourcesCOROUTINE$($this, $completion);
|
|
598
|
+
tmp.z9_1 = Unit_instance;
|
|
599
|
+
tmp.aa_1 = null;
|
|
600
|
+
return tmp.fa();
|
|
601
|
+
}
|
|
602
|
+
function sam$kotlinx_coroutines_flow_FlowCollector$0(function_0) {
|
|
603
|
+
this.tgy_1 = function_0;
|
|
604
|
+
}
|
|
605
|
+
protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).b2l = function (value, $completion) {
|
|
606
|
+
return this.tgy_1(value, $completion);
|
|
607
|
+
};
|
|
608
|
+
protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).v3 = function () {
|
|
609
|
+
return this.tgy_1;
|
|
610
|
+
};
|
|
611
|
+
protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).equals = function (other) {
|
|
612
|
+
var tmp;
|
|
613
|
+
if (!(other == null) ? isInterface(other, FlowCollector) : false) {
|
|
614
|
+
var tmp_0;
|
|
615
|
+
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
|
|
616
|
+
tmp_0 = equals(this.v3(), other.v3());
|
|
617
|
+
} else {
|
|
618
|
+
tmp_0 = false;
|
|
619
|
+
}
|
|
620
|
+
tmp = tmp_0;
|
|
621
|
+
} else {
|
|
622
|
+
tmp = false;
|
|
623
|
+
}
|
|
624
|
+
return tmp;
|
|
625
|
+
};
|
|
626
|
+
protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).hashCode = function () {
|
|
627
|
+
return hashCode(this.v3());
|
|
628
|
+
};
|
|
629
|
+
function SseClientTransport$_init_$lambda_36wv66(_this__u8e3s4) {
|
|
630
|
+
return Unit_instance;
|
|
631
|
+
}
|
|
632
|
+
function SseClientTransport$baseUrl$delegate$lambda(this$0) {
|
|
633
|
+
return function () {
|
|
634
|
+
// Inline function 'kotlin.let' call
|
|
635
|
+
var url = _get_session__cmsix1(this$0).d70_1.f67().o67();
|
|
636
|
+
var path = url.m5i();
|
|
637
|
+
var tmp;
|
|
638
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
639
|
+
if (charSequenceLength(path) === 0) {
|
|
640
|
+
tmp = get_protocolWithAuthority(url);
|
|
641
|
+
} else {
|
|
642
|
+
if (endsWith(path, '/')) {
|
|
643
|
+
tmp = get_protocolWithAuthority(url) + removeSuffix(path, '/');
|
|
644
|
+
} else {
|
|
645
|
+
tmp = get_protocolWithAuthority(url) + take(path, lastIndexOf(path, '/'));
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
return tmp;
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
function SseClientTransport$_get_baseUrl_$ref_zecqdl() {
|
|
652
|
+
return function (p0) {
|
|
653
|
+
return _get_baseUrl__6ouw37(p0);
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
function SseClientTransport$start$slambda(this$0, resultContinuation) {
|
|
657
|
+
this.cgz_1 = this$0;
|
|
658
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
659
|
+
}
|
|
660
|
+
protoOf(SseClientTransport$start$slambda).x2q = function ($this$launch, $completion) {
|
|
661
|
+
var tmp = this.y2q($this$launch, $completion);
|
|
662
|
+
tmp.z9_1 = Unit_instance;
|
|
663
|
+
tmp.aa_1 = null;
|
|
664
|
+
return tmp.fa();
|
|
665
|
+
};
|
|
666
|
+
protoOf(SseClientTransport$start$slambda).ra = function (p1, $completion) {
|
|
667
|
+
return this.x2q((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
668
|
+
};
|
|
669
|
+
protoOf(SseClientTransport$start$slambda).fa = function () {
|
|
670
|
+
var suspendResult = this.z9_1;
|
|
671
|
+
$sm: do
|
|
672
|
+
try {
|
|
673
|
+
var tmp = this.x9_1;
|
|
674
|
+
switch (tmp) {
|
|
675
|
+
case 0:
|
|
676
|
+
this.y9_1 = 2;
|
|
677
|
+
this.x9_1 = 1;
|
|
678
|
+
suspendResult = collectMessages(this.cgz_1, this.dgz_1, this);
|
|
679
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
680
|
+
return suspendResult;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
continue $sm;
|
|
684
|
+
case 1:
|
|
685
|
+
return Unit_instance;
|
|
686
|
+
case 2:
|
|
687
|
+
throw this.aa_1;
|
|
688
|
+
}
|
|
689
|
+
} catch ($p) {
|
|
690
|
+
var e = $p;
|
|
691
|
+
if (this.y9_1 === 2) {
|
|
692
|
+
throw e;
|
|
693
|
+
} else {
|
|
694
|
+
this.x9_1 = this.y9_1;
|
|
695
|
+
this.aa_1 = e;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
while (true);
|
|
699
|
+
};
|
|
700
|
+
protoOf(SseClientTransport$start$slambda).y2q = function ($this$launch, completion) {
|
|
701
|
+
var i = new SseClientTransport$start$slambda(this.cgz_1, completion);
|
|
702
|
+
i.dgz_1 = $this$launch;
|
|
703
|
+
return i;
|
|
704
|
+
};
|
|
705
|
+
function SseClientTransport$start$slambda_0(this$0, resultContinuation) {
|
|
706
|
+
var i = new SseClientTransport$start$slambda(this$0, resultContinuation);
|
|
707
|
+
var l = function ($this$launch, $completion) {
|
|
708
|
+
return i.x2q($this$launch, $completion);
|
|
709
|
+
};
|
|
710
|
+
l.$arity = 1;
|
|
711
|
+
return l;
|
|
712
|
+
}
|
|
713
|
+
function SseClientTransport$collectMessages$slambda($this_collectMessages, this$0, resultContinuation) {
|
|
714
|
+
this.mgz_1 = $this_collectMessages;
|
|
715
|
+
this.ngz_1 = this$0;
|
|
716
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
717
|
+
}
|
|
718
|
+
protoOf(SseClientTransport$collectMessages$slambda).b7x = function (event, $completion) {
|
|
719
|
+
var tmp = this.c7x(event, $completion);
|
|
720
|
+
tmp.z9_1 = Unit_instance;
|
|
721
|
+
tmp.aa_1 = null;
|
|
722
|
+
return tmp.fa();
|
|
723
|
+
};
|
|
724
|
+
protoOf(SseClientTransport$collectMessages$slambda).ra = function (p1, $completion) {
|
|
725
|
+
return this.b7x(p1 instanceof ServerSentEvent ? p1 : THROW_CCE(), $completion);
|
|
726
|
+
};
|
|
727
|
+
protoOf(SseClientTransport$collectMessages$slambda).fa = function () {
|
|
728
|
+
var suspendResult = this.z9_1;
|
|
729
|
+
$sm: do
|
|
730
|
+
try {
|
|
731
|
+
var tmp = this.x9_1;
|
|
732
|
+
switch (tmp) {
|
|
733
|
+
case 0:
|
|
734
|
+
this.y9_1 = 3;
|
|
735
|
+
ensureActive(this.mgz_1);
|
|
736
|
+
this.pgz_1 = this.ogz_1.l63_1;
|
|
737
|
+
if (this.pgz_1 === 'error') {
|
|
738
|
+
var error = IllegalStateException_init_$Create$('SSE error: ' + this.ogz_1.k63_1);
|
|
739
|
+
this.ngz_1.mga_1(error);
|
|
740
|
+
throw error;
|
|
741
|
+
} else {
|
|
742
|
+
if (this.pgz_1 === 'open') {
|
|
743
|
+
this.x9_1 = 2;
|
|
744
|
+
continue $sm;
|
|
745
|
+
} else {
|
|
746
|
+
if (this.pgz_1 === 'endpoint') {
|
|
747
|
+
var tmp0_elvis_lhs = this.ogz_1.k63_1;
|
|
748
|
+
handleEndpoint(this.ngz_1, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
|
|
749
|
+
this.x9_1 = 2;
|
|
750
|
+
continue $sm;
|
|
751
|
+
} else {
|
|
752
|
+
this.x9_1 = 1;
|
|
753
|
+
var tmp0_elvis_lhs_0 = this.ogz_1.k63_1;
|
|
754
|
+
suspendResult = handleMessage(this.ngz_1, tmp0_elvis_lhs_0 == null ? '' : tmp0_elvis_lhs_0, this);
|
|
755
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
756
|
+
return suspendResult;
|
|
757
|
+
}
|
|
758
|
+
continue $sm;
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
case 1:
|
|
764
|
+
this.x9_1 = 2;
|
|
765
|
+
continue $sm;
|
|
766
|
+
case 2:
|
|
767
|
+
return Unit_instance;
|
|
768
|
+
case 3:
|
|
769
|
+
throw this.aa_1;
|
|
770
|
+
}
|
|
771
|
+
} catch ($p) {
|
|
772
|
+
var e = $p;
|
|
773
|
+
if (this.y9_1 === 3) {
|
|
774
|
+
throw e;
|
|
775
|
+
} else {
|
|
776
|
+
this.x9_1 = this.y9_1;
|
|
777
|
+
this.aa_1 = e;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
while (true);
|
|
781
|
+
};
|
|
782
|
+
protoOf(SseClientTransport$collectMessages$slambda).c7x = function (event, completion) {
|
|
783
|
+
var i = new SseClientTransport$collectMessages$slambda(this.mgz_1, this.ngz_1, completion);
|
|
784
|
+
i.ogz_1 = event;
|
|
785
|
+
return i;
|
|
786
|
+
};
|
|
787
|
+
function SseClientTransport$collectMessages$slambda_0($this_collectMessages, this$0, resultContinuation) {
|
|
788
|
+
var i = new SseClientTransport$collectMessages$slambda($this_collectMessages, this$0, resultContinuation);
|
|
789
|
+
var l = function (event, $completion) {
|
|
790
|
+
return i.b7x(event, $completion);
|
|
791
|
+
};
|
|
792
|
+
l.$arity = 1;
|
|
793
|
+
return l;
|
|
794
|
+
}
|
|
795
|
+
function $startCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
796
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
797
|
+
this.ygz_1 = _this__u8e3s4;
|
|
798
|
+
}
|
|
799
|
+
protoOf($startCOROUTINE$).fa = function () {
|
|
800
|
+
var suspendResult = this.z9_1;
|
|
801
|
+
$sm: do
|
|
802
|
+
try {
|
|
803
|
+
var tmp = this.x9_1;
|
|
804
|
+
switch (tmp) {
|
|
805
|
+
case 0:
|
|
806
|
+
this.y9_1 = 9;
|
|
807
|
+
if (!this.ygz_1.dgx_1.n9(false, true)) {
|
|
808
|
+
var message = 'SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.';
|
|
809
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
this.y9_1 = 6;
|
|
813
|
+
this.ah0_1 = this.ygz_1.agx_1;
|
|
814
|
+
if (this.ah0_1 == null) {
|
|
815
|
+
this.bh0_1 = null;
|
|
816
|
+
this.x9_1 = 2;
|
|
817
|
+
continue $sm;
|
|
818
|
+
} else {
|
|
819
|
+
var tmp_0 = this;
|
|
820
|
+
tmp_0.ch0_1 = this.ah0_1;
|
|
821
|
+
this.dh0_1 = this.ch0_1;
|
|
822
|
+
var tmp_1 = this;
|
|
823
|
+
tmp_1.eh0_1 = this.dh0_1;
|
|
824
|
+
this.fh0_1 = this.eh0_1;
|
|
825
|
+
this.x9_1 = 1;
|
|
826
|
+
suspendResult = sseSession(this.ygz_1.zgw_1, this.fh0_1, this.ygz_1.bgx_1, VOID, VOID, this.ygz_1.cgx_1, this);
|
|
827
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
828
|
+
return suspendResult;
|
|
829
|
+
}
|
|
830
|
+
continue $sm;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
case 1:
|
|
834
|
+
this.bh0_1 = suspendResult;
|
|
835
|
+
this.x9_1 = 2;
|
|
836
|
+
continue $sm;
|
|
837
|
+
case 2:
|
|
838
|
+
this.gh0_1 = this.bh0_1;
|
|
839
|
+
if (this.gh0_1 == null) {
|
|
840
|
+
this.x9_1 = 3;
|
|
841
|
+
suspendResult = sseSession_0(this.ygz_1.zgw_1, this.ygz_1.bgx_1, VOID, VOID, this.ygz_1.cgx_1, this);
|
|
842
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
843
|
+
return suspendResult;
|
|
844
|
+
}
|
|
845
|
+
continue $sm;
|
|
846
|
+
} else {
|
|
847
|
+
this.hh0_1 = this.gh0_1;
|
|
848
|
+
this.x9_1 = 4;
|
|
849
|
+
continue $sm;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
case 3:
|
|
853
|
+
this.hh0_1 = suspendResult;
|
|
854
|
+
this.x9_1 = 4;
|
|
855
|
+
continue $sm;
|
|
856
|
+
case 4:
|
|
857
|
+
this.ih0_1 = this.hh0_1;
|
|
858
|
+
this.ygz_1.fgx_1 = this.ih0_1;
|
|
859
|
+
this.ygz_1.ggx_1 = CoroutineScope_0(_get_session__cmsix1(this.ygz_1).z1v().am(SupervisorJob()));
|
|
860
|
+
var tmp_2 = this.ygz_1;
|
|
861
|
+
var tmp_3 = _get_scope__bi2zur(this.ygz_1);
|
|
862
|
+
var tmp_4 = new CoroutineName('SseMcpClientTransport.connect#' + hashCode(this.ygz_1));
|
|
863
|
+
tmp_2.hgx_1 = launch(tmp_3, tmp_4, VOID, SseClientTransport$start$slambda_0(this.ygz_1, null));
|
|
864
|
+
this.x9_1 = 5;
|
|
865
|
+
suspendResult = this.ygz_1.egx_1.w21(this);
|
|
866
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
867
|
+
return suspendResult;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
continue $sm;
|
|
871
|
+
case 5:
|
|
872
|
+
this.zgz_1 = suspendResult;
|
|
873
|
+
this.y9_1 = 9;
|
|
874
|
+
this.x9_1 = 8;
|
|
875
|
+
continue $sm;
|
|
876
|
+
case 6:
|
|
877
|
+
this.y9_1 = 9;
|
|
878
|
+
var tmp_5 = this.aa_1;
|
|
879
|
+
if (tmp_5 instanceof Exception) {
|
|
880
|
+
this.jh0_1 = this.aa_1;
|
|
881
|
+
this.x9_1 = 7;
|
|
882
|
+
suspendResult = closeResources(this.ygz_1, this);
|
|
883
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
884
|
+
return suspendResult;
|
|
885
|
+
}
|
|
886
|
+
continue $sm;
|
|
887
|
+
} else {
|
|
888
|
+
throw this.aa_1;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
case 7:
|
|
892
|
+
this.ygz_1.dgx_1.m9(false);
|
|
893
|
+
var tmp_6 = this;
|
|
894
|
+
throw this.jh0_1;
|
|
895
|
+
case 8:
|
|
896
|
+
this.y9_1 = 9;
|
|
897
|
+
return Unit_instance;
|
|
898
|
+
case 9:
|
|
899
|
+
throw this.aa_1;
|
|
900
|
+
}
|
|
901
|
+
} catch ($p) {
|
|
902
|
+
var e = $p;
|
|
903
|
+
if (this.y9_1 === 9) {
|
|
904
|
+
throw e;
|
|
905
|
+
} else {
|
|
906
|
+
this.x9_1 = this.y9_1;
|
|
907
|
+
this.aa_1 = e;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
while (true);
|
|
911
|
+
};
|
|
912
|
+
function $sendCOROUTINE$(_this__u8e3s4, message, resultContinuation) {
|
|
913
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
914
|
+
this.sh0_1 = _this__u8e3s4;
|
|
915
|
+
this.th0_1 = message;
|
|
916
|
+
}
|
|
917
|
+
protoOf($sendCOROUTINE$).fa = function () {
|
|
918
|
+
var suspendResult = this.z9_1;
|
|
919
|
+
$sm: do
|
|
920
|
+
try {
|
|
921
|
+
var tmp = this.x9_1;
|
|
922
|
+
switch (tmp) {
|
|
923
|
+
case 0:
|
|
924
|
+
this.y9_1 = 6;
|
|
925
|
+
if (!this.sh0_1.dgx_1.i9()) {
|
|
926
|
+
var message = 'SseClientTransport is not initialized!';
|
|
927
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
var tmp0_safe_receiver = this.sh0_1.hgx_1;
|
|
931
|
+
if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a1w()) === true)) {
|
|
932
|
+
var message_0 = 'SseClientTransport is closed!';
|
|
933
|
+
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
if (!this.sh0_1.egx_1.v1w()) {
|
|
937
|
+
var message_1 = 'Not connected!';
|
|
938
|
+
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
this.y9_1 = 5;
|
|
942
|
+
var tmp_0 = this;
|
|
943
|
+
tmp_0.uh0_1 = this.sh0_1.zgw_1;
|
|
944
|
+
var tmp_1 = this;
|
|
945
|
+
tmp_1.vh0_1 = this.sh0_1.egx_1.f1z();
|
|
946
|
+
this.wh0_1 = this.uh0_1;
|
|
947
|
+
this.xh0_1 = this.vh0_1;
|
|
948
|
+
var tmp_2 = this;
|
|
949
|
+
tmp_2.yh0_1 = this.wh0_1;
|
|
950
|
+
this.zh0_1 = this.yh0_1;
|
|
951
|
+
this.ah1_1 = new HttpRequestBuilder();
|
|
952
|
+
this.ah1_1.x65_1 = Companion_getInstance().m5d_1;
|
|
953
|
+
var $this$post = this.ah1_1;
|
|
954
|
+
url($this$post, this.xh0_1);
|
|
955
|
+
this.sh0_1.cgx_1($this$post);
|
|
956
|
+
append($this$post.y65_1, HttpHeaders_getInstance().x59_1, Application_getInstance().h57_1);
|
|
957
|
+
var tmp0 = get_McpJson();
|
|
958
|
+
var value = this.th0_1;
|
|
959
|
+
var this_0 = tmp0.lz();
|
|
960
|
+
var this_1 = serializer(this_0, createKType(getKClass(JSONRPCMessage), arrayOf([]), false));
|
|
961
|
+
var body = tmp0.gw(isInterface(this_1, KSerializer) ? this_1 : THROW_CCE(), value);
|
|
962
|
+
if (body == null) {
|
|
963
|
+
$this$post.z65_1 = NullBody_instance;
|
|
964
|
+
var tmp_3 = PrimitiveClasses_getInstance().fd();
|
|
965
|
+
var tmp_4;
|
|
966
|
+
try {
|
|
967
|
+
tmp_4 = createKType(PrimitiveClasses_getInstance().fd(), arrayOf([]), false);
|
|
968
|
+
} catch ($p) {
|
|
969
|
+
var tmp_5;
|
|
970
|
+
if ($p instanceof Error) {
|
|
971
|
+
var _unused_var__etf5q3 = $p;
|
|
972
|
+
tmp_5 = null;
|
|
973
|
+
} else {
|
|
974
|
+
throw $p;
|
|
975
|
+
}
|
|
976
|
+
tmp_4 = tmp_5;
|
|
977
|
+
}
|
|
978
|
+
$this$post.j6c(new TypeInfo(tmp_3, tmp_4));
|
|
979
|
+
} else {
|
|
980
|
+
if (body instanceof OutgoingContent) {
|
|
981
|
+
$this$post.z65_1 = body;
|
|
982
|
+
$this$post.j6c(null);
|
|
983
|
+
} else {
|
|
984
|
+
$this$post.z65_1 = body;
|
|
985
|
+
var tmp_6 = PrimitiveClasses_getInstance().fd();
|
|
986
|
+
var tmp_7;
|
|
987
|
+
try {
|
|
988
|
+
tmp_7 = createKType(PrimitiveClasses_getInstance().fd(), arrayOf([]), false);
|
|
989
|
+
} catch ($p) {
|
|
990
|
+
var tmp_8;
|
|
991
|
+
if ($p instanceof Error) {
|
|
992
|
+
var _unused_var__etf5q3_0 = $p;
|
|
993
|
+
tmp_8 = null;
|
|
994
|
+
} else {
|
|
995
|
+
throw $p;
|
|
996
|
+
}
|
|
997
|
+
tmp_7 = tmp_8;
|
|
998
|
+
}
|
|
999
|
+
$this$post.j6c(new TypeInfo(tmp_6, tmp_7));
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
this.ah1_1.x65_1 = Companion_getInstance().m5d_1;
|
|
1004
|
+
var tmp_9 = this;
|
|
1005
|
+
tmp_9.bh1_1 = this.zh0_1;
|
|
1006
|
+
var tmp_10 = this;
|
|
1007
|
+
tmp_10.ch1_1 = this.ah1_1;
|
|
1008
|
+
this.dh1_1 = this.bh1_1;
|
|
1009
|
+
this.eh1_1 = this.ch1_1;
|
|
1010
|
+
this.x9_1 = 1;
|
|
1011
|
+
suspendResult = (new HttpStatement(this.eh1_1, this.dh1_1)).d7g(this);
|
|
1012
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1013
|
+
return suspendResult;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
continue $sm;
|
|
1017
|
+
case 1:
|
|
1018
|
+
this.fh1_1 = suspendResult;
|
|
1019
|
+
if (!isSuccess(this.fh1_1.a5j())) {
|
|
1020
|
+
this.x9_1 = 4;
|
|
1021
|
+
suspendResult = bodyAsText(this.fh1_1, VOID, this);
|
|
1022
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1023
|
+
return suspendResult;
|
|
1024
|
+
}
|
|
1025
|
+
continue $sm;
|
|
1026
|
+
} else {
|
|
1027
|
+
this.x9_1 = 2;
|
|
1028
|
+
continue $sm;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
case 2:
|
|
1032
|
+
this.y9_1 = 6;
|
|
1033
|
+
this.x9_1 = 3;
|
|
1034
|
+
continue $sm;
|
|
1035
|
+
case 3:
|
|
1036
|
+
this.y9_1 = 6;
|
|
1037
|
+
return Unit_instance;
|
|
1038
|
+
case 4:
|
|
1039
|
+
var text = suspendResult;
|
|
1040
|
+
var message_2 = 'Error POSTing to endpoint (HTTP ' + this.fh1_1.a5j().toString() + '): ' + text;
|
|
1041
|
+
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
1042
|
+
case 5:
|
|
1043
|
+
this.y9_1 = 6;
|
|
1044
|
+
var tmp_11 = this.aa_1;
|
|
1045
|
+
if (tmp_11 instanceof Error) {
|
|
1046
|
+
var e = this.aa_1;
|
|
1047
|
+
this.sh0_1.mga_1(e);
|
|
1048
|
+
throw e;
|
|
1049
|
+
} else {
|
|
1050
|
+
throw this.aa_1;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
case 6:
|
|
1054
|
+
throw this.aa_1;
|
|
1055
|
+
}
|
|
1056
|
+
} catch ($p) {
|
|
1057
|
+
var e_0 = $p;
|
|
1058
|
+
if (this.y9_1 === 6) {
|
|
1059
|
+
throw e_0;
|
|
1060
|
+
} else {
|
|
1061
|
+
this.x9_1 = this.y9_1;
|
|
1062
|
+
this.aa_1 = e_0;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
while (true);
|
|
1066
|
+
};
|
|
1067
|
+
function $collectMessagesCOROUTINE$(_this__u8e3s4, _this__u8e3s4_0, resultContinuation) {
|
|
1068
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1069
|
+
this.rgx_1 = _this__u8e3s4;
|
|
1070
|
+
this.sgx_1 = _this__u8e3s4_0;
|
|
1071
|
+
}
|
|
1072
|
+
protoOf($collectMessagesCOROUTINE$).fa = function () {
|
|
1073
|
+
var suspendResult = this.z9_1;
|
|
1074
|
+
$sm: do
|
|
1075
|
+
try {
|
|
1076
|
+
var tmp = this.x9_1;
|
|
1077
|
+
switch (tmp) {
|
|
1078
|
+
case 0:
|
|
1079
|
+
this.y9_1 = 8;
|
|
1080
|
+
this.x9_1 = 1;
|
|
1081
|
+
continue $sm;
|
|
1082
|
+
case 1:
|
|
1083
|
+
this.y9_1 = 4;
|
|
1084
|
+
this.y9_1 = 3;
|
|
1085
|
+
this.x9_1 = 2;
|
|
1086
|
+
var tmp_0 = _get_session__cmsix1(this.rgx_1).y6z();
|
|
1087
|
+
var tmp_1 = SseClientTransport$collectMessages$slambda_0(this.sgx_1, this.rgx_1, null);
|
|
1088
|
+
suspendResult = tmp_0.g2k(new sam$kotlinx_coroutines_flow_FlowCollector$0(tmp_1), this);
|
|
1089
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1090
|
+
return suspendResult;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
continue $sm;
|
|
1094
|
+
case 2:
|
|
1095
|
+
this.tgx_1 = suspendResult;
|
|
1096
|
+
this.y9_1 = 8;
|
|
1097
|
+
this.x9_1 = 6;
|
|
1098
|
+
continue $sm;
|
|
1099
|
+
case 3:
|
|
1100
|
+
this.y9_1 = 4;
|
|
1101
|
+
var tmp_2 = this.aa_1;
|
|
1102
|
+
if (tmp_2 instanceof CancellationException) {
|
|
1103
|
+
this.ugx_1 = this.aa_1;
|
|
1104
|
+
var tmp_3 = this;
|
|
1105
|
+
throw this.ugx_1;
|
|
1106
|
+
} else {
|
|
1107
|
+
var tmp_4 = this.aa_1;
|
|
1108
|
+
if (tmp_4 instanceof Error) {
|
|
1109
|
+
this.vgx_1 = this.aa_1;
|
|
1110
|
+
var tmp_5 = this;
|
|
1111
|
+
this.rgx_1.mga_1(this.vgx_1);
|
|
1112
|
+
throw this.vgx_1;
|
|
1113
|
+
} else {
|
|
1114
|
+
throw this.aa_1;
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
case 4:
|
|
1119
|
+
this.y9_1 = 8;
|
|
1120
|
+
this.wgx_1 = this.aa_1;
|
|
1121
|
+
this.x9_1 = 5;
|
|
1122
|
+
suspendResult = closeResources(this.rgx_1, this);
|
|
1123
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1124
|
+
return suspendResult;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
continue $sm;
|
|
1128
|
+
case 5:
|
|
1129
|
+
throw this.wgx_1;
|
|
1130
|
+
case 6:
|
|
1131
|
+
this.y9_1 = 8;
|
|
1132
|
+
this.x9_1 = 7;
|
|
1133
|
+
suspendResult = closeResources(this.rgx_1, this);
|
|
1134
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1135
|
+
return suspendResult;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
continue $sm;
|
|
1139
|
+
case 7:
|
|
1140
|
+
return Unit_instance;
|
|
1141
|
+
case 8:
|
|
1142
|
+
throw this.aa_1;
|
|
1143
|
+
}
|
|
1144
|
+
} catch ($p) {
|
|
1145
|
+
var e = $p;
|
|
1146
|
+
if (this.y9_1 === 8) {
|
|
1147
|
+
throw e;
|
|
1148
|
+
} else {
|
|
1149
|
+
this.x9_1 = this.y9_1;
|
|
1150
|
+
this.aa_1 = e;
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
while (true);
|
|
1154
|
+
};
|
|
1155
|
+
function $handleMessageCOROUTINE$(_this__u8e3s4, data, resultContinuation) {
|
|
1156
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1157
|
+
this.fgy_1 = _this__u8e3s4;
|
|
1158
|
+
this.ggy_1 = data;
|
|
1159
|
+
}
|
|
1160
|
+
protoOf($handleMessageCOROUTINE$).fa = function () {
|
|
1161
|
+
var suspendResult = this.z9_1;
|
|
1162
|
+
$sm: do
|
|
1163
|
+
try {
|
|
1164
|
+
var tmp = this.x9_1;
|
|
1165
|
+
switch (tmp) {
|
|
1166
|
+
case 0:
|
|
1167
|
+
this.y9_1 = 3;
|
|
1168
|
+
this.y9_1 = 2;
|
|
1169
|
+
var tmp_0 = this;
|
|
1170
|
+
var tmp0 = get_McpJson();
|
|
1171
|
+
var string = this.ggy_1;
|
|
1172
|
+
var this_0 = tmp0.lz();
|
|
1173
|
+
var this_1 = serializer(this_0, createKType(getKClass(JSONRPCMessage), arrayOf([]), false));
|
|
1174
|
+
tmp_0.hgy_1 = tmp0.hw(isInterface(this_1, KSerializer) ? this_1 : THROW_CCE(), string);
|
|
1175
|
+
this.x9_1 = 1;
|
|
1176
|
+
suspendResult = this.fgy_1.oga_1(this.hgy_1, this);
|
|
1177
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1178
|
+
return suspendResult;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
continue $sm;
|
|
1182
|
+
case 1:
|
|
1183
|
+
this.y9_1 = 3;
|
|
1184
|
+
this.x9_1 = 4;
|
|
1185
|
+
continue $sm;
|
|
1186
|
+
case 2:
|
|
1187
|
+
this.y9_1 = 3;
|
|
1188
|
+
var tmp_1 = this.aa_1;
|
|
1189
|
+
if (tmp_1 instanceof SerializationException) {
|
|
1190
|
+
var e = this.aa_1;
|
|
1191
|
+
this.fgy_1.mga_1(e);
|
|
1192
|
+
this.x9_1 = 4;
|
|
1193
|
+
continue $sm;
|
|
1194
|
+
} else {
|
|
1195
|
+
throw this.aa_1;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
case 3:
|
|
1199
|
+
throw this.aa_1;
|
|
1200
|
+
case 4:
|
|
1201
|
+
this.y9_1 = 3;
|
|
1202
|
+
return Unit_instance;
|
|
1203
|
+
}
|
|
1204
|
+
} catch ($p) {
|
|
1205
|
+
var e_0 = $p;
|
|
1206
|
+
if (this.y9_1 === 3) {
|
|
1207
|
+
throw e_0;
|
|
1208
|
+
} else {
|
|
1209
|
+
this.x9_1 = this.y9_1;
|
|
1210
|
+
this.aa_1 = e_0;
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
while (true);
|
|
1214
|
+
};
|
|
1215
|
+
function $closeResourcesCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
1216
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1217
|
+
this.qgy_1 = _this__u8e3s4;
|
|
1218
|
+
}
|
|
1219
|
+
protoOf($closeResourcesCOROUTINE$).fa = function () {
|
|
1220
|
+
var suspendResult = this.z9_1;
|
|
1221
|
+
$sm: do
|
|
1222
|
+
try {
|
|
1223
|
+
var tmp = this.x9_1;
|
|
1224
|
+
switch (tmp) {
|
|
1225
|
+
case 0:
|
|
1226
|
+
this.y9_1 = 5;
|
|
1227
|
+
if (!this.qgy_1.dgx_1.n9(true, false))
|
|
1228
|
+
return Unit_instance;
|
|
1229
|
+
this.rgy_1 = this.qgy_1.hgx_1;
|
|
1230
|
+
if (this.rgy_1 == null) {
|
|
1231
|
+
this.sgy_1 = null;
|
|
1232
|
+
this.x9_1 = 2;
|
|
1233
|
+
continue $sm;
|
|
1234
|
+
} else {
|
|
1235
|
+
this.x9_1 = 1;
|
|
1236
|
+
suspendResult = cancelAndJoin(this.rgy_1, this);
|
|
1237
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1238
|
+
return suspendResult;
|
|
1239
|
+
}
|
|
1240
|
+
continue $sm;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
case 1:
|
|
1244
|
+
var tmp_0 = this;
|
|
1245
|
+
tmp_0.sgy_1 = Unit_instance;
|
|
1246
|
+
this.x9_1 = 2;
|
|
1247
|
+
continue $sm;
|
|
1248
|
+
case 2:
|
|
1249
|
+
this.y9_1 = 3;
|
|
1250
|
+
if (!(this.qgy_1.fgx_1 == null)) {
|
|
1251
|
+
cancel(_get_session__cmsix1(this.qgy_1));
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
if (!(this.qgy_1.ggx_1 == null)) {
|
|
1255
|
+
cancel(_get_scope__bi2zur(this.qgy_1));
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
this.qgy_1.egx_1.k1x();
|
|
1259
|
+
this.y9_1 = 5;
|
|
1260
|
+
this.x9_1 = 4;
|
|
1261
|
+
continue $sm;
|
|
1262
|
+
case 3:
|
|
1263
|
+
this.y9_1 = 5;
|
|
1264
|
+
var tmp_1 = this.aa_1;
|
|
1265
|
+
if (tmp_1 instanceof Error) {
|
|
1266
|
+
var e = this.aa_1;
|
|
1267
|
+
this.qgy_1.mga_1(e);
|
|
1268
|
+
this.x9_1 = 4;
|
|
1269
|
+
continue $sm;
|
|
1270
|
+
} else {
|
|
1271
|
+
throw this.aa_1;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
case 4:
|
|
1275
|
+
this.y9_1 = 5;
|
|
1276
|
+
this.qgy_1.lga_1();
|
|
1277
|
+
return Unit_instance;
|
|
1278
|
+
case 5:
|
|
1279
|
+
throw this.aa_1;
|
|
1280
|
+
}
|
|
1281
|
+
} catch ($p) {
|
|
1282
|
+
var e_0 = $p;
|
|
1283
|
+
if (this.y9_1 === 5) {
|
|
1284
|
+
throw e_0;
|
|
1285
|
+
} else {
|
|
1286
|
+
this.x9_1 = this.y9_1;
|
|
1287
|
+
this.aa_1 = e_0;
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
while (true);
|
|
1291
|
+
};
|
|
1292
|
+
function SseClientTransport(client, urlString, reconnectionTime, requestBuilder) {
|
|
1293
|
+
reconnectionTime = reconnectionTime === VOID ? null : reconnectionTime;
|
|
1294
|
+
var tmp;
|
|
1295
|
+
if (requestBuilder === VOID) {
|
|
1296
|
+
tmp = SseClientTransport$_init_$lambda_36wv66;
|
|
1297
|
+
} else {
|
|
1298
|
+
tmp = requestBuilder;
|
|
1299
|
+
}
|
|
1300
|
+
requestBuilder = tmp;
|
|
1301
|
+
AbstractTransport.call(this);
|
|
1302
|
+
this.zgw_1 = client;
|
|
1303
|
+
this.agx_1 = urlString;
|
|
1304
|
+
this.bgx_1 = reconnectionTime;
|
|
1305
|
+
this.cgx_1 = requestBuilder;
|
|
1306
|
+
this.dgx_1 = new AtomicBoolean(false);
|
|
1307
|
+
this.egx_1 = CompletableDeferred();
|
|
1308
|
+
this.hgx_1 = null;
|
|
1309
|
+
var tmp_0 = this;
|
|
1310
|
+
tmp_0.igx_1 = lazy(SseClientTransport$baseUrl$delegate$lambda(this));
|
|
1311
|
+
}
|
|
1312
|
+
protoOf(SseClientTransport).qfo = function ($completion) {
|
|
1313
|
+
var tmp = new $startCOROUTINE$(this, $completion);
|
|
1314
|
+
tmp.z9_1 = Unit_instance;
|
|
1315
|
+
tmp.aa_1 = null;
|
|
1316
|
+
return tmp.fa();
|
|
1317
|
+
};
|
|
1318
|
+
protoOf(SseClientTransport).pg6 = function (message, $completion) {
|
|
1319
|
+
var tmp = new $sendCOROUTINE$(this, message, $completion);
|
|
1320
|
+
tmp.z9_1 = Unit_instance;
|
|
1321
|
+
tmp.aa_1 = null;
|
|
1322
|
+
return tmp.fa();
|
|
1323
|
+
};
|
|
1324
|
+
protoOf(SseClientTransport).zc9 = function ($completion) {
|
|
1325
|
+
// Inline function 'kotlin.check' call
|
|
1326
|
+
if (!this.dgx_1.i9()) {
|
|
1327
|
+
var message = 'SseClientTransport is not initialized!';
|
|
1328
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
1329
|
+
}
|
|
1330
|
+
return closeResources(this, $completion);
|
|
1331
|
+
};
|
|
1332
|
+
//region block: exports
|
|
1333
|
+
_.$_$ = _.$_$ || {};
|
|
1334
|
+
_.$_$.a = Client;
|
|
1335
|
+
_.$_$.b = SseClientTransport;
|
|
1336
|
+
//endregion
|
|
1337
|
+
return _;
|
|
1338
|
+
}));
|
|
1339
|
+
|
|
1340
|
+
//# sourceMappingURL=kotlin-sdk-kotlin-sdk-client.js.map
|