@makaio/framework 1.0.0-dev-1790783144258 → 1.0.0-dev-1791471149180
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/adapters/claude/index.d.mts +20 -20
- package/dist/artifact-D3VD0bDr.mjs +1 -0
- package/dist/bus/index.mjs +1 -1
- package/dist/bus-CzD5SUBY.mjs +9 -0
- package/dist/contracts/adapter/index.d.mts +2 -2
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
- package/dist/contracts/artifact/index.d.mts +3 -3
- package/dist/contracts/artifact/index.mjs +1 -1
- package/dist/contracts/automation-trigger/index.d.mts +1 -1
- package/dist/contracts/capabilities/index.d.mts +1 -1
- package/dist/contracts/client/index.d.mts +2 -2
- package/dist/contracts/extension/index.d.mts +4 -4
- package/dist/contracts/harness/index.d.mts +1 -1
- package/dist/contracts/index.d.mts +77 -77
- package/dist/contracts/index.mjs +1 -1
- package/dist/contracts/materialization/index.d.mts +2 -2
- package/dist/contracts/materialization/index.mjs +1 -1
- package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
- package/dist/contracts/reaction/index.d.mts +1 -1
- package/dist/contracts/session/index.d.mts +2 -2
- package/dist/contracts/variant/index.d.mts +1 -1
- package/dist/contracts/worker/index.d.mts +1 -1
- package/dist/contracts/worker/index.mjs +1 -1
- package/dist/contracts/workflow/index.d.mts +2 -2
- package/dist/contracts/workflow/index.mjs +1 -1
- package/dist/{contribution-CsDOPiDo.d.mts → contribution-CCVRsaNB.d.mts} +1 -1
- package/dist/{extension-context-BY9o1ITm.d.mts → extension-context-BWrjVPXR.d.mts} +3 -3
- package/dist/{framework-packages-blqho6Nk.mjs → framework-packages-CdpSqDeo.mjs} +1 -1
- package/dist/{hook-responses-Xxq6QAL2.d.mts → hook-responses-v6EA_7WC.d.mts} +1 -1
- package/dist/{index-CDezXPm9.d.mts → index-5NiMVtgh.d.mts} +425 -289
- package/dist/{index-BrnOW7-5.d.mts → index-B4IxvgmZ.d.mts} +17 -17
- package/dist/{index-VG-C-ZHN.d.mts → index-BKA5-NKn.d.mts} +16 -16
- package/dist/{index-Fmdwbgei.d.mts → index-BYFxcF58.d.mts} +7 -7
- package/dist/{index-DWWP2cUb.d.mts → index-Bt6KIvVk.d.mts} +1 -1
- package/dist/{index-CnVhfLrY.d.mts → index-C3C0hYHu.d.mts} +53 -53
- package/dist/{index-PymaxRkQ2.d.mts → index-CFet5T7v2.d.mts} +6 -6
- package/dist/{index-Di2-G_3M.d.mts → index-CQQsIg1Z.d.mts} +1 -1
- package/dist/{index-D_fMdJbU.d.mts → index-CTScKg_6.d.mts} +8 -8
- package/dist/{index-Dnc0PaTv2.d.mts → index-ChwEMUbc2.d.mts} +12 -12
- package/dist/{index-DMFFSC7x.d.mts → index-Cxx1aoPR.d.mts} +1 -1
- package/dist/{index-Fo4ALycy.d.mts → index-D9rIwIZ_.d.mts} +19 -19
- package/dist/{index-D_Zdnh0U.d.mts → index-DHKBs9sY.d.mts} +8 -8
- package/dist/{index-OA1A-NWE.d.mts → index-DVorNME3.d.mts} +1 -1
- package/dist/{index-chwNKVMu2.d.mts → index-D_1N051p2.d.mts} +37 -37
- package/dist/{index-CP7iuxhd2.d.mts → index-DbTxrhan2.d.mts} +4 -4
- package/dist/{index-C9X6ei7S.d.mts → index-DneUbrTU.d.mts} +4 -4
- package/dist/{index-BBrLhtLK.d.mts → index-MzTQNTb8.d.mts} +1 -1
- package/dist/{index-D9Ome4qp.d.mts → index-bYrlVerZ.d.mts} +1 -1
- 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/{materialization-BzSgnv2R.mjs → materialization-Cqx2hTZU.mjs} +1 -1
- package/dist/{namespace-BG35KNtw.d.mts → namespace-C1AVqxHR.d.mts} +4 -4
- package/dist/{namespace-BH9U2C1O.d.mts → namespace-ChJ-C9m_.d.mts} +2 -2
- package/dist/{namespace-D74MefGI.d.mts → namespace-D89Ih67f.d.mts} +2 -2
- package/dist/{namespace-DK5qZpST.d.mts → namespace-D_NJoYyN.d.mts} +6 -6
- package/dist/{namespace-DZooy1DW.d.mts → namespace-u4eoUCLp.d.mts} +18 -18
- package/dist/package.json +1 -1
- package/dist/packages-BOM7wECe.mjs +1 -0
- package/dist/{packages-Fy4a6vQy.d.mts → packages-g6BtlUF9.d.mts} +9 -6
- package/dist/{schemas-JPaSXxNr.d.mts → schemas-BBMHnFq8.d.mts} +4 -4
- package/dist/{schemas-CiJpGURT.d.mts → schemas-C81JlArF.d.mts} +8 -8
- package/dist/{schemas-DyTbvDp-.d.mts → schemas-CY2niCMn.d.mts} +54 -11
- package/dist/{schemas-CEc_v3dl.d.mts → schemas-DKaUrczB.d.mts} +2 -2
- package/dist/{schemas-BvDsO8Is.mjs → schemas-DmP_43fe.mjs} +1 -1
- package/dist/{schemas-DnwAE1ao.d.mts → schemas-DrTW-Clp.d.mts} +1 -1
- package/dist/{schemas-BYEgjPst2.d.mts → schemas-DrrpHMbF2.d.mts} +7 -7
- package/dist/{schemas-CtL2su-K.d.mts → schemas-yyNP39HU.d.mts} +4 -4
- 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/execution-target/index.d.mts +2 -2
- package/dist/services/execution-target/namespace.d.mts +1 -1
- package/dist/services/execution-target/schemas.d.mts +1 -1
- package/dist/services/filesystem/namespace.d.mts +12 -12
- package/dist/services/filesystem/schemas.d.mts +6 -6
- package/dist/services/git/namespace.d.mts +2 -2
- package/dist/services/git/schemas.d.mts +2 -2
- package/dist/services/index.d.mts +36 -36
- package/dist/services/index.mjs +1 -1
- package/dist/services/materialization/index.d.mts +1 -1
- package/dist/services/materialization/index.mjs +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/handlers/index.d.mts +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/settings/namespace.d.mts +8 -8
- package/dist/services/subagent-template/index.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/services/tools/index.mjs +1 -1
- package/dist/services/workflow-transitions/index.mjs +1 -1
- package/dist/{session-lineage-DZr5w2-z.d.mts → session-lineage-Bjh0Ccu7.d.mts} +1 -1
- package/dist/{storage-namespace-Cl8qtHDu.d.mts → storage-namespace-DoxNJ9Cg.d.mts} +10 -10
- package/dist/{tools-Cbuj-ClQ.mjs → tools-EK2HiPee.mjs} +1 -1
- package/dist/{transition-CzxHvafT.d.mts → transition-BEbgeCGa.d.mts} +1 -1
- package/dist/{types-CRKyrt5_.d.mts → types-C4-76ief.d.mts} +15 -15
- 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-BLdSezFD.d.mts → view-builder-Cw9R3hvK.d.mts} +1 -1
- package/dist/{worker-toBnRJ0A.mjs → worker-DAWXguML.mjs} +1 -1
- package/dist/{workflow-BDDB6EJi.mjs → workflow-CS_pwwXn.mjs} +1 -1
- package/dist/workflow-engine/index.d.mts +9 -9
- package/dist/{workflow-transitions-CvT6P03B.mjs → workflow-transitions-ztq90FUj.mjs} +1 -1
- package/package.json +1 -1
- package/dist/artifact-XE82Q2bH.mjs +0 -1
- package/dist/bus-B-ksy7YX.mjs +0 -9
- package/dist/packages-CZ2x-Ver.mjs +0 -1
|
@@ -17,13 +17,13 @@ declare const AdapterSubsystemNamespace: _$_makaio_core0.BusNamespaceDefinition<
|
|
|
17
17
|
displayName: _$zod.ZodOptional<_$zod.ZodString>;
|
|
18
18
|
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
19
19
|
clientId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
20
|
+
settings: _$zod.ZodOptional<_$zod.ZodType<Record<string, unknown>, Record<string, unknown>, _$zod_v4_core0.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
20
21
|
helpLinks: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
|
|
21
22
|
label: _$zod.ZodString;
|
|
22
23
|
url: _$zod.ZodString;
|
|
23
24
|
}, _$zod_v4_core0.$strict>>>;
|
|
24
25
|
instructions: _$zod.ZodOptional<_$zod.ZodString>;
|
|
25
26
|
providerDefinitionIds: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
26
|
-
settings: _$zod.ZodOptional<_$zod.ZodType<Record<string, unknown>, Record<string, unknown>, _$zod_v4_core0.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
27
27
|
name: _$zod.ZodString;
|
|
28
28
|
enabled: _$zod.ZodBoolean;
|
|
29
29
|
bindings: _$zod.ZodArray<_$zod.ZodObject<{
|
|
@@ -42,13 +42,13 @@ declare const AdapterSubsystemNamespace: _$_makaio_core0.BusNamespaceDefinition<
|
|
|
42
42
|
displayName: _$zod.ZodOptional<_$zod.ZodString>;
|
|
43
43
|
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
44
44
|
clientId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
45
|
+
settings: _$zod.ZodOptional<_$zod.ZodType<Record<string, unknown>, Record<string, unknown>, _$zod_v4_core0.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
45
46
|
helpLinks: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
|
|
46
47
|
label: _$zod.ZodString;
|
|
47
48
|
url: _$zod.ZodString;
|
|
48
49
|
}, _$zod_v4_core0.$strict>>>;
|
|
49
50
|
instructions: _$zod.ZodOptional<_$zod.ZodString>;
|
|
50
51
|
providerDefinitionIds: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
51
|
-
settings: _$zod.ZodOptional<_$zod.ZodType<Record<string, unknown>, Record<string, unknown>, _$zod_v4_core0.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
52
52
|
name: _$zod.ZodString;
|
|
53
53
|
enabled: _$zod.ZodBoolean;
|
|
54
54
|
bindings: _$zod.ZodArray<_$zod.ZodObject<{
|
|
@@ -1653,13 +1653,13 @@ declare const AdapterSubsystemNamespace: _$_makaio_core0.BusNamespaceDefinition<
|
|
|
1653
1653
|
displayName: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1654
1654
|
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1655
1655
|
clientId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1656
|
+
settings: _$zod.ZodOptional<_$zod.ZodType<Record<string, unknown>, Record<string, unknown>, _$zod_v4_core0.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
1656
1657
|
helpLinks: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
|
|
1657
1658
|
label: _$zod.ZodString;
|
|
1658
1659
|
url: _$zod.ZodString;
|
|
1659
1660
|
}, _$zod_v4_core0.$strict>>>;
|
|
1660
1661
|
instructions: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1661
1662
|
providerDefinitionIds: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
1662
|
-
settings: _$zod.ZodOptional<_$zod.ZodType<Record<string, unknown>, Record<string, unknown>, _$zod_v4_core0.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
1663
1663
|
name: _$zod.ZodString;
|
|
1664
1664
|
enabled: _$zod.ZodBoolean;
|
|
1665
1665
|
bindings: _$zod.ZodArray<_$zod.ZodObject<{
|
|
@@ -1878,13 +1878,13 @@ declare const AdapterSubsystemSubjects: _$_makaio_core0.BusSubjects<_$_makaio_co
|
|
|
1878
1878
|
displayName: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1879
1879
|
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1880
1880
|
clientId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1881
|
+
settings: _$zod.ZodOptional<_$zod.ZodType<Record<string, unknown>, Record<string, unknown>, _$zod_v4_core0.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
1881
1882
|
helpLinks: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
|
|
1882
1883
|
label: _$zod.ZodString;
|
|
1883
1884
|
url: _$zod.ZodString;
|
|
1884
1885
|
}, _$zod_v4_core0.$strict>>>;
|
|
1885
1886
|
instructions: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1886
1887
|
providerDefinitionIds: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
1887
|
-
settings: _$zod.ZodOptional<_$zod.ZodType<Record<string, unknown>, Record<string, unknown>, _$zod_v4_core0.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
1888
1888
|
name: _$zod.ZodString;
|
|
1889
1889
|
enabled: _$zod.ZodBoolean;
|
|
1890
1890
|
bindings: _$zod.ZodArray<_$zod.ZodObject<{
|
|
@@ -1903,13 +1903,13 @@ declare const AdapterSubsystemSubjects: _$_makaio_core0.BusSubjects<_$_makaio_co
|
|
|
1903
1903
|
displayName: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1904
1904
|
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1905
1905
|
clientId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1906
|
+
settings: _$zod.ZodOptional<_$zod.ZodType<Record<string, unknown>, Record<string, unknown>, _$zod_v4_core0.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
1906
1907
|
helpLinks: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
|
|
1907
1908
|
label: _$zod.ZodString;
|
|
1908
1909
|
url: _$zod.ZodString;
|
|
1909
1910
|
}, _$zod_v4_core0.$strict>>>;
|
|
1910
1911
|
instructions: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1911
1912
|
providerDefinitionIds: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
1912
|
-
settings: _$zod.ZodOptional<_$zod.ZodType<Record<string, unknown>, Record<string, unknown>, _$zod_v4_core0.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
1913
1913
|
name: _$zod.ZodString;
|
|
1914
1914
|
enabled: _$zod.ZodBoolean;
|
|
1915
1915
|
bindings: _$zod.ZodArray<_$zod.ZodObject<{
|
|
@@ -3514,13 +3514,13 @@ declare const AdapterSubsystemSubjects: _$_makaio_core0.BusSubjects<_$_makaio_co
|
|
|
3514
3514
|
displayName: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3515
3515
|
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3516
3516
|
clientId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3517
|
+
settings: _$zod.ZodOptional<_$zod.ZodType<Record<string, unknown>, Record<string, unknown>, _$zod_v4_core0.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
3517
3518
|
helpLinks: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
|
|
3518
3519
|
label: _$zod.ZodString;
|
|
3519
3520
|
url: _$zod.ZodString;
|
|
3520
3521
|
}, _$zod_v4_core0.$strict>>>;
|
|
3521
3522
|
instructions: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3522
3523
|
providerDefinitionIds: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
3523
|
-
settings: _$zod.ZodOptional<_$zod.ZodType<Record<string, unknown>, Record<string, unknown>, _$zod_v4_core0.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
3524
3524
|
name: _$zod.ZodString;
|
|
3525
3525
|
enabled: _$zod.ZodBoolean;
|
|
3526
3526
|
bindings: _$zod.ZodArray<_$zod.ZodObject<{
|
|
@@ -585,8 +585,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
585
585
|
type: _$zod.ZodLiteral<"locality.degraded">;
|
|
586
586
|
payload: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
|
|
587
587
|
intent: _$zod.ZodEnum<{
|
|
588
|
-
resume: "resume";
|
|
589
588
|
fork: "fork";
|
|
589
|
+
resume: "resume";
|
|
590
590
|
}>;
|
|
591
591
|
verdictKind: _$zod.ZodLiteral<"degrade">;
|
|
592
592
|
reason: _$zod.ZodEnum<{
|
|
@@ -611,8 +611,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
611
611
|
turnId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
612
612
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
613
613
|
intent: _$zod.ZodEnum<{
|
|
614
|
-
resume: "resume";
|
|
615
614
|
fork: "fork";
|
|
615
|
+
resume: "resume";
|
|
616
616
|
}>;
|
|
617
617
|
verdictKind: _$zod.ZodLiteral<"foreign">;
|
|
618
618
|
foreignMachineId: _$zod.ZodString;
|
|
@@ -967,8 +967,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
967
967
|
type: _$zod.ZodLiteral<"locality.degraded">;
|
|
968
968
|
payload: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
|
|
969
969
|
intent: _$zod.ZodEnum<{
|
|
970
|
-
resume: "resume";
|
|
971
970
|
fork: "fork";
|
|
971
|
+
resume: "resume";
|
|
972
972
|
}>;
|
|
973
973
|
verdictKind: _$zod.ZodLiteral<"degrade">;
|
|
974
974
|
reason: _$zod.ZodEnum<{
|
|
@@ -993,8 +993,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
993
993
|
turnId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
994
994
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
995
995
|
intent: _$zod.ZodEnum<{
|
|
996
|
-
resume: "resume";
|
|
997
996
|
fork: "fork";
|
|
997
|
+
resume: "resume";
|
|
998
998
|
}>;
|
|
999
999
|
verdictKind: _$zod.ZodLiteral<"foreign">;
|
|
1000
1000
|
foreignMachineId: _$zod.ZodString;
|
|
@@ -1339,8 +1339,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
1339
1339
|
type: _$zod.ZodLiteral<"locality.degraded">;
|
|
1340
1340
|
payload: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
|
|
1341
1341
|
intent: _$zod.ZodEnum<{
|
|
1342
|
-
resume: "resume";
|
|
1343
1342
|
fork: "fork";
|
|
1343
|
+
resume: "resume";
|
|
1344
1344
|
}>;
|
|
1345
1345
|
verdictKind: _$zod.ZodLiteral<"degrade">;
|
|
1346
1346
|
reason: _$zod.ZodEnum<{
|
|
@@ -1365,8 +1365,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
1365
1365
|
turnId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1366
1366
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
1367
1367
|
intent: _$zod.ZodEnum<{
|
|
1368
|
-
resume: "resume";
|
|
1369
1368
|
fork: "fork";
|
|
1369
|
+
resume: "resume";
|
|
1370
1370
|
}>;
|
|
1371
1371
|
verdictKind: _$zod.ZodLiteral<"foreign">;
|
|
1372
1372
|
foreignMachineId: _$zod.ZodString;
|
|
@@ -1719,8 +1719,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
1719
1719
|
type: _$zod.ZodLiteral<"locality.degraded">;
|
|
1720
1720
|
payload: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
|
|
1721
1721
|
intent: _$zod.ZodEnum<{
|
|
1722
|
-
resume: "resume";
|
|
1723
1722
|
fork: "fork";
|
|
1723
|
+
resume: "resume";
|
|
1724
1724
|
}>;
|
|
1725
1725
|
verdictKind: _$zod.ZodLiteral<"degrade">;
|
|
1726
1726
|
reason: _$zod.ZodEnum<{
|
|
@@ -1745,8 +1745,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
1745
1745
|
turnId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1746
1746
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
1747
1747
|
intent: _$zod.ZodEnum<{
|
|
1748
|
-
resume: "resume";
|
|
1749
1748
|
fork: "fork";
|
|
1749
|
+
resume: "resume";
|
|
1750
1750
|
}>;
|
|
1751
1751
|
verdictKind: _$zod.ZodLiteral<"foreign">;
|
|
1752
1752
|
foreignMachineId: _$zod.ZodString;
|
|
@@ -2087,8 +2087,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
2087
2087
|
type: _$zod.ZodLiteral<"locality.degraded">;
|
|
2088
2088
|
payload: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
|
|
2089
2089
|
intent: _$zod.ZodEnum<{
|
|
2090
|
-
resume: "resume";
|
|
2091
2090
|
fork: "fork";
|
|
2091
|
+
resume: "resume";
|
|
2092
2092
|
}>;
|
|
2093
2093
|
verdictKind: _$zod.ZodLiteral<"degrade">;
|
|
2094
2094
|
reason: _$zod.ZodEnum<{
|
|
@@ -2113,8 +2113,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
2113
2113
|
turnId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2114
2114
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
2115
2115
|
intent: _$zod.ZodEnum<{
|
|
2116
|
-
resume: "resume";
|
|
2117
2116
|
fork: "fork";
|
|
2117
|
+
resume: "resume";
|
|
2118
2118
|
}>;
|
|
2119
2119
|
verdictKind: _$zod.ZodLiteral<"foreign">;
|
|
2120
2120
|
foreignMachineId: _$zod.ZodString;
|
|
@@ -2469,8 +2469,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
2469
2469
|
type: _$zod.ZodLiteral<"locality.degraded">;
|
|
2470
2470
|
payload: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
|
|
2471
2471
|
intent: _$zod.ZodEnum<{
|
|
2472
|
-
resume: "resume";
|
|
2473
2472
|
fork: "fork";
|
|
2473
|
+
resume: "resume";
|
|
2474
2474
|
}>;
|
|
2475
2475
|
verdictKind: _$zod.ZodLiteral<"degrade">;
|
|
2476
2476
|
reason: _$zod.ZodEnum<{
|
|
@@ -2495,8 +2495,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
2495
2495
|
turnId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2496
2496
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
2497
2497
|
intent: _$zod.ZodEnum<{
|
|
2498
|
-
resume: "resume";
|
|
2499
2498
|
fork: "fork";
|
|
2499
|
+
resume: "resume";
|
|
2500
2500
|
}>;
|
|
2501
2501
|
verdictKind: _$zod.ZodLiteral<"foreign">;
|
|
2502
2502
|
foreignMachineId: _$zod.ZodString;
|
|
@@ -2841,8 +2841,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
2841
2841
|
type: _$zod.ZodLiteral<"locality.degraded">;
|
|
2842
2842
|
payload: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
|
|
2843
2843
|
intent: _$zod.ZodEnum<{
|
|
2844
|
-
resume: "resume";
|
|
2845
2844
|
fork: "fork";
|
|
2845
|
+
resume: "resume";
|
|
2846
2846
|
}>;
|
|
2847
2847
|
verdictKind: _$zod.ZodLiteral<"degrade">;
|
|
2848
2848
|
reason: _$zod.ZodEnum<{
|
|
@@ -2867,8 +2867,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
2867
2867
|
turnId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2868
2868
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
2869
2869
|
intent: _$zod.ZodEnum<{
|
|
2870
|
-
resume: "resume";
|
|
2871
2870
|
fork: "fork";
|
|
2871
|
+
resume: "resume";
|
|
2872
2872
|
}>;
|
|
2873
2873
|
verdictKind: _$zod.ZodLiteral<"foreign">;
|
|
2874
2874
|
foreignMachineId: _$zod.ZodString;
|
|
@@ -3221,8 +3221,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
3221
3221
|
type: _$zod.ZodLiteral<"locality.degraded">;
|
|
3222
3222
|
payload: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
|
|
3223
3223
|
intent: _$zod.ZodEnum<{
|
|
3224
|
-
resume: "resume";
|
|
3225
3224
|
fork: "fork";
|
|
3225
|
+
resume: "resume";
|
|
3226
3226
|
}>;
|
|
3227
3227
|
verdictKind: _$zod.ZodLiteral<"degrade">;
|
|
3228
3228
|
reason: _$zod.ZodEnum<{
|
|
@@ -3247,8 +3247,8 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
3247
3247
|
turnId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3248
3248
|
}, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
|
|
3249
3249
|
intent: _$zod.ZodEnum<{
|
|
3250
|
-
resume: "resume";
|
|
3251
3250
|
fork: "fork";
|
|
3251
|
+
resume: "resume";
|
|
3252
3252
|
}>;
|
|
3253
3253
|
verdictKind: _$zod.ZodLiteral<"foreign">;
|
|
3254
3254
|
foreignMachineId: _$zod.ZodString;
|
|
@@ -3537,14 +3537,14 @@ declare const SessionEventStorageNamespace$1: {
|
|
|
3537
3537
|
timestamp: number;
|
|
3538
3538
|
type: "locality.degraded";
|
|
3539
3539
|
payload: {
|
|
3540
|
-
intent: "
|
|
3540
|
+
intent: "fork" | "resume";
|
|
3541
3541
|
verdictKind: "degrade";
|
|
3542
3542
|
reason: "adapter-unsupported" | "adapter-mismatch" | "no-adapter-session" | "missing-machine-id" | "machine-mismatch" | "cwd-mismatch" | "transforms-present" | "compression-present" | "connector-swap" | "mid-history-unsupported" | "hybrid-imported-orchestrated" | "native-attempt-failed" | "agent-already-started" | "fork-point-unresolvable" | "adapter-session-moved";
|
|
3543
3543
|
agentId?: string | undefined;
|
|
3544
3544
|
adapterId?: string | undefined;
|
|
3545
3545
|
turnId?: string | undefined;
|
|
3546
3546
|
} | {
|
|
3547
|
-
intent: "
|
|
3547
|
+
intent: "fork" | "resume";
|
|
3548
3548
|
verdictKind: "foreign";
|
|
3549
3549
|
foreignMachineId: string;
|
|
3550
3550
|
agentId?: string | undefined;
|
package/dist/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{canonicalStringify as e}from"@makaio/framework/utils";import{ArtifactKindRegistrationSchema as t,ArtifactSubjects as n,ArtifactViewModelSchema as r,ArtifactViewResolveRequestSchema as i,MaterializationSubjects as a,dep as o,extensionToken as s,mergeRelationTypeRegistrations as c,normalizeRelationTypeRegistration as l}from"@makaio/framework/contracts";import{BaseService as u}from"@makaio/framework/service-base";import{compileArtifactDataSchema as d,readArtifactTitle as f}from"@makaio/framework/contracts/artifact";import{MaterializationSubjects as p}from"@makaio/framework/contracts/materialization";function m(e){try{d(e)}catch(t){throw Error(`Invalid data schema for artifact kind '${e.kind}' version '${e.schemaVersion}': ${t instanceof Error?t.message:String(t)}`,{cause:t})}}const h=[{type:`supersedes`,symmetry:`asymmetric`},{type:`contradicts`,symmetry:`symmetric`},{type:`derives_from`,symmetry:`asymmetric`},{type:`responds_to`,symmetry:`asymmetric`},{type:`contains`,symmetry:`asymmetric`},{type:`refines`,symmetry:`asymmetric`},{type:`scopes`,symmetry:`asymmetric`},{type:`references`,symmetry:`asymmetric`},{type:`evidenced_by`,symmetry:`asymmetric`}],g={extension:0,"factory-repo":1,"target-repo":2},_={source:`extension`,ownerKey:`extension:bus`};function v(e){return`${e.source}:${e.ownerKey}`}function y(e,t){return e.source===t.source&&e.ownerKey===t.ownerKey}function b(e){return structuredClone(e)}function x(e,t){return`${e}@${t}`}var S=class extends u{kinds=new Map;kindContributions=new Map;nextKindContributionOrder=0;relationTypes=new Map;constructor(e){super(e)}async onInit(){for(let e of h)this.relationTypes.set(e.type,l(e));this.registerHandler(n.kind.register,e=>{this.registerKind(e.payload),e.setResult({registered:!0})}),this.registerHandler(n.kind.list,e=>{let{kind:t}=e.payload,n=[...this.kinds.values()].filter(e=>!t||e.kind===t).map(b);e.setResult({kinds:n})}),this.registerHandler(n[`relation-type`].register,e=>{this.storeRelationType(e.payload),e.setResult({registered:!0})}),this.registerHandler(n[`relation-type`].list,e=>{let{type:t}=e.payload,n=[...this.relationTypes.values()].filter(e=>!t||e.type===t).map(b);e.setResult({relationTypes:n})})}compareKindContributions(e,t){let n=g[e.owner.source]-g[t.owner.source];return n===0?e.owner.source===`extension`?t.order-e.order:e.order-t.order:n}findSameTierRepoConflict(e,t,n){return[...e.values()].find(e=>!y(e.owner,t)&&e.owner.source===t.source&&t.source!==`extension`&&e.order<=n)}recomputeKindWinner(e){let t=this.kindContributions.get(e),r=this.kinds.get(e);if(t===void 0||t.size===0){this.kindContributions.delete(e),this.kinds.delete(e),this.emitKindChangedFromKey(e,r);return}let i;for(let e of t.values())(i===void 0||this.compareKindContributions(e,i)<0)&&(i=e);let a=i;this.kinds.set(e,b(a.registration)),JSON.stringify(r)!==JSON.stringify(a.registration)&&this.bus.emit(n.kind.changed,{kind:a.registration.kind,schemaVersion:a.registration.schemaVersion})}emitKindChangedFromKey(e,t){t!==void 0&&this.bus.emit(n.kind.changed,{kind:t.kind,schemaVersion:t.schemaVersion})}registerKind(e,n=_){e=t.parse(e),m(e);let r=x(e.kind,e.schemaVersion),i=this.kindContributions.get(r)??new Map,a=v(n),o=i.get(a),s=n.source===`extension`?this.nextKindContributionOrder:o?.order??this.nextKindContributionOrder,c=this.findSameTierRepoConflict(i,n,s);if(c!==void 0){console.warn(`[ArtifactSchemaRegistry] Artifact kind '${r}' is already registered by '${c.owner.ownerKey}' at the same priority; keeping the existing owner.`);return}i.set(a,{owner:n,registration:b(e),order:n.source===`extension`||o===void 0?this.nextKindContributionOrder++:o.order}),this.kindContributions.set(r,i),this.recomputeKindWinner(r)}deregisterKind(e,t,n=_){let r=x(e,t),i=this.kindContributions.get(r);i!==void 0&&(i.delete(v(n)),this.recomputeKindWinner(r))}replaceKindRegistrationsForOwner(e,n){let r=n.map(e=>t.parse(e));for(let e of r)m(e);let i=new Set,a=v(e),o=new Map;for(let[e,t]of this.kindContributions.entries()){let n=t.get(a);n!==void 0&&(o.set(e,n.order),t.delete(a),i.add(e))}for(let t of r){let n=x(t.kind,t.schemaVersion),r=this.kindContributions.get(n)??new Map,s=e.source===`extension`?void 0:o.get(n),c=s??this.nextKindContributionOrder,l=this.findSameTierRepoConflict(r,e,c);if(l!==void 0){console.warn(`[ArtifactSchemaRegistry] Artifact kind '${n}' is already registered by '${l.owner.ownerKey}' at the same priority; keeping the existing owner.`);continue}r.set(a,{owner:e,registration:b(t),order:s??this.nextKindContributionOrder++}),this.kindContributions.set(n,r),i.add(n)}for(let e of i)this.recomputeKindWinner(e)}storeRelationType(e){let t=this.relationTypes.get(e.type);this.relationTypes.set(e.type,t?c(t,e):l(e))}getKind(e,t){let n=this.kinds.get(x(e,t));return n?b(n):void 0}getRelationType(e){let t=this.relationTypes.get(e);return t?b(t):void 0}onDestroy(){this.kinds.clear(),this.kindContributions.clear(),this.relationTypes.clear(),this.nextKindContributionOrder=0}};const C=s(`artifact-schema-registry`),w={name:C.name,displayName:`Artifact Schema Registry`,version:`0.1.0`,critical:!0,create:e=>new S(e.bus)};function T(e,t){return JSON.stringify([e,t])}function E(e){return Object.freeze({kind:e.kind,schemaVersion:e.schemaVersion,version:e.version,build:e.build})}var D=class extends Error{key;incomingOwner;existingOwner;constructor(e,t,n){let r=t===n?`Duplicate builder key '${e}' within owner '${t}'`:`Builder key '${e}' from owner '${t}' collides with owner '${n}'`;super(r),this.key=e,this.incomingOwner=t,this.existingOwner=n,this.name=`ArtifactViewBuilderCollisionError`}},O=class{owners=new Map;globalIndex=new Map;getBuilder(e,t){return this.globalIndex.get(T(e,t))?.builder}replaceBuildersForOwner(e,t){for(let n of t)if(!Number.isInteger(n.version)||n.version<1)throw Error(`Builder for '${T(n.kind,n.schemaVersion)}' from owner '${e}' has non-positive version ${String(n.version)}`);let n=new Map;for(let r of t){let t=T(r.kind,r.schemaVersion);if(n.has(t))throw new D(t,e,e);n.set(t,E(r))}for(let t of n.keys()){let n=this.globalIndex.get(t);if(n&&n.owner!==e)throw new D(t,e,n.owner)}n.size===0?this.owners.delete(e):this.owners.set(e,[...n.values()]),this.rebuildGlobalIndex()}removeBuildersForOwner(e){this.owners.has(e)&&(this.owners.delete(e),this.rebuildGlobalIndex())}getBuildersForOwner(e){let t=this.owners.get(e);if(t)return[...t]}clear(){this.owners.clear(),this.globalIndex.clear()}destroy(){this.clear()}rebuildGlobalIndex(){let e=new Map;for(let[t,n]of this.owners)for(let r of n){let n=T(r.kind,r.schemaVersion);e.set(n,{owner:t,builder:r})}this.globalIndex=e}};const k=5;function A(e){if(e.target.refClass===`artifact`)return{artifactId:e.target.id,label:`[${e.target.kind}] ${e.target.id}`,...e.sourceLocalId===void 0?{}:{sourceLocalId:e.sourceLocalId}}}function j(e){let t=new Map;for(let n of e){let e=A(n);if(!e)continue;let r=t.get(n.type)??[];r.push(e),t.set(n.type,r)}if(t.size!==0)return{type:`relations`,title:`Relations`,groups:[...t.entries()].map(([e,t])=>({type:e,items:t}))}}function M(e){let t=[],n=new Set;for(let r of e){let e=A(r);if(!e)continue;let i=JSON.stringify([e.artifactId,e.sourceLocalId]);n.has(i)||(n.add(i),t.push(e))}return{breadcrumbs:[],related:t}}function N(e){if(!e.confidence?.basis)return;let t=[];for(let n of e.confidence.basis){let e=n.evidenceRef;e?.refClass===`evidence`&&t.push({kind:e.kind,id:e.id,...e.locator?{locator:e.locator}:{}})}if(t.length!==0)return{type:`evidence`,title:`Evidence`,items:t}}function P(e,t,n){let r=[];if(n===`full`){let t=j(e.relations);t&&r.push(t);let n=N(e);n&&r.push(n)}return{title:f(e.data,t.titlePath),artifact:{id:e.id,kind:e.kind,revision:e.revision},navigation:M(e.relations),sections:r,links:{}}}var F=class extends u{schemaRegistry;builderRegistry;constructor(e,t,n){super(e),this.schemaRegistry=t,this.builderRegistry=n}async onInit(){this.registerHandler(a.artifact.view.resolve,async e=>{let{ref:t,level:n,affordance:r,params:a}=i.parse(e.payload),o=await this.resolve(t,n,r,a);e.setResult(o)})}async resolve(e,t,i,a){let o=await this.bus.requestOptional(n.resolve,{ref:e});if(!o.handled||o.data.artifact===null)return{status:`artifact-not-found`,view:null};let s=o.data.artifact,c=this.schemaRegistry.getKind(s.kind,s.schemaVersion);if(c===void 0)return{status:`not-rendered`,view:null};let l=this.builderRegistry.getBuilder(s.kind,s.schemaVersion);if(l===void 0)return{status:`not-rendered`,view:null};let u=P(s,c,t),d=u.sections,f=u.navigation,p=l.version,m=await l.build({artifact:s,level:t,affordance:i,params:a,genericSections:u.sections,genericNavigation:u.navigation,relations:s.relations});if(m!==void 0){if(`render`in m&&m.render===!1)return{status:`not-rendered`,view:null};`sections`in m&&(d=m.sections??d),`navigation`in m&&(f=m.navigation??f)}let h={title:u.title,artifact:u.artifact,navigation:f,sections:[...d],links:u.links};return{status:`ok`,view:r.parse(h),builderVersion:p,sourceRevision:e.revision}}};function I(e){return structuredClone(e)}var L=class extends u{bindings=new Map;constructor(e){super(e)}async onInit(){this.registerHandler(p.surfaceBinding.register,e=>{this.registerBinding(e.payload),e.setResult({registered:!0})}),this.registerHandler(p.surfaceBinding.list,e=>{let{id:t,provider:n,namespace:r}=e.payload,i=[...this.bindings.values()].filter(e=>(!t||e.id===t)&&(!n||e.provider===n)&&(!r||e.namespace===r)).map(I);e.setResult({bindings:i})})}registerBinding(t){let n=this.bindings.get(t.id);if(n){if(e(n)!==e(t))throw Error(`Surface binding '${t.id}' is already registered with a different definition`);return}this.bindings.set(t.id,I(t)),this.bus.emit(p.surfaceBinding.changed,{id:t.id,provider:t.provider})}deregisterBinding(e){let t=this.bindings.get(e);t&&(this.bindings.delete(e),this.bus.emit(p.surfaceBinding.changed,{id:e,provider:t.provider}))}getBinding(e){let t=this.bindings.get(e);return t?I(t):void 0}onDestroy(){this.bindings.clear()}},R=class{queues=new Map;activeLeases=new Map;pendingAcquisitions=new Set;authorizedRequests=new Map;consumedAuthorizedRequestIds=new Set;acceptingAcquisitions=!0;destroyPromise;destroy(){return this.acceptingAcquisitions=!1,this.destroyPromise??=this.drain(),this.destroyPromise}acquire(e){if(!this.acceptingAcquisitions)return Promise.reject(Error(`Materialization operation coordinator is destroyed`));let t=this.acquireAdmitted(e);return this.pendingAcquisitions.add(t),t.then(()=>this.pendingAcquisitions.delete(t),()=>this.pendingAcquisitions.delete(t)),t}async acquireAdmitted(e){let t=z(e),n=new Set,r=[];for(let e of B(t))r.push(await this.acquireKey(e)),n.add(e);let i={id:crypto.randomUUID(),scope:t},a,o=new Promise(e=>{a=e});return this.activeLeases.set(i.id,{lease:i,heldKeys:n,releases:r,settled:o,settle:a,released:!1}),i}release(e){let t=this.requireActiveLease(e);t.released=!0,this.activeLeases.delete(e.id);for(let e of t.releases.reverse())e();t.settle()}async extend(e,t){let n=this.requireActiveLease(e),r=z(t);if(r.artifactId!==e.scope.artifactId)throw Error(`A materialization operation lease cannot be extended to another artifact`);let i=B(r).filter(e=>!n.heldKeys.has(e)),a=[...n.heldKeys].filter(e=>e.startsWith(`provider:`)).at(-1);if(a&&i.some(e=>H(e,a)<0))throw Error(`Materialization operation lease extension violates lock ordering`);for(let e of i)n.releases.push(await this.acquireKey(e)),n.heldKeys.add(e)}async runExclusive(e,t,n,r){let i=z(e);if(n){if(this.consumedAuthorizedRequestIds.has(n))throw Error(`Materialization operation authorization has already been consumed`);let e=this.authorizedRequests.get(n);if(e){this.authorizedRequests.delete(n),this.consumedAuthorizedRequestIds.add(n);let a=this.activeLeases.get(e.leaseId);if(!r?.local||!a||e.scopeKey!==U(i))throw Error(`Materialization operation authorization does not match this scope`);return t(a.lease)}}let a=await this.acquire(i);try{return await t(a)}finally{this.release(a)}}async runAuthorizedRequest(e,t,n){let r=this.requireActiveLease(e),i=z(t);if(!B(i).every(e=>r.heldKeys.has(e)))throw Error(`Materialization operation authorization requires a lease for the full scope`);let a=crypto.randomUUID();this.authorizedRequests.set(a,{leaseId:e.id,scopeKey:U(i)});try{return await n(a)}finally{this.authorizedRequests.delete(a),this.consumedAuthorizedRequestIds.delete(a)}}requireActiveLease(e){let t=this.activeLeases.get(e.id);if(!t||t.released||t.lease!==e)throw Error(`Materialization operation lease is no longer active`);return t}async acquireKey(e){let t=this.queues.get(e)??Promise.resolve(),n,r=new Promise(e=>{n=e}),i=t.then(()=>r);return this.queues.set(e,i),await t,()=>{n(),this.queues.get(e)===i&&this.queues.delete(e)}}async drain(){for(;this.pendingAcquisitions.size>0||this.activeLeases.size>0;)await Promise.allSettled([...this.pendingAcquisitions,...[...this.activeLeases.values()].map(e=>e.settled)])}};function z(e){if(!e.artifactId)throw Error(`Materialization operation scope requires an artifactId`);let t=[...new Map((e.providerObjects??[]).map(e=>[V(e),e])).values()].sort((e,t)=>H(V(e),V(t)));return t.length>0?{artifactId:e.artifactId,providerObjects:t}:{artifactId:e.artifactId}}function B(e){return[`artifact:${e.artifactId}`,...(e.providerObjects??[]).map(V)]}function V(e){if(!e.provider||!e.externalId)throw Error(`Materialization provider objects require provider and externalId`);return`provider:${JSON.stringify([e.provider,e.externalId])}`}function H(e,t){return e===t?0:e<t?-1:1}function U(e){return JSON.stringify(B(e))}const W=s(`surface-binding-registry`),G=s(`artifact-view-builder-registry`),K=s(`artifact-view-service`),q=s(`materialization-operation-coordinator`),J={name:q.name,displayName:`Materialization Operation Coordinator`,version:`0.1.0`,critical:!0,create:()=>new R},Y={name:W.name,displayName:`Surface Binding Registry`,version:`0.1.0`,critical:!0,create:e=>new L(e.bus)},X={name:G.name,displayName:`Artifact View Builder Registry`,version:`0.1.0`,critical:!0,create:()=>new O},Z={name:K.name,displayName:`Artifact View Service`,version:`0.1.0`,critical:!0,dependencies:[o(C.name),o(G.name)],create:e=>{let t=e.getService(C),n=e.getService(G);if(t===void 0)throw Error(`ArtifactSchemaRegistry is not available for ArtifactViewService`);if(n===void 0)throw Error(`ArtifactViewBuilderRegistry is not available for ArtifactViewService`);return new F(e.bus,t,n)}};export{w as _,X as a,Y as c,F as d,k as f,C as g,O as h,W as i,R as l,D as m,K as n,Z as o,P as p,q as r,J as s,G as t,L as u,S as v};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
|
|
2
|
-
import { ArtifactKindRegistration, ExtensionServiceLifecycle, MakaioNodeExtension,
|
|
2
|
+
import { ArtifactKindRegistration, ExtensionServiceLifecycle, MakaioNodeExtension, NormalizedRelationTypeRegistration } from "@makaio/framework/contracts";
|
|
3
3
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
4
4
|
import { BaseService } from "@makaio/framework/service-base";
|
|
5
5
|
import { ArtifactViewBuilder, SurfaceBindingRegistration } from "@makaio/framework/contracts/materialization";
|
|
@@ -63,6 +63,7 @@ declare class ArtifactSchemaRegistry extends BaseService {
|
|
|
63
63
|
private readonly kindContributions;
|
|
64
64
|
/** Monotone counter for contribution insertion order. */
|
|
65
65
|
private nextKindContributionOrder;
|
|
66
|
+
/** Relation types by name, stored in normal form (shorthand folded into `endpoints`). */
|
|
66
67
|
private readonly relationTypes;
|
|
67
68
|
/**
|
|
68
69
|
* @param bus - Bus instance used for handler registration and event emission.
|
|
@@ -153,10 +154,12 @@ declare class ArtifactSchemaRegistry extends BaseService {
|
|
|
153
154
|
/**
|
|
154
155
|
* Store a relation type registration.
|
|
155
156
|
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
157
|
+
* Contributions for the same type from several modules are merged: their endpoint
|
|
158
|
+
* entries are unioned and the result is kept in normal form. An identical
|
|
159
|
+
* re-registration merges to the same normal form.
|
|
160
|
+
* Conflicts on per-type properties (`symmetry`, differing `implication`) throw.
|
|
158
161
|
* @param registration - Relation type registration payload received from the bus RPC.
|
|
159
|
-
* @throws If a conflicting registration for the same type already exists.
|
|
162
|
+
* @throws RelationTypeConflictError If a conflicting registration for the same type already exists.
|
|
160
163
|
*/
|
|
161
164
|
private storeRelationType;
|
|
162
165
|
/**
|
|
@@ -169,9 +172,9 @@ declare class ArtifactSchemaRegistry extends BaseService {
|
|
|
169
172
|
/**
|
|
170
173
|
* Look up a relation type registration by type string.
|
|
171
174
|
* @param type - Relation type string.
|
|
172
|
-
* @returns The registration record, or `undefined` if not found.
|
|
175
|
+
* @returns The registration record in normal form, or `undefined` if not found.
|
|
173
176
|
*/
|
|
174
|
-
getRelationType(type: string):
|
|
177
|
+
getRelationType(type: string): NormalizedRelationTypeRegistration | undefined;
|
|
175
178
|
/**
|
|
176
179
|
* Service teardown hook.
|
|
177
180
|
*
|
|
@@ -10,8 +10,8 @@ import { UiNavigationLevel } from "@makaio/framework/contracts";
|
|
|
10
10
|
*/
|
|
11
11
|
declare const SurfaceIdSchema: z.ZodEnum<{
|
|
12
12
|
tray: "tray";
|
|
13
|
-
web: "web";
|
|
14
13
|
mobile: "mobile";
|
|
14
|
+
web: "web";
|
|
15
15
|
electron: "electron";
|
|
16
16
|
electrobun: "electrobun";
|
|
17
17
|
}>;
|
|
@@ -101,8 +101,8 @@ declare const PageMetadataSchema: z.ZodObject<{
|
|
|
101
101
|
level: z.ZodCustom<UiNavigationLevel, UiNavigationLevel>;
|
|
102
102
|
surfaces: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodEnum<{
|
|
103
103
|
tray: "tray";
|
|
104
|
-
web: "web";
|
|
105
104
|
mobile: "mobile";
|
|
105
|
+
web: "web";
|
|
106
106
|
electron: "electron";
|
|
107
107
|
electrobun: "electrobun";
|
|
108
108
|
}>>]>>;
|
|
@@ -127,8 +127,8 @@ declare const PageSchemas: {
|
|
|
127
127
|
readonly request: z.ZodObject<{
|
|
128
128
|
surface: z.ZodOptional<z.ZodEnum<{
|
|
129
129
|
tray: "tray";
|
|
130
|
-
web: "web";
|
|
131
130
|
mobile: "mobile";
|
|
131
|
+
web: "web";
|
|
132
132
|
electron: "electron";
|
|
133
133
|
electrobun: "electrobun";
|
|
134
134
|
}>>;
|
|
@@ -147,8 +147,8 @@ declare const PageSchemas: {
|
|
|
147
147
|
level: z.ZodCustom<UiNavigationLevel, UiNavigationLevel>;
|
|
148
148
|
surfaces: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodEnum<{
|
|
149
149
|
tray: "tray";
|
|
150
|
-
web: "web";
|
|
151
150
|
mobile: "mobile";
|
|
151
|
+
web: "web";
|
|
152
152
|
electron: "electron";
|
|
153
153
|
electrobun: "electrobun";
|
|
154
154
|
}>>]>>;
|
|
@@ -15,8 +15,8 @@ declare const SubagentTemplateSchema: z.ZodObject<{
|
|
|
15
15
|
model: z.ZodOptional<z.ZodString>;
|
|
16
16
|
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
17
17
|
contextMode: z.ZodDefault<z.ZodEnum<{
|
|
18
|
-
fresh: "fresh";
|
|
19
18
|
fork: "fork";
|
|
19
|
+
fresh: "fresh";
|
|
20
20
|
}>>;
|
|
21
21
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
22
|
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -47,14 +47,14 @@ declare const SubagentTemplateCreateSchema: z.ZodObject<{
|
|
|
47
47
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
48
48
|
adapterName: z.ZodString;
|
|
49
49
|
model: z.ZodOptional<z.ZodString>;
|
|
50
|
-
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
51
50
|
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
51
|
+
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
52
52
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
53
53
|
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
54
54
|
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
55
55
|
contextMode: z.ZodDefault<z.ZodEnum<{
|
|
56
|
-
fresh: "fresh";
|
|
57
56
|
fork: "fork";
|
|
57
|
+
fresh: "fresh";
|
|
58
58
|
}>>;
|
|
59
59
|
}, z.core.$strip>;
|
|
60
60
|
type SubagentTemplateCreate = z.infer<typeof SubagentTemplateCreateSchema>;
|
|
@@ -69,8 +69,8 @@ declare const SubagentTemplateUpdateSchema: z.ZodObject<{
|
|
|
69
69
|
model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
70
70
|
systemPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
71
71
|
contextMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
72
|
-
fresh: "fresh";
|
|
73
72
|
fork: "fork";
|
|
73
|
+
fresh: "fresh";
|
|
74
74
|
}>>>;
|
|
75
75
|
allowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
76
76
|
disallowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
@@ -114,8 +114,8 @@ declare const SubagentTemplateSettingsSchemas: {
|
|
|
114
114
|
model: z.ZodOptional<z.ZodString>;
|
|
115
115
|
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
116
116
|
contextMode: z.ZodDefault<z.ZodEnum<{
|
|
117
|
-
fresh: "fresh";
|
|
118
117
|
fork: "fork";
|
|
118
|
+
fresh: "fresh";
|
|
119
119
|
}>>;
|
|
120
120
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
121
121
|
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -132,14 +132,14 @@ declare const SubagentTemplateSettingsSchemas: {
|
|
|
132
132
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
133
133
|
adapterName: z.ZodString;
|
|
134
134
|
model: z.ZodOptional<z.ZodString>;
|
|
135
|
-
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
136
135
|
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
136
|
+
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
137
137
|
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
138
138
|
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
139
139
|
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
140
140
|
contextMode: z.ZodDefault<z.ZodEnum<{
|
|
141
|
-
fresh: "fresh";
|
|
142
141
|
fork: "fork";
|
|
142
|
+
fresh: "fresh";
|
|
143
143
|
}>>;
|
|
144
144
|
}, z.core.$strip>;
|
|
145
145
|
response: z.ZodObject<{
|
|
@@ -155,8 +155,8 @@ declare const SubagentTemplateSettingsSchemas: {
|
|
|
155
155
|
model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
156
156
|
systemPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
157
157
|
contextMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
158
|
-
fresh: "fresh";
|
|
159
158
|
fork: "fork";
|
|
159
|
+
fresh: "fresh";
|
|
160
160
|
}>>>;
|
|
161
161
|
allowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
162
162
|
disallowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
@@ -695,27 +695,66 @@ declare const ArtifactRevisionSchema: z.ZodObject<{
|
|
|
695
695
|
timestamp: z.ZodNumber;
|
|
696
696
|
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
697
697
|
}, z.core.$strip>;
|
|
698
|
+
/** Reference classes a relation target may belong to. */
|
|
699
|
+
declare const RelationTargetRefClassSchema: z.ZodEnum<{
|
|
700
|
+
local: "local";
|
|
701
|
+
evidence: "evidence";
|
|
702
|
+
artifact: "artifact";
|
|
703
|
+
entity: "entity";
|
|
704
|
+
}>;
|
|
705
|
+
/**
|
|
706
|
+
* One permitted endpoint pair of a relation type.
|
|
707
|
+
* An omitted list is open. A present list is an allowlist, so an empty list permits nothing.
|
|
708
|
+
*/
|
|
709
|
+
declare const RelationEndpointSchema: z.ZodObject<{
|
|
710
|
+
sourceKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
711
|
+
targetKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
712
|
+
targetRefClasses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
713
|
+
local: "local";
|
|
714
|
+
evidence: "evidence";
|
|
715
|
+
artifact: "artifact";
|
|
716
|
+
entity: "entity";
|
|
717
|
+
}>>>;
|
|
718
|
+
description: z.ZodOptional<z.ZodString>;
|
|
719
|
+
}, z.core.$strip>;
|
|
698
720
|
/**
|
|
699
721
|
* Registration record for a named relation type.
|
|
700
722
|
*
|
|
701
|
-
*
|
|
702
|
-
*
|
|
723
|
+
* A registration declares the verb (`type`, `symmetry`, `implication`) and the
|
|
724
|
+
* endpoint pairs it may connect. `symmetry` and `implication` describe the verb
|
|
725
|
+
* as a whole, not an individual pair. Pairs are declared either through
|
|
726
|
+
* `endpoints` (a list of permitted pairs) or through the shorthand fields
|
|
727
|
+
* `sourceKinds`, `targetKinds` and `targetRefClasses`, which stand for exactly
|
|
728
|
+
* one endpoint. The two forms are mutually exclusive. `description` states the
|
|
729
|
+
* meaning of the verb for the whole type; per-pair usage lives on the endpoint entries.
|
|
703
730
|
*/
|
|
704
731
|
declare const RelationTypeRegistrationSchema: z.ZodObject<{
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
732
|
+
endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
733
|
+
sourceKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
734
|
+
targetKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
735
|
+
targetRefClasses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
736
|
+
local: "local";
|
|
737
|
+
evidence: "evidence";
|
|
738
|
+
artifact: "artifact";
|
|
739
|
+
entity: "entity";
|
|
740
|
+
}>>>;
|
|
741
|
+
description: z.ZodOptional<z.ZodString>;
|
|
742
|
+
}, z.core.$strip>>>;
|
|
711
743
|
sourceKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
712
744
|
targetKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
713
745
|
targetRefClasses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
714
746
|
local: "local";
|
|
715
|
-
artifact: "artifact";
|
|
716
747
|
evidence: "evidence";
|
|
748
|
+
artifact: "artifact";
|
|
717
749
|
entity: "entity";
|
|
718
750
|
}>>>;
|
|
751
|
+
type: z.ZodString;
|
|
752
|
+
symmetry: z.ZodEnum<{
|
|
753
|
+
asymmetric: "asymmetric";
|
|
754
|
+
symmetric: "symmetric";
|
|
755
|
+
}>;
|
|
756
|
+
implication: z.ZodOptional<z.ZodString>;
|
|
757
|
+
description: z.ZodOptional<z.ZodString>;
|
|
719
758
|
}, z.core.$strip>;
|
|
720
759
|
/**
|
|
721
760
|
* Query parameters for retrieving artifact revisions from the store.
|
|
@@ -1134,7 +1173,11 @@ type ArtifactRevision$1<TData extends Record<string, unknown> = Record<string, u
|
|
|
1134
1173
|
data: TData;
|
|
1135
1174
|
};
|
|
1136
1175
|
/** Registration record for a named relation type. */
|
|
1137
|
-
type RelationTypeRegistration
|
|
1176
|
+
type RelationTypeRegistration = z.infer<typeof RelationTypeRegistrationSchema>;
|
|
1177
|
+
/** Reference classes a relation target may belong to. */
|
|
1178
|
+
type RelationTargetRefClass = z.infer<typeof RelationTargetRefClassSchema>;
|
|
1179
|
+
/** One permitted endpoint pair of a relation type. */
|
|
1180
|
+
type RelationEndpoint = z.infer<typeof RelationEndpointSchema>;
|
|
1138
1181
|
/** Query parameters for retrieving artifact revisions from the store. */
|
|
1139
1182
|
type ArtifactQueryRequest = z.infer<typeof ArtifactQueryRequestSchema>;
|
|
1140
1183
|
/** Request to compare two artifact revisions. */
|
|
@@ -1142,4 +1185,4 @@ type ArtifactCompareRequest = z.infer<typeof ArtifactCompareRequestSchema>;
|
|
|
1142
1185
|
/** Result of comparing two artifact revisions. */
|
|
1143
1186
|
type ArtifactCompareResponse = z.infer<typeof ArtifactCompareResponseSchema>;
|
|
1144
1187
|
//#endregion
|
|
1145
|
-
export {
|
|
1188
|
+
export { ArtifactLifecycleState as $, ConfidenceMetadata as A, RelationTargetRefClass as B, ArtifactScope as C, ConfidenceBasisSchema as D, ConfidenceBasis as E, EvidenceRefSchema as F, ArtifactCategorySchema as G, RelationTypeRegistrationSchema as H, LocalRef as I, ArtifactEvidenceRequirementsSchema as J, ArtifactDataPathSchema as K, LocalRefSchema as L, EntityRef as M, EntityRefSchema as N, ConfidenceLevel as O, EvidenceRef as P, ArtifactKindViewSchema as Q, RelationEndpoint as R, ArtifactRevisionSchema as S, ArtifactStatusPathSchema as T, ARTIFACT_CATEGORY_LIFECYCLE_STATES as U, RelationTypeRegistration as V, ArtifactCategory as W, ArtifactKindRegistrationSchema$1 as X, ArtifactKindRegistration$1 as Y, ArtifactKindView as Z, ArtifactRelationTarget as _, ArtifactCompareResponse as a, ArtifactRelationRequirementConditionSchema as at, ArtifactRepresentationsSchema as b, ArtifactObservationSchema as c, ArtifactUniquenessRule as ct, ArtifactQueryScope as d, ArtifactRef$1 as dt, ArtifactLifecycleStateSchema as et, ArtifactQueryScopeSchema as f, ArtifactRefSchema as ft, ArtifactRelationSchema as g, ArtifactRelationQueryTargetSchema as h, ArtifactCompareRequestSchema as i, ArtifactRelationRequirementCondition as it, ConfidenceMetadataSchema as j, ConfidenceLevelSchema as k, ArtifactQueryRequest as l, ArtifactUniquenessRuleSchema as lt, ArtifactRelationQueryTarget as m, ArtifactActorSchema as n, ArtifactPartAreaSchema as nt, ArtifactCompareResponseSchema as o, ArtifactRelationRequirementSchema as ot, ArtifactRelation as p, ArtifactEvidenceRequirements as q, ArtifactCompareRequest as r, ArtifactRelationRequirement as rt, ArtifactObservation$1 as s, ArtifactSchemaVersionSchema as st, ArtifactActor as t, ArtifactPartArea as tt, ArtifactQueryRequestSchema as u, ArtifactUniquenessSelectorSchema as ut, ArtifactRelationTargetSchema as v, ArtifactScopeSchema as w, ArtifactRevision$1 as x, ArtifactRepresentations as y, RelationEndpointSchema as z };
|
|
@@ -102,8 +102,8 @@ declare const ExecutionTargetInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
102
102
|
name: z.ZodString;
|
|
103
103
|
image: z.ZodOptional<z.ZodString>;
|
|
104
104
|
enabled: z.ZodBoolean;
|
|
105
|
-
scope: z.ZodString;
|
|
106
105
|
busUrl: z.ZodOptional<z.ZodString>;
|
|
106
|
+
scope: z.ZodString;
|
|
107
107
|
}, z.core.$strip>, z.ZodObject<{
|
|
108
108
|
type: z.ZodLiteral<"container-isolated">;
|
|
109
109
|
id: z.ZodString;
|
|
@@ -205,8 +205,8 @@ declare const ExecutionTargetSchemas: {
|
|
|
205
205
|
name: z.ZodString;
|
|
206
206
|
image: z.ZodOptional<z.ZodString>;
|
|
207
207
|
enabled: z.ZodBoolean;
|
|
208
|
-
scope: z.ZodString;
|
|
209
208
|
busUrl: z.ZodOptional<z.ZodString>;
|
|
209
|
+
scope: z.ZodString;
|
|
210
210
|
}, z.core.$strip>, z.ZodObject<{
|
|
211
211
|
type: z.ZodLiteral<"container-isolated">;
|
|
212
212
|
id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./json-value-DM-EjTC1.mjs";import{d as n,r,w as i}from"./kind-registration-CdjmVxY_.mjs";import{t as a}from"./repo-context-cO-TLEGN.mjs";import{z as o}from"zod";const s=o.string().min(1).regex(/\S/),c=o.strictObject({refClass:o.literal(`artifact`),kind:s,id:s,revision:s}),l=`x-makaio-value-type`,u=`evidence/v1`,d=o.string().min(1).regex(/\S/),f=o.strictObject({kind:o.literal(`whole-source`)}),p=o.strictObject({kind:o.literal(`lines`),startLine:o.number().int().positive(),lineCount:o.number().int().positive()}),m=o.strictObject({kind:o.literal(`data-path`),path:r}),h=o.strictObject({kind:o.literal(`git-file`),repository:a.strict(),path:d,commit:o.string().regex(/^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$/)}),g=o.strictObject({kind:o.literal(`confluence-page`),site:d,pageId:d,version:o.number().int().positive()}),_=o.strictObject({kind:o.literal(`artifact`),reference:c}),v=o.union([o.strictObject({source:h,location:o.union([f,p]),excerpt:o.string().optional()}),o.strictObject({source:g,location:f,excerpt:o.string().optional()}),o.strictObject({source:_,location:o.union([f,m]),excerpt:o.string().optional()})]).meta({title:`EvidenceValue`,description:`An immutable, directly cited source and its source-specific location.`,[l]:u}),y=o.string().regex(/^(?:\/(?:[^~/]|~[01])*)+$/,`Expected a data-relative JSON Pointer`),b=o.object({kind:o.string().min(1),id:o.string().min(1),displayName:o.string().optional()}),x=o.object({level:o.string().min(1),ids:o.record(o.string().min(1),o.string().min(1)).optional()}).superRefine((e,t)=>{e.level!==`global`&&(!e.ids||Object.keys(e.ids).length===0)&&t.addIssue({code:o.ZodIssueCode.custom,path:[`ids`],message:`ids is required when scope level is not 'global'`})}),S=o.object({level:o.string().min(1),ids:o.record(o.string().min(1),o.string().min(1)).optional()}),C=o.object({refClass:o.literal(`local`).default(`local`),artifact:c,localId:o.string().min(1)}),w=o.object({refClass:o.literal(`evidence`).default(`evidence`),kind:o.string().min(1),id:o.string().min(1),revision:o.string().min(1).optional(),locator:o.string().min(1).optional()}),T=o.strictObject({refClass:o.literal(`entity`),entityType:o.string().min(1),id:o.string().min(1)}),E=o.discriminatedUnion(`refClass`,[c,C,w,T]);function D(e){return!e||typeof e!=`object`||Array.isArray(e)||`refClass`in e?e:`artifact`in e&&`localId`in e?{...e,refClass:`local`}:`locator`in e||!(`revision`in e)?{...e,refClass:`evidence`}:{...e,refClass:`artifact`}}const O=o.preprocess(D,E),k=o.discriminatedUnion(`refClass`,[c.extend({revision:c.shape.revision.optional()}),C,w,T]);function A(e){return!e||typeof e!=`object`||Array.isArray(e)||`refClass`in e?e:`artifact`in e&&`localId`in e?{...e,refClass:`local`}:`locator`in e?{...e,refClass:`evidence`}:{...e,refClass:`artifact`}}const j=o.preprocess(A,k),M=o.object({type:o.string().min(1),sourceLocalId:o.string().min(1).regex(/\S/).optional(),target:O}),N=o.enum([`assumed`,`inferred`,`stated`,`confirmed`,`verified`]),P=o.object({kind:o.string().min(1),actor:b,timestamp:o.number().int().nonnegative(),detail:o.string().optional(),evidenceRef:O.optional()}),F=o.object({level:N,basis:o.array(P)}),I=o.object({id:o.string().min(1),kind:o.string().min(1),summary:o.string().min(1),detail:o.string().optional(),severity:o.enum([`info`,`warning`,`blocker`]).optional(),tags:o.array(o.string().min(1)).optional(),regarding:o.union([c,C]).optional(),evidence:o.union([c,w]).optional(),actor:b,timestamp:o.number().int().nonnegative()}),L=o.object({markdown:o.string().optional(),summary:o.string().optional(),plaintext:o.string().optional()}),R=o.object({kind:c.shape.kind,id:c.shape.id,slug:i,revision:c.shape.revision,scope:x,schemaVersion:n,data:e,relations:o.array(M),evidence:o.array(v).optional(),confidence:F.optional(),representations:L.optional(),actor:b,timestamp:o.number().int().nonnegative(),createdAt:o.number().int().nonnegative().optional()}),z=o.object({type:o.string().min(1),symmetry:o.enum([`asymmetric`,`symmetric`]),implication:o.string().min(1).optional(),
|
|
1
|
+
import{n as e,o as t}from"./json-value-DM-EjTC1.mjs";import{d as n,r,w as i}from"./kind-registration-CdjmVxY_.mjs";import{t as a}from"./repo-context-cO-TLEGN.mjs";import{z as o}from"zod";const s=o.string().min(1).regex(/\S/),c=o.strictObject({refClass:o.literal(`artifact`),kind:s,id:s,revision:s}),l=`x-makaio-value-type`,u=`evidence/v1`,d=o.string().min(1).regex(/\S/),f=o.strictObject({kind:o.literal(`whole-source`)}),p=o.strictObject({kind:o.literal(`lines`),startLine:o.number().int().positive(),lineCount:o.number().int().positive()}),m=o.strictObject({kind:o.literal(`data-path`),path:r}),h=o.strictObject({kind:o.literal(`git-file`),repository:a.strict(),path:d,commit:o.string().regex(/^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$/)}),g=o.strictObject({kind:o.literal(`confluence-page`),site:d,pageId:d,version:o.number().int().positive()}),_=o.strictObject({kind:o.literal(`artifact`),reference:c}),v=o.union([o.strictObject({source:h,location:o.union([f,p]),excerpt:o.string().optional()}),o.strictObject({source:g,location:f,excerpt:o.string().optional()}),o.strictObject({source:_,location:o.union([f,m]),excerpt:o.string().optional()})]).meta({title:`EvidenceValue`,description:`An immutable, directly cited source and its source-specific location.`,[l]:u}),y=o.string().regex(/^(?:\/(?:[^~/]|~[01])*)+$/,`Expected a data-relative JSON Pointer`),b=o.object({kind:o.string().min(1),id:o.string().min(1),displayName:o.string().optional()}),x=o.object({level:o.string().min(1),ids:o.record(o.string().min(1),o.string().min(1)).optional()}).superRefine((e,t)=>{e.level!==`global`&&(!e.ids||Object.keys(e.ids).length===0)&&t.addIssue({code:o.ZodIssueCode.custom,path:[`ids`],message:`ids is required when scope level is not 'global'`})}),S=o.object({level:o.string().min(1),ids:o.record(o.string().min(1),o.string().min(1)).optional()}),C=o.object({refClass:o.literal(`local`).default(`local`),artifact:c,localId:o.string().min(1)}),w=o.object({refClass:o.literal(`evidence`).default(`evidence`),kind:o.string().min(1),id:o.string().min(1),revision:o.string().min(1).optional(),locator:o.string().min(1).optional()}),T=o.strictObject({refClass:o.literal(`entity`),entityType:o.string().min(1),id:o.string().min(1)}),E=o.discriminatedUnion(`refClass`,[c,C,w,T]);function D(e){return!e||typeof e!=`object`||Array.isArray(e)||`refClass`in e?e:`artifact`in e&&`localId`in e?{...e,refClass:`local`}:`locator`in e||!(`revision`in e)?{...e,refClass:`evidence`}:{...e,refClass:`artifact`}}const O=o.preprocess(D,E),k=o.discriminatedUnion(`refClass`,[c.extend({revision:c.shape.revision.optional()}),C,w,T]);function A(e){return!e||typeof e!=`object`||Array.isArray(e)||`refClass`in e?e:`artifact`in e&&`localId`in e?{...e,refClass:`local`}:`locator`in e?{...e,refClass:`evidence`}:{...e,refClass:`artifact`}}const j=o.preprocess(A,k),M=o.object({type:o.string().min(1),sourceLocalId:o.string().min(1).regex(/\S/).optional(),target:O}),N=o.enum([`assumed`,`inferred`,`stated`,`confirmed`,`verified`]),P=o.object({kind:o.string().min(1),actor:b,timestamp:o.number().int().nonnegative(),detail:o.string().optional(),evidenceRef:O.optional()}),F=o.object({level:N,basis:o.array(P)}),I=o.object({id:o.string().min(1),kind:o.string().min(1),summary:o.string().min(1),detail:o.string().optional(),severity:o.enum([`info`,`warning`,`blocker`]).optional(),tags:o.array(o.string().min(1)).optional(),regarding:o.union([c,C]).optional(),evidence:o.union([c,w]).optional(),actor:b,timestamp:o.number().int().nonnegative()}),L=o.object({markdown:o.string().optional(),summary:o.string().optional(),plaintext:o.string().optional()}),R=o.object({kind:c.shape.kind,id:c.shape.id,slug:i,revision:c.shape.revision,scope:x,schemaVersion:n,data:e,relations:o.array(M),evidence:o.array(v).optional(),confidence:F.optional(),representations:L.optional(),actor:b,timestamp:o.number().int().nonnegative(),createdAt:o.number().int().nonnegative().optional()}),z=o.enum([`artifact`,`local`,`evidence`,`entity`]),B=o.object({sourceKinds:o.array(o.string().min(1)).optional(),targetKinds:o.array(o.string().min(1)).optional(),targetRefClasses:o.array(z).optional(),description:o.string().trim().min(1).optional()}),V=o.object({type:o.string().min(1),symmetry:o.enum([`asymmetric`,`symmetric`]),implication:o.string().min(1).optional(),description:o.string().trim().min(1).optional(),...B.omit({description:!0}).shape,endpoints:o.array(B).min(1).optional()}).superRefine((e,t)=>{e.endpoints!==void 0&&(e.sourceKinds!==void 0||e.targetKinds!==void 0||e.targetRefClasses!==void 0)&&t.addIssue({code:`custom`,path:[`endpoints`],message:`endpoints cannot be combined with the shorthand fields sourceKinds, targetKinds or targetRefClasses`})}),H=o.object({kind:o.string().min(1).optional(),scope:S.optional(),ids:o.array(o.string().min(1)).optional(),slug:i.optional(),currentOnly:o.boolean().optional(),search:o.string().optional(),relation:o.object({type:o.string().min(1).optional(),target:j.optional()}).optional(),confidence:o.object({maxLevel:N.optional(),minLevel:N.optional()}).optional(),indexed:o.record(o.string(),t).optional(),limit:o.number().int().min(1).optional()}),U=o.object({base:c,target:c}),W=o.object({base:R,target:R,changedPaths:o.array(o.string())});export{u as C,l as S,c as T,T as _,H as a,B as b,M as c,R as d,x as f,F as g,N as h,I as i,O as l,P as m,U as n,S as o,y as p,W as r,j as s,b as t,L as u,w as v,v as w,V as x,C as y};
|
|
@@ -143,8 +143,8 @@ declare const AdapterRuntimeSchemas: {
|
|
|
143
143
|
teardownCompleted: z.ZodObject<{
|
|
144
144
|
evidence: z.ZodEnum<{
|
|
145
145
|
unknown: "unknown";
|
|
146
|
-
closed: "closed";
|
|
147
146
|
exited: "exited";
|
|
147
|
+
closed: "closed";
|
|
148
148
|
released: "released";
|
|
149
149
|
detached: "detached";
|
|
150
150
|
}>;
|