@makaio/framework 1.0.0-dev-1789148673705 → 1.0.0-dev-1789168267790
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/artifact-BGy1hXuP.mjs +1 -0
- package/dist/bus/index.d.mts +48 -1
- package/dist/bus/index.mjs +1 -8
- package/dist/bus-KqRHrusX.mjs +9 -0
- package/dist/contracts/adapter/index.d.mts +1 -1
- package/dist/contracts/artifact/index.d.mts +2 -2
- package/dist/contracts/artifact/index.mjs +1 -1
- package/dist/contracts/capabilities/index.d.mts +1 -1
- package/dist/contracts/client/index.d.mts +1 -1
- package/dist/contracts/extension/index.d.mts +2 -2
- package/dist/contracts/index.d.mts +31 -31
- package/dist/contracts/index.mjs +1 -1
- package/dist/contracts/session/index.d.mts +2 -2
- package/dist/contracts/worker/index.d.mts +1 -1
- package/dist/contracts/worker/index.mjs +1 -1
- package/dist/contracts/workflow/index.d.mts +1 -1
- package/dist/contracts/workflow/index.mjs +1 -1
- package/dist/{index-Caai1zAG.d.mts → index-BTwMms1p.d.mts} +1 -1
- package/dist/{index-Bk-hwMue.d.mts → index-Bp8ZljrJ.d.mts} +2 -2
- package/dist/{index-2YEh0vHQ.d.mts → index-CjOJLtH7.d.mts} +28 -28
- package/dist/{index-DC2C-u2k.d.mts → index-Cp9olTr7.d.mts} +7 -7
- package/dist/{index-LFS-KagP.d.mts → index-DOVT8mU7.d.mts} +233 -66
- package/dist/{index-DKI-qw1F.d.mts → index-DPBh4QNY.d.mts} +30 -30
- package/dist/{index-EJFdPYs32.d.mts → index-D__FyAg62.d.mts} +4 -4
- package/dist/{index-CK5GEXLB2.d.mts → index-DtlZ4hw62.d.mts} +12 -12
- package/dist/{index-DcfuHw2O.d.mts → index-ZBm6F5_h.d.mts} +16 -16
- package/dist/{index-Ddk-kjif.d.mts → index-kC3LKZYJ.d.mts} +1 -1
- package/dist/{index-Zf9Zayey2.d.mts → index-qal7TzGP2.d.mts} +79 -79
- package/dist/{index-BLhNHkiK.d.mts → index-yapYXeah.d.mts} +8 -8
- 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/{namespace-BD4lgMfP.d.mts → namespace-BYBMtQUy.d.mts} +5 -5
- package/dist/{namespace--mFdPlbu.d.mts → namespace-CZJQrexB.d.mts} +18 -18
- package/dist/{namespace-CQPcYS-Q.d.mts → namespace-CjFT0wBT.d.mts} +2 -2
- package/dist/{namespace-Bw7YLQHw.d.mts → namespace-CvCk6Y9i.d.mts} +25 -25
- package/dist/package.json +1 -1
- package/dist/{schema-CbmZYwEl.d.mts → schema-B098Jz9p.d.mts} +1 -1
- package/dist/{schemas-Dt1YwXLN.d.mts → schemas-D0ZZdGmV.d.mts} +10 -10
- package/dist/{schemas-D9WJH6We.d.mts → schemas-DNUfTOJ0.d.mts} +1 -1
- 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/context-rules/index.d.mts +3 -3
- package/dist/services/filesystem/namespace.d.mts +6 -6
- package/dist/services/filesystem/schemas.d.mts +3 -3
- package/dist/services/git/namespace.d.mts +2 -2
- package/dist/services/git/schemas.d.mts +2 -2
- package/dist/services/index.d.mts +21 -21
- 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 +10 -10
- package/dist/services/subagent-template/index.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/{types-BrD4l8JJ.d.mts → types-6PHSlnbx.d.mts} +26 -26
- package/dist/{worker-DHZKWcLx.mjs → worker-Bw2UYlVO.mjs} +1 -1
- package/dist/workflow-engine/index.d.mts +24 -24
- package/dist/{workflow-D8uoSvcR.mjs → workflow-pOvprFKW.mjs} +1 -1
- package/package.json +1 -1
- package/dist/artifact-0LaQv515.mjs +0 -1
- package/dist/bus-CobBUqjo.mjs +0 -2
- package/dist/bus-Uy9C3TBM.mjs +0 -1
- package/dist/scoped-bus-DwVrmi_1.mjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ArtifactScope, K as ArtifactKindRegistration$1, V as ArtifactCategory, X as ArtifactLifecycleState, _ as ArtifactRelationTarget, it as ArtifactRef$1, p as ArtifactRelation, s as ArtifactObservation$1, t as ArtifactActor, x as ArtifactRevision$1, y as ArtifactRepresentations } from "./schemas-CXCdmM5K.mjs";
|
|
1
|
+
import { C as ArtifactScope, K as ArtifactKindRegistration$1, V as ArtifactCategory, X as ArtifactLifecycleState, _ as ArtifactRelationTarget, it as ArtifactRef$1, p as ArtifactRelation, s as ArtifactObservation$1, t as ArtifactActor, tt as ArtifactUniquenessRule, x as ArtifactRevision$1, y as ArtifactRepresentations } from "./schemas-CXCdmM5K.mjs";
|
|
2
2
|
import { l as JsonValue$1 } from "./json-value-DyMQrwGz.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import * as _$_makaio_core0 from "@makaio/framework/core";
|
|
@@ -1173,16 +1173,6 @@ declare const ArtifactSchemas$1: {
|
|
|
1173
1173
|
excerpt: z.ZodOptional<z.ZodString>;
|
|
1174
1174
|
}, z.core.$strict>]>>>;
|
|
1175
1175
|
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
1176
|
-
schemaVersion: z.ZodNumber;
|
|
1177
|
-
scope: z.ZodObject<{
|
|
1178
|
-
level: z.ZodString;
|
|
1179
|
-
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1180
|
-
}, z.core.$strip>;
|
|
1181
|
-
actor: z.ZodObject<{
|
|
1182
|
-
kind: z.ZodString;
|
|
1183
|
-
id: z.ZodString;
|
|
1184
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
1185
|
-
}, z.core.$strip>;
|
|
1186
1176
|
relations: z.ZodArray<z.ZodObject<{
|
|
1187
1177
|
type: z.ZodString;
|
|
1188
1178
|
target: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1211,6 +1201,16 @@ declare const ArtifactSchemas$1: {
|
|
|
1211
1201
|
id: z.ZodString;
|
|
1212
1202
|
}, z.core.$strict>], "refClass">>;
|
|
1213
1203
|
}, z.core.$strip>>;
|
|
1204
|
+
schemaVersion: z.ZodNumber;
|
|
1205
|
+
scope: z.ZodObject<{
|
|
1206
|
+
level: z.ZodString;
|
|
1207
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1208
|
+
}, z.core.$strip>;
|
|
1209
|
+
actor: z.ZodObject<{
|
|
1210
|
+
kind: z.ZodString;
|
|
1211
|
+
id: z.ZodString;
|
|
1212
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
1213
|
+
}, z.core.$strip>;
|
|
1214
1214
|
confidence: z.ZodOptional<z.ZodObject<{
|
|
1215
1215
|
level: z.ZodEnum<{
|
|
1216
1216
|
inferred: "inferred";
|
|
@@ -1467,16 +1467,6 @@ declare const ArtifactSchemas$1: {
|
|
|
1467
1467
|
excerpt: z.ZodOptional<z.ZodString>;
|
|
1468
1468
|
}, z.core.$strict>]>>>;
|
|
1469
1469
|
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
1470
|
-
schemaVersion: z.ZodNumber;
|
|
1471
|
-
scope: z.ZodObject<{
|
|
1472
|
-
level: z.ZodString;
|
|
1473
|
-
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1474
|
-
}, z.core.$strip>;
|
|
1475
|
-
actor: z.ZodObject<{
|
|
1476
|
-
kind: z.ZodString;
|
|
1477
|
-
id: z.ZodString;
|
|
1478
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
1479
|
-
}, z.core.$strip>;
|
|
1480
1470
|
relations: z.ZodArray<z.ZodObject<{
|
|
1481
1471
|
type: z.ZodString;
|
|
1482
1472
|
target: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1505,6 +1495,16 @@ declare const ArtifactSchemas$1: {
|
|
|
1505
1495
|
id: z.ZodString;
|
|
1506
1496
|
}, z.core.$strict>], "refClass">>;
|
|
1507
1497
|
}, z.core.$strip>>;
|
|
1498
|
+
schemaVersion: z.ZodNumber;
|
|
1499
|
+
scope: z.ZodObject<{
|
|
1500
|
+
level: z.ZodString;
|
|
1501
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1502
|
+
}, z.core.$strip>;
|
|
1503
|
+
actor: z.ZodObject<{
|
|
1504
|
+
kind: z.ZodString;
|
|
1505
|
+
id: z.ZodString;
|
|
1506
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
1507
|
+
}, z.core.$strip>;
|
|
1508
1508
|
confidence: z.ZodOptional<z.ZodObject<{
|
|
1509
1509
|
level: z.ZodEnum<{
|
|
1510
1510
|
inferred: "inferred";
|
|
@@ -3890,16 +3890,6 @@ declare const ArtifactNamespace: _$_makaio_core0.BusNamespaceDefinition<"artifac
|
|
|
3890
3890
|
excerpt: z.ZodOptional<z.ZodString>;
|
|
3891
3891
|
}, z.core.$strict>]>>>;
|
|
3892
3892
|
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
3893
|
-
schemaVersion: z.ZodNumber;
|
|
3894
|
-
scope: z.ZodObject<{
|
|
3895
|
-
level: z.ZodString;
|
|
3896
|
-
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3897
|
-
}, z.core.$strip>;
|
|
3898
|
-
actor: z.ZodObject<{
|
|
3899
|
-
kind: z.ZodString;
|
|
3900
|
-
id: z.ZodString;
|
|
3901
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
3902
|
-
}, z.core.$strip>;
|
|
3903
3893
|
relations: z.ZodArray<z.ZodObject<{
|
|
3904
3894
|
type: z.ZodString;
|
|
3905
3895
|
target: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -3928,6 +3918,16 @@ declare const ArtifactNamespace: _$_makaio_core0.BusNamespaceDefinition<"artifac
|
|
|
3928
3918
|
id: z.ZodString;
|
|
3929
3919
|
}, z.core.$strict>], "refClass">>;
|
|
3930
3920
|
}, z.core.$strip>>;
|
|
3921
|
+
schemaVersion: z.ZodNumber;
|
|
3922
|
+
scope: z.ZodObject<{
|
|
3923
|
+
level: z.ZodString;
|
|
3924
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3925
|
+
}, z.core.$strip>;
|
|
3926
|
+
actor: z.ZodObject<{
|
|
3927
|
+
kind: z.ZodString;
|
|
3928
|
+
id: z.ZodString;
|
|
3929
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
3930
|
+
}, z.core.$strip>;
|
|
3931
3931
|
confidence: z.ZodOptional<z.ZodObject<{
|
|
3932
3932
|
level: z.ZodEnum<{
|
|
3933
3933
|
inferred: "inferred";
|
|
@@ -4184,16 +4184,6 @@ declare const ArtifactNamespace: _$_makaio_core0.BusNamespaceDefinition<"artifac
|
|
|
4184
4184
|
excerpt: z.ZodOptional<z.ZodString>;
|
|
4185
4185
|
}, z.core.$strict>]>>>;
|
|
4186
4186
|
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
4187
|
-
schemaVersion: z.ZodNumber;
|
|
4188
|
-
scope: z.ZodObject<{
|
|
4189
|
-
level: z.ZodString;
|
|
4190
|
-
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4191
|
-
}, z.core.$strip>;
|
|
4192
|
-
actor: z.ZodObject<{
|
|
4193
|
-
kind: z.ZodString;
|
|
4194
|
-
id: z.ZodString;
|
|
4195
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
4196
|
-
}, z.core.$strip>;
|
|
4197
4187
|
relations: z.ZodArray<z.ZodObject<{
|
|
4198
4188
|
type: z.ZodString;
|
|
4199
4189
|
target: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -4222,6 +4212,16 @@ declare const ArtifactNamespace: _$_makaio_core0.BusNamespaceDefinition<"artifac
|
|
|
4222
4212
|
id: z.ZodString;
|
|
4223
4213
|
}, z.core.$strict>], "refClass">>;
|
|
4224
4214
|
}, z.core.$strip>>;
|
|
4215
|
+
schemaVersion: z.ZodNumber;
|
|
4216
|
+
scope: z.ZodObject<{
|
|
4217
|
+
level: z.ZodString;
|
|
4218
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
4219
|
+
}, z.core.$strip>;
|
|
4220
|
+
actor: z.ZodObject<{
|
|
4221
|
+
kind: z.ZodString;
|
|
4222
|
+
id: z.ZodString;
|
|
4223
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
4224
|
+
}, z.core.$strip>;
|
|
4225
4225
|
confidence: z.ZodOptional<z.ZodObject<{
|
|
4226
4226
|
level: z.ZodEnum<{
|
|
4227
4227
|
inferred: "inferred";
|
|
@@ -6628,16 +6628,6 @@ declare const ArtifactSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
|
|
|
6628
6628
|
excerpt: z.ZodOptional<z.ZodString>;
|
|
6629
6629
|
}, z.core.$strict>]>>>;
|
|
6630
6630
|
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
6631
|
-
schemaVersion: z.ZodNumber;
|
|
6632
|
-
scope: z.ZodObject<{
|
|
6633
|
-
level: z.ZodString;
|
|
6634
|
-
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
6635
|
-
}, z.core.$strip>;
|
|
6636
|
-
actor: z.ZodObject<{
|
|
6637
|
-
kind: z.ZodString;
|
|
6638
|
-
id: z.ZodString;
|
|
6639
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
6640
|
-
}, z.core.$strip>;
|
|
6641
6631
|
relations: z.ZodArray<z.ZodObject<{
|
|
6642
6632
|
type: z.ZodString;
|
|
6643
6633
|
target: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -6666,6 +6656,16 @@ declare const ArtifactSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
|
|
|
6666
6656
|
id: z.ZodString;
|
|
6667
6657
|
}, z.core.$strict>], "refClass">>;
|
|
6668
6658
|
}, z.core.$strip>>;
|
|
6659
|
+
schemaVersion: z.ZodNumber;
|
|
6660
|
+
scope: z.ZodObject<{
|
|
6661
|
+
level: z.ZodString;
|
|
6662
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
6663
|
+
}, z.core.$strip>;
|
|
6664
|
+
actor: z.ZodObject<{
|
|
6665
|
+
kind: z.ZodString;
|
|
6666
|
+
id: z.ZodString;
|
|
6667
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
6668
|
+
}, z.core.$strip>;
|
|
6669
6669
|
confidence: z.ZodOptional<z.ZodObject<{
|
|
6670
6670
|
level: z.ZodEnum<{
|
|
6671
6671
|
inferred: "inferred";
|
|
@@ -6922,16 +6922,6 @@ declare const ArtifactSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
|
|
|
6922
6922
|
excerpt: z.ZodOptional<z.ZodString>;
|
|
6923
6923
|
}, z.core.$strict>]>>>;
|
|
6924
6924
|
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
6925
|
-
schemaVersion: z.ZodNumber;
|
|
6926
|
-
scope: z.ZodObject<{
|
|
6927
|
-
level: z.ZodString;
|
|
6928
|
-
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
6929
|
-
}, z.core.$strip>;
|
|
6930
|
-
actor: z.ZodObject<{
|
|
6931
|
-
kind: z.ZodString;
|
|
6932
|
-
id: z.ZodString;
|
|
6933
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
6934
|
-
}, z.core.$strip>;
|
|
6935
6925
|
relations: z.ZodArray<z.ZodObject<{
|
|
6936
6926
|
type: z.ZodString;
|
|
6937
6927
|
target: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -6960,6 +6950,16 @@ declare const ArtifactSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
|
|
|
6960
6950
|
id: z.ZodString;
|
|
6961
6951
|
}, z.core.$strict>], "refClass">>;
|
|
6962
6952
|
}, z.core.$strip>>;
|
|
6953
|
+
schemaVersion: z.ZodNumber;
|
|
6954
|
+
scope: z.ZodObject<{
|
|
6955
|
+
level: z.ZodString;
|
|
6956
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
6957
|
+
}, z.core.$strip>;
|
|
6958
|
+
actor: z.ZodObject<{
|
|
6959
|
+
kind: z.ZodString;
|
|
6960
|
+
id: z.ZodString;
|
|
6961
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
6962
|
+
}, z.core.$strip>;
|
|
6963
6963
|
confidence: z.ZodOptional<z.ZodObject<{
|
|
6964
6964
|
level: z.ZodEnum<{
|
|
6965
6965
|
inferred: "inferred";
|
|
@@ -9756,10 +9756,11 @@ declare const ArtifactLifecycleIdentitySchema: z.ZodObject<{
|
|
|
9756
9756
|
/** Monotonic administration version, independent of the content revision. */
|
|
9757
9757
|
declare const ArtifactLifecycleVersionSchema: z.ZodNumber;
|
|
9758
9758
|
/**
|
|
9759
|
-
* Current administration state; each category admits only its own states. Version 1
|
|
9760
|
-
*
|
|
9761
|
-
*
|
|
9762
|
-
*
|
|
9759
|
+
* Current administration state; each category admits only its own states. Version 1 implies
|
|
9760
|
+
* the category initial state (every transition increments the version, so only the creation
|
|
9761
|
+
* entry can be version 1). The converse does not hold: a `knowledge` artifact retired and
|
|
9762
|
+
* then reinstated re-enters `valid` at a version greater than 1, so the reverse rule is
|
|
9763
|
+
* deliberately not enforced.
|
|
9763
9764
|
*/
|
|
9764
9765
|
declare const ArtifactLifecycleSnapshotSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9765
9766
|
category: z.ZodLiteral<"knowledge">;
|
|
@@ -11404,4 +11405,170 @@ type ArtifactLifecycleFailure = z.infer<typeof ArtifactLifecycleFailureSchema>;
|
|
|
11404
11405
|
/** Supplemental reaction input following a rejected valid transition request. */
|
|
11405
11406
|
type ArtifactLifecycleRejectedPayload = z.infer<typeof ArtifactLifecycleRejectedPayloadSchema>;
|
|
11406
11407
|
//#endregion
|
|
11407
|
-
|
|
11408
|
+
//#region core/contracts/src/artifact/relation-target-identity.d.ts
|
|
11409
|
+
/**
|
|
11410
|
+
* Pin-less identity of a relation target.
|
|
11411
|
+
*
|
|
11412
|
+
* The schema is derived from the canonical ref schemas so validation cannot
|
|
11413
|
+
* drift from the definitions of what constitutes a valid artifact or entity
|
|
11414
|
+
* reference: an `artifact` target is identified by its kind and stable id
|
|
11415
|
+
* only (the mutable revision pin is omitted), and an `entity` target is
|
|
11416
|
+
* identified by its entity type and id.
|
|
11417
|
+
*
|
|
11418
|
+
* Local and evidence targets carry no comparable stable identity and are
|
|
11419
|
+
* therefore excluded from this union.
|
|
11420
|
+
*/
|
|
11421
|
+
declare const ArtifactRelationTargetIdentitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
11422
|
+
id: z.ZodString;
|
|
11423
|
+
kind: z.ZodString;
|
|
11424
|
+
refClass: z.ZodLiteral<"artifact">;
|
|
11425
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
11426
|
+
refClass: z.ZodLiteral<"entity">;
|
|
11427
|
+
entityType: z.ZodString;
|
|
11428
|
+
id: z.ZodString;
|
|
11429
|
+
}, z.core.$strict>], "refClass">;
|
|
11430
|
+
/**
|
|
11431
|
+
* Pin-less identity of a relation target.
|
|
11432
|
+
* @see {@link ArtifactRelationTargetIdentitySchema}
|
|
11433
|
+
*/
|
|
11434
|
+
type ArtifactRelationTargetIdentity = z.infer<typeof ArtifactRelationTargetIdentitySchema>;
|
|
11435
|
+
/**
|
|
11436
|
+
* Strip the revision pin from an artifact target and keep an entity target as
|
|
11437
|
+
* is, producing the comparable pin-less identity for uniqueness checks.
|
|
11438
|
+
* @param target - A parsed {@link ArtifactRelationTarget}.
|
|
11439
|
+
* @returns The pin-less {@link ArtifactRelationTargetIdentity} for `artifact`
|
|
11440
|
+
* and `entity` targets, or `undefined` for `local` and `evidence` targets
|
|
11441
|
+
* which carry no stable comparable identity.
|
|
11442
|
+
*/
|
|
11443
|
+
declare function artifactRelationTargetIdentity(target: ArtifactRelationTarget): ArtifactRelationTargetIdentity | undefined;
|
|
11444
|
+
/**
|
|
11445
|
+
* Injective string form of an identity; equal identities serialize equally,
|
|
11446
|
+
* distinct ones never collide.
|
|
11447
|
+
*
|
|
11448
|
+
* The serialization is a JSON-stringified fixed-order tuple:
|
|
11449
|
+
* `['artifact', kind, id]` for artifact targets or
|
|
11450
|
+
* `['entity', entityType, id]` for entity targets.
|
|
11451
|
+
* @param identity - A validated {@link ArtifactRelationTargetIdentity}.
|
|
11452
|
+
* @returns A stable, unique string for the identity.
|
|
11453
|
+
*/
|
|
11454
|
+
declare function serializeArtifactRelationTargetIdentity(identity: ArtifactRelationTargetIdentity): string;
|
|
11455
|
+
/**
|
|
11456
|
+
* Human-readable form of an identity.
|
|
11457
|
+
* @param identity - A validated {@link ArtifactRelationTargetIdentity}.
|
|
11458
|
+
* @returns `artifact:<kind>/<id>` for artifact targets or
|
|
11459
|
+
* `entity:<entityType>/<id>` for entity targets.
|
|
11460
|
+
*/
|
|
11461
|
+
declare function describeArtifactRelationTargetIdentity(identity: ArtifactRelationTargetIdentity): string;
|
|
11462
|
+
//#endregion
|
|
11463
|
+
//#region core/contracts/src/artifact/uniqueness.d.ts
|
|
11464
|
+
/**
|
|
11465
|
+
* What a store can derive and enforce; declared rules outside this set are
|
|
11466
|
+
* reported as issues rather than silently dropped.
|
|
11467
|
+
*/
|
|
11468
|
+
type UniquenessSelectorCapability = 'relation-target' | 'lifecycle-states';
|
|
11469
|
+
/** Per-rule or per-selector issue surfaced when a capability is missing. */
|
|
11470
|
+
interface UniquenessSupportIssue {
|
|
11471
|
+
/** Zero-based index of the rule in the declared uniqueness array. */
|
|
11472
|
+
ruleIndex: number;
|
|
11473
|
+
/**
|
|
11474
|
+
* Zero-based index of the selector within `rule.by`.
|
|
11475
|
+
* Absent when the issue concerns `lifecycleStates` rather than a selector.
|
|
11476
|
+
*/
|
|
11477
|
+
selectorIndex?: number;
|
|
11478
|
+
/**
|
|
11479
|
+
* The missing capability.
|
|
11480
|
+
* May be `'data'` even though it is not in {@link UniquenessSelectorCapability},
|
|
11481
|
+
* because a data-path selector is always undeivable regardless of what the
|
|
11482
|
+
* store declares.
|
|
11483
|
+
*/
|
|
11484
|
+
capability: ArtifactUniquenessRule['by'][number]['kind'] | 'lifecycle-states';
|
|
11485
|
+
/** Human-readable explanation. */
|
|
11486
|
+
message: string;
|
|
11487
|
+
}
|
|
11488
|
+
/**
|
|
11489
|
+
* Split declared rules into enforceable rules and issues, given a store's
|
|
11490
|
+
* capabilities. A rule is enforceable when every selector kind and, if
|
|
11491
|
+
* declared, `lifecycleStates` are supported.
|
|
11492
|
+
* A selector is reported as unsupported when its kind is not in
|
|
11493
|
+
* {@link DERIVABLE_SELECTOR_KINDS} or not in `supported`.
|
|
11494
|
+
* Undefined or empty rules yield `{ ok: true, rules: [] }`.
|
|
11495
|
+
* @param rules - Declared uniqueness rules from the kind registration.
|
|
11496
|
+
* @param supported - Capability set the calling store can enforce.
|
|
11497
|
+
* @returns Either an ok result with the rules array or a list of issues.
|
|
11498
|
+
*/
|
|
11499
|
+
declare function assessUniquenessSupport(rules: readonly ArtifactUniquenessRule[] | undefined, supported: readonly UniquenessSelectorCapability[]): {
|
|
11500
|
+
ok: true;
|
|
11501
|
+
rules: readonly ArtifactUniquenessRule[];
|
|
11502
|
+
} | {
|
|
11503
|
+
ok: false;
|
|
11504
|
+
issues: UniquenessSupportIssue[];
|
|
11505
|
+
};
|
|
11506
|
+
/**
|
|
11507
|
+
* One selector's contribution to a uniqueness key.
|
|
11508
|
+
* A part is structurally a `Partial<ArtifactRelation>` and can be used
|
|
11509
|
+
* directly as a jsonb containment probe against the `relations_json` column:
|
|
11510
|
+
* `relations_json @> '[{"type":"...","target":{...}}]'::jsonb`.
|
|
11511
|
+
*/
|
|
11512
|
+
interface UniquenessKeyPart {
|
|
11513
|
+
/** Relation type matching the selector's `relationType`. */
|
|
11514
|
+
type: string;
|
|
11515
|
+
/** Pin-less comparable identity of the resolved target. */
|
|
11516
|
+
target: ArtifactRelationTargetIdentity;
|
|
11517
|
+
}
|
|
11518
|
+
/** A fully resolved uniqueness key derived from an artifact's relations. */
|
|
11519
|
+
interface UniquenessKey {
|
|
11520
|
+
/** The rule this key was derived from, in its original declared form. */
|
|
11521
|
+
rule: ArtifactUniquenessRule;
|
|
11522
|
+
/** Zero-based index of the rule in the declared uniqueness array. */
|
|
11523
|
+
ruleIndex: number;
|
|
11524
|
+
/**
|
|
11525
|
+
* One part per selector, in declaration order; the containment probe a store
|
|
11526
|
+
* can run against a stored relations array.
|
|
11527
|
+
*/
|
|
11528
|
+
parts: UniquenessKeyPart[];
|
|
11529
|
+
/** Injective string form for equality and logging (stable key order). */
|
|
11530
|
+
serialized: string;
|
|
11531
|
+
}
|
|
11532
|
+
/** Reason a key could not be derived for a selector. */
|
|
11533
|
+
type UniquenessKeyIssueReason = 'missing-target' | 'ambiguous-target' | 'unsupported-target' | 'unsupported-selector';
|
|
11534
|
+
/** Diagnostic for a single selector within a rule that blocked key derivation. */
|
|
11535
|
+
interface UniquenessKeyIssue {
|
|
11536
|
+
/** Zero-based index of the rule in the declared uniqueness array. */
|
|
11537
|
+
ruleIndex: number;
|
|
11538
|
+
/** Zero-based index of the failing selector within `rule.by`. */
|
|
11539
|
+
selectorIndex: number;
|
|
11540
|
+
/** Why derivation failed. */
|
|
11541
|
+
reason: UniquenessKeyIssueReason;
|
|
11542
|
+
/**
|
|
11543
|
+
* Relation type string for `relation-target` selectors.
|
|
11544
|
+
* Absent for `unsupported-selector` issues on `data` selectors.
|
|
11545
|
+
*/
|
|
11546
|
+
relationType?: string;
|
|
11547
|
+
/** Human-readable explanation. */
|
|
11548
|
+
message: string;
|
|
11549
|
+
}
|
|
11550
|
+
/** Combined result of {@link buildUniquenessKeys}. */
|
|
11551
|
+
interface BuildUniquenessKeysResult {
|
|
11552
|
+
/** Derived keys, one per fully resolved rule. */
|
|
11553
|
+
keys: UniquenessKey[];
|
|
11554
|
+
/** Selector-level issues for rules that could not be fully resolved. */
|
|
11555
|
+
issues: UniquenessKeyIssue[];
|
|
11556
|
+
}
|
|
11557
|
+
/**
|
|
11558
|
+
* Derive one key per rule from an artifact's relations.
|
|
11559
|
+
* Rules with any issue produce no key; keys and issues are returned together.
|
|
11560
|
+
* @param rules - Declared uniqueness rules to derive keys for.
|
|
11561
|
+
* @param relations - Full relation list of the artifact being written.
|
|
11562
|
+
* @returns Combined set of derived keys and selector-level issues.
|
|
11563
|
+
*/
|
|
11564
|
+
declare function buildUniquenessKeys(rules: readonly ArtifactUniquenessRule[], relations: readonly ArtifactRelation[]): BuildUniquenessKeysResult;
|
|
11565
|
+
/**
|
|
11566
|
+
* Human-readable one-liner for a key.
|
|
11567
|
+
* @example `about → artifact:concept/abc`
|
|
11568
|
+
* @example `owned-by → entity:workpiece/W-1; about → artifact:concept/abc`
|
|
11569
|
+
* @param key - A fully resolved uniqueness key.
|
|
11570
|
+
* @returns A string describing each part in `type → identity` form, joined by `'; '`.
|
|
11571
|
+
*/
|
|
11572
|
+
declare function describeUniquenessKey(key: UniquenessKey): string;
|
|
11573
|
+
//#endregion
|
|
11574
|
+
export { ArtifactLifecycleTransitionedEntry as $, AfterArtifactHookRegistration as $n, ArtifactKindRegisterRequest as $t, ArtifactLifecycleSchemas as A, ArtifactContextUnresolvedReasonSchema as An, ArtifactPatchSegment as At, ArtifactLifecycleIdentitySchema as B, ArtifactContextSelectorSchema as Bn, ARTIFACT_COLLECTION_ELEMENT_SEGMENT as Bt, ArtifactLifecycleGetResponseSchema as C, ArtifactContextRootNode as Cn, ArtifactPatchOperator as Ct, ArtifactLifecycleHistoryResponseSchema as D, ArtifactContextRefEntry as Dn, ArtifactPatchRequestSchema as Dt, ArtifactLifecycleHistoryResponse as E, UnresolvedArtifactContextNode as En, ArtifactPatchRequest as Et, ArtifactLifecycleCurrent as F, ArtifactContextRelationSelector as Fn, artifactPatchFilterName as Ft, ArtifactLifecycleSituation as G, compileArtifactDataChecker as Gn, ArtifactCreateRequest as Gt, ArtifactLifecycleInitializedEntrySchema as H, ArtifactDataChecker as Hn, inspectArtifactDataLocation as Ht, ArtifactLifecycleCurrentSchema as I, ArtifactContextRelationSelectorSchema as In, artifactPatchInstructions as It, ArtifactLifecycleSnapshotSchema as J, ArtifactDataOf as Jn, ArtifactEvidenceResolveRequest as Jt, ArtifactLifecycleSituationSchema as K, compileArtifactDataSchema as Kn, ArtifactCreateResponse as Kt, ArtifactLifecycleError as L, ArtifactContextRenderHint as Ln, artifactPatchPathFilterNames as Lt, ArtifactLifecycleTransitionResponseSchema as M, ResolvedArtifactContextWireSchema as Mn, ArtifactPatchSuccessSchema as Mt, toArtifactLifecycleFailure as N, ARTIFACT_CONTEXT_RENDER_HINTS as Nn, ArtifactPatchTarget as Nt, ArtifactLifecycleRejectedPayload as O, ArtifactContextRefEntrySchema as On, ArtifactPatchResponse as Ot, ARTIFACT_LIFECYCLE_REJECTED_CODE as P, ArtifactContextKnownRenderHint as Pn, ArtifactPatchTargetSchema as Pt, ArtifactLifecycleTransitionIntentSchema as Q, AfterArtifactHookContext as Qn, ArtifactKindListResponse as Qt, ArtifactLifecycleHistoryEntry as R, ArtifactContextRenderHintSchema as Rn, artifactPatchSegment as Rt, ArtifactLifecycleGetResponse as S, ArtifactContextNode as Sn, ArtifactPatchOperationResultSchema as St, ArtifactLifecycleHistoryRequestSchema as T, ResolvedArtifactContextNode as Tn, ArtifactPatchPersistedSchema as Tt, ArtifactLifecycleRejection as U, ArtifactDataIssue as Un, isArtifactDataPathDeclared as Ut, ArtifactLifecycleInitializedEntry as V, ArtifactDataCheck as Vn, ArtifactSchemaFragment as Vt, ArtifactLifecycleRejectionSchema as W, ArtifactDataValidator as Wn, readArtifactTitle as Wt, ArtifactLifecycleTransitionCommandSchema as X, ArtifactOf as Xn, ArtifactKindChangedPayload as Xt, ArtifactLifecycleTransitionCommand as Y, ArtifactKindDefinition as Yn, ArtifactEvidenceResolveResponse$1 as Yt, ArtifactLifecycleTransitionIntent as Z, defineArtifactKind as Zn, ArtifactKindListRequest as Zt, ArtifactLifecycleCommittedPayloadSchema as _, ArtifactRevisedPayload as _n, ARTIFACT_VALUE_TYPE_KEYWORD as _r, ArtifactPatchIssue as _t, UniquenessKeyPart as a, ArtifactQueryResponse as an, ArtifactLifecycleHookRegistration$1 as ar, ARTIFACT_PATCH_ERROR_CODES as at, ArtifactLifecycleGetRequest as b, ArtifactSubjects$1 as bn, EvidenceValueSchema$1 as br, ArtifactPatchMigrationSchema as bt, assessUniquenessSupport as c, ArtifactRelationTypeListResponse as cn, BeforeArtifactHookRegistration as cr, ArtifactPatchArrayFilterSchema as ct, ArtifactRelationTargetIdentity as d, ArtifactResolveContextRequest as dn, EvidenceOccurrenceExtractionOptions as dr, ArtifactPatchDryRunSchema as dt, ArtifactKindRegisterResponse as en, ArtifactDraft as er, ArtifactLifecycleTransitionedEntrySchema as et, ArtifactRelationTargetIdentitySchema as f, ArtifactResolveContextResponse as fn, extractEvidenceOccurrences as fr, ArtifactPatchError as ft, ArtifactLifecycleCommittedPayload as g, ArtifactReviseResponse as gn, EvidenceResolveResponseSchema as gr, ArtifactPatchInstruction as gt, serializeArtifactRelationTargetIdentity as h, ArtifactReviseRequest as hn, EvidenceResolveResponse as hr, ArtifactPatchFailureSchema as ht, UniquenessKeyIssueReason as i, ArtifactPatchSubjectResponse as in, ArtifactLifecycleHookEvent as ir, isArtifactLifecycleTransitionAllowed as it, ArtifactLifecycleTransitionResponse as j, ResolvedArtifactContextWire$1 as jn, ArtifactPatchSuccess as jt, ArtifactLifecycleRejectedPayloadSchema as k, ArtifactContextUnresolvedReason as kn, ArtifactPatchResponseSchema as kt, buildUniquenessKeys as l, ArtifactRelationTypeRegisterRequest as ln, defineArtifactLifecycleHooks as lr, ArtifactPatchDocument as lt, describeArtifactRelationTargetIdentity as m, ArtifactResolveResponse as mn, EvidenceResolveRequestSchema as mr, ArtifactPatchErrorSchema as mt, UniquenessKey as n, ArtifactObservationAddedPayload as nn, ArtifactHookFilter as nr, advanceArtifactLifecycle as nt, UniquenessSelectorCapability as o, ArtifactRelationAddedPayload as on, ArtifactLifecycleSemanticEvent as or, ARTIFACT_PATCH_OPERATORS as ot, artifactRelationTargetIdentity as p, ArtifactResolveRequest as pn, EvidenceResolveRequest as pr, ArtifactPatchErrorCode as pt, ArtifactLifecycleSnapshot as q, AnyArtifactKindDefinition as qn, ArtifactCreatedPayload as qt, UniquenessKeyIssue as r, ArtifactPatchSubjectRequest as rn, ArtifactLifecycleHookDefinition as rr, initialArtifactLifecycle as rt, UniquenessSupportIssue as s, ArtifactRelationTypeListRequest as sn, BeforeArtifactHookContext as sr, ArtifactPatchArrayFilter as st, BuildUniquenessKeysResult as t, ArtifactNamespace as tn, ArtifactDraftPatch as tr, ArtifactLifecycleVersionSchema as tt, describeUniquenessKey as u, ArtifactRelationTypeRegisterResponse as un, EvidenceOccurrence as ur, ArtifactPatchDocumentSchema as ut, ArtifactLifecycleFailure as v, ArtifactSchemas$1 as vn, EVIDENCE_VALUE_TYPE as vr, ArtifactPatchIssueSchema as vt, ArtifactLifecycleHistoryRequest as w, ArtifactContextTree as wn, ArtifactPatchPathSchema as wt, ArtifactLifecycleGetRequestSchema as x, hydrateArtifactContextTree as xn, ArtifactPatchOperationResult as xt, ArtifactLifecycleFailureSchema as y, ArtifactStatusChangedPayload as yn, EvidenceValue$1 as yr, ArtifactPatchMigration as yt, ArtifactLifecycleHistoryEntrySchema as z, ArtifactContextSelector$1 as zn, artifactPatchSegments as zt };
|