semantic-atlas 0.1.0

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.
Files changed (175) hide show
  1. package/.agents/skills/semantic-atlas/SKILL.md +172 -0
  2. package/.agents/skills/semantic-atlas/references/graph-patch.md +109 -0
  3. package/.agents/skills/semantic-atlas/references/result-routing.md +91 -0
  4. package/LICENSE +21 -0
  5. package/README.md +118 -0
  6. package/dist/business-flow/business-flow-derivation-service.d.ts +11 -0
  7. package/dist/business-flow/business-flow-derivation-service.d.ts.map +1 -0
  8. package/dist/business-flow/business-flow-derivation-service.js +151 -0
  9. package/dist/business-flow/business-flow-draft.d.ts +16 -0
  10. package/dist/business-flow/business-flow-draft.d.ts.map +1 -0
  11. package/dist/business-flow/business-flow-draft.js +150 -0
  12. package/dist/business-flow/framework-business-strategy.d.ts +7 -0
  13. package/dist/business-flow/framework-business-strategy.d.ts.map +1 -0
  14. package/dist/business-flow/framework-business-strategy.js +1 -0
  15. package/dist/business-flow/strategies/bullmq-business-strategy.d.ts +10 -0
  16. package/dist/business-flow/strategies/bullmq-business-strategy.d.ts.map +1 -0
  17. package/dist/business-flow/strategies/bullmq-business-strategy.js +79 -0
  18. package/dist/business-flow/strategies/called-operation-derivation.d.ts +13 -0
  19. package/dist/business-flow/strategies/called-operation-derivation.d.ts.map +1 -0
  20. package/dist/business-flow/strategies/called-operation-derivation.js +32 -0
  21. package/dist/business-flow/strategies/graphql-business-strategy.d.ts +8 -0
  22. package/dist/business-flow/strategies/graphql-business-strategy.d.ts.map +1 -0
  23. package/dist/business-flow/strategies/graphql-business-strategy.js +65 -0
  24. package/dist/business-flow/strategies/nestjs-business-strategy.d.ts +8 -0
  25. package/dist/business-flow/strategies/nestjs-business-strategy.d.ts.map +1 -0
  26. package/dist/business-flow/strategies/nestjs-business-strategy.js +72 -0
  27. package/dist/business-flow/strategies/strategy-helpers.d.ts +32 -0
  28. package/dist/business-flow/strategies/strategy-helpers.d.ts.map +1 -0
  29. package/dist/business-flow/strategies/strategy-helpers.js +49 -0
  30. package/dist/business-flow/strategies/typeorm-business-strategy.d.ts +10 -0
  31. package/dist/business-flow/strategies/typeorm-business-strategy.d.ts.map +1 -0
  32. package/dist/business-flow/strategies/typeorm-business-strategy.js +136 -0
  33. package/dist/business-flow/strategies/verified-invariant-strategy.d.ts +5 -0
  34. package/dist/business-flow/strategies/verified-invariant-strategy.d.ts.map +1 -0
  35. package/dist/business-flow/strategies/verified-invariant-strategy.js +38 -0
  36. package/dist/business-flow/strategies/verified-test-strategy.d.ts +5 -0
  37. package/dist/business-flow/strategies/verified-test-strategy.d.ts.map +1 -0
  38. package/dist/business-flow/strategies/verified-test-strategy.js +26 -0
  39. package/dist/business-flow/structural-flow-catalog.d.ts +21 -0
  40. package/dist/business-flow/structural-flow-catalog.d.ts.map +1 -0
  41. package/dist/business-flow/structural-flow-catalog.js +125 -0
  42. package/dist/business-flow/types.d.ts +51 -0
  43. package/dist/business-flow/types.d.ts.map +1 -0
  44. package/dist/business-flow/types.js +1 -0
  45. package/dist/cli/argument-parser.d.ts +3 -0
  46. package/dist/cli/argument-parser.d.ts.map +1 -0
  47. package/dist/cli/argument-parser.js +174 -0
  48. package/dist/cli/bin.d.ts +3 -0
  49. package/dist/cli/bin.d.ts.map +1 -0
  50. package/dist/cli/bin.js +23 -0
  51. package/dist/cli/cli-application.d.ts +38 -0
  52. package/dist/cli/cli-application.d.ts.map +1 -0
  53. package/dist/cli/cli-application.js +515 -0
  54. package/dist/cli/cli-error.d.ts +12 -0
  55. package/dist/cli/cli-error.d.ts.map +1 -0
  56. package/dist/cli/cli-error.js +44 -0
  57. package/dist/cli/cli-presenter.d.ts +14 -0
  58. package/dist/cli/cli-presenter.d.ts.map +1 -0
  59. package/dist/cli/cli-presenter.js +36 -0
  60. package/dist/cli/main.d.ts +3 -0
  61. package/dist/cli/main.d.ts.map +1 -0
  62. package/dist/cli/main.js +45 -0
  63. package/dist/cli/types.d.ts +46 -0
  64. package/dist/cli/types.d.ts.map +1 -0
  65. package/dist/cli/types.js +1 -0
  66. package/dist/contracts/cli.d.ts +2139 -0
  67. package/dist/contracts/cli.d.ts.map +1 -0
  68. package/dist/contracts/cli.js +232 -0
  69. package/dist/contracts/graph.d.ts +262 -0
  70. package/dist/contracts/graph.d.ts.map +1 -0
  71. package/dist/contracts/graph.js +182 -0
  72. package/dist/contracts/identifiers.d.ts +4 -0
  73. package/dist/contracts/identifiers.d.ts.map +1 -0
  74. package/dist/contracts/identifiers.js +7 -0
  75. package/dist/contracts/public-contracts.d.ts +4 -0
  76. package/dist/contracts/public-contracts.d.ts.map +1 -0
  77. package/dist/contracts/public-contracts.js +3 -0
  78. package/dist/evaluation/comparison.d.ts +30 -0
  79. package/dist/evaluation/comparison.d.ts.map +1 -0
  80. package/dist/evaluation/comparison.js +108 -0
  81. package/dist/evaluation/contracts.d.ts +204 -0
  82. package/dist/evaluation/contracts.d.ts.map +1 -0
  83. package/dist/evaluation/contracts.js +269 -0
  84. package/dist/graph/graph-store.d.ts +47 -0
  85. package/dist/graph/graph-store.d.ts.map +1 -0
  86. package/dist/graph/graph-store.js +719 -0
  87. package/dist/graph/types.d.ts +168 -0
  88. package/dist/graph/types.d.ts.map +1 -0
  89. package/dist/graph/types.js +1 -0
  90. package/dist/index.d.ts +19 -0
  91. package/dist/index.d.ts.map +1 -0
  92. package/dist/index.js +9 -0
  93. package/dist/knowledge/business-knowledge-service.d.ts +24 -0
  94. package/dist/knowledge/business-knowledge-service.d.ts.map +1 -0
  95. package/dist/knowledge/business-knowledge-service.js +200 -0
  96. package/dist/knowledge/graph-patch-conflict-error.d.ts +8 -0
  97. package/dist/knowledge/graph-patch-conflict-error.d.ts.map +1 -0
  98. package/dist/knowledge/graph-patch-conflict-error.js +12 -0
  99. package/dist/knowledge/structural-target-binding.d.ts +14 -0
  100. package/dist/knowledge/structural-target-binding.d.ts.map +1 -0
  101. package/dist/knowledge/structural-target-binding.js +11 -0
  102. package/dist/repository/git-command.d.ts +3 -0
  103. package/dist/repository/git-command.d.ts.map +1 -0
  104. package/dist/repository/git-command.js +25 -0
  105. package/dist/repository/repository-inspector.d.ts +7 -0
  106. package/dist/repository/repository-inspector.d.ts.map +1 -0
  107. package/dist/repository/repository-inspector.js +84 -0
  108. package/dist/repository/repository-language-support.d.ts +14 -0
  109. package/dist/repository/repository-language-support.d.ts.map +1 -0
  110. package/dist/repository/repository-language-support.js +64 -0
  111. package/dist/repository/types.d.ts +9 -0
  112. package/dist/repository/types.d.ts.map +1 -0
  113. package/dist/repository/types.js +1 -0
  114. package/dist/snapshots/repository-snapshot.d.ts +4 -0
  115. package/dist/snapshots/repository-snapshot.d.ts.map +1 -0
  116. package/dist/snapshots/repository-snapshot.js +119 -0
  117. package/dist/snapshots/types.d.ts +30 -0
  118. package/dist/snapshots/types.d.ts.map +1 -0
  119. package/dist/snapshots/types.js +1 -0
  120. package/dist/storage/atlas-database.d.ts +14 -0
  121. package/dist/storage/atlas-database.d.ts.map +1 -0
  122. package/dist/storage/atlas-database.js +552 -0
  123. package/dist/storage/snapshot-store.d.ts +19 -0
  124. package/dist/storage/snapshot-store.d.ts.map +1 -0
  125. package/dist/storage/snapshot-store.js +77 -0
  126. package/dist/structural-backend/codegraph-backend.d.ts +54 -0
  127. package/dist/structural-backend/codegraph-backend.d.ts.map +1 -0
  128. package/dist/structural-backend/codegraph-backend.js +1224 -0
  129. package/dist/structural-backend/codegraph-worker-client.d.ts +5 -0
  130. package/dist/structural-backend/codegraph-worker-client.d.ts.map +1 -0
  131. package/dist/structural-backend/codegraph-worker-client.js +118 -0
  132. package/dist/structural-backend/codegraph-worker-protocol.d.ts +35 -0
  133. package/dist/structural-backend/codegraph-worker-protocol.d.ts.map +1 -0
  134. package/dist/structural-backend/codegraph-worker-protocol.js +1 -0
  135. package/dist/structural-backend/codegraph-worker.d.ts +2 -0
  136. package/dist/structural-backend/codegraph-worker.d.ts.map +1 -0
  137. package/dist/structural-backend/codegraph-worker.js +131 -0
  138. package/dist/structural-backend/process-instance.d.ts +18 -0
  139. package/dist/structural-backend/process-instance.d.ts.map +1 -0
  140. package/dist/structural-backend/process-instance.js +207 -0
  141. package/dist/structural-backend/structural-fact-changes.d.ts +7 -0
  142. package/dist/structural-backend/structural-fact-changes.d.ts.map +1 -0
  143. package/dist/structural-backend/structural-fact-changes.js +78 -0
  144. package/dist/structural-backend/structural-publication.d.ts +12 -0
  145. package/dist/structural-backend/structural-publication.d.ts.map +1 -0
  146. package/dist/structural-backend/structural-publication.js +252 -0
  147. package/dist/structural-backend/structural-write-lock.d.ts +8 -0
  148. package/dist/structural-backend/structural-write-lock.d.ts.map +1 -0
  149. package/dist/structural-backend/structural-write-lock.js +415 -0
  150. package/dist/structural-backend/types.d.ts +144 -0
  151. package/dist/structural-backend/types.d.ts.map +1 -0
  152. package/dist/structural-backend/types.js +11 -0
  153. package/dist/world/types.d.ts +77 -0
  154. package/dist/world/types.d.ts.map +1 -0
  155. package/dist/world/types.js +1 -0
  156. package/dist/world/world-graph-query.d.ts +31 -0
  157. package/dist/world/world-graph-query.d.ts.map +1 -0
  158. package/dist/world/world-graph-query.js +453 -0
  159. package/dist/world/world-model-service.d.ts +21 -0
  160. package/dist/world/world-model-service.d.ts.map +1 -0
  161. package/dist/world/world-model-service.js +211 -0
  162. package/dist/world/world-snapshot-store.d.ts +40 -0
  163. package/dist/world/world-snapshot-store.d.ts.map +1 -0
  164. package/dist/world/world-snapshot-store.js +555 -0
  165. package/docs/architecture/codegraph-backend.md +193 -0
  166. package/docs/contracts/cli-v1.md +119 -0
  167. package/docs/contracts/graph-model.md +102 -0
  168. package/docs/contracts/graph-patch-v1.md +98 -0
  169. package/docs/evaluation.md +128 -0
  170. package/docs/product-contract.md +148 -0
  171. package/package.json +78 -0
  172. package/schemas/cli-envelope-v1.schema.json +1359 -0
  173. package/schemas/evaluation-plan-v1.schema.json +211 -0
  174. package/schemas/evaluation-run-v1.schema.json +365 -0
  175. package/schemas/graph-patch-v1.schema.json +392 -0
