@makaio/framework 1.0.0-dev-1783940945655 → 1.0.0-dev-1783973359164
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.makaio-build.json +2 -2
- package/dist/adapter-subsystem/index.d.mts +10 -0
- package/dist/adapter-subsystem/index.mjs +1 -1
- package/dist/authority-state-bootstrap-CEuKScnL.mjs +1 -0
- package/dist/bus/index.d.mts +31 -31
- package/dist/bus/index.mjs +1 -1
- package/dist/{canonical-model-CVRCW9h7.mjs → canonical-model-C31NaBJs.mjs} +1 -1
- package/dist/clients/index.d.mts +5 -5
- package/dist/contracts/adapter/index.d.mts +2 -2
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
- package/dist/contracts/canonical-model/index.d.mts +1 -1
- package/dist/contracts/canonical-model/index.mjs +1 -1
- package/dist/contracts/client/index.d.mts +1 -1
- package/dist/contracts/extension/index.d.mts +2 -2
- package/dist/contracts/facet/index.d.mts +1 -1
- package/dist/contracts/index.d.mts +228 -160
- package/dist/contracts/index.mjs +1 -1
- package/dist/contracts/native-session-supervisor/index.d.mts +2 -2
- package/dist/contracts/session/index.d.mts +3 -3
- package/dist/contracts/shared/index.d.mts +1 -1
- package/dist/contracts/variant/index.d.mts +1 -1
- package/dist/contracts/workflow/index.d.mts +3 -3
- package/dist/contracts/workflow/index.mjs +1 -1
- package/dist/{detached-extension-handle-CTaQoolf.mjs → detached-extension-handle-vDK194QV.mjs} +1 -1
- package/dist/drizzle/0026_m_mrgvi7fq.sql +16 -0
- package/dist/drizzle/0027_m_mrgw0uzg.sql +1 -0
- package/dist/drizzle/0028_m_mrgx04i1.sql +1 -0
- package/dist/drizzle/0029_terminal-authority.sql +1 -0
- package/dist/drizzle/meta/_journal.json +28 -0
- package/dist/{index-Do7Wgio_2.d.mts → index-BDr2Ba122.d.mts} +1 -1
- package/dist/{index-p6dWV52m.d.mts → index-BKZAAWo2.d.mts} +330 -330
- package/dist/{index-CB2XTzvd.d.mts → index-Bbr5LEUc.d.mts} +1 -1
- package/dist/{index-5s_dN3cg2.d.mts → index-BmsPH78f2.d.mts} +33 -5
- package/dist/{index-BsEvzFey.d.mts → index-ButbwvVY.d.mts} +6 -6
- package/dist/{index-D5IEq4_E.d.mts → index-C2C1qH1Y.d.mts} +6 -4
- package/dist/{index-BtL7ONuM.d.mts → index-C6LZOiDv.d.mts} +149 -1
- package/dist/{index-DxatNFz7.d.mts → index-COC9jCdc.d.mts} +12 -12
- package/dist/{index-BcejR1Jc.d.mts → index-CtjLeK1F.d.mts} +1 -1
- package/dist/{index-Cw3cjGAT.d.mts → index-Cx8jGKOs.d.mts} +11 -11
- package/dist/{index-DNc1yLQs.d.mts → index-DHGW7dFf.d.mts} +8 -8
- package/dist/{index-DlUPWOh4.d.mts → index-DNkR5yTY.d.mts} +2876 -709
- package/dist/{index-iJP-l15K.d.mts → index-DXBiCH2y.d.mts} +27 -1
- package/dist/{index-CW6-0k3Z.d.mts → index-DlAfs3RD.d.mts} +105 -105
- package/dist/{index-sCOlgPyj.d.mts → index-DpZbaS7y.d.mts} +388 -388
- package/dist/{index-C9Q1E8Y-.d.mts → index-x2gFj3BK.d.mts} +38 -38
- package/dist/kernel/extension/index.d.mts +1 -1
- package/dist/kernel/index.d.mts +2 -2
- package/dist/kernel/observability/index.d.mts +1 -1
- package/dist/{load-extensions-BtUrq2_t.mjs → load-extensions-nqL5WAKj.mjs} +1 -1
- package/dist/mcp-http-server/index.d.mts +27 -90
- package/dist/mcp-http-server/index.mjs +1 -1
- package/dist/{namespace-CQBSXm1U.d.mts → namespace-B0uZIZYT.d.mts} +20 -20
- package/dist/{namespace-CfgtqUWS.d.mts → namespace-BoA6u44C.d.mts} +156 -156
- package/dist/{namespace-CpyL93kW.d.mts → namespace-CCZXyxSe.d.mts} +9 -9
- package/dist/{namespace-D3SQQgxa2.d.mts → namespace-CukqFYHf2.d.mts} +1 -1
- package/dist/{namespace-CGgOLxiW2.d.mts → namespace-rO-C2Dgu2.d.mts} +2 -2
- package/dist/package-BYpWkSuQ.mjs +1 -0
- package/dist/package-CsFFT9iR.mjs +7 -0
- package/dist/{package-CdBiknf3.d.mts → package-DG9GSY8M.d.mts} +52 -1
- package/dist/package.json +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/runtime-node/extension-validation.mjs +1 -1
- package/dist/runtime-node/index.d.mts +4 -89
- package/dist/runtime-node/index.mjs +24 -24
- package/dist/runtime-node/makaio-config.mjs +1 -1
- package/dist/runtime-node/workflow-worker/index.d.mts +2 -2
- package/dist/runtime-node/workflow-worker/index.mjs +1 -1
- package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
- package/dist/{schema-BnTOFCdU.d.mts → schema-aOwmHxaF.d.mts} +1 -1
- package/dist/{schemas--uwN5dfK2.d.mts → schemas-CoJCTFod2.d.mts} +19 -19
- package/dist/{schemas-C17AifUQ.d.mts → schemas-OaBqeEUT.d.mts} +156 -156
- package/dist/schemas-th_nuC5t.mjs +1 -0
- package/dist/service-base/index.d.mts +4 -3
- package/dist/service-base/index.mjs +1 -1
- package/dist/services/agent-runtime/index.d.mts +2 -2
- package/dist/services/agent-runtime/namespace.d.mts +1 -1
- package/dist/services/agent-runtime/schemas.d.mts +1 -1
- package/dist/services/context-rules/index.d.mts +3 -3
- package/dist/services/execution-target/index.d.mts +1 -1
- package/dist/services/filesystem/namespace.d.mts +6 -6
- package/dist/services/filesystem/schemas.d.mts +3 -3
- package/dist/services/index.d.mts +104 -104
- package/dist/services/index.mjs +1 -1
- package/dist/services/session/index.d.mts +5 -5
- package/dist/services/session/messages/namespace.d.mts +1 -1
- package/dist/services/session/session-events/namespace.d.mts +1 -1
- package/dist/services/session/storage/namespace.d.mts +1 -1
- package/dist/services/session/storage/schema.d.mts +1 -1
- package/dist/services/settings/namespace.d.mts +16 -16
- package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
- package/dist/services/subagent/index.d.mts +2 -2
- package/dist/services/subagent/index.mjs +1 -1
- package/dist/services/subagent-template/index.d.mts +2 -2
- package/dist/services/subagent-template/namespace.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/services/tools/index.mjs +1 -1
- package/dist/{session-lineage-BLw8iWAj.d.mts → session-lineage-YShrn77v.d.mts} +1 -1
- package/dist/storage/drizzle/index.d.mts +8 -1
- package/dist/storage/drizzle/index.mjs +1 -1
- package/dist/tools/index.d.mts +1 -1
- package/dist/{tools-C8vqn1KY.mjs → tools-PC_L6g2m.mjs} +1 -1
- package/dist/{transition-Bfe8VVc1.d.mts → transition-CwUIm1hJ.d.mts} +8 -0
- package/dist/{types-q95p55BF.d.mts → types-BaDYigzD.d.mts} +567 -256
- package/dist/workflow-DFJYGjq_.mjs +1 -0
- package/dist/workflow-engine/index.d.mts +690 -87
- package/dist/workflow-engine/index.mjs +1 -1
- package/dist/workflow-engine/package.d.mts +1 -1
- package/dist/workflow-engine/package.mjs +1 -1
- package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
- package/dist/workflow-worker-BEFjCccX.mjs +1 -0
- package/package.json +9 -8
- package/dist/loop-gate-handlers-0a3dIY8O.mjs +0 -1
- package/dist/package-0gVhAVkO.mjs +0 -7
- package/dist/package-BwvGaKwn.mjs +0 -1
- package/dist/schemas-D6lj9NMg.mjs +0 -1
- package/dist/workflow-CvVAZ89A.mjs +0 -1
- package/dist/workflow-worker-CudfEstp.mjs +0 -1
- /package/dist/{await-trigger-D623tvig.mjs → await-trigger-DP-fTQc4.mjs} +0 -0
- /package/dist/{descriptor-to-package-D5SWf6TL.mjs → descriptor-to-package-Rs-OjOQU.mjs} +0 -0
- /package/dist/{esm-oHhRYTEn.mjs → esm-C_WW4-pP.mjs} +0 -0
|
@@ -17,8 +17,8 @@ declare const ClientExecutionContextSchema: z.ZodObject<{
|
|
|
17
17
|
env: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
18
18
|
configDir: z.ZodNullable<z.ZodString>;
|
|
19
19
|
source: z.ZodEnum<{
|
|
20
|
-
managed: "managed";
|
|
21
20
|
global: "global";
|
|
21
|
+
managed: "managed";
|
|
22
22
|
}>;
|
|
23
23
|
version: z.ZodNullable<z.ZodString>;
|
|
24
24
|
}, z.core.$strip>;
|
|
@@ -39,8 +39,8 @@ declare const ClientResolveBinarySchema: {
|
|
|
39
39
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
40
40
|
projectDir: z.ZodOptional<z.ZodString>;
|
|
41
41
|
preferSource: z.ZodOptional<z.ZodEnum<{
|
|
42
|
-
managed: "managed";
|
|
43
42
|
global: "global";
|
|
43
|
+
managed: "managed";
|
|
44
44
|
}>>;
|
|
45
45
|
harnessId: z.ZodOptional<z.ZodString>;
|
|
46
46
|
}, z.core.$strip>;
|
|
@@ -49,8 +49,8 @@ declare const ClientResolveBinarySchema: {
|
|
|
49
49
|
env: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
50
50
|
configDir: z.ZodNullable<z.ZodString>;
|
|
51
51
|
source: z.ZodEnum<{
|
|
52
|
-
managed: "managed";
|
|
53
52
|
global: "global";
|
|
53
|
+
managed: "managed";
|
|
54
54
|
}>;
|
|
55
55
|
version: z.ZodNullable<z.ZodString>;
|
|
56
56
|
}, z.core.$strip>;
|
|
@@ -89,9 +89,9 @@ declare const ClientSchemas: {
|
|
|
89
89
|
baseConfigDir: z.ZodOptional<z.ZodString>;
|
|
90
90
|
projectDir: z.ZodOptional<z.ZodString>;
|
|
91
91
|
configInheritance: z.ZodOptional<z.ZodEnum<{
|
|
92
|
+
empty: "empty";
|
|
92
93
|
"auth-only": "auth-only";
|
|
93
94
|
full: "full";
|
|
94
|
-
empty: "empty";
|
|
95
95
|
}>>;
|
|
96
96
|
}, z.core.$strip>;
|
|
97
97
|
response: z.ZodObject<{
|
|
@@ -222,8 +222,8 @@ declare const ClientSchemas: {
|
|
|
222
222
|
clientId: z.ZodString;
|
|
223
223
|
source: z.ZodObject<{
|
|
224
224
|
layer: z.ZodEnum<{
|
|
225
|
-
supervisor: "supervisor";
|
|
226
225
|
adapter: "adapter";
|
|
226
|
+
supervisor: "supervisor";
|
|
227
227
|
"client-hook": "client-hook";
|
|
228
228
|
statusline: "statusline";
|
|
229
229
|
"cli-wrapper": "cli-wrapper";
|
|
@@ -258,13 +258,13 @@ declare const ClientSchemas: {
|
|
|
258
258
|
clientRuntimeId: z.ZodString;
|
|
259
259
|
clientId: z.ZodString;
|
|
260
260
|
status: z.ZodEnum<{
|
|
261
|
-
observed: "observed";
|
|
262
261
|
started: "started";
|
|
262
|
+
observed: "observed";
|
|
263
263
|
}>;
|
|
264
264
|
source: z.ZodObject<{
|
|
265
265
|
layer: z.ZodEnum<{
|
|
266
|
-
supervisor: "supervisor";
|
|
267
266
|
adapter: "adapter";
|
|
267
|
+
supervisor: "supervisor";
|
|
268
268
|
"client-hook": "client-hook";
|
|
269
269
|
statusline: "statusline";
|
|
270
270
|
"cli-wrapper": "cli-wrapper";
|
|
@@ -506,8 +506,8 @@ declare const ClientSchemas: {
|
|
|
506
506
|
cwd: z.ZodOptional<z.ZodString>;
|
|
507
507
|
machineId: z.ZodOptional<z.ZodString>;
|
|
508
508
|
startMode: z.ZodOptional<z.ZodEnum<{
|
|
509
|
-
fresh: "fresh";
|
|
510
509
|
fork: "fork";
|
|
510
|
+
fresh: "fresh";
|
|
511
511
|
resume: "resume";
|
|
512
512
|
clear: "clear";
|
|
513
513
|
compact: "compact";
|
|
@@ -688,8 +688,8 @@ declare const ClientSchemas: {
|
|
|
688
688
|
reason: z.ZodEnum<{
|
|
689
689
|
update: "update";
|
|
690
690
|
install: "install";
|
|
691
|
-
uninstall: "uninstall";
|
|
692
691
|
"set-active": "set-active";
|
|
692
|
+
uninstall: "uninstall";
|
|
693
693
|
}>;
|
|
694
694
|
}, z.core.$strip>;
|
|
695
695
|
resolveBinary: {
|
|
@@ -698,8 +698,8 @@ declare const ClientSchemas: {
|
|
|
698
698
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
699
699
|
projectDir: z.ZodOptional<z.ZodString>;
|
|
700
700
|
preferSource: z.ZodOptional<z.ZodEnum<{
|
|
701
|
-
managed: "managed";
|
|
702
701
|
global: "global";
|
|
702
|
+
managed: "managed";
|
|
703
703
|
}>>;
|
|
704
704
|
harnessId: z.ZodOptional<z.ZodString>;
|
|
705
705
|
}, z.core.$strip>;
|
|
@@ -708,8 +708,8 @@ declare const ClientSchemas: {
|
|
|
708
708
|
env: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
709
709
|
configDir: z.ZodNullable<z.ZodString>;
|
|
710
710
|
source: z.ZodEnum<{
|
|
711
|
-
managed: "managed";
|
|
712
711
|
global: "global";
|
|
712
|
+
managed: "managed";
|
|
713
713
|
}>;
|
|
714
714
|
version: z.ZodNullable<z.ZodString>;
|
|
715
715
|
}, z.core.$strip>;
|
|
@@ -1246,8 +1246,8 @@ declare const ClientVersionChangedSchema: z.ZodObject<{
|
|
|
1246
1246
|
reason: z.ZodEnum<{
|
|
1247
1247
|
update: "update";
|
|
1248
1248
|
install: "install";
|
|
1249
|
-
uninstall: "uninstall";
|
|
1250
1249
|
"set-active": "set-active";
|
|
1250
|
+
uninstall: "uninstall";
|
|
1251
1251
|
}>;
|
|
1252
1252
|
}, z.core.$strip>;
|
|
1253
1253
|
type ClientVersionChanged = z.infer<typeof ClientVersionChangedSchema>;
|
|
@@ -1264,8 +1264,8 @@ type ClientVersionChanged = z.infer<typeof ClientVersionChangedSchema>;
|
|
|
1264
1264
|
* - `'cli-wrapper'` — a thin CLI shim wrapping the client binary reported the signal
|
|
1265
1265
|
*/
|
|
1266
1266
|
declare const ClientRuntimeSourceLayerSchema: z.ZodEnum<{
|
|
1267
|
-
supervisor: "supervisor";
|
|
1268
1267
|
adapter: "adapter";
|
|
1268
|
+
supervisor: "supervisor";
|
|
1269
1269
|
"client-hook": "client-hook";
|
|
1270
1270
|
statusline: "statusline";
|
|
1271
1271
|
"cli-wrapper": "cli-wrapper";
|
|
@@ -1279,8 +1279,8 @@ type ClientRuntimeSourceLayer = z.infer<typeof ClientRuntimeSourceLayerSchema>;
|
|
|
1279
1279
|
*/
|
|
1280
1280
|
declare const ClientRuntimeSourceSchema: z.ZodObject<{
|
|
1281
1281
|
layer: z.ZodEnum<{
|
|
1282
|
-
supervisor: "supervisor";
|
|
1283
1282
|
adapter: "adapter";
|
|
1283
|
+
supervisor: "supervisor";
|
|
1284
1284
|
"client-hook": "client-hook";
|
|
1285
1285
|
statusline: "statusline";
|
|
1286
1286
|
"cli-wrapper": "cli-wrapper";
|
|
@@ -1334,8 +1334,8 @@ declare const ClientRuntimeObserveSchema: {
|
|
|
1334
1334
|
clientId: z.ZodString;
|
|
1335
1335
|
source: z.ZodObject<{
|
|
1336
1336
|
layer: z.ZodEnum<{
|
|
1337
|
-
supervisor: "supervisor";
|
|
1338
1337
|
adapter: "adapter";
|
|
1338
|
+
supervisor: "supervisor";
|
|
1339
1339
|
"client-hook": "client-hook";
|
|
1340
1340
|
statusline: "statusline";
|
|
1341
1341
|
"cli-wrapper": "cli-wrapper";
|
|
@@ -1382,13 +1382,13 @@ declare const ClientRuntimeStartedSchema: z.ZodObject<{
|
|
|
1382
1382
|
clientRuntimeId: z.ZodString;
|
|
1383
1383
|
clientId: z.ZodString;
|
|
1384
1384
|
status: z.ZodEnum<{
|
|
1385
|
-
observed: "observed";
|
|
1386
1385
|
started: "started";
|
|
1386
|
+
observed: "observed";
|
|
1387
1387
|
}>;
|
|
1388
1388
|
source: z.ZodObject<{
|
|
1389
1389
|
layer: z.ZodEnum<{
|
|
1390
|
-
supervisor: "supervisor";
|
|
1391
1390
|
adapter: "adapter";
|
|
1391
|
+
supervisor: "supervisor";
|
|
1392
1392
|
"client-hook": "client-hook";
|
|
1393
1393
|
statusline: "statusline";
|
|
1394
1394
|
"cli-wrapper": "cli-wrapper";
|
|
@@ -1486,8 +1486,8 @@ type ClientSessionObservedBase = z.infer<typeof ClientSessionObservedBaseSchema>
|
|
|
1486
1486
|
declare const CLIENT_SESSION_START_MODES: readonly ["fresh", "fork", "resume", "clear", "compact"];
|
|
1487
1487
|
/** Zod schema for the client-reported session start mode. */
|
|
1488
1488
|
declare const ClientSessionStartModeSchema: z.ZodEnum<{
|
|
1489
|
-
fresh: "fresh";
|
|
1490
1489
|
fork: "fork";
|
|
1490
|
+
fresh: "fresh";
|
|
1491
1491
|
resume: "resume";
|
|
1492
1492
|
clear: "clear";
|
|
1493
1493
|
compact: "compact";
|
|
@@ -1505,8 +1505,8 @@ declare const ClientSessionStartedSchema: z.ZodObject<{
|
|
|
1505
1505
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1506
1506
|
machineId: z.ZodOptional<z.ZodString>;
|
|
1507
1507
|
startMode: z.ZodOptional<z.ZodEnum<{
|
|
1508
|
-
fresh: "fresh";
|
|
1509
1508
|
fork: "fork";
|
|
1509
|
+
fresh: "fresh";
|
|
1510
1510
|
resume: "resume";
|
|
1511
1511
|
clear: "clear";
|
|
1512
1512
|
compact: "compact";
|
|
@@ -1675,9 +1675,9 @@ declare const ClientNamespace: _$_makaio_core0.BusNamespaceDefinition<"client",
|
|
|
1675
1675
|
baseConfigDir: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1676
1676
|
projectDir: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1677
1677
|
configInheritance: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
1678
|
+
empty: "empty";
|
|
1678
1679
|
"auth-only": "auth-only";
|
|
1679
1680
|
full: "full";
|
|
1680
|
-
empty: "empty";
|
|
1681
1681
|
}>>;
|
|
1682
1682
|
}, _$zod_v4_core0.$strip>;
|
|
1683
1683
|
response: _$zod.ZodObject<{
|
|
@@ -1808,8 +1808,8 @@ declare const ClientNamespace: _$_makaio_core0.BusNamespaceDefinition<"client",
|
|
|
1808
1808
|
clientId: _$zod.ZodString;
|
|
1809
1809
|
source: _$zod.ZodObject<{
|
|
1810
1810
|
layer: _$zod.ZodEnum<{
|
|
1811
|
-
supervisor: "supervisor";
|
|
1812
1811
|
adapter: "adapter";
|
|
1812
|
+
supervisor: "supervisor";
|
|
1813
1813
|
"client-hook": "client-hook";
|
|
1814
1814
|
statusline: "statusline";
|
|
1815
1815
|
"cli-wrapper": "cli-wrapper";
|
|
@@ -1844,13 +1844,13 @@ declare const ClientNamespace: _$_makaio_core0.BusNamespaceDefinition<"client",
|
|
|
1844
1844
|
clientRuntimeId: _$zod.ZodString;
|
|
1845
1845
|
clientId: _$zod.ZodString;
|
|
1846
1846
|
status: _$zod.ZodEnum<{
|
|
1847
|
-
observed: "observed";
|
|
1848
1847
|
started: "started";
|
|
1848
|
+
observed: "observed";
|
|
1849
1849
|
}>;
|
|
1850
1850
|
source: _$zod.ZodObject<{
|
|
1851
1851
|
layer: _$zod.ZodEnum<{
|
|
1852
|
-
supervisor: "supervisor";
|
|
1853
1852
|
adapter: "adapter";
|
|
1853
|
+
supervisor: "supervisor";
|
|
1854
1854
|
"client-hook": "client-hook";
|
|
1855
1855
|
statusline: "statusline";
|
|
1856
1856
|
"cli-wrapper": "cli-wrapper";
|
|
@@ -2076,8 +2076,8 @@ declare const ClientNamespace: _$_makaio_core0.BusNamespaceDefinition<"client",
|
|
|
2076
2076
|
cwd: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2077
2077
|
machineId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2078
2078
|
startMode: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
2079
|
-
fresh: "fresh";
|
|
2080
2079
|
fork: "fork";
|
|
2080
|
+
fresh: "fresh";
|
|
2081
2081
|
resume: "resume";
|
|
2082
2082
|
clear: "clear";
|
|
2083
2083
|
compact: "compact";
|
|
@@ -2258,8 +2258,8 @@ declare const ClientNamespace: _$_makaio_core0.BusNamespaceDefinition<"client",
|
|
|
2258
2258
|
reason: _$zod.ZodEnum<{
|
|
2259
2259
|
update: "update";
|
|
2260
2260
|
install: "install";
|
|
2261
|
-
uninstall: "uninstall";
|
|
2262
2261
|
"set-active": "set-active";
|
|
2262
|
+
uninstall: "uninstall";
|
|
2263
2263
|
}>;
|
|
2264
2264
|
}, _$zod_v4_core0.$strip>;
|
|
2265
2265
|
resolveBinary: {
|
|
@@ -2268,8 +2268,8 @@ declare const ClientNamespace: _$_makaio_core0.BusNamespaceDefinition<"client",
|
|
|
2268
2268
|
sessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2269
2269
|
projectDir: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2270
2270
|
preferSource: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
2271
|
-
managed: "managed";
|
|
2272
2271
|
global: "global";
|
|
2272
|
+
managed: "managed";
|
|
2273
2273
|
}>>;
|
|
2274
2274
|
harnessId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2275
2275
|
}, _$zod_v4_core0.$strip>;
|
|
@@ -2278,8 +2278,8 @@ declare const ClientNamespace: _$_makaio_core0.BusNamespaceDefinition<"client",
|
|
|
2278
2278
|
env: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>;
|
|
2279
2279
|
configDir: _$zod.ZodNullable<_$zod.ZodString>;
|
|
2280
2280
|
source: _$zod.ZodEnum<{
|
|
2281
|
-
managed: "managed";
|
|
2282
2281
|
global: "global";
|
|
2282
|
+
managed: "managed";
|
|
2283
2283
|
}>;
|
|
2284
2284
|
version: _$zod.ZodNullable<_$zod.ZodString>;
|
|
2285
2285
|
}, _$zod_v4_core0.$strip>;
|
|
@@ -2315,9 +2315,9 @@ declare const ClientSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSu
|
|
|
2315
2315
|
baseConfigDir: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2316
2316
|
projectDir: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2317
2317
|
configInheritance: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
2318
|
+
empty: "empty";
|
|
2318
2319
|
"auth-only": "auth-only";
|
|
2319
2320
|
full: "full";
|
|
2320
|
-
empty: "empty";
|
|
2321
2321
|
}>>;
|
|
2322
2322
|
}, _$zod_v4_core0.$strip>;
|
|
2323
2323
|
response: _$zod.ZodObject<{
|
|
@@ -2448,8 +2448,8 @@ declare const ClientSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSu
|
|
|
2448
2448
|
clientId: _$zod.ZodString;
|
|
2449
2449
|
source: _$zod.ZodObject<{
|
|
2450
2450
|
layer: _$zod.ZodEnum<{
|
|
2451
|
-
supervisor: "supervisor";
|
|
2452
2451
|
adapter: "adapter";
|
|
2452
|
+
supervisor: "supervisor";
|
|
2453
2453
|
"client-hook": "client-hook";
|
|
2454
2454
|
statusline: "statusline";
|
|
2455
2455
|
"cli-wrapper": "cli-wrapper";
|
|
@@ -2484,13 +2484,13 @@ declare const ClientSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSu
|
|
|
2484
2484
|
clientRuntimeId: _$zod.ZodString;
|
|
2485
2485
|
clientId: _$zod.ZodString;
|
|
2486
2486
|
status: _$zod.ZodEnum<{
|
|
2487
|
-
observed: "observed";
|
|
2488
2487
|
started: "started";
|
|
2488
|
+
observed: "observed";
|
|
2489
2489
|
}>;
|
|
2490
2490
|
source: _$zod.ZodObject<{
|
|
2491
2491
|
layer: _$zod.ZodEnum<{
|
|
2492
|
-
supervisor: "supervisor";
|
|
2493
2492
|
adapter: "adapter";
|
|
2493
|
+
supervisor: "supervisor";
|
|
2494
2494
|
"client-hook": "client-hook";
|
|
2495
2495
|
statusline: "statusline";
|
|
2496
2496
|
"cli-wrapper": "cli-wrapper";
|
|
@@ -2716,8 +2716,8 @@ declare const ClientSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSu
|
|
|
2716
2716
|
cwd: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2717
2717
|
machineId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2718
2718
|
startMode: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
2719
|
-
fresh: "fresh";
|
|
2720
2719
|
fork: "fork";
|
|
2720
|
+
fresh: "fresh";
|
|
2721
2721
|
resume: "resume";
|
|
2722
2722
|
clear: "clear";
|
|
2723
2723
|
compact: "compact";
|
|
@@ -2898,8 +2898,8 @@ declare const ClientSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSu
|
|
|
2898
2898
|
reason: _$zod.ZodEnum<{
|
|
2899
2899
|
update: "update";
|
|
2900
2900
|
install: "install";
|
|
2901
|
-
uninstall: "uninstall";
|
|
2902
2901
|
"set-active": "set-active";
|
|
2902
|
+
uninstall: "uninstall";
|
|
2903
2903
|
}>;
|
|
2904
2904
|
}, _$zod_v4_core0.$strip>;
|
|
2905
2905
|
resolveBinary: {
|
|
@@ -2908,8 +2908,8 @@ declare const ClientSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSu
|
|
|
2908
2908
|
sessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2909
2909
|
projectDir: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2910
2910
|
preferSource: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
2911
|
-
managed: "managed";
|
|
2912
2911
|
global: "global";
|
|
2912
|
+
managed: "managed";
|
|
2913
2913
|
}>>;
|
|
2914
2914
|
harnessId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2915
2915
|
}, _$zod_v4_core0.$strip>;
|
|
@@ -2918,8 +2918,8 @@ declare const ClientSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSu
|
|
|
2918
2918
|
env: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>;
|
|
2919
2919
|
configDir: _$zod.ZodNullable<_$zod.ZodString>;
|
|
2920
2920
|
source: _$zod.ZodEnum<{
|
|
2921
|
-
managed: "managed";
|
|
2922
2921
|
global: "global";
|
|
2922
|
+
managed: "managed";
|
|
2923
2923
|
}>;
|
|
2924
2924
|
version: _$zod.ZodNullable<_$zod.ZodString>;
|
|
2925
2925
|
}, _$zod_v4_core0.$strip>;
|
|
@@ -2978,9 +2978,9 @@ declare const SessionConfigEnvSchema: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
|
2978
2978
|
* Policy for materializing a session config directory from a base client config.
|
|
2979
2979
|
*/
|
|
2980
2980
|
declare const SessionConfigInheritanceSchema: z.ZodEnum<{
|
|
2981
|
+
empty: "empty";
|
|
2981
2982
|
"auth-only": "auth-only";
|
|
2982
2983
|
full: "full";
|
|
2983
|
-
empty: "empty";
|
|
2984
2984
|
}>;
|
|
2985
2985
|
type SessionConfigInheritance = z.infer<typeof SessionConfigInheritanceSchema>;
|
|
2986
2986
|
/**
|
|
@@ -3136,9 +3136,9 @@ declare const ClientSessionConfigSchemas: {
|
|
|
3136
3136
|
baseConfigDir: z.ZodOptional<z.ZodString>;
|
|
3137
3137
|
projectDir: z.ZodOptional<z.ZodString>;
|
|
3138
3138
|
configInheritance: z.ZodOptional<z.ZodEnum<{
|
|
3139
|
+
empty: "empty";
|
|
3139
3140
|
"auth-only": "auth-only";
|
|
3140
3141
|
full: "full";
|
|
3141
|
-
empty: "empty";
|
|
3142
3142
|
}>>;
|
|
3143
3143
|
}, z.core.$strip>;
|
|
3144
3144
|
response: z.ZodObject<{
|
|
@@ -3192,9 +3192,9 @@ declare const SessionConfigSetupRequestSchema: z.ZodObject<{
|
|
|
3192
3192
|
win32: "win32";
|
|
3193
3193
|
}>;
|
|
3194
3194
|
configInheritance: z.ZodEnum<{
|
|
3195
|
+
empty: "empty";
|
|
3195
3196
|
"auth-only": "auth-only";
|
|
3196
3197
|
full: "full";
|
|
3197
|
-
empty: "empty";
|
|
3198
3198
|
}>;
|
|
3199
3199
|
}, z.core.$strip>;
|
|
3200
3200
|
type SessionConfigSetupRequest = z.infer<typeof SessionConfigSetupRequestSchema>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ExtensionCoordinatorOptions, c as KernelMakaioExtension, i as ContributionProcessor, l as RuntimeCapability, n as filterEligibleExtensions, o as ExtensionRuntimeSurface, r as ExtensionCoordinator, s as KernelExtensionContext, t as coalesceExtensionOverrides, u as RuntimeEnvironment } from "../../index-
|
|
1
|
+
import { a as ExtensionCoordinatorOptions, c as KernelMakaioExtension, i as ContributionProcessor, l as RuntimeCapability, n as filterEligibleExtensions, o as ExtensionRuntimeSurface, r as ExtensionCoordinator, s as KernelExtensionContext, t as coalesceExtensionOverrides, u as RuntimeEnvironment } from "../../index-CtjLeK1F.mjs";
|
|
2
2
|
export { ContributionProcessor, ExtensionCoordinator, ExtensionCoordinatorOptions, ExtensionRuntimeSurface, KernelExtensionContext, KernelMakaioExtension, RuntimeCapability, RuntimeEnvironment, coalesceExtensionOverrides, filterEligibleExtensions };
|
package/dist/kernel/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as ExtensionInfo, f as ServiceInfo, i as ComponentInfo, l as ExtensionInfoSchema, n as ExtensionSubjects, o as ComponentState, p as ServiceInfoSchema, s as ComponentStateSchema, t as ExtensionNamespace } from "../index-
|
|
2
|
-
import { c as KernelMakaioExtension, i as ContributionProcessor, l as RuntimeCapability, n as filterEligibleExtensions, o as ExtensionRuntimeSurface, r as ExtensionCoordinator, s as KernelExtensionContext, t as coalesceExtensionOverrides, u as RuntimeEnvironment } from "../index-
|
|
1
|
+
import { c as ExtensionInfo, f as ServiceInfo, i as ComponentInfo, l as ExtensionInfoSchema, n as ExtensionSubjects, o as ComponentState, p as ServiceInfoSchema, s as ComponentStateSchema, t as ExtensionNamespace } from "../index-COC9jCdc.mjs";
|
|
2
|
+
import { c as KernelMakaioExtension, i as ContributionProcessor, l as RuntimeCapability, n as filterEligibleExtensions, o as ExtensionRuntimeSurface, r as ExtensionCoordinator, s as KernelExtensionContext, t as coalesceExtensionOverrides, u as RuntimeEnvironment } from "../index-CtjLeK1F.mjs";
|
|
3
3
|
import { i as WindowStyle, n as WindowRegistration, r as WindowRegistry, t as STYLE_DEFAULTS } from "../window-registry-WsWu-rcK.mjs";
|
|
4
4
|
import { a as KernelSchemas, i as setWorkflowTriggerTypeRegistry, n as KernelSubjects, r as getWorkflowTriggerTypeRegistry, t as KernelNamespace } from "../index-FDyqQIt5.mjs";
|
|
5
5
|
import { a as MachineIdentity, c as StorageProvider, i as IdentityProvider, n as NoTransportProvider, o as TransportProvider, r as MemoryStorageProvider, s as StorageCleanup, t as EphemeralIdentityProvider } from "../index-DoLdETfR.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ComponentInfoSchema, c as ExtensionInfo, d as ExtensionWarningEntrySchema, f as ServiceInfo, i as ComponentInfo, l as ExtensionInfoSchema, n as ExtensionSubjects, o as ComponentState, p as ServiceInfoSchema, r as ComponentIdentitySchema, s as ComponentStateSchema, t as ExtensionNamespace, u as ExtensionWarningEntry } from "../../index-
|
|
1
|
+
import { a as ComponentInfoSchema, c as ExtensionInfo, d as ExtensionWarningEntrySchema, f as ServiceInfo, i as ComponentInfo, l as ExtensionInfoSchema, n as ExtensionSubjects, o as ComponentState, p as ServiceInfoSchema, r as ComponentIdentitySchema, s as ComponentStateSchema, t as ExtensionNamespace, u as ExtensionWarningEntry } from "../../index-COC9jCdc.mjs";
|
|
2
2
|
export { ComponentIdentitySchema, ComponentInfo, ComponentInfoSchema, ComponentState, ComponentStateSchema, ExtensionInfo, ExtensionInfoSchema, ExtensionNamespace, ExtensionSubjects, ExtensionWarningEntry, ExtensionWarningEntrySchema, ServiceInfo, ServiceInfoSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./descriptor-to-package-
|
|
1
|
+
import{t as e}from"./descriptor-to-package-Rs-OjOQU.mjs";import{pathToFileURL as t}from"node:url";import*as n from"node:path";import*as r from"node:fs";import{versionSatisfies as i}from"@makaio/framework/contracts";async function a(e,t){let{frameworkVersion:n,importModule:r=S}=t,i=[],a=new Map,s;for(let t of e){let{descriptor:e,extensionPath:c}=t,l=`[extensions] ${e.name}@${e.version}`;if(!u(t,n))continue;if(e.execution===`detached`){let t;try{s??=(await import(`./detached-extension-handle-vDK194QV.mjs`)).createDetachedExtensionPackage,t=s(e,c)}catch(e){console.warn(`${l}: failed to synthesize detached extension package:`,e instanceof Error?e.message:e);continue}i.push(t),e.config?.defaults&&a.set(e.name,e.config.defaults);continue}if(!e.entrypoints.server){!e.entrypoints.browser&&!e.entrypoints.cli&&console.warn(`${l}: no executable entrypoint declared, skipping`);continue}let d;if(t.preloadedModule)d=t.preloadedModule;else try{let t=_(`server`,e.entrypoints.server,c);if(!t){console.warn(`${l}: server entrypoint could not be resolved within extension directory, skipping`);continue}d=await r(t)}catch(e){console.warn(`${l}: failed to import server entry:`,e instanceof Error?e.message:e);continue}let f=o(d.default,e.name,l);f&&(i.push(...f),e.config?.defaults&&a.set(e.name,e.config.defaults))}return{packages:i,configDefaults:a}}function o(e,t,n){if(Array.isArray(e)){let r=[],i=new Set;for(let t of e){if(!f(t)){console.warn(`${n}: default export array contains an invalid MakaioExtension, skipping`);return}if(i.has(t.name)){console.warn(`${n}: default export array contains duplicate package name '${t.name}', skipping`);return}i.add(t.name),r.push(t)}if(!r.some(e=>e.name===t)){console.warn(`${n}: default export array must include a package named '${t}' to match descriptor identity, skipping`);return}if(r.some(e=>e.name!==t&&!e.name.startsWith(`${t}.`))){console.warn(`${n}: default export array contains package names outside descriptor namespace '${t}', skipping`);return}return r}if(!f(e)){console.warn(`${n}: default export is not a valid MakaioExtension or MakaioExtension[], skipping`);return}if(e.name!==t){console.warn(`${n}: imported package name '${e.name}' does not match descriptor name '${t}', skipping`);return}return[e]}async function s(e,t,n){let{importModule:r=S,frameworkVersion:i}=n,a=new Map(t.map(e=>[e.name,e])),o=new Map;for(let t of e){let e=c(t,i);if(!e)continue;let n=`[extensions] ${t.descriptor.name}@${t.descriptor.version}`,s=a.get(t.descriptor.name);if(s?.cli)continue;let u=await d(t,e,n,r);if(!u)continue;if(!p(u.default)){console.warn(`${n}: default export is not a valid CliContribution, skipping`);continue}let f=t.descriptor.cli?.name??t.descriptor.name;if(u.default.name!==f){console.warn(`${n}: imported CLI contribution name '${u.default.name}' does not match descriptor CLI name '${f}', skipping`);continue}if(s){a.set(t.descriptor.name,{...s,cli:u.default});continue}if(t.descriptor.entrypoints?.server||t.descriptor.entrypoints?.browser){console.warn(`${n}: server or browser entry is present but no package was loaded, skipping CLI-only synthesis`);continue}a.set(t.descriptor.name,l(t,u.default)),t.descriptor.config?.defaults&&o.set(t.descriptor.name,t.descriptor.config.defaults)}return{packages:[...a.values()],configDefaults:o}}function c(e,t){if(u(e,t)&&e.descriptor.execution!==`detached`)return e.descriptor.entrypoints?.cli}function l(t,n){return{...e(t.descriptor),cli:n}}function u(e,t){let{descriptor:n}=e,r=`[extensions] ${n.name}@${n.version}`;try{return i(t,n.makaio.framework)?!0:(console.warn(`${r}: requires framework ${n.makaio.framework}, current is ${t}, skipping`),!1)}catch(e){return console.warn(`${r}: invalid version metadata (framework=${t}, range=${n.makaio.framework}), skipping:`,e instanceof Error?e.message:e),!1}}async function d(e,t,n,r){try{let i=_(`cli`,t,e.extensionPath);if(!i){console.warn(`${n}: cli entrypoint has no resolvable candidate within extension directory, skipping`);return}return await r(i)}catch(e){console.warn(`${n}: failed to import cli entry:`,e instanceof Error?e.message:e);return}}function f(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.name==`string`&&typeof t.displayName==`string`&&typeof t.version==`string`}function p(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.name!=`string`||typeof t.description!=`string`||!Array.isArray(t.subcommands)||`interactive`in t&&t.interactive!==void 0&&typeof t.interactive!=`function`?!1:t.subcommands.length===0?typeof t.interactive==`function`:t.subcommands.every(m)}function m(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.name==`string`&&typeof t.description==`string`&&h(t.schema)&&typeof t.handler==`function`}function h(e){return typeof e==`object`&&!!e&&typeof e.safeParse==`function`}function g(e,t){return t===!0?e:t}function _(e,t,r){if(!n.isAbsolute(r))return;let i=g(e,t),a=x(r),o=n.resolve(r,`src`,`${i}.ts`);if(y(o,a))return o;let s=n.resolve(r,`dist`,`${i}.mjs`);if(y(s,a))return s}function v(e,t){let n=x(t);return b(x(e),n)}function y(e,t){try{return b(r.realpathSync(e),t)}catch{return!1}}function b(e,t){return e.startsWith(t+n.sep)}function x(e){let t=n.resolve(e);try{return r.realpathSync(t)}catch{return t}}async function S(e){return await import(t(e).href)}export{f as a,_ as c,u as i,g as n,v as o,p as r,a as s,s as t};
|
|
@@ -188,116 +188,56 @@ declare function resolveMcpTools(bus: IMakaioBus, options?: McpToolDiscoveryOpti
|
|
|
188
188
|
*/
|
|
189
189
|
declare function toolInfoToMcpTool(tool: ToolInfo, mcpName: string): McpToolDefinition;
|
|
190
190
|
//#endregion
|
|
191
|
-
//#region subsystems/mcp-http-server/src/server.d.ts
|
|
192
|
-
/**
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
191
|
+
//#region subsystems/mcp-http-server/src/server-options.d.ts
|
|
192
|
+
/** Resolve session-stable context overrides for an adapter session. */
|
|
193
|
+
type ResolveContextOverrides = (adapterSessionId: string | undefined) => ToolExecutionContextOverrides | undefined;
|
|
194
|
+
/** Shared timeout option for MCP tool execution. */
|
|
195
|
+
interface ToolExecutionTimeoutOption {
|
|
196
|
+
/** Positive timeout in milliseconds, bounded to 30 minutes. */
|
|
197
|
+
toolExecutionTimeoutMs?: number;
|
|
198
|
+
}
|
|
199
|
+
/** Options for configuring MCP server startup. */
|
|
200
|
+
interface McpServerOptions extends ToolExecutionTimeoutOption {
|
|
201
201
|
transport: 'stdio' | 'http';
|
|
202
|
-
/** Port for HTTP transport. When omitted or 0, OS assigns an available port. */
|
|
203
202
|
port?: number;
|
|
204
|
-
/** Agent context for HTTP transport routing. */
|
|
205
203
|
agentContext?: McpAgentContext$1;
|
|
206
|
-
/** Optional MCP tool discovery customization. */
|
|
207
204
|
toolDiscovery?: McpToolDiscoveryOptions;
|
|
208
|
-
|
|
209
|
-
* Optional callback invoked exactly once when the stdio transport closes.
|
|
210
|
-
*
|
|
211
|
-
* Fired on whichever of these happens first: the client detaches (stdin EOF),
|
|
212
|
-
* the SDK transport fires its own `onclose` hook, or an explicit
|
|
213
|
-
* {@link StdioMcpServerHandle.close} call completes. Subsequent triggers are
|
|
214
|
-
* suppressed so the callback is guaranteed to fire at most once.
|
|
215
|
-
*
|
|
216
|
-
* Only consulted for `transport: 'stdio'`; ignored for HTTP.
|
|
217
|
-
*/
|
|
205
|
+
resolveContextOverrides?: ResolveContextOverrides;
|
|
218
206
|
onclose?: () => void;
|
|
219
207
|
}
|
|
220
|
-
/**
|
|
221
|
-
* Result returned by {@link startMcpServer} for the stdio transport.
|
|
222
|
-
*/
|
|
208
|
+
/** Result returned for the stdio transport. */
|
|
223
209
|
interface StdioMcpServerHandle {
|
|
224
|
-
/** Gracefully close the MCP server and stdio transport. */
|
|
225
210
|
close: () => Promise<void>;
|
|
226
211
|
}
|
|
227
|
-
/**
|
|
228
|
-
* Result returned by {@link startHttpMcpServer}.
|
|
229
|
-
*/
|
|
212
|
+
/** Result returned for the HTTP transport. */
|
|
230
213
|
interface HttpMcpServerHandle {
|
|
231
|
-
/** OS-assigned port the HTTP server is listening on. */
|
|
232
214
|
port: number;
|
|
233
|
-
/** Context registry for registering/unregistering agent sessions. */
|
|
234
215
|
contextRegistry: IMcpContextRegistry;
|
|
235
|
-
/** Gracefully close the HTTP server and MCP transport. */
|
|
236
216
|
close: () => Promise<void>;
|
|
237
217
|
}
|
|
238
|
-
/**
|
|
239
|
-
|
|
240
|
-
* adapter session ID.
|
|
241
|
-
*
|
|
242
|
-
* Invoked on every tool-call request. When the session is found, its
|
|
243
|
-
* return value overrides the default fallback context
|
|
244
|
-
* `{ cwd: process.cwd(), sessionId }`. When the session is unknown or
|
|
245
|
-
* the header is absent, returning `undefined` keeps the fallback.
|
|
246
|
-
* @param adapterSessionId - The adapter session ID extracted from request
|
|
247
|
-
* headers, or `undefined` when the header is absent.
|
|
248
|
-
* @returns Resolved context overrides, or `undefined` to use the fallback.
|
|
249
|
-
*/
|
|
250
|
-
type ResolveContextOverrides = (adapterSessionId: string | undefined) => ToolExecutionContextOverrides | undefined;
|
|
251
|
-
/**
|
|
252
|
-
* Options for {@link createMcpServer}.
|
|
253
|
-
*/
|
|
254
|
-
interface CreateMcpServerOptions {
|
|
255
|
-
/** Registry for resolving agent context by adapterSessionId. When present, the `approve` tool is exposed. */
|
|
218
|
+
/** Options for creating the transport-independent MCP server. */
|
|
219
|
+
interface CreateMcpServerOptions extends ToolExecutionTimeoutOption {
|
|
256
220
|
contextRegistry?: IMcpContextRegistry;
|
|
257
|
-
/** Optional tool discovery customization. */
|
|
258
221
|
toolDiscovery?: McpToolDiscoveryOptions;
|
|
259
|
-
/** Optional callback to resolve session-stable context overrides from an adapter session ID at tool-call time. */
|
|
260
222
|
resolveContextOverrides?: ResolveContextOverrides;
|
|
261
223
|
}
|
|
262
|
-
/**
|
|
263
|
-
|
|
264
|
-
* {@link createFetchMcpHandler}, and {@link startHttpMcpServer}. These fields configure the MCP server and its
|
|
265
|
-
* attached transport without prescribing how the resulting handler is mounted
|
|
266
|
-
* onto an HTTP stack.
|
|
267
|
-
*/
|
|
268
|
-
interface HttpMcpHandlerOptions {
|
|
269
|
-
/** Agent context for HTTP transport routing. */
|
|
224
|
+
/** Transport-independent HTTP MCP handler options. */
|
|
225
|
+
interface HttpMcpHandlerOptions extends ToolExecutionTimeoutOption {
|
|
270
226
|
agentContext?: McpAgentContext$1;
|
|
271
|
-
/** Optional MCP tool discovery customization. */
|
|
272
227
|
toolDiscovery?: McpToolDiscoveryOptions;
|
|
273
|
-
/**
|
|
274
|
-
* Optional callback invoked when the underlying MCP transport closes.
|
|
275
|
-
*
|
|
276
|
-
* Called synchronously by the MCP SDK's transport `onclose` hook — that is,
|
|
277
|
-
* after {@link HttpMcpHandlerHandle.close}, {@link FetchMcpHandlerHandle.close},
|
|
278
|
-
* or {@link HttpMcpServerHandle.close}
|
|
279
|
-
* has been called and the transport has finished tearing down. Intended for
|
|
280
|
-
* best-effort resource cleanup (e.g. flushing session registries) without
|
|
281
|
-
* blocking the close path.
|
|
282
|
-
*
|
|
283
|
-
* When used via {@link startHttpMcpServer}, the callback fires after the MCP
|
|
284
|
-
* transport closes, which occurs during the combined server-and-transport
|
|
285
|
-
* teardown initiated by {@link HttpMcpServerHandle.close}.
|
|
286
|
-
*/
|
|
287
228
|
onclose?: () => void;
|
|
288
|
-
/** Optional callback for session-stable context override resolution. */
|
|
289
229
|
resolveContextOverrides?: ResolveContextOverrides;
|
|
290
230
|
}
|
|
291
|
-
/**
|
|
292
|
-
* Options accepted by {@link startHttpMcpServer}.
|
|
293
|
-
*
|
|
294
|
-
* Extends {@link HttpMcpHandlerOptions} with `port`, which controls which
|
|
295
|
-
* TCP port the internally-created `http.Server` listens on.
|
|
296
|
-
*/
|
|
231
|
+
/** Options for starting a standalone HTTP MCP server. */
|
|
297
232
|
interface HttpMcpServerOptions extends HttpMcpHandlerOptions {
|
|
298
|
-
/** Port for HTTP transport. When omitted or 0, OS assigns an available port. */
|
|
299
233
|
port?: number;
|
|
300
234
|
}
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region subsystems/mcp-http-server/src/server.d.ts
|
|
237
|
+
/** Query parameter name used by adapters to pass the session ID when custom headers are not available. */
|
|
238
|
+
declare const ADAPTER_SESSION_ID_PARAM = "adapterSessionId";
|
|
239
|
+
/** HTTP header name that carries the adapter session ID after query-param promotion. */
|
|
240
|
+
declare const ADAPTER_SESSION_ID_HEADER = "x-adapter-session-id";
|
|
301
241
|
/**
|
|
302
242
|
* Result returned by {@link createHttpMcpHandler}.
|
|
303
243
|
*
|
|
@@ -329,11 +269,6 @@ interface HttpMcpHandlerHandle {
|
|
|
329
269
|
*
|
|
330
270
|
* **Freshness contract:** Tool lists are resolved fresh on every MCP `tools/list` and
|
|
331
271
|
* `tools/call` request. There is no caching between calls.
|
|
332
|
-
*
|
|
333
|
-
* **Side-effect:** Subscribes to {@link ToolSubjects.registryChanged} on `bus` and
|
|
334
|
-
* sends `notifications/tools/list_changed` to connected MCP clients on each emission.
|
|
335
|
-
* Calling `server.close()` unsubscribes this listener; connected transport closure
|
|
336
|
-
* also reaches the same idempotent cleanup through the SDK's `onclose` hook.
|
|
337
272
|
* @param bus - Bus instance for tool execution and approval RPC.
|
|
338
273
|
* @param sessionId - Session identifier for tool execution context.
|
|
339
274
|
* @param options - Optional server configuration.
|
|
@@ -456,7 +391,9 @@ declare function startHttpMcpServer(bus: IMakaioBus, options?: HttpMcpServerOpti
|
|
|
456
391
|
* For the stdio transport, returns a {@link StdioMcpServerHandle} whose
|
|
457
392
|
* `close()` method gracefully tears down the MCP server. Pass
|
|
458
393
|
* `options.onclose` to receive a single callback when the transport closes for
|
|
459
|
-
* any reason (client detach via stdin EOF, or explicit `handle.close()`).
|
|
394
|
+
* any reason (client detach via stdin EOF, or explicit `handle.close()`). Pass
|
|
395
|
+
* `options.resolveContextOverrides` to resolve current execution context on
|
|
396
|
+
* every tool call, including calls after client reconnects.
|
|
460
397
|
* Signal handling is intentionally left to the composition root — library code
|
|
461
398
|
* must not own process-global resources such as `process.on('SIGINT')`.
|
|
462
399
|
* @param bus - Bus instance.
|