@leitwerk-dev/domain 0.2.0 → 0.2.1
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/actor.d.ts +4 -2
- package/dist/actor.d.ts.map +1 -1
- package/dist/domain-model.d.ts +397 -64
- package/dist/domain-model.d.ts.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -21
- package/dist/index.js.map +1 -1
- package/dist/launcher-recent-values.d.ts +5 -0
- package/dist/launcher-recent-values.d.ts.map +1 -1
- package/dist/markdown-normalize.d.ts +3 -0
- package/dist/markdown-normalize.d.ts.map +1 -1
- package/dist/number-normalize.d.ts +1 -1
- package/dist/number-normalize.d.ts.map +1 -1
- package/dist/process-definitions.d.ts +37 -8
- package/dist/process-definitions.d.ts.map +1 -1
- package/dist/process-model-config.d.ts +18 -0
- package/dist/process-model-config.d.ts.map +1 -1
- package/dist/process-row-slots.d.ts +14 -0
- package/dist/process-row-slots.d.ts.map +1 -1
- package/dist/process-state-json.d.ts +13 -0
- package/dist/process-state-json.d.ts.map +1 -1
- package/dist/repo-locator.d.ts +8 -0
- package/dist/repo-locator.d.ts.map +1 -1
- package/dist/semantic-entry-refs.d.ts +21 -0
- package/dist/semantic-entry-refs.d.ts.map +1 -1
- package/dist/startup-observation.d.ts +35 -2
- package/dist/startup-observation.d.ts.map +1 -1
- package/dist/string-normalize.d.ts +7 -2
- package/dist/string-normalize.d.ts.map +1 -1
- package/dist/turn-acceptance.d.ts +2 -0
- package/dist/turn-acceptance.d.ts.map +1 -1
- package/dist/turn-annotations.d.ts +27 -0
- package/dist/turn-annotations.d.ts.map +1 -1
- package/dist/turn-recovery.d.ts +24 -0
- package/dist/turn-recovery.d.ts.map +1 -1
- package/dist/turn-start-resolution.d.ts +48 -1
- package/dist/turn-start-resolution.d.ts.map +1 -1
- package/dist/unknown-record.d.ts +3 -1
- package/dist/unknown-record.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/actor.ts +4 -2
- package/src/domain-model.ts +428 -72
- package/src/index.ts +1 -34
- package/src/launcher-recent-values.ts +5 -0
- package/src/markdown-normalize.ts +3 -0
- package/src/number-normalize.ts +1 -1
- package/src/process-definitions.ts +37 -8
- package/src/process-model-config.ts +27 -1
- package/src/process-row-slots.ts +14 -0
- package/src/process-state-json.ts +13 -0
- package/src/repo-locator.ts +8 -0
- package/src/semantic-entry-refs.ts +21 -0
- package/src/startup-observation.ts +35 -2
- package/src/string-normalize.ts +7 -2
- package/src/turn-acceptance.ts +2 -0
- package/src/turn-annotations.ts +27 -0
- package/src/turn-recovery.ts +20 -0
- package/src/turn-start-resolution.ts +59 -5
- package/src/unknown-record.ts +3 -1
|
@@ -1,65 +1,112 @@
|
|
|
1
1
|
import type { ProcessTurnRecordPathType } from "./domain-model.js";
|
|
2
2
|
import type { ProcessProductRefs, ProcessSemanticEntryRefKey, ProcessSemanticEntryRefs } from "./semantic-entry-refs.js";
|
|
3
|
+
/** @internal */
|
|
3
4
|
export interface ProcessTurnStartFromCurrentLeaf {
|
|
5
|
+
/** @internal */
|
|
4
6
|
kind: "current_leaf";
|
|
5
7
|
}
|
|
8
|
+
/** @internal */
|
|
6
9
|
export interface ProcessTurnStartFromSessionRoot {
|
|
7
|
-
/** Start with no persisted Pi entry in context. The kickoff entry has parentId null. */
|
|
10
|
+
/** Start with no persisted Pi entry in context. The kickoff entry has parentId null. @internal */
|
|
8
11
|
kind: "session_root";
|
|
9
12
|
}
|
|
13
|
+
/** @internal */
|
|
10
14
|
export interface ProcessTurnStartFromEntry {
|
|
15
|
+
/** @internal */
|
|
11
16
|
kind: "entry";
|
|
17
|
+
/** @internal */
|
|
12
18
|
entryId: string;
|
|
13
19
|
}
|
|
20
|
+
/** @internal */
|
|
14
21
|
export type ProcessTurnStartFallback = ProcessTurnStartFromCurrentLeaf | ProcessTurnStartFromSessionRoot | ProcessTurnStartFromEntry;
|
|
22
|
+
/** @internal */
|
|
15
23
|
export interface ProcessTurnStartFromSemanticRef {
|
|
24
|
+
/** @internal */
|
|
16
25
|
kind: "semantic_ref";
|
|
26
|
+
/** @internal */
|
|
17
27
|
ref: ProcessSemanticEntryRefKey;
|
|
28
|
+
/** @internal */
|
|
18
29
|
fallback?: ProcessTurnStartSelection;
|
|
19
30
|
}
|
|
31
|
+
/** @internal */
|
|
20
32
|
export interface ProcessTurnStartFromProductRef {
|
|
33
|
+
/** @internal */
|
|
21
34
|
kind: "product_ref";
|
|
35
|
+
/** @internal */
|
|
22
36
|
productName: string;
|
|
37
|
+
/** @internal */
|
|
23
38
|
fallback?: ProcessTurnStartSelection;
|
|
24
39
|
}
|
|
40
|
+
/** @internal */
|
|
25
41
|
export type ProcessTurnStartSelection = ProcessTurnStartFallback | ProcessTurnStartFromSemanticRef | ProcessTurnStartFromProductRef;
|
|
42
|
+
/** @internal */
|
|
26
43
|
export type ProcessTurnStartTarget = {
|
|
44
|
+
/** @internal */
|
|
27
45
|
kind: "current_leaf";
|
|
28
46
|
} | {
|
|
47
|
+
/** @internal */
|
|
29
48
|
kind: "entry";
|
|
49
|
+
/** @internal */
|
|
30
50
|
entryId: string;
|
|
31
51
|
} | {
|
|
52
|
+
/** @internal */
|
|
32
53
|
kind: "root";
|
|
33
54
|
};
|
|
55
|
+
/** @internal */
|
|
34
56
|
export interface ProcessTurnStartResolution {
|
|
57
|
+
/** @internal */
|
|
35
58
|
forkPiEntryId: string | null;
|
|
59
|
+
/** @internal */
|
|
36
60
|
startTarget: ProcessTurnStartTarget;
|
|
37
61
|
}
|
|
62
|
+
/** @internal */
|
|
38
63
|
export declare function defaultProcessTurnStartSelection(branchType: ProcessTurnRecordPathType): ProcessTurnStartFallback;
|
|
64
|
+
/** @internal */
|
|
39
65
|
export declare function resolveProcessTurnStartSelection(input: {
|
|
66
|
+
/** @internal */
|
|
40
67
|
branchType: ProcessTurnRecordPathType;
|
|
68
|
+
/** @internal */
|
|
41
69
|
startFrom?: ProcessTurnStartSelection;
|
|
42
70
|
}): ProcessTurnStartSelection;
|
|
71
|
+
/** @internal */
|
|
43
72
|
export declare function resolveExistingProcessEntryId(entryId: string | null, entryExists?: ((entryId: string) => boolean) | undefined): string | null;
|
|
73
|
+
/** @internal */
|
|
44
74
|
export declare function resolveProcessSemanticRefEntryId(input: {
|
|
75
|
+
/** @internal */
|
|
45
76
|
ref: keyof ProcessSemanticEntryRefs;
|
|
77
|
+
/** @internal */
|
|
46
78
|
semanticEntryRefs?: ProcessSemanticEntryRefs | null;
|
|
79
|
+
/** @internal */
|
|
47
80
|
currentLeafId: string | null;
|
|
81
|
+
/** @internal */
|
|
48
82
|
rootEntryId: string | null;
|
|
83
|
+
/** @internal */
|
|
49
84
|
entryExists?: (entryId: string) => boolean;
|
|
50
85
|
}): string | null;
|
|
86
|
+
/** @internal */
|
|
51
87
|
export declare function resolveProcessProductRefEntryId(input: {
|
|
88
|
+
/** @internal */
|
|
52
89
|
productName: string;
|
|
90
|
+
/** @internal */
|
|
53
91
|
productRefs?: ProcessProductRefs | null;
|
|
92
|
+
/** @internal */
|
|
54
93
|
entryExists?: (entryId: string) => boolean;
|
|
55
94
|
}): string | null;
|
|
95
|
+
/** @internal */
|
|
56
96
|
export declare function resolveProcessTurnStartTarget(input: {
|
|
97
|
+
/** @internal */
|
|
57
98
|
branchType: ProcessTurnRecordPathType;
|
|
99
|
+
/** @internal */
|
|
58
100
|
selection: ProcessTurnStartSelection;
|
|
101
|
+
/** @internal */
|
|
59
102
|
currentLeafId: string | null;
|
|
103
|
+
/** @internal */
|
|
60
104
|
rootEntryId: string | null;
|
|
105
|
+
/** @internal */
|
|
61
106
|
semanticEntryRefs?: ProcessSemanticEntryRefs | null;
|
|
107
|
+
/** @internal */
|
|
62
108
|
productRefs?: ProcessProductRefs | null;
|
|
109
|
+
/** @internal */
|
|
63
110
|
entryExists?: (entryId: string) => boolean;
|
|
64
111
|
}): ProcessTurnStartResolution;
|
|
65
112
|
//# sourceMappingURL=turn-start-resolution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn-start-resolution.d.ts","sourceRoot":"","sources":["../src/turn-start-resolution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EACX,kBAAkB,EAClB,0BAA0B,EAC1B,wBAAwB,EACxB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,+BAA+B;IAC/C,IAAI,EAAE,cAAc,CAAC;CACrB;AAED,MAAM,WAAW,+BAA+B;IAC/C,
|
|
1
|
+
{"version":3,"file":"turn-start-resolution.d.ts","sourceRoot":"","sources":["../src/turn-start-resolution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,KAAK,EACX,kBAAkB,EAClB,0BAA0B,EAC1B,wBAAwB,EACxB,MAAM,0BAA0B,CAAC;AAElC,gBAAgB;AAChB,MAAM,WAAW,+BAA+B;IAC/C,gBAAgB;IAChB,IAAI,EAAE,cAAc,CAAC;CACrB;AAED,gBAAgB;AAChB,MAAM,WAAW,+BAA+B;IAC/C,kGAAkG;IAClG,IAAI,EAAE,cAAc,CAAC;CACrB;AAED,gBAAgB;AAChB,MAAM,WAAW,yBAAyB;IACzC,gBAAgB;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,gBAAgB;IAChB,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,MAAM,wBAAwB,GACjC,+BAA+B,GAC/B,+BAA+B,GAC/B,yBAAyB,CAAC;AAE7B,gBAAgB;AAChB,MAAM,WAAW,+BAA+B;IAC/C,gBAAgB;IAChB,IAAI,EAAE,cAAc,CAAC;IACrB,gBAAgB;IAChB,GAAG,EAAE,0BAA0B,CAAC;IAChC,gBAAgB;IAChB,QAAQ,CAAC,EAAE,yBAAyB,CAAC;CACrC;AAED,gBAAgB;AAChB,MAAM,WAAW,8BAA8B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iBAAiB,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAC;IACpD,gBAAgB;IAChB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gBAAgB;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB;IAChB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3C,GAAG,MAAM,GAAG,IAAI,CAehB;AAED,gBAAgB;AAChB,wBAAgB,+BAA+B,CAAC,KAAK,EAAE;IACtD,gBAAgB;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB;IAChB,WAAW,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACxC,gBAAgB;IAChB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3C,GAAG,MAAM,GAAG,IAAI,CAShB;AAED,gBAAgB;AAChB,wBAAgB,6BAA6B,CAAC,KAAK,EAAE;IACpD,gBAAgB;IAChB,UAAU,EAAE,yBAAyB,CAAC;IACtC,gBAAgB;IAChB,SAAS,EAAE,yBAAyB,CAAC;IACrC,gBAAgB;IAChB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gBAAgB;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB;IAChB,iBAAiB,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAC;IACpD,gBAAgB;IAChB,WAAW,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACxC,gBAAgB;IAChB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3C,GAAG,0BAA0B,CA6C7B"}
|
package/dist/unknown-record.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
/** Parse non-array objects into a fresh record using Valibot's key handling. */
|
|
2
|
+
/** Parse non-array objects into a fresh record using Valibot's key handling. @internal */
|
|
3
3
|
export declare const copiedUnknownRecordSchema: v.SchemaWithPipe<readonly [v.UnknownSchema, v.CheckAction<unknown, "Expected object">, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>]>;
|
|
4
|
+
/** @internal */
|
|
4
5
|
export declare function isUnknownRecord(value: unknown): value is Record<string, unknown>;
|
|
6
|
+
/** @internal */
|
|
5
7
|
export declare function asUnknownRecord(value: unknown): Record<string, unknown> | null;
|
|
6
8
|
//# sourceMappingURL=unknown-record.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unknown-record.d.ts","sourceRoot":"","sources":["../src/unknown-record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,
|
|
1
|
+
{"version":3,"file":"unknown-record.d.ts","sourceRoot":"","sources":["../src/unknown-record.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,0FAA0F;AAC1F,eAAO,MAAM,yBAAyB,gKAIrC,CAAC;AAEF,gBAAgB;AAChB,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEhF;AAED,gBAAgB;AAChB,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAE9E"}
|
package/package.json
CHANGED
package/src/actor.ts
CHANGED
|
@@ -11,6 +11,7 @@ function isActorKind(value: unknown): value is ActorKind {
|
|
|
11
11
|
* defaults for invalid kind/provider. Returns `null` when no stable id is
|
|
12
12
|
* present so callers can decide on a fallback actor.
|
|
13
13
|
*/
|
|
14
|
+
/** @internal */
|
|
14
15
|
export function normalizeActor(value: unknown): Actor | null {
|
|
15
16
|
if (typeof value !== "object" || value === null) {
|
|
16
17
|
return null;
|
|
@@ -33,7 +34,7 @@ export function normalizeActor(value: unknown): Actor | null {
|
|
|
33
34
|
};
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
/** Serializes an `Actor` to a stable JSON string for durable storage. */
|
|
37
|
+
/** Serializes an `Actor` to a stable JSON string for durable storage. @internal */
|
|
37
38
|
export function serializeActor(actor: Actor): string {
|
|
38
39
|
return JSON.stringify({
|
|
39
40
|
id: actor.id,
|
|
@@ -48,6 +49,7 @@ export function serializeActor(actor: Actor): string {
|
|
|
48
49
|
* stored value is missing or malformed. Used when reading legacy rows that
|
|
49
50
|
* predate actor attribution.
|
|
50
51
|
*/
|
|
52
|
+
/** @internal */
|
|
51
53
|
export function parseActorOrSystem(value: string | null | undefined): Actor {
|
|
52
54
|
if (value === null || value === undefined || value.trim() === "") {
|
|
53
55
|
return SYSTEM_ACTOR;
|
|
@@ -59,5 +61,5 @@ export function parseActorOrSystem(value: string | null | undefined): Actor {
|
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
|
|
62
|
-
/** Canonical serialized form of `SYSTEM_ACTOR`, used as the durable default. */
|
|
64
|
+
/** Canonical serialized form of `SYSTEM_ACTOR`, used as the durable default. @internal */
|
|
63
65
|
export const SERIALIZED_SYSTEM_ACTOR = serializeActor(SYSTEM_ACTOR);
|