@makaio/framework 1.0.0-dev-1790535947927 → 1.0.0-dev-1790538920793
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/README.md +2 -2
- package/dist/.makaio-build.json +2 -2
- package/dist/adapter-subsystem/index.d.mts +1 -1
- package/dist/adapters/claude/index.d.mts +24 -24
- package/dist/adapters/config/index.d.mts +7 -7
- package/dist/adapters/index.d.mts +16 -19
- package/dist/adapters/node.d.mts +1 -1
- package/dist/{base-orchestrator-FNFJ6Cwf.d.mts → base-orchestrator-DH6W4NQg.d.mts} +2 -4
- package/dist/bus/index.mjs +1 -1
- package/dist/{bus-DzEgIHGt.mjs → bus-CgswamdO.mjs} +1 -1
- package/dist/clients/index.d.mts +5 -5
- package/dist/{config-namespace-CeTODseW.d.mts → config-namespace-Ctia-VDG.d.mts} +1 -1
- package/dist/contracts/adapter/index.d.mts +1 -1
- package/dist/contracts/artifact/index.d.mts +2 -2
- package/dist/contracts/capabilities/index.d.mts +1 -1
- package/dist/contracts/client/index.d.mts +1 -1
- package/dist/contracts/config/index.d.mts +1 -1
- package/dist/contracts/extension/index.d.mts +3 -3
- package/dist/contracts/harness/index.d.mts +2 -2
- package/dist/contracts/harness/index.mjs +1 -1
- package/dist/contracts/index.d.mts +29 -29
- package/dist/contracts/index.mjs +1 -1
- package/dist/contracts/materialization/index.d.mts +2 -2
- package/dist/contracts/provider/index.d.mts +2 -2
- package/dist/contracts/session/index.d.mts +2 -2
- package/dist/contracts/shared/index.d.mts +1 -1
- package/dist/contracts/variant/index.d.mts +1 -1
- package/dist/contracts/worker/index.d.mts +1 -1
- package/dist/contracts/workflow/index.d.mts +2 -2
- package/dist/{definition-D2SO1tX-.d.mts → definition-Cx175qXh.d.mts} +1 -1
- package/dist/{harness-DBxywOGi.mjs → harness-DMlk3uEj.mjs} +1 -1
- package/dist/{index-CnQw9he92.d.mts → index-6UlianLY2.d.mts} +8 -8
- package/dist/{index-B1iXL1pW.d.mts → index-9NQQkY0Z.d.mts} +5 -5
- package/dist/{index-lSpH5lvV.d.mts → index-AMzzMjhN.d.mts} +6 -6
- package/dist/{index-oE2q0pTG.d.mts → index-B1uHTa1l.d.mts} +1 -1
- package/dist/{index-CVRQS5jk.d.mts → index-BM53WQaQ.d.mts} +1 -1
- package/dist/{index-BVN64wQx.d.mts → index-BM8oUon_.d.mts} +12 -12
- package/dist/{index-DPc-Lstu.d.mts → index-BZw3MR6v.d.mts} +78 -78
- package/dist/{index-Ce6-SiB3.d.mts → index-C9vF42jh.d.mts} +1 -1
- package/dist/{index-DIOmmpkx2.d.mts → index-CPOJqxrf2.d.mts} +3 -3
- package/dist/{index-Bgz81LHZ.d.mts → index-CU0AgN84.d.mts} +1 -1
- package/dist/{index-CMsQnCAu.d.mts → index-CeAkK4Oq.d.mts} +37 -37
- package/dist/{index-Bc4u4rD8.d.mts → index-CoD7P-IS.d.mts} +5 -5
- package/dist/{index-BUxs65tf.d.mts → index-DDCixELI.d.mts} +1 -1
- package/dist/{index-DzOTNzZv2.d.mts → index-DIEnLLhi2.d.mts} +2 -2
- package/dist/{index-CEy4pCZ0.d.mts → index-DUpW-4X8.d.mts} +41 -41
- package/dist/{index-aAo9ugCm.d.mts → index-wQB90bP1.d.mts} +5 -7
- package/dist/{index-CWry0rks.d.mts → index-xPzwlPjm.d.mts} +41 -41
- package/dist/kernel/extension/index.d.mts +2 -2
- package/dist/kernel/index.d.mts +2 -2
- package/dist/kernel/observability/index.d.mts +1 -1
- package/dist/{namespace-C1-ZAKEG.d.mts → namespace-CNX4llM5.d.mts} +6 -6
- package/dist/{namespace-DAzOxaux.d.mts → namespace-D6W4Erwp.d.mts} +2 -2
- package/dist/{package-DT1Jaweg.d.mts → package-BjtsXnaA.d.mts} +1 -1
- package/dist/package.json +1 -1
- package/dist/runtime-node/static/model-registry.yaml +0 -29
- package/dist/{schema-De6d0FWI.d.mts → schema-MdntS6Eu.d.mts} +1 -1
- package/dist/{schemas-CjFPsYeV.d.mts → schemas-BjhhkGN_.d.mts} +4 -4
- package/dist/{schemas-Dec5VtBU.d.mts → schemas-CYjPZwlQ.d.mts} +4 -4
- package/dist/{schemas-CBDNnyz4.d.mts → schemas-Cb9OJ9va.d.mts} +1 -1
- package/dist/{schemas-Dyp3rHZ7.d.mts → schemas-D9pXu76T.d.mts} +4 -4
- package/dist/{schemas-DPtj1sPC2.d.mts → schemas-RwAlAMbq2.d.mts} +7 -7
- package/dist/services/adapter-runtime/index.d.mts +3 -3
- package/dist/services/adapter-runtime/namespace.d.mts +1 -1
- package/dist/services/adapter-runtime/schemas.d.mts +1 -1
- package/dist/services/adapter-subsystem/index.d.mts +2 -2
- package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
- package/dist/services/context-rules/index.d.mts +3 -3
- package/dist/services/git/namespace.d.mts +2 -2
- package/dist/services/git/schemas.d.mts +1 -1
- package/dist/services/harness/index.d.mts +3 -3
- package/dist/services/harness/storage/schema.d.mts +1 -1
- package/dist/services/index.d.mts +23 -23
- package/dist/services/log-import/browser.d.mts +1 -1
- package/dist/services/log-import/index.d.mts +1 -1
- package/dist/services/preferences/index.d.mts +2 -2
- package/dist/services/preferences/schemas.d.mts +1 -1
- package/dist/services/preferences/storage-namespace.d.mts +2 -2
- package/dist/services/provider-context/index.d.mts +1 -1
- package/dist/services/session/index.d.mts +2 -2
- package/dist/services/session/storage/schema.d.mts +1 -1
- package/dist/services/settings/namespace.d.mts +4 -4
- package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
- package/dist/services/subagent-template/index.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/{storage-namespace-CwwiV3kt.d.mts → storage-namespace-NHTWAjaX.d.mts} +10 -10
- package/dist/{transition-DH313MFE.d.mts → transition-ClMo_PUJ.d.mts} +1 -1
- package/dist/{types-BrsmFcWl.d.mts → types-CG3PWgMt.d.mts} +21 -23
- package/dist/{types-DyBD5MdV2.d.mts → types-CW-4Y0k_2.d.mts} +2 -2
- package/dist/{types-qna5Bcs8.d.mts → types-DTpwvvY9.d.mts} +1 -1
- package/dist/ui-kernel/index.d.mts +4 -4
- package/dist/ui-kernel/pages/namespace.d.mts +4 -4
- package/dist/ui-kernel/pages/schemas.d.mts +1 -1
- package/dist/{view-builder-D6W7fBUv.d.mts → view-builder-B8WSU6WT.d.mts} +7 -7
- package/dist/workflow-engine/index.d.mts +32 -32
- package/dist/workflow-engine/package.d.mts +1 -1
- package/package.json +1 -1
- package/dist/{schemas-B-2yBaGk.d.mts → schemas-B2fs9-uF.d.mts} +7 -7
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
Makaio Framework is runtime infrastructure for AI agent systems. It provides a typed event bus where agents, services, tools, and storage communicate through events and RPC — across threads, processes, or machines.
|
|
15
15
|
|
|
16
|
-
- **
|
|
16
|
+
- **9 provider adapters** (Anthropic, OpenAI, Claude Code, Codex, Cursor, Qwen, and more)
|
|
17
17
|
- **Typed event bus** with pub/sub, RPC, namespaces, and cross-process transports
|
|
18
18
|
- **Extension system** — capabilities load at runtime, not compile time
|
|
19
19
|
- **Bus-mediated storage** — swap backends without touching service code
|
|
@@ -39,7 +39,7 @@ const { messageId } = await MakaioBus.request(SessionSubjects.sendMessage, {
|
|
|
39
39
|
sessionId,
|
|
40
40
|
agent: {
|
|
41
41
|
kind: 'adapter',
|
|
42
|
-
adapterName: 'anthropic-sdk', // or 'openai-node', '
|
|
42
|
+
adapterName: 'anthropic-sdk', // or 'openai-node', 'pi-sdk', etc.
|
|
43
43
|
systemPrompt: 'You are a security reviewer. Be concise.',
|
|
44
44
|
},
|
|
45
45
|
message: 'Review the changes in src/ for security issues',
|
package/dist/.makaio-build.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"fingerprint": "
|
|
4
|
-
"builtAt": "2026-09-27T19:
|
|
3
|
+
"fingerprint": "f110117a4598444e44beb436099ecfcce1c9c44c7a160e1419d5257d32d806b8",
|
|
4
|
+
"builtAt": "2026-09-27T19:56:34.209Z",
|
|
5
5
|
"declarations": true,
|
|
6
6
|
"declarationBackend": "tsc"
|
|
7
7
|
}
|
|
@@ -257,7 +257,7 @@ interface PlatformDefaults {
|
|
|
257
257
|
*
|
|
258
258
|
* Examples:
|
|
259
259
|
* - `@makaio/ai-adapters-claude-code` → `'claude-code'`
|
|
260
|
-
* - `@scope/ai-adapters-
|
|
260
|
+
* - `@scope/ai-adapters-openai-node` → `'openai-node'`
|
|
261
261
|
* - `some-package` → `'some-package'` (fallback: full name)
|
|
262
262
|
* @param packageName - NPM package name for the adapter.
|
|
263
263
|
* @returns Non-empty stable identifier used for deterministic routing.
|
|
@@ -4993,16 +4993,16 @@ declare function createClaudeConnectorNamespace<N extends string>(namespaceName:
|
|
|
4993
4993
|
adapterId: z.ZodString;
|
|
4994
4994
|
agentId: z.ZodString;
|
|
4995
4995
|
oldState: z.ZodEnum<{
|
|
4996
|
-
paused: "paused";
|
|
4997
4996
|
idle: "idle";
|
|
4997
|
+
paused: "paused";
|
|
4998
4998
|
turn_started: "turn_started";
|
|
4999
4999
|
step_started: "step_started";
|
|
5000
5000
|
step_finished: "step_finished";
|
|
5001
5001
|
turn_finished: "turn_finished";
|
|
5002
5002
|
}>;
|
|
5003
5003
|
newState: z.ZodEnum<{
|
|
5004
|
-
paused: "paused";
|
|
5005
5004
|
idle: "idle";
|
|
5005
|
+
paused: "paused";
|
|
5006
5006
|
turn_started: "turn_started";
|
|
5007
5007
|
step_started: "step_started";
|
|
5008
5008
|
step_finished: "step_finished";
|
|
@@ -5014,16 +5014,16 @@ declare function createClaudeConnectorNamespace<N extends string>(namespaceName:
|
|
|
5014
5014
|
adapterId: z.ZodString;
|
|
5015
5015
|
agentId: z.ZodString;
|
|
5016
5016
|
oldState: z.ZodEnum<{
|
|
5017
|
-
paused: "paused";
|
|
5018
5017
|
idle: "idle";
|
|
5018
|
+
paused: "paused";
|
|
5019
5019
|
turn_started: "turn_started";
|
|
5020
5020
|
step_started: "step_started";
|
|
5021
5021
|
step_finished: "step_finished";
|
|
5022
5022
|
turn_finished: "turn_finished";
|
|
5023
5023
|
}>;
|
|
5024
5024
|
newState: z.ZodEnum<{
|
|
5025
|
-
paused: "paused";
|
|
5026
5025
|
idle: "idle";
|
|
5026
|
+
paused: "paused";
|
|
5027
5027
|
turn_started: "turn_started";
|
|
5028
5028
|
step_started: "step_started";
|
|
5029
5029
|
step_finished: "step_finished";
|
|
@@ -5035,16 +5035,16 @@ declare function createClaudeConnectorNamespace<N extends string>(namespaceName:
|
|
|
5035
5035
|
adapterId: z.ZodString;
|
|
5036
5036
|
agentId: z.ZodString;
|
|
5037
5037
|
oldState: z.ZodEnum<{
|
|
5038
|
-
paused: "paused";
|
|
5039
5038
|
idle: "idle";
|
|
5039
|
+
paused: "paused";
|
|
5040
5040
|
turn_started: "turn_started";
|
|
5041
5041
|
step_started: "step_started";
|
|
5042
5042
|
step_finished: "step_finished";
|
|
5043
5043
|
turn_finished: "turn_finished";
|
|
5044
5044
|
}>;
|
|
5045
5045
|
newState: z.ZodEnum<{
|
|
5046
|
-
paused: "paused";
|
|
5047
5046
|
idle: "idle";
|
|
5047
|
+
paused: "paused";
|
|
5048
5048
|
turn_started: "turn_started";
|
|
5049
5049
|
step_started: "step_started";
|
|
5050
5050
|
step_finished: "step_finished";
|
|
@@ -5056,16 +5056,16 @@ declare function createClaudeConnectorNamespace<N extends string>(namespaceName:
|
|
|
5056
5056
|
adapterId: z.ZodString;
|
|
5057
5057
|
agentId: z.ZodString;
|
|
5058
5058
|
oldState: z.ZodEnum<{
|
|
5059
|
-
paused: "paused";
|
|
5060
5059
|
idle: "idle";
|
|
5060
|
+
paused: "paused";
|
|
5061
5061
|
turn_started: "turn_started";
|
|
5062
5062
|
step_started: "step_started";
|
|
5063
5063
|
step_finished: "step_finished";
|
|
5064
5064
|
turn_finished: "turn_finished";
|
|
5065
5065
|
}>;
|
|
5066
5066
|
newState: z.ZodEnum<{
|
|
5067
|
-
paused: "paused";
|
|
5068
5067
|
idle: "idle";
|
|
5068
|
+
paused: "paused";
|
|
5069
5069
|
turn_started: "turn_started";
|
|
5070
5070
|
step_started: "step_started";
|
|
5071
5071
|
step_finished: "step_finished";
|
|
@@ -5077,16 +5077,16 @@ declare function createClaudeConnectorNamespace<N extends string>(namespaceName:
|
|
|
5077
5077
|
adapterId: z.ZodString;
|
|
5078
5078
|
agentId: z.ZodString;
|
|
5079
5079
|
oldState: z.ZodEnum<{
|
|
5080
|
-
paused: "paused";
|
|
5081
5080
|
idle: "idle";
|
|
5081
|
+
paused: "paused";
|
|
5082
5082
|
turn_started: "turn_started";
|
|
5083
5083
|
step_started: "step_started";
|
|
5084
5084
|
step_finished: "step_finished";
|
|
5085
5085
|
turn_finished: "turn_finished";
|
|
5086
5086
|
}>;
|
|
5087
5087
|
newState: z.ZodEnum<{
|
|
5088
|
-
paused: "paused";
|
|
5089
5088
|
idle: "idle";
|
|
5089
|
+
paused: "paused";
|
|
5090
5090
|
turn_started: "turn_started";
|
|
5091
5091
|
step_started: "step_started";
|
|
5092
5092
|
step_finished: "step_finished";
|
|
@@ -5098,16 +5098,16 @@ declare function createClaudeConnectorNamespace<N extends string>(namespaceName:
|
|
|
5098
5098
|
adapterId: z.ZodString;
|
|
5099
5099
|
agentId: z.ZodString;
|
|
5100
5100
|
oldState: z.ZodEnum<{
|
|
5101
|
-
paused: "paused";
|
|
5102
5101
|
idle: "idle";
|
|
5102
|
+
paused: "paused";
|
|
5103
5103
|
turn_started: "turn_started";
|
|
5104
5104
|
step_started: "step_started";
|
|
5105
5105
|
step_finished: "step_finished";
|
|
5106
5106
|
turn_finished: "turn_finished";
|
|
5107
5107
|
}>;
|
|
5108
5108
|
newState: z.ZodEnum<{
|
|
5109
|
-
paused: "paused";
|
|
5110
5109
|
idle: "idle";
|
|
5110
|
+
paused: "paused";
|
|
5111
5111
|
turn_started: "turn_started";
|
|
5112
5112
|
step_started: "step_started";
|
|
5113
5113
|
step_finished: "step_finished";
|
|
@@ -7620,16 +7620,16 @@ declare function createClaudeConnectorNamespace<N extends string>(namespaceName:
|
|
|
7620
7620
|
adapterId: z.ZodString;
|
|
7621
7621
|
agentId: z.ZodString;
|
|
7622
7622
|
oldState: z.ZodEnum<{
|
|
7623
|
-
paused: "paused";
|
|
7624
7623
|
idle: "idle";
|
|
7624
|
+
paused: "paused";
|
|
7625
7625
|
turn_started: "turn_started";
|
|
7626
7626
|
step_started: "step_started";
|
|
7627
7627
|
step_finished: "step_finished";
|
|
7628
7628
|
turn_finished: "turn_finished";
|
|
7629
7629
|
}>;
|
|
7630
7630
|
newState: z.ZodEnum<{
|
|
7631
|
-
paused: "paused";
|
|
7632
7631
|
idle: "idle";
|
|
7632
|
+
paused: "paused";
|
|
7633
7633
|
turn_started: "turn_started";
|
|
7634
7634
|
step_started: "step_started";
|
|
7635
7635
|
step_finished: "step_finished";
|
|
@@ -7641,16 +7641,16 @@ declare function createClaudeConnectorNamespace<N extends string>(namespaceName:
|
|
|
7641
7641
|
adapterId: z.ZodString;
|
|
7642
7642
|
agentId: z.ZodString;
|
|
7643
7643
|
oldState: z.ZodEnum<{
|
|
7644
|
-
paused: "paused";
|
|
7645
7644
|
idle: "idle";
|
|
7645
|
+
paused: "paused";
|
|
7646
7646
|
turn_started: "turn_started";
|
|
7647
7647
|
step_started: "step_started";
|
|
7648
7648
|
step_finished: "step_finished";
|
|
7649
7649
|
turn_finished: "turn_finished";
|
|
7650
7650
|
}>;
|
|
7651
7651
|
newState: z.ZodEnum<{
|
|
7652
|
-
paused: "paused";
|
|
7653
7652
|
idle: "idle";
|
|
7653
|
+
paused: "paused";
|
|
7654
7654
|
turn_started: "turn_started";
|
|
7655
7655
|
step_started: "step_started";
|
|
7656
7656
|
step_finished: "step_finished";
|
|
@@ -7662,16 +7662,16 @@ declare function createClaudeConnectorNamespace<N extends string>(namespaceName:
|
|
|
7662
7662
|
adapterId: z.ZodString;
|
|
7663
7663
|
agentId: z.ZodString;
|
|
7664
7664
|
oldState: z.ZodEnum<{
|
|
7665
|
-
paused: "paused";
|
|
7666
7665
|
idle: "idle";
|
|
7666
|
+
paused: "paused";
|
|
7667
7667
|
turn_started: "turn_started";
|
|
7668
7668
|
step_started: "step_started";
|
|
7669
7669
|
step_finished: "step_finished";
|
|
7670
7670
|
turn_finished: "turn_finished";
|
|
7671
7671
|
}>;
|
|
7672
7672
|
newState: z.ZodEnum<{
|
|
7673
|
-
paused: "paused";
|
|
7674
7673
|
idle: "idle";
|
|
7674
|
+
paused: "paused";
|
|
7675
7675
|
turn_started: "turn_started";
|
|
7676
7676
|
step_started: "step_started";
|
|
7677
7677
|
step_finished: "step_finished";
|
|
@@ -7683,16 +7683,16 @@ declare function createClaudeConnectorNamespace<N extends string>(namespaceName:
|
|
|
7683
7683
|
adapterId: z.ZodString;
|
|
7684
7684
|
agentId: z.ZodString;
|
|
7685
7685
|
oldState: z.ZodEnum<{
|
|
7686
|
-
paused: "paused";
|
|
7687
7686
|
idle: "idle";
|
|
7687
|
+
paused: "paused";
|
|
7688
7688
|
turn_started: "turn_started";
|
|
7689
7689
|
step_started: "step_started";
|
|
7690
7690
|
step_finished: "step_finished";
|
|
7691
7691
|
turn_finished: "turn_finished";
|
|
7692
7692
|
}>;
|
|
7693
7693
|
newState: z.ZodEnum<{
|
|
7694
|
-
paused: "paused";
|
|
7695
7694
|
idle: "idle";
|
|
7695
|
+
paused: "paused";
|
|
7696
7696
|
turn_started: "turn_started";
|
|
7697
7697
|
step_started: "step_started";
|
|
7698
7698
|
step_finished: "step_finished";
|
|
@@ -7704,16 +7704,16 @@ declare function createClaudeConnectorNamespace<N extends string>(namespaceName:
|
|
|
7704
7704
|
adapterId: z.ZodString;
|
|
7705
7705
|
agentId: z.ZodString;
|
|
7706
7706
|
oldState: z.ZodEnum<{
|
|
7707
|
-
paused: "paused";
|
|
7708
7707
|
idle: "idle";
|
|
7708
|
+
paused: "paused";
|
|
7709
7709
|
turn_started: "turn_started";
|
|
7710
7710
|
step_started: "step_started";
|
|
7711
7711
|
step_finished: "step_finished";
|
|
7712
7712
|
turn_finished: "turn_finished";
|
|
7713
7713
|
}>;
|
|
7714
7714
|
newState: z.ZodEnum<{
|
|
7715
|
-
paused: "paused";
|
|
7716
7715
|
idle: "idle";
|
|
7716
|
+
paused: "paused";
|
|
7717
7717
|
turn_started: "turn_started";
|
|
7718
7718
|
step_started: "step_started";
|
|
7719
7719
|
step_finished: "step_finished";
|
|
@@ -7725,16 +7725,16 @@ declare function createClaudeConnectorNamespace<N extends string>(namespaceName:
|
|
|
7725
7725
|
adapterId: z.ZodString;
|
|
7726
7726
|
agentId: z.ZodString;
|
|
7727
7727
|
oldState: z.ZodEnum<{
|
|
7728
|
-
paused: "paused";
|
|
7729
7728
|
idle: "idle";
|
|
7729
|
+
paused: "paused";
|
|
7730
7730
|
turn_started: "turn_started";
|
|
7731
7731
|
step_started: "step_started";
|
|
7732
7732
|
step_finished: "step_finished";
|
|
7733
7733
|
turn_finished: "turn_finished";
|
|
7734
7734
|
}>;
|
|
7735
7735
|
newState: z.ZodEnum<{
|
|
7736
|
-
paused: "paused";
|
|
7737
7736
|
idle: "idle";
|
|
7737
|
+
paused: "paused";
|
|
7738
7738
|
turn_started: "turn_started";
|
|
7739
7739
|
step_started: "step_started";
|
|
7740
7740
|
step_finished: "step_finished";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as bindProviderAuth, B as PreparedAdapterAuthRuntime, G as AdapterAuthError, H as SuppliedAdapterAuthRuntime, J as BoundProviderAuthContext, K as AdapterAuthErrorReason, L as AdapterAuthLeaseHandle, Q as ResolvedConnectorAuthDelivery, R as AdapterAuthRuntimePreparer, U as applySuppliedAdapterAuthRuntime, V as ResolvedAdapterRuntimeConfig, W as prepareAdapterAuthRuntime, X as ResolvedAdapterAuth, Y as ResolveAuthCredentialRefs, Z as ResolvedAuthCredentialValues, _ as BaseAgentConnectorConfig, et as getOptionalAuthCredentialFields, q as BindProviderAuthOptions, tt as resolveBoundProviderAuth, z as BoundAdapterRuntimeConfig } from "../../types-
|
|
1
|
+
import { $ as bindProviderAuth, B as PreparedAdapterAuthRuntime, G as AdapterAuthError, H as SuppliedAdapterAuthRuntime, J as BoundProviderAuthContext, K as AdapterAuthErrorReason, L as AdapterAuthLeaseHandle, Q as ResolvedConnectorAuthDelivery, R as AdapterAuthRuntimePreparer, U as applySuppliedAdapterAuthRuntime, V as ResolvedAdapterRuntimeConfig, W as prepareAdapterAuthRuntime, X as ResolvedAdapterAuth, Y as ResolveAuthCredentialRefs, Z as ResolvedAuthCredentialValues, _ as BaseAgentConnectorConfig, et as getOptionalAuthCredentialFields, q as BindProviderAuthOptions, tt as resolveBoundProviderAuth, z as BoundAdapterRuntimeConfig } from "../../types-CG3PWgMt.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { TimeoutConfig, TrackedTimeoutConfig } from "@makaio/framework/utils";
|
|
4
4
|
import { AIModelSchema, AdapterProviderAuth, ProtocolId, ProviderContext, ResolvedProviderAuth } from "@makaio/framework/contracts";
|
|
@@ -107,7 +107,7 @@ type AdapterDefaults<TConfig extends BaseAgentConnectorConfig = BaseAgentConnect
|
|
|
107
107
|
* @typeParam TConfig - The adapter's full config type for type-safe defaults
|
|
108
108
|
*/
|
|
109
109
|
interface CreateAdapterConfigFactoryOptions<TConfig extends BaseAgentConnectorConfig> {
|
|
110
|
-
/** Adapter type name (e.g., 'claude-code', '
|
|
110
|
+
/** Adapter type name (e.g., 'claude-code', 'openai-node') */
|
|
111
111
|
adapterName: string;
|
|
112
112
|
/** Adapter-level defaults (model required, others optional including providerConfig) */
|
|
113
113
|
adapterDefaults: AdapterDefaults<TConfig>;
|
|
@@ -188,10 +188,10 @@ type AdapterConfigFactory<TConfig extends BaseAgentConnectorConfig, TProviderCon
|
|
|
188
188
|
* @returns Factory with getConfig method
|
|
189
189
|
* @example
|
|
190
190
|
* ```typescript
|
|
191
|
-
* export const
|
|
192
|
-
* adapterName:
|
|
193
|
-
* adapterDefaults: {
|
|
194
|
-
* schema:
|
|
191
|
+
* export const OpenAINodeConfig = createAdapterConfigFactory<OpenAINodeAgentConfig>(() => ({
|
|
192
|
+
* adapterName: OpenAINodeAdapterName,
|
|
193
|
+
* adapterDefaults: { reasoningEffort: 'low' },
|
|
194
|
+
* schema: OpenAINodeProviderConfigSchema,
|
|
195
195
|
* adapterDefinition: { defaultTimeouts: DEFAULT_TIMEOUTS },
|
|
196
196
|
* }));
|
|
197
197
|
* ```
|
|
@@ -355,7 +355,7 @@ interface SessionEnvironmentOptions {
|
|
|
355
355
|
globalBus?: IMakaioBus;
|
|
356
356
|
/**
|
|
357
357
|
* Stable client identifier passed to `resolveClientBinary`
|
|
358
|
-
* (e.g. `'claude-code'`, `'qwen'`, `'
|
|
358
|
+
* (e.g. `'claude-code'`, `'qwen'`, `'codex'`). Omit for
|
|
359
359
|
* connector-only SDK adapters with no managed binary.
|
|
360
360
|
*/
|
|
361
361
|
clientId?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $t as SessionToolLedger, A as AgentTeardownArbiter, At as runBestEffortStage, Bt as MessageHandle, C as NormalizedCallUsage, Ct as ObservedExitOptions, D as AdapterProviderDefinition, Dt as reportBestEffortStages, E as StartAgentOptions, Et as exitWasObserved, F as TeardownSubject, Ft as unknownTeardown, Gt as MessageState, Ht as NormalizedMessageInput, I as CreateConnectorRuntimeOptions, It as CONNECTOR_EXIT_OBSERVATION_MS, Jt as AIModel, Kt as ProcessingState, Lt as SWAP_SETTLEMENT_WAIT_MS, M as ConnectorReplacementSettlement, Mt as TeardownReport, N as ConnectorSwapAdmission, Nt as aggregateTeardownReports, O as ConfigFactoryInput, Ot as reportObservedExit, P as ConnectorSwapHandover, Pt as rethrowTeardownFailure, Qt as LedgerSessionContext, R as AdapterAuthRuntimePreparer, Rt as AIAgentConnector, S as GetCapabilitiesResponsePayload, St as SupersededGeneration, T as SendMessageResponsePayload, Tt as describeTeardownFailure, Ut as normalizeMessageInput, Vt as markCompletedWithFinalResult, Wt as MessageResult, Xt as ReasoningLevelMap, Yt as AIReasoningLevel, Zt as ISessionToolLedger, _ as BaseAgentConnectorConfig, _t as BaseConnectorTurn, a as AgentCredentialChangeResponsePayload, at as WireSessionSubjects, b as ContextWindowInput, bt as ConnectorSessionConfig, c as AgentIdentity, ct as QueueableTurn, d as AgentMcpServersSetRequestPayload, dt as rejectQueuedHandles, en as ToolLedgerEntry, f as AgentMcpServersSetResponsePayload, ft as UserMessageQueue, g as AgentStartResult, gt as TurnSubjects, h as AgentSendMessageOptions, ht as ProceduralTurnState, i as AgentCredentialChangeRequestPayload, it as WireSessionConfig, j as ClosableConnectorRuntime, jt as stageFailure, k as IAdapterConfigFactory, kt as reportRepeatTeardown, l as AgentInterruptRequestPayload, lt as SESSION_CLOSED_QUEUE_ERROR, m as AgentModelChangeResponsePayload, mt as ProceduralTurnConfig, n as AgentConnectorConfigOverrides, nt as ProceduralAgentConnector, o as AgentCwdChangeRequestPayload, ot as MergeResult, p as AgentModelChangeRequestPayload, pt as ProceduralConnectorTurn, qt as SendMessageOptions, r as AgentContext, rt as ProceduralConnectorSession, s as AgentCwdChangeResponsePayload, st as ProcessQueueCallbacks, t as AIAgentConfig, u as AgentInterruptResponsePayload, ut as processQueueMessages, v as ConnectorSendMessageOptions, vt as PauseResult, w as SendMessageRequestPayload, wt as capTeardownEvidence, x as ExecutionContext, xt as GenerationRetirementLedger, y as ConnectorStartOptions, yt as BaseConnectorSession, zt as MessageDeliveryMode } from "../types-
|
|
2
|
-
import { S as toImportSegment, _ as LogImporter, a as CompactionMetadata, b as ProcessLogFileResult, c as ExternalToolIdentifiers, d as ImportMetadata, f as ImportSegment, g as LogImportTestConfig, h as LogImportSessionContext, l as ExternalToolMeta, m as ImportSegmentTurn, n as LogOrchestratorConfig, o as DiscoveryMetadata, p as ImportSegmentLineage, r as ParseFileResult, s as ExternalToolIdentifier, u as ImportCursorPosition, v as LogImporterConfig, x as StorageMessagePayload, y as NormalizedEvent } from "../base-orchestrator-
|
|
1
|
+
import { $t as SessionToolLedger, A as AgentTeardownArbiter, At as runBestEffortStage, Bt as MessageHandle, C as NormalizedCallUsage, Ct as ObservedExitOptions, D as AdapterProviderDefinition, Dt as reportBestEffortStages, E as StartAgentOptions, Et as exitWasObserved, F as TeardownSubject, Ft as unknownTeardown, Gt as MessageState, Ht as NormalizedMessageInput, I as CreateConnectorRuntimeOptions, It as CONNECTOR_EXIT_OBSERVATION_MS, Jt as AIModel, Kt as ProcessingState, Lt as SWAP_SETTLEMENT_WAIT_MS, M as ConnectorReplacementSettlement, Mt as TeardownReport, N as ConnectorSwapAdmission, Nt as aggregateTeardownReports, O as ConfigFactoryInput, Ot as reportObservedExit, P as ConnectorSwapHandover, Pt as rethrowTeardownFailure, Qt as LedgerSessionContext, R as AdapterAuthRuntimePreparer, Rt as AIAgentConnector, S as GetCapabilitiesResponsePayload, St as SupersededGeneration, T as SendMessageResponsePayload, Tt as describeTeardownFailure, Ut as normalizeMessageInput, Vt as markCompletedWithFinalResult, Wt as MessageResult, Xt as ReasoningLevelMap, Yt as AIReasoningLevel, Zt as ISessionToolLedger, _ as BaseAgentConnectorConfig, _t as BaseConnectorTurn, a as AgentCredentialChangeResponsePayload, at as WireSessionSubjects, b as ContextWindowInput, bt as ConnectorSessionConfig, c as AgentIdentity, ct as QueueableTurn, d as AgentMcpServersSetRequestPayload, dt as rejectQueuedHandles, en as ToolLedgerEntry, f as AgentMcpServersSetResponsePayload, ft as UserMessageQueue, g as AgentStartResult, gt as TurnSubjects, h as AgentSendMessageOptions, ht as ProceduralTurnState, i as AgentCredentialChangeRequestPayload, it as WireSessionConfig, j as ClosableConnectorRuntime, jt as stageFailure, k as IAdapterConfigFactory, kt as reportRepeatTeardown, l as AgentInterruptRequestPayload, lt as SESSION_CLOSED_QUEUE_ERROR, m as AgentModelChangeResponsePayload, mt as ProceduralTurnConfig, n as AgentConnectorConfigOverrides, nt as ProceduralAgentConnector, o as AgentCwdChangeRequestPayload, ot as MergeResult, p as AgentModelChangeRequestPayload, pt as ProceduralConnectorTurn, qt as SendMessageOptions, r as AgentContext, rt as ProceduralConnectorSession, s as AgentCwdChangeResponsePayload, st as ProcessQueueCallbacks, t as AIAgentConfig, u as AgentInterruptResponsePayload, ut as processQueueMessages, v as ConnectorSendMessageOptions, vt as PauseResult, w as SendMessageRequestPayload, wt as capTeardownEvidence, x as ExecutionContext, xt as GenerationRetirementLedger, y as ConnectorStartOptions, yt as BaseConnectorSession, zt as MessageDeliveryMode } from "../types-CG3PWgMt.mjs";
|
|
2
|
+
import { S as toImportSegment, _ as LogImporter, a as CompactionMetadata, b as ProcessLogFileResult, c as ExternalToolIdentifiers, d as ImportMetadata, f as ImportSegment, g as LogImportTestConfig, h as LogImportSessionContext, l as ExternalToolMeta, m as ImportSegmentTurn, n as LogOrchestratorConfig, o as DiscoveryMetadata, p as ImportSegmentLineage, r as ParseFileResult, s as ExternalToolIdentifier, u as ImportCursorPosition, v as LogImporterConfig, x as StorageMessagePayload, y as NormalizedEvent } from "../base-orchestrator-DH6W4NQg.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import * as _$_makaio_core0 from "@makaio/framework/core";
|
|
5
5
|
import { CreateBusNamespaceOptions, ExtractSubjectPayload, FilterablePayloadIntersection, HandlerForSubjectDefinition, RegistrableBusNamespaceDefinition, RequestContext, SchemaRecord, ScopedSubjectDefinition, SubjectDefinition, SubjectRecordFromSchemaRecord } from "@makaio/framework/core";
|
|
@@ -209,8 +209,7 @@ declare function formatContextBlockAsText(tag: string, content: string): string;
|
|
|
209
209
|
* Each adapter converts these blocks to its wire format:
|
|
210
210
|
* - Claude SDK: each block → prependContextBlock(msg, tag, content)
|
|
211
211
|
* - Anthropic/OpenAI: join and prepend to user message
|
|
212
|
-
* -
|
|
213
|
-
* - CLI/Copilot: prepend to prompt string
|
|
212
|
+
* - CLI: prepend to prompt string
|
|
214
213
|
* - Codex: push as userInput
|
|
215
214
|
* @param turnContext - The context record from MessageHandle.turnContext
|
|
216
215
|
* @returns Ordered blocks: skillCatalog, skills, contextRules, then remaining keys alphabetical.
|
|
@@ -767,7 +766,7 @@ declare function serializeBlockToText(block: MessageBlock$1): string;
|
|
|
767
766
|
interface ToolApprovalContext {
|
|
768
767
|
/** Adapter instance ID */
|
|
769
768
|
adapterId: string;
|
|
770
|
-
/** Adapter type name (e.g., '
|
|
769
|
+
/** Adapter type name (e.g., 'openai-node', 'anthropic-sdk') */
|
|
771
770
|
adapterName: string;
|
|
772
771
|
/** Agent ID within the adapter */
|
|
773
772
|
agentId: string;
|
|
@@ -834,7 +833,7 @@ declare function mergeScopedToolApproval(payload: ScopedToolApprovalRequest, con
|
|
|
834
833
|
* (or equivalent) injects `sessionId` from its own context before forwarding
|
|
835
834
|
* to the global `AgentSubjects.toolApprove` subject, where `sessionId` is required.
|
|
836
835
|
*
|
|
837
|
-
* Adapters with a genuinely different wire format (e.g.,
|
|
836
|
+
* Adapters with a genuinely different wire format (e.g., a callId/name pair)
|
|
838
837
|
* should define their own schema rather than extending this one.
|
|
839
838
|
*/
|
|
840
839
|
declare const ScopedToolApprovalSchema: {
|
|
@@ -894,9 +893,9 @@ type FromGlobalToolApprovalFn<TResponse> = (response: AgentToolApproveResponse)
|
|
|
894
893
|
* @returns Handler registration function
|
|
895
894
|
* @example
|
|
896
895
|
* ```typescript
|
|
897
|
-
* // In
|
|
896
|
+
* // In <adapter>/src/tool-handling.ts
|
|
898
897
|
* export const registerToolApprovalHandler = createToolApprovalHandler(
|
|
899
|
-
*
|
|
898
|
+
* AdapterConnectorSubjects.tool_approval,
|
|
900
899
|
* toGlobalToolApproval,
|
|
901
900
|
* fromGlobalToolApproval,
|
|
902
901
|
* );
|
|
@@ -1442,8 +1441,8 @@ type AdapterNamespace<Domain extends string = string> = Omit<BusNamespace<Domain
|
|
|
1442
1441
|
* const bus = await ClaudeCodeNamespace.scopedBus();
|
|
1443
1442
|
* bus.withFilter({ content: 'test' }); // ✅ Type-checked
|
|
1444
1443
|
*
|
|
1445
|
-
* // For adapters
|
|
1446
|
-
* const
|
|
1444
|
+
* // For adapters whose SDK bundles a conflicting Zod version:
|
|
1445
|
+
* const LegacyNamespace = createAdapterNamespace('adapter:legacy', schemas, {
|
|
1447
1446
|
* busValidationMode: 'skip', // Skip validation due to Zod version conflict
|
|
1448
1447
|
* });
|
|
1449
1448
|
*
|
|
@@ -2016,8 +2015,8 @@ declare function extractMcpCallTarget(args: Record<string, unknown>): string | u
|
|
|
2016
2015
|
* stays in sync with the toolset definition automatically.
|
|
2017
2016
|
*
|
|
2018
2017
|
* Callers are responsible for stripping provider-specific prefixes before
|
|
2019
|
-
* calling this function (e.g.,
|
|
2020
|
-
* removed at the call site
|
|
2018
|
+
* calling this function (e.g., an SDK-added `default_api.` prefix must be
|
|
2019
|
+
* removed at the call site).
|
|
2021
2020
|
* @param toolName - Normalized tool name from the tool call
|
|
2022
2021
|
* @returns `true` if this is an `mcp_call` invocation
|
|
2023
2022
|
*/
|
|
@@ -2309,7 +2308,7 @@ declare abstract class AIAgent<TBus extends ScopedBus<string> = ScopedBus<string
|
|
|
2309
2308
|
* Start mode for the next `emitStart()` call (consume-on-read).
|
|
2310
2309
|
*
|
|
2311
2310
|
* Set before dispatch; {@link emitStart} reads and clears the slot so
|
|
2312
|
-
* subsequent calls within the same dispatch (e.g.
|
|
2311
|
+
* subsequent calls within the same dispatch (e.g. SDK sub-turns)
|
|
2313
2312
|
* fall back to `'rotation'`. The `undefined` initial value is safe —
|
|
2314
2313
|
* every first-start path sets the mode before the connector fires.
|
|
2315
2314
|
*/
|
|
@@ -2335,7 +2334,7 @@ declare abstract class AIAgent<TBus extends ScopedBus<string> = ScopedBus<string
|
|
|
2335
2334
|
get agentId(): string;
|
|
2336
2335
|
/** @returns Adapter instance identifier */
|
|
2337
2336
|
get adapterId(): string;
|
|
2338
|
-
/** @returns Adapter type name (e.g., 'claude-code', '
|
|
2337
|
+
/** @returns Adapter type name (e.g., 'claude-code', 'openai-node') */
|
|
2339
2338
|
get adapterName(): string;
|
|
2340
2339
|
/** @returns Adapter capabilities for runtime feature detection */
|
|
2341
2340
|
get capabilities(): string[];
|
|
@@ -3291,7 +3290,7 @@ interface ConformanceTestConfig<TBus extends ScopedBus<string> = ScopedBus<strin
|
|
|
3291
3290
|
* @defaultValue 2 (when not specified)
|
|
3292
3291
|
* @example
|
|
3293
3292
|
* ```typescript
|
|
3294
|
-
* // Rate-limited API (e.g.,
|
|
3293
|
+
* // Rate-limited API (e.g., a free-tier API key)
|
|
3295
3294
|
* concurrency: 1 // Run test files sequentially
|
|
3296
3295
|
*
|
|
3297
3296
|
* // High-throughput API
|
|
@@ -3306,7 +3305,6 @@ interface ConformanceTestConfig<TBus extends ScopedBus<string> = ScopedBus<strin
|
|
|
3306
3305
|
* Derived from the default provider preset's `fastModel` (or `defaultModel` as fallback).
|
|
3307
3306
|
*
|
|
3308
3307
|
* **Claude**: `{ definitionId: 'anthropic', modelName: 'haiku' }`
|
|
3309
|
-
* **Gemini**: `{ definitionId: 'gemini', modelName: 'gemini-2.5-flash' }`
|
|
3310
3308
|
* @example
|
|
3311
3309
|
* ```typescript
|
|
3312
3310
|
* primaryModel: { definitionId: 'anthropic', modelName: 'haiku' }
|
|
@@ -3320,7 +3318,6 @@ interface ConformanceTestConfig<TBus extends ScopedBus<string> = ScopedBus<strin
|
|
|
3320
3318
|
* Derived from the default provider preset's `defaultModel`.
|
|
3321
3319
|
*
|
|
3322
3320
|
* **Claude**: `{ definitionId: 'anthropic', modelName: 'sonnet' }`
|
|
3323
|
-
* **Gemini**: `{ definitionId: 'gemini', modelName: 'gemini-2.5-pro' }`
|
|
3324
3321
|
* @example
|
|
3325
3322
|
* ```typescript
|
|
3326
3323
|
* secondaryModel: { definitionId: 'anthropic', modelName: 'sonnet' }
|
|
@@ -3344,7 +3341,7 @@ interface ConformanceTestConfig<TBus extends ScopedBus<string> = ScopedBus<strin
|
|
|
3344
3341
|
*
|
|
3345
3342
|
* When set, test infrastructure serializes context creation and key
|
|
3346
3343
|
* operations through a per-adapter queue. Useful for adapters with
|
|
3347
|
-
* aggressive rate limits (e.g.,
|
|
3344
|
+
* aggressive rate limits (e.g., free-tier API keys).
|
|
3348
3345
|
*
|
|
3349
3346
|
* **Default**: undefined (no throttling - tests run fully concurrent)
|
|
3350
3347
|
* @example
|
|
@@ -3885,7 +3882,7 @@ interface TurnEvent {
|
|
|
3885
3882
|
* Adapters provide detection functions specific to their log format:
|
|
3886
3883
|
* - Claude Code: `detectTurnStart` triggers on user messages,
|
|
3887
3884
|
* `detectTurnComplete` triggers on final text content blocks
|
|
3888
|
-
* -
|
|
3885
|
+
* - Formats with explicit `turn_start`/`turn_end` events may bypass this tracker
|
|
3889
3886
|
* @typeParam TRecord - The adapter's native log record type
|
|
3890
3887
|
* @see {@link TurnTracker} - Uses these options
|
|
3891
3888
|
*/
|
package/dist/adapters/node.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as LogImporter, i as LogFileChangeEvent, n as LogOrchestratorConfig, t as BaseLogOrchestrator } from "../base-orchestrator-
|
|
1
|
+
import { _ as LogImporter, i as LogFileChangeEvent, n as LogOrchestratorConfig, t as BaseLogOrchestrator } from "../base-orchestrator-DH6W4NQg.mjs";
|
|
2
2
|
|
|
3
3
|
//#region adapters/core/src/log-importer/jsonl-parser.d.ts
|
|
4
4
|
/**
|
|
@@ -352,7 +352,7 @@ interface DiscoveryMetadata {
|
|
|
352
352
|
* Contract for log importers (adapters and extensions).
|
|
353
353
|
*
|
|
354
354
|
* Importers implement this interface to import external session logs
|
|
355
|
-
* into Makaio's event system. Both AI adapters (Claude Code, Codex
|
|
355
|
+
* into Makaio's event system. Both AI adapters (Claude Code, Codex)
|
|
356
356
|
* and extensions can provide log importers.
|
|
357
357
|
* @remarks
|
|
358
358
|
* The importer is responsible for:
|
|
@@ -388,7 +388,6 @@ interface LogImporter<TRecord, TState = unknown> {
|
|
|
388
388
|
* Example implementations:
|
|
389
389
|
* - Claude Code: Check for `type` field in `['started', 'message', 'tool_use']`
|
|
390
390
|
* - Codex: Check for `event` field matching Codex schema patterns
|
|
391
|
-
* - Gemini: Check for Gemini-specific log structure
|
|
392
391
|
*
|
|
393
392
|
* Return `{ confidence: 0.95 }` for high confidence matches,
|
|
394
393
|
* `{ confidence: 0.5 }` for ambiguous formats, or `false` for incompatible.
|
|
@@ -403,7 +402,6 @@ interface LogImporter<TRecord, TState = unknown> {
|
|
|
403
402
|
* Examples of log directories:
|
|
404
403
|
* - Claude Code: `~/.claude/projects/` (contains `session.jsonl` files)
|
|
405
404
|
* - Codex: `~/.codex/sessions/` (date-organized subdirectories)
|
|
406
|
-
* - Gemini: `~/.gemini/tmp/` (hash-organized project directories)
|
|
407
405
|
*/
|
|
408
406
|
getLogDirectory(): string;
|
|
409
407
|
/**
|
|
@@ -526,7 +524,7 @@ interface LogImportTestConfig<TRecord = unknown, TState = unknown> {
|
|
|
526
524
|
* Fixture file name for conformance tests.
|
|
527
525
|
*
|
|
528
526
|
* Relative to the conformance harness fixture directory.
|
|
529
|
-
* @example 'codex-session.jsonl' or '
|
|
527
|
+
* @example 'codex-session.jsonl' or 'claude-session.jsonl'
|
|
530
528
|
*/
|
|
531
529
|
fixtureFile: string;
|
|
532
530
|
/**
|
package/dist/bus/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as ee,M as te,N as f,O as ne,P as re,Q as p,R as m,S as h,T as ie,U as ae,V as g,W as oe,X as se,Y as ce,Z as le,_ as ue,a as de,at as fe,b as pe,d as _,et as me,f as he,g as v,h as y,i as ge,it as b,j as x,k as S,l as C,m as w,nt as T,o as E,p as D,q as O,r as k,rt as A,s as j,t as M,tt as N,u as P,v as F,w as I,x as L,y as _e,z as ve}from"../bus-DzEgIHGt.mjs";import{z as R}from"zod";const z={"channel.open":{request:R.object({endpoint:R.string(),token:R.string(),clientPubKey:R.string(),transports:R.array(R.string())}),response:R.object({channelId:R.string(),endpointPubKey:R.string()})}};function B(e){let t=e instanceof Uint8Array?e:new Uint8Array(e),n=Array(t.length);for(let e=0;e<t.length;e++)n[e]=String.fromCharCode(t[e]);return btoa(n.join(``))}function V(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n.buffer}async function H(){return globalThis.crypto.subtle.generateKey({name:`ECDH`,namedCurve:`P-256`},!1,[`deriveKey`])}async function U(e){return B(await globalThis.crypto.subtle.exportKey(`raw`,e))}async function W(e){let t=V(e);return globalThis.crypto.subtle.importKey(`raw`,t,{name:`ECDH`,namedCurve:`P-256`},!1,[])}async function G(e,t){return globalThis.crypto.subtle.deriveKey({name:`ECDH`,public:t},e,{name:`AES-GCM`,length:256},!1,[`encrypt`,`decrypt`])}async function K(e,t,n){let r=globalThis.crypto.getRandomValues(new Uint8Array(12)),i=new TextEncoder().encode(t),a={name:`AES-GCM`,iv:r};n!==void 0&&(a.additionalData=new TextEncoder().encode(n));let o=await globalThis.crypto.subtle.encrypt(a,e,i);return{iv:B(r),data:B(o)}}async function q(e,t,n){let r=V(t.iv),i=V(t.data),a={name:`AES-GCM`,iv:r};n!==void 0&&(a.additionalData=new TextEncoder().encode(n));let o=await globalThis.crypto.subtle.decrypt(a,e,i);return new TextDecoder().decode(o)}function J(e,t){return{subject:t,$meta:{namespace:`channel:${e}`,isRequest:!1,payload:{},local:!1,channel:!1}}}function Y(e,t){return{subject:t,$meta:{namespace:`channel:${e}`,isRequest:!0,payload:{},local:!1,channel:!1}}}var X=class{channelId;sharedKey;context;transportNames;cleanups=[];pendingRequests=new Set;closed=!1;constructor(e,t,n,r){this.channelId=e,this.sharedKey=t,this.context=n,this.transportNames=r;let i=J(e,`$close`);this.cleanups.push(this.registerEventHandler(i,t,e=>{this.handlePeerClose()}))}on(e,t,n){this.assertOpen();let r=this.requireKey(),i=e.$meta.isRequest?this.registerRequestHandler(e,r,t,n):this.registerEventHandler(e,r,t,n);return this.cleanups.push(i),()=>{i();let e=this.cleanups.indexOf(i);e!==-1&&this.cleanups.splice(e,1)}}once(e,t){this.assertOpen();let n=this.requireKey(),r=null,i=(e=>{let n=r;if(r=null,n){let e=this.cleanups.indexOf(n);e!==-1&&this.cleanups.splice(e,1)}return n?.(),t(e)});return r=e.$meta.isRequest?this.registerRequestHandler(e,n,i):this.registerEventHandler(e,n,i),this.cleanups.push(r),()=>{if(r){let e=r;r=null;let t=this.cleanups.indexOf(e);t!==-1&&this.cleanups.splice(t,1),e()}}}async emit(e,t){this.assertOpen();let n=this.requireKey(),r=J(this.channelId,e.subject),i=await K(n,JSON.stringify(t),`${this.channelId}:${e.subject}:evt`);await w(this.context,r,i,{...this.transportNames?{transports:[...this.transportNames]}:{}})}async request(e,t,n){this.assertOpen();let r=this.requireKey(),i=new AbortController;this.pendingRequests.add(i);try{let a=Y(this.channelId,e.subject),o=await K(r,JSON.stringify(t),`${this.channelId}:${e.subject}:req`),s=await q(r,await _(this.context,a,o,{signal:i.signal,...n?.timeout===void 0?{}:{timeout:n.timeout},...this.transportNames?{transports:[...this.transportNames]}:{}}),`${this.channelId}:${e.subject}:res`);return JSON.parse(s)}finally{this.pendingRequests.delete(i)}}async requestOptional(e,t,n){try{return{handled:!0,data:await this.request(e,t,n)}}catch(e){if(e instanceof l)return{handled:!1};throw e}}close(){if(this.closed)return;this.closed=!0;let e=this.sharedKey;if(e){let t=J(this.channelId,`$close`);K(e,JSON.stringify({}),`${this.channelId}:$close:evt`).then(e=>w(this.context,t,e,{...this.transportNames?{transports:[...this.transportNames]}:{}})).catch(()=>{})}this.abortPendingRequests(),this.runCleanups(),this.sharedKey=null}assertOpen(){if(this.closed)throw new g(this.channelId)}requireKey(){return this.sharedKey}registerEventHandler(e,t,n,r){let i=J(this.channelId,e.subject),a=`${this.channelId}:${e.subject}:evt`;return v(this.context,i,async e=>{let r=await q(t,e.payload,a),i=JSON.parse(r);return n({...e,payload:i})},r)}registerRequestHandler(e,t,n,r){let i=Y(this.channelId,e.subject),a=`${this.channelId}:${e.subject}:req`,o=`${this.channelId}:${e.subject}:res`;return v(this.context,i,async e=>{let r=await q(t,e.payload,a),i=JSON.parse(r),s,c=e=>{s={value:e}},l=e=>{s={value:{...s?.value??{},...e}}},u=async()=>{let n=s;if(await e.next(),n!==void 0){s=n;return}let r=e.result;if(r!==void 0){let e=await q(t,r,o);s={value:JSON.parse(e)}}};if(await n({...e,payload:i,get result(){return s?.value},setResult:c,extendResult:l,next:u}),s!==void 0){let n=await K(t,JSON.stringify(s.value),o);e.setResult(n)}},r)}handlePeerClose(){this.closed||(this.closed=!0,this.abortPendingRequests(),this.runCleanups(),this.sharedKey=null)}abortPendingRequests(){let e=new g(this.channelId);for(let t of this.pendingRequests)t.abort(e);this.pendingRequests.clear()}runCleanups(){for(let e of this.cleanups)try{e()}catch{}this.cleanups.length=0}};function Z(e){return e.namespaceRegistry.registerNamespace(p(`system`,z)).subjects.channel.open}function ye(e,t,n,r){let i=v(e,Z(e),async i=>{if(i.payload.endpoint!==t){await i.next();return}if(i.payload.token!==r.token)throw new c(t);let{publicKey:a,privateKey:o}=await H(),s=await G(o,await W(i.payload.clientPubKey)),l=globalThis.crypto.randomUUID(),u=new Set(e.transportRegistry.names()),d=new X(l,s,e,(i.payload.transports??[]).filter(e=>u.has(e)));try{n(d),i.setResult({channelId:l,endpointPubKey:await U(a)})}catch(e){throw d.close(),e}});return{name:t,token:r.token,close:i}}async function be(e,t,n){let r=Z(e),{publicKey:i,privateKey:a}=await H(),o=await U(i),s=n.transports!==void 0,c=s?[...n.transports]:[...e.transportRegistry.names()],l=s?{transports:c}:void 0,u=await _(e,r,{endpoint:t,token:n.token,clientPubKey:o,transports:c},l),d=await G(a,await W(u.endpointPubKey));return new X(u.channelId,d,e,c)}var xe=class{pending;constructor(){this.pending=new Map}track(e,t,n){return new Promise((r,i)=>{if(n?.aborted){i(s(n.reason));return}let a=t===0?void 0:setTimeout(()=>{let n=this.pending.get(e);n!==void 0&&(clearTimeout(n.timeoutId),n.removeAbortListener?.(),this.pending.delete(e),n.reject(new f(e,t)))},t);if(this.pending.set(e,{resolve:r,reject:i,timeoutId:a,removeAbortListener:void 0}),n){let t=()=>{this.reject(e,s(n.reason))};n.addEventListener(`abort`,t,{once:!0});let r=()=>{n.removeEventListener(`abort`,t)},i=this.pending.get(e);i&&(i.removeAbortListener=r)}n?.aborted&&this.reject(e,s(n.reason))})}resolve(e,t){let n=this.pending.get(e);n&&(clearTimeout(n.timeoutId),n.removeAbortListener?.(),this.pending.delete(e),n.resolve(t))}reject(e,t){let n=this.pending.get(e);n&&(clearTimeout(n.timeoutId),n.removeAbortListener?.(),this.pending.delete(e),n.reject(t))}cancel(e,t){this.reject(e,t??s(void 0))}rejectAll(e){for(let[t,n]of this.pending.entries())clearTimeout(n.timeoutId),n.removeAbortListener?.(),n.reject(e);this.pending.clear()}cleanup(){this.rejectAll(Error(`Transport disconnected`))}};const Se=p(`bus:lifecycle`,de).subjects;function Ce(e,t){let n={},r={},i={};for(let[t,a]of e)n[t]=a.priorities,r[t]=a.deliveryClass??`relayable`,a.filter!==void 0&&(i[t]=a.filter);return{type:`subscribe`,...t===void 0?{}:{ackId:t},subjects:n,deliveryClasses:r,...Object.keys(i).length>0&&{filters:i}}}function we(e,t){return{type:`unsubscribe`,...t===void 0?{}:{ackId:t},subjects:e}}function Q(e,t){let n=e.trim();if(n.length===0||n.startsWith(`extension:`))throw Error(`Invalid extensionName: expected a non-empty extension name without the "extension:" prefix.`);let r=n;return{...p(`extension:${r}`,t.schemas),domain:r,extensions:t.extensions??{}}}function $(e,t){return`${e}.${t}`}function Te(){let e=new Map;return{register(t){let n=$(t.namespace,t.subject);return e.set(n,t),()=>{e.get(n)===t&&e.delete(n)}},get(t,n){return e.get($(t,n))}}}const Ee=x.fact.$meta.namespace,De=x.fact.subject;function Oe(e){return e.type===`event`||e.type===`request`||e.type===`broadcast`}async function ke(e,t,n,r,i,a){let o=y({message:t,direction:`outbound`,observedAt:a(),machineId:i,namespaceRegistry:n,projectorRegistry:r});for(let n of o)await e.send({type:`event`,namespace:Ee,subject:De,payload:n,messageId:`${t.messageId}:telemetry:${n.factId}`,correlationId:t.correlationId})}function Ae(e,t,n,r,i){return async function(a,o){if(!Oe(a))return!0;if(await ke(e,a,t,n,r,i),a.type===`request`)throw Error(`Projected telemetry transport cannot satisfy request responses; exclude it from request routing.`);return a.type===`broadcast`?[]:!0}}function je(e){let{inner:t,namespaceRegistry:n,projectorRegistry:r,machineId:i,now:a=Date.now}=e,o={name:e.name,send:Ae(t,n,r,i,a),onReceive(e){return t.onReceive(async()=>{})},connect(){return t.connect()},disconnect(){return t.disconnect()},subscribe(){return Promise.resolve()},unsubscribe(){return Promise.resolve()},get ready(){return t.ready},get onNewReadySession(){return t.onNewReadySession},set onNewReadySession(e){t.onNewReadySession=e},get onConnected(){return t.onConnected},set onConnected(e){t.onConnected=e},get onDisconnected(){return t.onDisconnected},set onDisconnected(e){t.onDisconnected=e},isReady(){return t.isReady?.()??!0},cancelRequest(e,n){t.cancelRequest?.(e,n)},onBroadcastResults(e,n,r){t.onBroadcastResults?.(e,n,r)}};return t.reconnect&&(o.reconnect=()=>t.reconnect()),o}export{ae as BusAbortError,d as BusError,Se as BusLifecycle,m as CONNECTION_LOST_ERROR_CODE,c as ChannelAuthError,g as ChannelClosedError,n as ChannelOnlyError,ve as ConnectionLostError,xe as CorrelationTracker,he as DEFAULT_READINESS_TIMEOUT_MS,D as DEFAULT_REQUEST_TIMEOUT_MS,pe as LOCAL_ORIGIN,ee as LocalSubjectError,M as MakaioBus,o as NO_HANDLER_ERROR_CODE,l as NoHandlerError,P as OnceAbortError,L as REMOTE_ORIGIN,re as RequestError,z as SystemChannelSchemas,f as TimeoutError,te as ValidationError,F as __resetWarnedSubjects,Ce as buildSubscribeMessage,we as buildUnsubscribeMessage,b as channelSubject,me as collectorOnlySubject,k as createBusContext,ge as createBusInstance,ye as createChannelEndpoint,Q as createExtensionNamespace,C as createFilteredBus,je as createProjectedTelemetryTransport,Te as createSubjectTelemetryProjectorRegistry,N as defaultTransports,E as defineSubjectExtension,a as deserializeTransportError,j as extendSubject,i as findInErrorChain,e as getFullSubjectForSubjectDefinition,O as getPath,ne as getSubjectFromBusMessage,h as handleCorrelationResponse,T as hostLocalRequest,S as isNoHandlerErrorForSubject,oe as isRequestCancellation,fe as isRequestSchema,A as localSubject,se as matchesAnySubscription,u as matchesFilter,le as matchesSubscription,ce as mergeFilters,be as openChannel,_e as parseBusUrl,y as projectSubjectTelemetryFacts,r as serializeTransportError,I as shouldReceiveMessage,ie as trackMessageCorrelation,t as transportErrorData,ue as waitForSubscriptionPropagation};
|
|
1
|
+
import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as ee,M as te,N as f,O as ne,P as re,Q as p,R as m,S as h,T as ie,U as ae,V as g,W as oe,X as se,Y as ce,Z as le,_ as ue,a as de,at as fe,b as pe,d as _,et as me,f as he,g as v,h as y,i as ge,it as b,j as x,k as S,l as C,m as w,nt as T,o as E,p as D,q as O,r as k,rt as A,s as j,t as M,tt as N,u as P,v as F,w as I,x as L,y as _e,z as ve}from"../bus-CgswamdO.mjs";import{z as R}from"zod";const z={"channel.open":{request:R.object({endpoint:R.string(),token:R.string(),clientPubKey:R.string(),transports:R.array(R.string())}),response:R.object({channelId:R.string(),endpointPubKey:R.string()})}};function B(e){let t=e instanceof Uint8Array?e:new Uint8Array(e),n=Array(t.length);for(let e=0;e<t.length;e++)n[e]=String.fromCharCode(t[e]);return btoa(n.join(``))}function V(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n.buffer}async function H(){return globalThis.crypto.subtle.generateKey({name:`ECDH`,namedCurve:`P-256`},!1,[`deriveKey`])}async function U(e){return B(await globalThis.crypto.subtle.exportKey(`raw`,e))}async function W(e){let t=V(e);return globalThis.crypto.subtle.importKey(`raw`,t,{name:`ECDH`,namedCurve:`P-256`},!1,[])}async function G(e,t){return globalThis.crypto.subtle.deriveKey({name:`ECDH`,public:t},e,{name:`AES-GCM`,length:256},!1,[`encrypt`,`decrypt`])}async function K(e,t,n){let r=globalThis.crypto.getRandomValues(new Uint8Array(12)),i=new TextEncoder().encode(t),a={name:`AES-GCM`,iv:r};n!==void 0&&(a.additionalData=new TextEncoder().encode(n));let o=await globalThis.crypto.subtle.encrypt(a,e,i);return{iv:B(r),data:B(o)}}async function q(e,t,n){let r=V(t.iv),i=V(t.data),a={name:`AES-GCM`,iv:r};n!==void 0&&(a.additionalData=new TextEncoder().encode(n));let o=await globalThis.crypto.subtle.decrypt(a,e,i);return new TextDecoder().decode(o)}function J(e,t){return{subject:t,$meta:{namespace:`channel:${e}`,isRequest:!1,payload:{},local:!1,channel:!1}}}function Y(e,t){return{subject:t,$meta:{namespace:`channel:${e}`,isRequest:!0,payload:{},local:!1,channel:!1}}}var X=class{channelId;sharedKey;context;transportNames;cleanups=[];pendingRequests=new Set;closed=!1;constructor(e,t,n,r){this.channelId=e,this.sharedKey=t,this.context=n,this.transportNames=r;let i=J(e,`$close`);this.cleanups.push(this.registerEventHandler(i,t,e=>{this.handlePeerClose()}))}on(e,t,n){this.assertOpen();let r=this.requireKey(),i=e.$meta.isRequest?this.registerRequestHandler(e,r,t,n):this.registerEventHandler(e,r,t,n);return this.cleanups.push(i),()=>{i();let e=this.cleanups.indexOf(i);e!==-1&&this.cleanups.splice(e,1)}}once(e,t){this.assertOpen();let n=this.requireKey(),r=null,i=(e=>{let n=r;if(r=null,n){let e=this.cleanups.indexOf(n);e!==-1&&this.cleanups.splice(e,1)}return n?.(),t(e)});return r=e.$meta.isRequest?this.registerRequestHandler(e,n,i):this.registerEventHandler(e,n,i),this.cleanups.push(r),()=>{if(r){let e=r;r=null;let t=this.cleanups.indexOf(e);t!==-1&&this.cleanups.splice(t,1),e()}}}async emit(e,t){this.assertOpen();let n=this.requireKey(),r=J(this.channelId,e.subject),i=await K(n,JSON.stringify(t),`${this.channelId}:${e.subject}:evt`);await w(this.context,r,i,{...this.transportNames?{transports:[...this.transportNames]}:{}})}async request(e,t,n){this.assertOpen();let r=this.requireKey(),i=new AbortController;this.pendingRequests.add(i);try{let a=Y(this.channelId,e.subject),o=await K(r,JSON.stringify(t),`${this.channelId}:${e.subject}:req`),s=await q(r,await _(this.context,a,o,{signal:i.signal,...n?.timeout===void 0?{}:{timeout:n.timeout},...this.transportNames?{transports:[...this.transportNames]}:{}}),`${this.channelId}:${e.subject}:res`);return JSON.parse(s)}finally{this.pendingRequests.delete(i)}}async requestOptional(e,t,n){try{return{handled:!0,data:await this.request(e,t,n)}}catch(e){if(e instanceof l)return{handled:!1};throw e}}close(){if(this.closed)return;this.closed=!0;let e=this.sharedKey;if(e){let t=J(this.channelId,`$close`);K(e,JSON.stringify({}),`${this.channelId}:$close:evt`).then(e=>w(this.context,t,e,{...this.transportNames?{transports:[...this.transportNames]}:{}})).catch(()=>{})}this.abortPendingRequests(),this.runCleanups(),this.sharedKey=null}assertOpen(){if(this.closed)throw new g(this.channelId)}requireKey(){return this.sharedKey}registerEventHandler(e,t,n,r){let i=J(this.channelId,e.subject),a=`${this.channelId}:${e.subject}:evt`;return v(this.context,i,async e=>{let r=await q(t,e.payload,a),i=JSON.parse(r);return n({...e,payload:i})},r)}registerRequestHandler(e,t,n,r){let i=Y(this.channelId,e.subject),a=`${this.channelId}:${e.subject}:req`,o=`${this.channelId}:${e.subject}:res`;return v(this.context,i,async e=>{let r=await q(t,e.payload,a),i=JSON.parse(r),s,c=e=>{s={value:e}},l=e=>{s={value:{...s?.value??{},...e}}},u=async()=>{let n=s;if(await e.next(),n!==void 0){s=n;return}let r=e.result;if(r!==void 0){let e=await q(t,r,o);s={value:JSON.parse(e)}}};if(await n({...e,payload:i,get result(){return s?.value},setResult:c,extendResult:l,next:u}),s!==void 0){let n=await K(t,JSON.stringify(s.value),o);e.setResult(n)}},r)}handlePeerClose(){this.closed||(this.closed=!0,this.abortPendingRequests(),this.runCleanups(),this.sharedKey=null)}abortPendingRequests(){let e=new g(this.channelId);for(let t of this.pendingRequests)t.abort(e);this.pendingRequests.clear()}runCleanups(){for(let e of this.cleanups)try{e()}catch{}this.cleanups.length=0}};function Z(e){return e.namespaceRegistry.registerNamespace(p(`system`,z)).subjects.channel.open}function ye(e,t,n,r){let i=v(e,Z(e),async i=>{if(i.payload.endpoint!==t){await i.next();return}if(i.payload.token!==r.token)throw new c(t);let{publicKey:a,privateKey:o}=await H(),s=await G(o,await W(i.payload.clientPubKey)),l=globalThis.crypto.randomUUID(),u=new Set(e.transportRegistry.names()),d=new X(l,s,e,(i.payload.transports??[]).filter(e=>u.has(e)));try{n(d),i.setResult({channelId:l,endpointPubKey:await U(a)})}catch(e){throw d.close(),e}});return{name:t,token:r.token,close:i}}async function be(e,t,n){let r=Z(e),{publicKey:i,privateKey:a}=await H(),o=await U(i),s=n.transports!==void 0,c=s?[...n.transports]:[...e.transportRegistry.names()],l=s?{transports:c}:void 0,u=await _(e,r,{endpoint:t,token:n.token,clientPubKey:o,transports:c},l),d=await G(a,await W(u.endpointPubKey));return new X(u.channelId,d,e,c)}var xe=class{pending;constructor(){this.pending=new Map}track(e,t,n){return new Promise((r,i)=>{if(n?.aborted){i(s(n.reason));return}let a=t===0?void 0:setTimeout(()=>{let n=this.pending.get(e);n!==void 0&&(clearTimeout(n.timeoutId),n.removeAbortListener?.(),this.pending.delete(e),n.reject(new f(e,t)))},t);if(this.pending.set(e,{resolve:r,reject:i,timeoutId:a,removeAbortListener:void 0}),n){let t=()=>{this.reject(e,s(n.reason))};n.addEventListener(`abort`,t,{once:!0});let r=()=>{n.removeEventListener(`abort`,t)},i=this.pending.get(e);i&&(i.removeAbortListener=r)}n?.aborted&&this.reject(e,s(n.reason))})}resolve(e,t){let n=this.pending.get(e);n&&(clearTimeout(n.timeoutId),n.removeAbortListener?.(),this.pending.delete(e),n.resolve(t))}reject(e,t){let n=this.pending.get(e);n&&(clearTimeout(n.timeoutId),n.removeAbortListener?.(),this.pending.delete(e),n.reject(t))}cancel(e,t){this.reject(e,t??s(void 0))}rejectAll(e){for(let[t,n]of this.pending.entries())clearTimeout(n.timeoutId),n.removeAbortListener?.(),n.reject(e);this.pending.clear()}cleanup(){this.rejectAll(Error(`Transport disconnected`))}};const Se=p(`bus:lifecycle`,de).subjects;function Ce(e,t){let n={},r={},i={};for(let[t,a]of e)n[t]=a.priorities,r[t]=a.deliveryClass??`relayable`,a.filter!==void 0&&(i[t]=a.filter);return{type:`subscribe`,...t===void 0?{}:{ackId:t},subjects:n,deliveryClasses:r,...Object.keys(i).length>0&&{filters:i}}}function we(e,t){return{type:`unsubscribe`,...t===void 0?{}:{ackId:t},subjects:e}}function Q(e,t){let n=e.trim();if(n.length===0||n.startsWith(`extension:`))throw Error(`Invalid extensionName: expected a non-empty extension name without the "extension:" prefix.`);let r=n;return{...p(`extension:${r}`,t.schemas),domain:r,extensions:t.extensions??{}}}function $(e,t){return`${e}.${t}`}function Te(){let e=new Map;return{register(t){let n=$(t.namespace,t.subject);return e.set(n,t),()=>{e.get(n)===t&&e.delete(n)}},get(t,n){return e.get($(t,n))}}}const Ee=x.fact.$meta.namespace,De=x.fact.subject;function Oe(e){return e.type===`event`||e.type===`request`||e.type===`broadcast`}async function ke(e,t,n,r,i,a){let o=y({message:t,direction:`outbound`,observedAt:a(),machineId:i,namespaceRegistry:n,projectorRegistry:r});for(let n of o)await e.send({type:`event`,namespace:Ee,subject:De,payload:n,messageId:`${t.messageId}:telemetry:${n.factId}`,correlationId:t.correlationId})}function Ae(e,t,n,r,i){return async function(a,o){if(!Oe(a))return!0;if(await ke(e,a,t,n,r,i),a.type===`request`)throw Error(`Projected telemetry transport cannot satisfy request responses; exclude it from request routing.`);return a.type===`broadcast`?[]:!0}}function je(e){let{inner:t,namespaceRegistry:n,projectorRegistry:r,machineId:i,now:a=Date.now}=e,o={name:e.name,send:Ae(t,n,r,i,a),onReceive(e){return t.onReceive(async()=>{})},connect(){return t.connect()},disconnect(){return t.disconnect()},subscribe(){return Promise.resolve()},unsubscribe(){return Promise.resolve()},get ready(){return t.ready},get onNewReadySession(){return t.onNewReadySession},set onNewReadySession(e){t.onNewReadySession=e},get onConnected(){return t.onConnected},set onConnected(e){t.onConnected=e},get onDisconnected(){return t.onDisconnected},set onDisconnected(e){t.onDisconnected=e},isReady(){return t.isReady?.()??!0},cancelRequest(e,n){t.cancelRequest?.(e,n)},onBroadcastResults(e,n,r){t.onBroadcastResults?.(e,n,r)}};return t.reconnect&&(o.reconnect=()=>t.reconnect()),o}export{ae as BusAbortError,d as BusError,Se as BusLifecycle,m as CONNECTION_LOST_ERROR_CODE,c as ChannelAuthError,g as ChannelClosedError,n as ChannelOnlyError,ve as ConnectionLostError,xe as CorrelationTracker,he as DEFAULT_READINESS_TIMEOUT_MS,D as DEFAULT_REQUEST_TIMEOUT_MS,pe as LOCAL_ORIGIN,ee as LocalSubjectError,M as MakaioBus,o as NO_HANDLER_ERROR_CODE,l as NoHandlerError,P as OnceAbortError,L as REMOTE_ORIGIN,re as RequestError,z as SystemChannelSchemas,f as TimeoutError,te as ValidationError,F as __resetWarnedSubjects,Ce as buildSubscribeMessage,we as buildUnsubscribeMessage,b as channelSubject,me as collectorOnlySubject,k as createBusContext,ge as createBusInstance,ye as createChannelEndpoint,Q as createExtensionNamespace,C as createFilteredBus,je as createProjectedTelemetryTransport,Te as createSubjectTelemetryProjectorRegistry,N as defaultTransports,E as defineSubjectExtension,a as deserializeTransportError,j as extendSubject,i as findInErrorChain,e as getFullSubjectForSubjectDefinition,O as getPath,ne as getSubjectFromBusMessage,h as handleCorrelationResponse,T as hostLocalRequest,S as isNoHandlerErrorForSubject,oe as isRequestCancellation,fe as isRequestSchema,A as localSubject,se as matchesAnySubscription,u as matchesFilter,le as matchesSubscription,ce as mergeFilters,be as openChannel,_e as parseBusUrl,y as projectSubjectTelemetryFacts,r as serializeTransportError,I as shouldReceiveMessage,ie as trackMessageCorrelation,t as transportErrorData,ue as waitForSubscriptionPropagation};
|