@@ -0,0 +1,32 @@
1
+ import type { AssertionCertainty, BusinessNodeKind, BusinessRelationType } from "../../graph/types.js";
2
+ import type { StructuralNode } from "../../structural-backend/types.js";
3
+ import { type BusinessFlowDraft } from "../business-flow-draft.js";
4
+ import type { StructuralFlowCatalog } from "../structural-flow-catalog.js";
5
+ export declare function nodeKey(capabilityKey: string, category: string, node: StructuralNode): string;
6
+ export declare function addBusinessNode(draft: BusinessFlowDraft, input: {
7
+ readonly key: string;
8
+ readonly kind: BusinessNodeKind;
9
+ readonly label: string;
10
+ readonly summary: string;
11
+ readonly evidence: StructuralNode;
12
+ readonly aliases?: readonly string[];
13
+ readonly certainty?: AssertionCertainty;
14
+ }): void;
15
+ export declare function addBusinessRelation(draft: BusinessFlowDraft, input: {
16
+ readonly from: string;
17
+ readonly type: Exclude<BusinessRelationType, "realized_by" | "verified_by">;
18
+ readonly to: string;
19
+ readonly evidence: StructuralNode;
20
+ readonly certainty?: AssertionCertainty;
21
+ }): void;
22
+ export declare function addStructuralRelation(draft: BusinessFlowDraft, input: {
23
+ readonly from: string;
24
+ readonly type: "realized_by" | "verified_by";
25
+ readonly to: StructuralNode;
26
+ readonly evidence?: StructuralNode;
27
+ readonly certainty?: AssertionCertainty;
28
+ }): void;
29
+ export declare function decoratorNames(node: StructuralNode): readonly string[];
30
+ export declare function hasDecorator(node: StructuralNode, names: readonly string[]): boolean;
31
+ export declare function hasBusinessOperationEvidence(node: StructuralNode, catalog: StructuralFlowCatalog): boolean;
32
+ //# sourceMappingURL=strategy-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strategy-helpers.d.ts","sourceRoot":"","sources":["../../../src/business-flow/strategies/strategy-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAElB,gBAAgB,EAEhB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAsB,K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AAE,cAAc,CAAC;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC;CACzC,GACA,IAAI,CASN;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,MAAM,EAAE,CAItE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAGpF;AAED,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAKT"}
@@ -0,0 +1,49 @@
1
+ import { businessKeySegment } from "../business-flow-draft.js";
2
+ export function nodeKey(capabilityKey, category, node) {
3
+ return `${capabilityKey}/${category}/${businessKeySegment(node.name, node.reference.id)}`;
4
+ }
5
+ export function addBusinessNode(draft, input) {
6
+ const node = {
7
+ key: input.key,
8
+ kind: input.kind,
9
+ label: input.label,
10
+ summary: input.summary,
11
+ aliases: [...(input.aliases ?? [])],
12
+ certainty: input.certainty ?? "inferred",
13
+ evidence: [draft.evidenceFor(input.evidence)],
14
+ };
15
+ draft.addNode(node);
16
+ }
17
+ export function addBusinessRelation(draft, input) {
18
+ const relation = {
19
+ from: { domain: "business", key: input.from },
20
+ type: input.type,
21
+ to: { domain: "business", key: input.to },
22
+ certainty: input.certainty ?? "inferred",
23
+ evidence: [draft.evidenceFor(input.evidence)],
24
+ };
25
+ draft.addRelation(relation);
26
+ }
27
+ export function addStructuralRelation(draft, input) {
28
+ const relation = {
29
+ from: { domain: "business", key: input.from },
30
+ type: input.type,
31
+ to: { domain: "structural", id: input.to.reference.id },
32
+ certainty: input.certainty ?? "inferred",
33
+ evidence: [draft.evidenceFor(input.evidence ?? input.to)],
34
+ };
35
+ draft.addRelation(relation);
36
+ }
37
+ export function decoratorNames(node) {
38
+ return node.decorators.map((decorator) => (decorator.replace(/^@/u, "").split("(", 1)[0].split(".").at(-1)));
39
+ }
40
+ export function hasDecorator(node, names) {
41
+ const decorators = decoratorNames(node);
42
+ return names.some((name) => decorators.includes(name));
43
+ }
44
+ export function hasBusinessOperationEvidence(node, catalog) {
45
+ if (hasDecorator(node, ["CommandHandler", "EventsHandler", "QueryHandler", "Resolver"])) {
46
+ return true;
47
+ }
48
+ return catalog.isRoot(node.reference.id);
49
+ }
@@ -0,0 +1,10 @@
1
+ import type { StructuralNode } from "../../structural-backend/types.js";
2
+ import type { BusinessFlowDraft } from "../business-flow-draft.js";
3
+ import type { FrameworkBusinessStrategy } from "../framework-business-strategy.js";
4
+ import type { StructuralFlowCatalog } from "../structural-flow-catalog.js";
5
+ import type { BusinessFlowDerivationOptions } from "../types.js";
6
+ export declare class TypeOrmBusinessStrategy implements FrameworkBusinessStrategy {
7
+ derive(catalog: StructuralFlowCatalog, options: BusinessFlowDerivationOptions, draft: BusinessFlowDraft): void;
8
+ }
9
+ export declare function findTypeOrmEntities(catalog: StructuralFlowCatalog): StructuralNode[];
10
+ //# sourceMappingURL=typeorm-business-strategy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeorm-business-strategy.d.ts","sourceRoot":"","sources":["../../../src/business-flow/strategies/typeorm-business-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAWjE,qBAAa,uBAAwB,YAAW,yBAAyB;IACvE,MAAM,CACJ,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,6BAA6B,EACtC,KAAK,EAAE,iBAAiB,GACvB,IAAI;CAgER;AAoCD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,GAAG,cAAc,EAAE,CAmBpF"}
@@ -0,0 +1,136 @@
1
+ import { addBusinessNode, addBusinessRelation, nodeKey, hasDecorator, } from "./strategy-helpers.js";
2
+ const WRITE_METHODS = new Set(["save", "insert", "update", "delete", "remove", "softDelete", "softRemove", "upsert"]);
3
+ const READ_METHODS = new Set(["find", "findOne", "findBy", "findOneBy", "count", "exists", "query"]);
4
+ export class TypeOrmBusinessStrategy {
5
+ derive(catalog, options, draft) {
6
+ const entities = findTypeOrmEntities(catalog);
7
+ const entityKeys = new Map(entities.map((entity) => {
8
+ const key = nodeKey(options.capability.key, "data", entity);
9
+ addBusinessNode(draft, {
10
+ key,
11
+ kind: "Data",
12
+ label: entity.name,
13
+ summary: `TypeORM persisted data represented by ${entity.qualifiedName}.`,
14
+ evidence: entity,
15
+ });
16
+ return [entity.reference.id, key];
17
+ }));
18
+ if (entities.length === 0) {
19
+ return;
20
+ }
21
+ for (const operation of catalog.nodes.filter(isOperationNode)) {
22
+ const operationKey = nodeKey(options.capability.key, "operations", operation);
23
+ for (const call of catalog.outgoing(operation.reference.id, "calls")) {
24
+ const dataAccess = catalog.exactTarget(call);
25
+ if (dataAccess === undefined || !looksLikeRepositoryAccess(dataAccess)) {
26
+ continue;
27
+ }
28
+ const accessType = classifyDataAccess(dataAccess.name);
29
+ if (accessType === undefined) {
30
+ draft.addBoundary("typeorm", "classify_data_access", `The TypeORM access ${dataAccess.qualifiedName} cannot be classified as a supported read or write.`, dataAccess, [...entityKeys.values()]);
31
+ continue;
32
+ }
33
+ const entity = resolveEntityTarget(dataAccess, entities);
34
+ if (entity === undefined) {
35
+ draft.addBoundary("typeorm", "resolve_data_target", `The TypeORM access ${dataAccess.qualifiedName} does not identify one decorated entity.`, dataAccess, entities.map((entity) => entity.reference.id));
36
+ continue;
37
+ }
38
+ const dataKey = entityKeys.get(entity.reference.id);
39
+ addBusinessNode(draft, {
40
+ key: operationKey,
41
+ kind: "Operation",
42
+ label: operation.name,
43
+ summary: `Performs ${operation.qualifiedName}.`,
44
+ evidence: operation,
45
+ });
46
+ addBusinessRelation(draft, {
47
+ from: operationKey,
48
+ type: accessType,
49
+ to: dataKey,
50
+ evidence: dataAccess,
51
+ });
52
+ }
53
+ deriveUnresolvedRepositoryAccess(operation, catalog, draft);
54
+ }
55
+ }
56
+ }
57
+ function deriveUnresolvedRepositoryAccess(operation, catalog, draft) {
58
+ const fileContext = catalog.contextNodes(operation.path);
59
+ const hasTypeOrmImport = fileContext.some(isTypeOrmImport);
60
+ const boundaries = catalog.boundaries.filter((boundary) => (boundary.owner.id === operation.reference.id && boundary.operation === "calls"));
61
+ if (!hasTypeOrmImport || !hasRepositoryTypeEvidence(operation.path, catalog)) {
62
+ return;
63
+ }
64
+ for (const boundary of boundaries) {
65
+ if (boundary.target === undefined || classifyDataAccess(boundary.target) === undefined) {
66
+ continue;
67
+ }
68
+ draft.addBoundary("typeorm", "resolve_repository_access", `The TypeORM repository call ${boundary.target} is unresolved and requires source inspection.`, operation, boundary.candidates);
69
+ }
70
+ }
71
+ function hasRepositoryTypeEvidence(path, catalog) {
72
+ return catalog.contextBoundaries(path).some((boundary) => (boundary.target === "Repository"
73
+ && (boundary.operation === "references" || boundary.operation === "imports")));
74
+ }
75
+ export function findTypeOrmEntities(catalog) {
76
+ const entities = catalog.nodes.filter((node) => (hasDecorator(node, ["Entity", "ViewEntity"])
77
+ || isConventionalEntity(node, catalog)));
78
+ for (const file of catalog.nodes.filter(isTypeOrmEntityFile)) {
79
+ const children = catalog.outgoing(file.reference.id, "declares")
80
+ .filter((relation) => relation.support.status === "exact")
81
+ .map((relation) => catalog.node(relation.to.id))
82
+ .filter((node) => node !== undefined);
83
+ if (!children.some(isTypeOrmImport)) {
84
+ continue;
85
+ }
86
+ const entityName = entityNameFromFile(file.name);
87
+ entities.push(...children.filter((node) => (node.declarationKind === "class" && node.name.toLowerCase() === entityName)));
88
+ }
89
+ return [...new Map(entities.map((entity) => [entity.reference.id, entity])).values()];
90
+ }
91
+ function isConventionalEntity(node, catalog) {
92
+ if (node.declarationKind !== "class") {
93
+ return false;
94
+ }
95
+ const ownerFile = catalog.contextIncoming(node.reference.id, "declares")
96
+ .map((relation) => catalog.contextNode(relation.from.id))
97
+ .find((owner) => owner !== undefined && isTypeOrmEntityFile(owner));
98
+ return ownerFile !== undefined
99
+ && node.name.toLowerCase() === entityNameFromFile(ownerFile.name)
100
+ && catalog.contextNodes(ownerFile.path).some(isTypeOrmImport);
101
+ }
102
+ function entityNameFromFile(fileName) {
103
+ return fileName.replace(/\.entity\.[cm]?[jt]sx?$/iu, "")
104
+ .replace(/[^a-z0-9]/giu, "")
105
+ .toLowerCase();
106
+ }
107
+ function isTypeOrmEntityFile(node) {
108
+ return node.declarationKind === "file"
109
+ && /(?:^|\.)entity\.[cm]?[jt]sx?$/iu.test(node.name);
110
+ }
111
+ function isTypeOrmImport(node) {
112
+ return node.declarationKind === "import"
113
+ && (node.name === "typeorm" || node.qualifiedName === "typeorm");
114
+ }
115
+ function classifyDataAccess(name) {
116
+ if (WRITE_METHODS.has(name)) {
117
+ return "writes";
118
+ }
119
+ return READ_METHODS.has(name) ? "reads" : undefined;
120
+ }
121
+ function looksLikeRepositoryAccess(node) {
122
+ return /(?:^|::|\.)(?:Repository(?:<[^>]+>)?|EntityManager|(?:Select|Insert|Update|Delete|SoftDelete|Relation)?QueryBuilder)(?:::|\.)/u
123
+ .test(node.qualifiedName);
124
+ }
125
+ function resolveEntityTarget(access, entities) {
126
+ const generic = access.qualifiedName.match(/Repository<([^>]+)>(?:::|\.)/u)?.[1];
127
+ if (generic === undefined) {
128
+ return undefined;
129
+ }
130
+ const entityName = generic.split(/[.:]/u).at(-1)?.trim();
131
+ const candidates = entities.filter((entity) => entity.name === entityName);
132
+ return candidates.length === 1 ? candidates[0] : undefined;
133
+ }
134
+ function isOperationNode(node) {
135
+ return node.declarationKind === "method" || node.declarationKind === "function";
136
+ }
@@ -0,0 +1,5 @@
1
+ import type { BusinessFlowDraft } from "../business-flow-draft.js";
2
+ import type { StructuralFlowCatalog } from "../structural-flow-catalog.js";
3
+ import type { BusinessFlowDerivationOptions } from "../types.js";
4
+ export declare function deriveVerifiedInvariants(catalog: StructuralFlowCatalog, options: BusinessFlowDerivationOptions, draft: BusinessFlowDraft): void;
5
+ //# sourceMappingURL=verified-invariant-strategy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verified-invariant-strategy.d.ts","sourceRoot":"","sources":["../../../src/business-flow/strategies/verified-invariant-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAOjE,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,6BAA6B,EACtC,KAAK,EAAE,iBAAiB,GACvB,IAAI,CAoCN"}
@@ -0,0 +1,38 @@
1
+ import { addBusinessNode, addBusinessRelation, nodeKey, } from "./strategy-helpers.js";
2
+ export function deriveVerifiedInvariants(catalog, options, draft) {
3
+ for (const invariant of options.invariants ?? []) {
4
+ const evidence = catalog.node(invariant.evidence.id);
5
+ if (evidence === undefined) {
6
+ throw new Error(`Verified invariant ${invariant.key} references missing evidence`);
7
+ }
8
+ addBusinessNode(draft, {
9
+ key: invariant.key,
10
+ kind: "Invariant",
11
+ label: invariant.label,
12
+ summary: invariant.summary,
13
+ evidence,
14
+ certainty: invariant.certainty ?? "inferred",
15
+ });
16
+ for (const constrainedReference of invariant.constrains) {
17
+ const constrained = catalog.node(constrainedReference.id);
18
+ if (constrained === undefined) {
19
+ throw new Error(`Verified invariant ${invariant.key} has a missing target`);
20
+ }
21
+ const constrainedKey = nodeKey(options.capability.key, "operations", constrained);
22
+ addBusinessNode(draft, {
23
+ key: constrainedKey,
24
+ kind: "Operation",
25
+ label: constrained.name,
26
+ summary: `Performs ${constrained.qualifiedName}.`,
27
+ evidence: constrained,
28
+ });
29
+ addBusinessRelation(draft, {
30
+ from: constrainedKey,
31
+ type: "constrained_by",
32
+ to: invariant.key,
33
+ evidence,
34
+ certainty: invariant.certainty ?? "inferred",
35
+ });
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,5 @@
1
+ import type { BusinessFlowDraft } from "../business-flow-draft.js";
2
+ import type { StructuralFlowCatalog } from "../structural-flow-catalog.js";
3
+ import type { BusinessFlowDerivationOptions } from "../types.js";
4
+ export declare function deriveVerifiedTests(catalog: StructuralFlowCatalog, options: BusinessFlowDerivationOptions, draft: BusinessFlowDraft): void;
5
+ //# sourceMappingURL=verified-test-strategy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verified-test-strategy.d.ts","sourceRoot":"","sources":["../../../src/business-flow/strategies/verified-test-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAOjE,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE,6BAA6B,EACtC,KAAK,EAAE,iBAAiB,GACvB,IAAI,CAwBN"}
@@ -0,0 +1,26 @@
1
+ import { addBusinessNode, addStructuralRelation, nodeKey, } from "./strategy-helpers.js";
2
+ export function deriveVerifiedTests(catalog, options, draft) {
3
+ for (const verification of options.verifications ?? []) {
4
+ const operation = catalog.node(verification.operation.id);
5
+ const test = catalog.node(verification.test.id);
6
+ if (operation === undefined || test === undefined) {
7
+ throw new Error("Verified test flow references missing structural evidence");
8
+ }
9
+ const operationKey = nodeKey(options.capability.key, "operations", operation);
10
+ addBusinessNode(draft, {
11
+ key: operationKey,
12
+ kind: "Operation",
13
+ label: operation.name,
14
+ summary: `Performs ${operation.qualifiedName}.`,
15
+ evidence: operation,
16
+ certainty: verification.certainty ?? "inferred",
17
+ });
18
+ addStructuralRelation(draft, {
19
+ from: operationKey,
20
+ type: "verified_by",
21
+ to: test,
22
+ evidence: test,
23
+ certainty: verification.certainty ?? "inferred",
24
+ });
25
+ }
26
+ }
@@ -0,0 +1,21 @@
1
+ import type { StructuralIndexBackend, StructuralNode, StructuralReference, StructuralRelation, StructuralUnknownBoundary } from "../structural-backend/types.js";
2
+ export declare class StructuralFlowCatalog {
3
+ #private;
4
+ readonly nodes: readonly StructuralNode[];
5
+ readonly relations: readonly StructuralRelation[];
6
+ readonly boundaries: readonly StructuralUnknownBoundary[];
7
+ private constructor();
8
+ static load(structural: StructuralIndexBackend, verifiedReferences?: readonly StructuralReference[]): Promise<StructuralFlowCatalog>;
9
+ scopeTo(roots: readonly StructuralReference[]): StructuralFlowCatalog;
10
+ node(reference: string): StructuralNode | undefined;
11
+ outgoing(reference: string, type?: StructuralRelation["type"]): readonly StructuralRelation[];
12
+ incoming(reference: string, type?: StructuralRelation["type"]): readonly StructuralRelation[];
13
+ exactTarget(relation: StructuralRelation): StructuralNode | undefined;
14
+ contextNodes(path: string): readonly StructuralNode[];
15
+ contextIncoming(reference: string, type?: StructuralRelation["type"]): readonly StructuralRelation[];
16
+ contextNode(reference: string): StructuralNode | undefined;
17
+ contextBoundaries(path: string): readonly StructuralUnknownBoundary[];
18
+ isRoot(reference: string): boolean;
19
+ private outgoingClosure;
20
+ }
21
+ //# sourceMappingURL=structural-flow-catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structural-flow-catalog.d.ts","sourceRoot":"","sources":["../../src/business-flow/structural-flow-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,sBAAsB,EACtB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,EAC1B,MAAM,gCAAgC,CAAC;AASxC,qBAAa,qBAAqB;;IAChC,QAAQ,CAAC,KAAK,EAAE,SA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ries;
11
+ #nodesByReference;
12
+ #contextNodesByReference;
13
+ #contextNodes;
14
+ #contextRelations;
15
+ #contextBoundaries;
16
+ #rootReferences;
17
+ constructor(nodes, relations, boundaries, context = { nodes, relations, boundaries }, rootReferences = new Set()) {
18
+ this.nodes = nodes;
19
+ this.relations = relations;
20
+ this.boundaries = boundaries;
21
+ this.#contextNodes = context.nodes;
22
+ this.#contextRelations = context.relations;
23
+ this.#contextBoundaries = context.boundaries;
24
+ this.#rootReferences = rootReferences;
25
+ this.#nodesByReference = new Map(nodes.map((node) => [node.reference.id, node]));
26
+ this.#contextNodesByReference = new Map(context.nodes.map((node) => [node.reference.id, node]));
27
+ }
28
+ static async load(structural, verifiedReferences = []) {
29
+ const graph = await structural.readProjectGraph({
30
+ declarationKinds: ["file", "import", "route", "class", "method", "function"],
31
+ });
32
+ const graphNodeIds = new Set(graph.nodes.map((node) => node.reference.id));
33
+ const verifiedNodes = await Promise.all(uniqueReferences(verifiedReferences)
34
+ .filter((reference) => !graphNodeIds.has(reference.id))
35
+ .map((reference) => structural.getNode(reference)));
36
+ return new StructuralFlowCatalog([...graph.nodes, ...verifiedNodes.filter((node) => node !== undefined)]
37
+ .sort(compareNodes), uniqueRelations(graph.relations), uniqueBoundaries(graph.boundaries));
38
+ }
39
+ scopeTo(roots) {
40
+ if (roots.length === 0) {
41
+ throw new Error("Business flow derivation requires at least one capability root");
42
+ }
43
+ const owned = this.outgoingClosure(roots);
44
+ const missing = roots.filter((root) => !owned.has(root.id));
45
+ if (missing.length > 0) {
46
+ throw new Error(`Business flow roots reference missing evidence: ${missing.map((root) => root.id).join(", ")}`);
47
+ }
48
+ return new StructuralFlowCatalog(this.#contextNodes.filter((node) => owned.has(node.reference.id)), this.#contextRelations.filter((relation) => (owned.has(relation.from.id) && owned.has(relation.to.id))), this.#contextBoundaries.filter((boundary) => owned.has(boundary.owner.id)), {
49
+ nodes: this.#contextNodes,
50
+ relations: this.#contextRelations,
51
+ boundaries: this.#contextBoundaries,
52
+ }, new Set(roots.map((root) => root.id)));
53
+ }
54
+ node(reference) {
55
+ return this.#nodesByReference.get(reference);
56
+ }
57
+ outgoing(reference, type) {
58
+ return this.relations.filter((relation) => (relation.from.id === reference && (type === undefined || relation.type === type)));
59
+ }
60
+ incoming(reference, type) {
61
+ return this.relations.filter((relation) => (relation.to.id === reference && (type === undefined || relation.type === type)));
62
+ }
63
+ exactTarget(relation) {
64
+ return relation.support.status === "exact"
65
+ && this.nodes.some((node) => node.reference.id === relation.to.id)
66
+ ? this.node(relation.to.id)
67
+ : undefined;
68
+ }
69
+ contextNodes(path) {
70
+ return this.#contextNodes.filter((node) => node.path === path);
71
+ }
72
+ contextIncoming(reference, type) {
73
+ return this.#contextRelations.filter((relation) => (relation.to.id === reference && (type === undefined || relation.type === type)));
74
+ }
75
+ contextNode(reference) {
76
+ return this.#contextNodesByReference.get(reference);
77
+ }
78
+ contextBoundaries(path) {
79
+ return this.#contextBoundaries.filter((boundary) => boundary.path === path);
80
+ }
81
+ isRoot(reference) {
82
+ return this.#rootReferences.has(reference);
83
+ }
84
+ outgoingClosure(roots) {
85
+ const knownNodes = new Set(this.#contextNodes.map((node) => node.reference.id));
86
+ const owned = new Set();
87
+ const queue = roots.map((root) => root.id);
88
+ for (let index = 0; index < queue.length; index += 1) {
89
+ const reference = queue[index];
90
+ if (!knownNodes.has(reference) || owned.has(reference)) {
91
+ continue;
92
+ }
93
+ owned.add(reference);
94
+ for (const relation of this.#contextRelations) {
95
+ if (relation.from.id === reference
96
+ && relation.support.status === "exact"
97
+ && CAPABILITY_REACHABILITY.has(relation.type)) {
98
+ queue.push(relation.to.id);
99
+ }
100
+ }
101
+ }
102
+ return owned;
103
+ }
104
+ }
105
+ function uniqueReferences(references) {
106
+ return [...new Map(references.map((reference) => [reference.id, reference])).values()];
107
+ }
108
+ function uniqueRelations(relations) {
109
+ return [...new Map(relations.map((relation) => [
110
+ [relation.from.id, relation.type, relation.to.id].join("\0"),
111
+ relation,
112
+ ])).values()].sort((left, right) => (left.from.id.localeCompare(right.from.id)
113
+ || left.type.localeCompare(right.type)
114
+ || left.to.id.localeCompare(right.to.id)));
115
+ }
116
+ function uniqueBoundaries(boundaries) {
117
+ return [...new Map(boundaries.map((boundary) => [boundary.reference.id, boundary])).values()]
118
+ .sort((left, right) => left.reference.id.localeCompare(right.reference.id));
119
+ }
120
+ function compareNodes(left, right) {
121
+ return left.path.localeCompare(right.path)
122
+ || left.range.start.line - right.range.start.line
123
+ || left.range.start.column - right.range.start.column
124
+ || left.reference.id.localeCompare(right.reference.id);
125
+ }
@@ -0,0 +1,51 @@
1
+ import type { GraphPatchV1 } from "../contracts/graph.js";
2
+ import type { AssertionCertainty, GraphSourceLocation, StructuralNodeReference } from "../graph/types.js";
3
+ import type { StructuralReference } from "../structural-backend/types.js";
4
+ export type SupportedBusinessFramework = "nestjs" | "graphql" | "typeorm" | "bullmq";
5
+ export interface BusinessCapabilityDefinition {
6
+ readonly key: string;
7
+ readonly label: string;
8
+ readonly summary: string;
9
+ readonly aliases?: readonly string[];
10
+ readonly roots: readonly StructuralReference[];
11
+ }
12
+ export interface VerifiedMessageFlow {
13
+ readonly channel: string;
14
+ readonly producer: StructuralReference;
15
+ readonly consumer: StructuralReference;
16
+ readonly certainty?: AssertionCertainty;
17
+ }
18
+ export interface VerifiedInvariant {
19
+ readonly key: string;
20
+ readonly label: string;
21
+ readonly summary: string;
22
+ readonly evidence: StructuralReference;
23
+ readonly constrains: readonly StructuralReference[];
24
+ readonly certainty?: AssertionCertainty;
25
+ }
26
+ export interface VerifiedTestFlow {
27
+ readonly operation: StructuralReference;
28
+ readonly test: StructuralReference;
29
+ readonly certainty?: AssertionCertainty;
30
+ }
31
+ export interface BusinessFlowDerivationOptions {
32
+ readonly capability: BusinessCapabilityDefinition;
33
+ readonly messageFlows?: readonly VerifiedMessageFlow[];
34
+ readonly invariants?: readonly VerifiedInvariant[];
35
+ readonly verifications?: readonly VerifiedTestFlow[];
36
+ }
37
+ export interface BusinessFlowBoundary {
38
+ readonly id: string;
39
+ readonly framework: SupportedBusinessFramework;
40
+ readonly operation: string;
41
+ readonly reason: string;
42
+ readonly owner: StructuralNodeReference;
43
+ readonly location: GraphSourceLocation;
44
+ readonly candidates: readonly string[];
45
+ readonly resolution: "unresolved" | "source_fallback";
46
+ }
47
+ export interface DerivedBusinessFlow {
48
+ readonly patch: GraphPatchV1;
49
+ readonly boundaries: readonly BusinessFlowBoundary[];
50
+ }
51
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/business-flow/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAErF,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,SAAS,mBAAmB,EAAE,CAAC;CAChD;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IACvC,QAAQ,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC;CACzC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC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AE,SAAS,oBAAoB,EAAE,CAAC;CACtD"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { ParsedInvocation } from "./types.js";
2
+ export declare function parseCliArguments(arguments_: readonly string[], currentDirectory: string): ParsedInvocation;
3
+ //# sourceMappingURL=argument-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"argument-parser.d.ts","sourceRoot":"","sources":["../../src/cli/argument-parser.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,gBAAgB,EAAE,MAAM,GACvB,gBAAgB,CAQlB"}