@soddong/agentic-contract-validation 0.2.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 (38) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +157 -0
  3. package/dist/database.d.ts +17 -0
  4. package/dist/database.d.ts.map +1 -0
  5. package/dist/database.js +76 -0
  6. package/dist/database.js.map +1 -0
  7. package/dist/index.d.ts +67 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +67 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/registry.d.ts +21 -0
  12. package/dist/registry.d.ts.map +1 -0
  13. package/dist/registry.js +173 -0
  14. package/dist/registry.js.map +1 -0
  15. package/dist/seed-apply.d.ts +22 -0
  16. package/dist/seed-apply.d.ts.map +1 -0
  17. package/dist/seed-apply.js +198 -0
  18. package/dist/seed-apply.js.map +1 -0
  19. package/docs/build.md +25 -0
  20. package/docs/configuration.md +18 -0
  21. package/docs/delivery.md +9 -0
  22. package/docs/operations.md +7 -0
  23. package/docs/publishing.md +11 -0
  24. package/docs/schema/generated/README.md +22 -0
  25. package/docs/schema/generated/schema.json +563 -0
  26. package/docs/schema/generated/schema.mmd +48 -0
  27. package/docs/schema/generated/schema.svg +83 -0
  28. package/docs/schema/generated/validation_contract_profiles.md +72 -0
  29. package/docs/schema/generated/validation_contract_profiles.svg +71 -0
  30. package/docs/schema/generated/validation_contract_provider_manifests.md +62 -0
  31. package/docs/schema/generated/validation_contract_provider_manifests.svg +49 -0
  32. package/docs/schema/generated/validation_contract_rules.md +91 -0
  33. package/docs/schema/generated/validation_contract_rules.svg +52 -0
  34. package/docs/schema/generated/validation_contract_schema_migrations.md +47 -0
  35. package/docs/schema/generated/validation_contract_schema_migrations.svg +27 -0
  36. package/docs/usage.md +55 -0
  37. package/package.json +27 -0
  38. package/src/database/migrations/0001_validation_contract_registry.sql +78 -0
@@ -0,0 +1,83 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <!-- Generated by graphviz version 12.1.2 (20240928.0832)
5
+ -->
6
+ <!-- Title: agentic&#45;contract&#45;validation Pages: 1 -->
7
+ <svg width="924pt" height="631pt"
8
+ viewBox="0.00 0.00 924.14 631.20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
+ <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 627.2)">
10
+ <title>agentic&#45;contract&#45;validation</title>
11
+ <polygon fill="white" stroke="none" points="-4,4 -4,-627.2 920.14,-627.2 920.14,4 -4,4"/>
12
+ <!-- validation_contract_schema_migrations -->
13
+ <g id="node1" class="node">
14
+ <title>validation_contract_schema_migrations</title>
15
+ <polygon fill="#efefef" stroke="none" points="43.2,-518.6 43.2,-564.6 414.37,-564.6 414.37,-518.6 43.2,-518.6"/>
16
+ <polygon fill="none" stroke="black" points="43.2,-518.6 43.2,-564.6 414.37,-564.6 414.37,-518.6 43.2,-518.6"/>
17
+ <text text-anchor="start" x="50.2" y="-542.4" font-family="Arial Bold" font-size="18.00">validation_contract_schema_migrations</text>
18
+ <text text-anchor="start" x="338.11" y="-542.4" font-family="Arial" font-size="14.00">    </text>
19
+ <text text-anchor="start" x="369.23" y="-542.4" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
20
+ <text text-anchor="start" x="56.45" y="-528" font-family="Arial" font-size="14.00" fill="#333333">validation contract registry migration 적용 이력을 관리한다.</text>
21
+ <polygon fill="none" stroke="black" points="43.2,-487.8 43.2,-518.6 414.37,-518.6 414.37,-487.8 43.2,-487.8"/>
22
+ <text text-anchor="start" x="50.2" y="-500" font-family="Arial" font-size="14.00">migration_id </text>
23
+ <text text-anchor="start" x="130.35" y="-500" font-family="Arial" font-size="14.00" fill="#666666">[VARCHAR(128)]</text>
24
+ </g>
25
+ <!-- validation_contract_provider_manifests -->
26
+ <g id="node2" class="node">
27
+ <title>validation_contract_provider_manifests</title>
28
+ <polygon fill="#efefef" stroke="none" points="489.7,-74 489.7,-120 859.87,-120 859.87,-74 489.7,-74"/>
29
+ <polygon fill="none" stroke="black" points="489.7,-74 489.7,-120 859.87,-120 859.87,-74 489.7,-74"/>
30
+ <text text-anchor="start" x="496.7" y="-97.8" font-family="Arial Bold" font-size="18.00">validation_contract_provider_manifests</text>
31
+ <text text-anchor="start" x="783.61" y="-97.8" font-family="Arial" font-size="14.00">    </text>
32
+ <text text-anchor="start" x="814.73" y="-97.8" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
33
+ <text text-anchor="start" x="556.51" y="-83.4" font-family="Arial" font-size="14.00" fill="#333333">validation provider manifest를 관리한다.</text>
34
+ <polygon fill="none" stroke="black" points="489.7,-43.2 489.7,-74 859.87,-74 859.87,-43.2 489.7,-43.2"/>
35
+ <text text-anchor="start" x="496.7" y="-55.4" font-family="Arial" font-size="14.00">provider_manifest_id </text>
36
+ <text text-anchor="start" x="630.55" y="-55.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
37
+ </g>
38
+ <!-- validation_contract_profiles -->
39
+ <g id="node3" class="node">
40
+ <title>validation_contract_profiles</title>
41
+ <polygon fill="#efefef" stroke="none" points="497.38,-304 497.38,-350 852.18,-350 852.18,-304 497.38,-304"/>
42
+ <polygon fill="none" stroke="black" points="497.38,-304 497.38,-350 852.18,-350 852.18,-304 497.38,-304"/>
43
+ <text text-anchor="start" x="538.69" y="-327.8" font-family="Arial Bold" font-size="18.00">validation_contract_profiles</text>
44
+ <text text-anchor="start" x="741.62" y="-327.8" font-family="Arial" font-size="14.00">    </text>
45
+ <text text-anchor="start" x="772.74" y="-327.8" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
46
+ <text text-anchor="start" x="504.38" y="-313.4" font-family="Arial" font-size="14.00" fill="#333333">provider manifest가 제공하는 validation profile을 관리한다.</text>
47
+ <polygon fill="none" stroke="black" points="497.38,-273.2 497.38,-304 852.18,-304 852.18,-273.2 497.38,-273.2"/>
48
+ <text text-anchor="start" x="504.38" y="-285.4" font-family="Arial" font-size="14.00">validation_profile_id </text>
49
+ <text text-anchor="start" x="632.02" y="-285.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
50
+ <polygon fill="none" stroke="black" points="497.38,-242.4 497.38,-273.2 852.18,-273.2 852.18,-242.4 497.38,-242.4"/>
51
+ <text text-anchor="start" x="504.38" y="-254.6" font-family="Arial" font-size="14.00">provider_manifest_id </text>
52
+ <text text-anchor="start" x="638.23" y="-254.6" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
53
+ </g>
54
+ <!-- validation_contract_profiles&#45;&gt;validation_contract_provider_manifests -->
55
+ <g id="edge1" class="edge">
56
+ <title>validation_contract_profiles:provider_manifest_id&#45;&gt;validation_contract_provider_manifests:provider_manifest_id</title>
57
+ <path fill="none" stroke="black" d="M675.35,-231.17C686.01,-141.87 842.85,-247.48 903.07,-163.2 918.57,-141.5 921.88,-62.1 903.07,-43.2 867.27,-7.25 674.78,8.53 674.78,-42.2"/>
58
+ <polygon fill="black" stroke="black" points="675.36,-231.08 670.31,-240.82 675.06,-236.41 674.82,-240.73 674.82,-240.73 674.82,-240.73 675.06,-236.41 679.3,-241.32 675.36,-231.08"/>
59
+ </g>
60
+ <!-- validation_contract_rules -->
61
+ <g id="node4" class="node">
62
+ <title>validation_contract_rules</title>
63
+ <polygon fill="#efefef" stroke="none" points="518.39,-534 518.39,-580 831.18,-580 831.18,-534 518.39,-534"/>
64
+ <polygon fill="none" stroke="black" points="518.39,-534 518.39,-580 831.18,-580 831.18,-534 518.39,-534"/>
65
+ <text text-anchor="start" x="548.69" y="-557.8" font-family="Arial Bold" font-size="18.00">validation_contract_rules</text>
66
+ <text text-anchor="start" x="731.62" y="-557.8" font-family="Arial" font-size="14.00">    </text>
67
+ <text text-anchor="start" x="762.74" y="-557.8" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
68
+ <text text-anchor="start" x="525.39" y="-543.4" font-family="Arial" font-size="14.00" fill="#333333">validation profile에 포함된 rule contract를 관리한다.</text>
69
+ <polygon fill="none" stroke="black" points="518.39,-503.2 518.39,-534 831.18,-534 831.18,-503.2 518.39,-503.2"/>
70
+ <text text-anchor="start" x="525.39" y="-515.4" font-family="Arial" font-size="14.00">validation_rule_id </text>
71
+ <text text-anchor="start" x="638.25" y="-515.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
72
+ <polygon fill="none" stroke="black" points="518.39,-472.4 518.39,-503.2 831.18,-503.2 831.18,-472.4 518.39,-472.4"/>
73
+ <text text-anchor="start" x="525.39" y="-484.6" font-family="Arial" font-size="14.00">validation_profile_id </text>
74
+ <text text-anchor="start" x="653.03" y="-484.6" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
75
+ </g>
76
+ <!-- validation_contract_rules&#45;&gt;validation_contract_profiles -->
77
+ <g id="edge2" class="edge">
78
+ <title>validation_contract_rules:validation_profile_id&#45;&gt;validation_contract_profiles:validation_profile_id</title>
79
+ <path fill="none" stroke="black" d="M675.49,-461.19C685.8,-391.82 806.81,-462.06 852.18,-393.2 877.76,-354.38 899.67,-288.6 853.18,-288.6"/>
80
+ <polygon fill="black" stroke="black" points="675.49,-461.09 670.32,-470.76 675.13,-466.41 674.83,-470.73 674.83,-470.73 674.83,-470.73 675.13,-466.41 679.3,-471.38 675.49,-461.09"/>
81
+ </g>
82
+ </g>
83
+ </svg>
@@ -0,0 +1,72 @@
1
+ # validation_contract_profiles
2
+
3
+ ## Description
4
+
5
+ provider manifest가 제공하는 validation profile을 관리한다.
6
+
7
+ <details>
8
+ <summary><strong>Table Definition</strong></summary>
9
+
10
+ ```sql
11
+ CREATE TABLE validation_contract_profiles (
12
+ validation_profile_id CHAR(36) PRIMARY KEY
13
+ CHECK (length(validation_profile_id) = 36),
14
+ provider_manifest_id CHAR(36) NOT NULL
15
+ CHECK (length(provider_manifest_id) = 36),
16
+ profile_id VARCHAR(256) NOT NULL,
17
+ provider_module VARCHAR(256) NOT NULL,
18
+ target_domain VARCHAR(128) NOT NULL,
19
+ created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
20
+ updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
21
+ metadata_json JSON
22
+ CHECK (metadata_json IS NULL OR json_valid(metadata_json)),
23
+ FOREIGN KEY (provider_manifest_id)
24
+ REFERENCES validation_contract_provider_manifests (provider_manifest_id)
25
+ ON DELETE CASCADE,
26
+ UNIQUE (provider_manifest_id, profile_id)
27
+ )
28
+ ```
29
+
30
+ </details>
31
+
32
+ ## Columns
33
+
34
+ | Name | Type | Default | Nullable | Children | Parents |
35
+ | --------------------- | ------------ | ----------------- | -------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------- |
36
+ | validation_profile_id | CHAR(36) | | true | [validation_contract_rules](validation_contract_rules.md) | |
37
+ | provider_manifest_id | CHAR(36) | | false | | [validation_contract_provider_manifests](validation_contract_provider_manifests.md) |
38
+ | profile_id | VARCHAR(256) | | false | | |
39
+ | provider_module | VARCHAR(256) | | false | | |
40
+ | target_domain | VARCHAR(128) | | false | | |
41
+ | created_at | DATETIME | CURRENT_TIMESTAMP | false | | |
42
+ | updated_at | DATETIME | CURRENT_TIMESTAMP | false | | |
43
+ | metadata_json | JSON | | true | | |
44
+
45
+ ## Constraints
46
+
47
+ | Name | Type | Definition |
48
+ | ----------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
49
+ | validation_profile_id | PRIMARY KEY | PRIMARY KEY (validation_profile_id) |
50
+ | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (provider_manifest_id) REFERENCES validation_contract_provider_manifests (provider_manifest_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
51
+ | sqlite_autoindex_validation_contract_profiles_2 | UNIQUE | UNIQUE (provider_manifest_id, profile_id) |
52
+ | sqlite_autoindex_validation_contract_profiles_1 | PRIMARY KEY | PRIMARY KEY (validation_profile_id) |
53
+ | - | CHECK | CHECK (length(validation_profile_id) = 36) |
54
+ | - | CHECK | CHECK (length(provider_manifest_id) = 36) |
55
+ | - | CHECK | CHECK (metadata_json IS NULL OR json_valid(metadata_json)) |
56
+
57
+ ## Indexes
58
+
59
+ | Name | Definition |
60
+ | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
61
+ | idx_validation_contract_profiles_target | CREATE INDEX idx_validation_contract_profiles_target<br /> ON validation_contract_profiles (target_domain) |
62
+ | idx_validation_contract_profiles_provider | CREATE INDEX idx_validation_contract_profiles_provider<br /> ON validation_contract_profiles (provider_manifest_id) |
63
+ | sqlite_autoindex_validation_contract_profiles_2 | UNIQUE (provider_manifest_id, profile_id) |
64
+ | sqlite_autoindex_validation_contract_profiles_1 | PRIMARY KEY (validation_profile_id) |
65
+
66
+ ## Relations
67
+
68
+ ![er](validation_contract_profiles.svg)
69
+
70
+ ---
71
+
72
+ > Generated by [tbls](https://github.com/k1LoW/tbls)
@@ -0,0 +1,71 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <!-- Generated by graphviz version 12.1.2 (20240928.0832)
5
+ -->
6
+ <!-- Title: validation_contract_profiles Pages: 1 -->
7
+ <svg width="490pt" height="637pt"
8
+ viewBox="0.00 0.00 490.42 637.20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
+ <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 633.2)">
10
+ <title>validation_contract_profiles</title>
11
+ <polygon fill="white" stroke="none" points="-4,4 -4,-633.2 486.42,-633.2 486.42,4 -4,4"/>
12
+ <!-- validation_contract_profiles -->
13
+ <g id="node1" class="node">
14
+ <title>validation_contract_profiles</title>
15
+ <polygon fill="#efefef" stroke="none" points="50.88,-307 50.88,-353 405.68,-353 405.68,-307 50.88,-307"/>
16
+ <polygon fill="none" stroke="black" points="50.88,-307 50.88,-353 405.68,-353 405.68,-307 50.88,-307"/>
17
+ <text text-anchor="start" x="92.19" y="-330.8" font-family="Arial Bold" font-size="18.00">validation_contract_profiles</text>
18
+ <text text-anchor="start" x="295.12" y="-330.8" font-family="Arial" font-size="14.00">    </text>
19
+ <text text-anchor="start" x="326.24" y="-330.8" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
20
+ <text text-anchor="start" x="57.88" y="-316.4" font-family="Arial" font-size="14.00" fill="#333333">provider manifest가 제공하는 validation profile을 관리한다.</text>
21
+ <polygon fill="none" stroke="black" points="50.88,-276.2 50.88,-307 405.68,-307 405.68,-276.2 50.88,-276.2"/>
22
+ <text text-anchor="start" x="57.88" y="-288.4" font-family="Arial" font-size="14.00">validation_profile_id </text>
23
+ <text text-anchor="start" x="185.52" y="-288.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
24
+ <polygon fill="none" stroke="black" points="50.88,-245.4 50.88,-276.2 405.68,-276.2 405.68,-245.4 50.88,-245.4"/>
25
+ <text text-anchor="start" x="57.88" y="-257.6" font-family="Arial" font-size="14.00">provider_manifest_id </text>
26
+ <text text-anchor="start" x="191.73" y="-257.6" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
27
+ <polygon fill="none" stroke="black" stroke-width="3" points="49.38,-243.9 49.38,-354.5 407.18,-354.5 407.18,-243.9 49.38,-243.9"/>
28
+ </g>
29
+ <!-- validation_contract_provider_manifests -->
30
+ <g id="node3" class="node">
31
+ <title>validation_contract_provider_manifests</title>
32
+ <polygon fill="#efefef" stroke="none" points="43.2,-74 43.2,-120 413.37,-120 413.37,-74 43.2,-74"/>
33
+ <polygon fill="none" stroke="black" points="43.2,-74 43.2,-120 413.37,-120 413.37,-74 43.2,-74"/>
34
+ <text text-anchor="start" x="50.2" y="-97.8" font-family="Arial Bold" font-size="18.00">validation_contract_provider_manifests</text>
35
+ <text text-anchor="start" x="337.11" y="-97.8" font-family="Arial" font-size="14.00">    </text>
36
+ <text text-anchor="start" x="368.23" y="-97.8" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
37
+ <text text-anchor="start" x="110.01" y="-83.4" font-family="Arial" font-size="14.00" fill="#333333">validation provider manifest를 관리한다.</text>
38
+ <polygon fill="none" stroke="black" points="43.2,-43.2 43.2,-74 413.37,-74 413.37,-43.2 43.2,-43.2"/>
39
+ <text text-anchor="start" x="50.2" y="-55.4" font-family="Arial" font-size="14.00">provider_manifest_id </text>
40
+ <text text-anchor="start" x="184.05" y="-55.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
41
+ </g>
42
+ <!-- validation_contract_profiles&#45;&gt;validation_contract_provider_manifests -->
43
+ <g id="edge2" class="edge">
44
+ <title>validation_contract_profiles:provider_manifest_id&#45;&gt;validation_contract_provider_manifests:provider_manifest_id</title>
45
+ <path fill="none" stroke="black" d="M228.85,-234.12C239.52,-144.3 396.6,-248.18 456.57,-163.2 487.32,-119.62 494.19,-80.99 456.57,-43.2 420.77,-7.25 228.28,8.53 228.28,-42.2"/>
46
+ <polygon fill="black" stroke="black" points="228.86,-234.08 223.81,-243.82 228.56,-239.41 228.32,-243.73 228.32,-243.73 228.32,-243.73 228.56,-239.41 232.79,-244.32 228.86,-234.08"/>
47
+ </g>
48
+ <!-- validation_contract_rules -->
49
+ <g id="node2" class="node">
50
+ <title>validation_contract_rules</title>
51
+ <polygon fill="#efefef" stroke="none" points="71.89,-540 71.89,-586 384.68,-586 384.68,-540 71.89,-540"/>
52
+ <polygon fill="none" stroke="black" points="71.89,-540 71.89,-586 384.68,-586 384.68,-540 71.89,-540"/>
53
+ <text text-anchor="start" x="102.19" y="-563.8" font-family="Arial Bold" font-size="18.00">validation_contract_rules</text>
54
+ <text text-anchor="start" x="285.12" y="-563.8" font-family="Arial" font-size="14.00">    </text>
55
+ <text text-anchor="start" x="316.24" y="-563.8" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
56
+ <text text-anchor="start" x="78.89" y="-549.4" font-family="Arial" font-size="14.00" fill="#333333">validation profile에 포함된 rule contract를 관리한다.</text>
57
+ <polygon fill="none" stroke="black" points="71.89,-509.2 71.89,-540 384.68,-540 384.68,-509.2 71.89,-509.2"/>
58
+ <text text-anchor="start" x="78.89" y="-521.4" font-family="Arial" font-size="14.00">validation_rule_id </text>
59
+ <text text-anchor="start" x="191.74" y="-521.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
60
+ <polygon fill="none" stroke="black" points="71.89,-478.4 71.89,-509.2 384.68,-509.2 384.68,-478.4 71.89,-478.4"/>
61
+ <text text-anchor="start" x="78.89" y="-490.6" font-family="Arial" font-size="14.00">validation_profile_id </text>
62
+ <text text-anchor="start" x="206.53" y="-490.6" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
63
+ </g>
64
+ <!-- validation_contract_rules&#45;&gt;validation_contract_profiles -->
65
+ <g id="edge1" class="edge">
66
+ <title>validation_contract_rules:validation_profile_id&#45;&gt;validation_contract_profiles:validation_profile_id</title>
67
+ <path fill="none" stroke="black" d="M228.99,-467.19C239.3,-397.82 360.32,-468.07 405.68,-399.2 431.99,-359.26 454.51,-291.6 406.68,-291.6"/>
68
+ <polygon fill="black" stroke="black" points="228.99,-467.09 223.82,-476.76 228.63,-472.41 228.33,-476.73 228.33,-476.73 228.33,-476.73 228.63,-472.41 232.79,-477.38 228.99,-467.09"/>
69
+ </g>
70
+ </g>
71
+ </svg>
@@ -0,0 +1,62 @@
1
+ # validation_contract_provider_manifests
2
+
3
+ ## Description
4
+
5
+ validation provider manifest를 관리한다.
6
+
7
+ <details>
8
+ <summary><strong>Table Definition</strong></summary>
9
+
10
+ ```sql
11
+ CREATE TABLE validation_contract_provider_manifests (
12
+ provider_manifest_id CHAR(36) PRIMARY KEY
13
+ CHECK (length(provider_manifest_id) = 36),
14
+ provider_id VARCHAR(256) NOT NULL,
15
+ provider_module VARCHAR(256) NOT NULL,
16
+ provider_version VARCHAR(64) NOT NULL,
17
+ created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
18
+ updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
19
+ metadata_json JSON
20
+ CHECK (metadata_json IS NULL OR json_valid(metadata_json)),
21
+ UNIQUE (provider_id, provider_version)
22
+ )
23
+ ```
24
+
25
+ </details>
26
+
27
+ ## Columns
28
+
29
+ | Name | Type | Default | Nullable | Children |
30
+ | -------------------- | ------------ | ----------------- | -------- | --------------------------------------------------------------- |
31
+ | provider_manifest_id | CHAR(36) | | true | [validation_contract_profiles](validation_contract_profiles.md) |
32
+ | provider_id | VARCHAR(256) | | false | |
33
+ | provider_module | VARCHAR(256) | | false | |
34
+ | provider_version | VARCHAR(64) | | false | |
35
+ | created_at | DATETIME | CURRENT_TIMESTAMP | false | |
36
+ | updated_at | DATETIME | CURRENT_TIMESTAMP | false | |
37
+ | metadata_json | JSON | | true | |
38
+
39
+ ## Constraints
40
+
41
+ | Name | Type | Definition |
42
+ | --------------------------------------------------------- | ----------- | ---------------------------------------------------------- |
43
+ | provider_manifest_id | PRIMARY KEY | PRIMARY KEY (provider_manifest_id) |
44
+ | sqlite_autoindex_validation_contract_provider_manifests_2 | UNIQUE | UNIQUE (provider_id, provider_version) |
45
+ | sqlite_autoindex_validation_contract_provider_manifests_1 | PRIMARY KEY | PRIMARY KEY (provider_manifest_id) |
46
+ | - | CHECK | CHECK (length(provider_manifest_id) = 36) |
47
+ | - | CHECK | CHECK (metadata_json IS NULL OR json_valid(metadata_json)) |
48
+
49
+ ## Indexes
50
+
51
+ | Name | Definition |
52
+ | --------------------------------------------------------- | -------------------------------------- |
53
+ | sqlite_autoindex_validation_contract_provider_manifests_2 | UNIQUE (provider_id, provider_version) |
54
+ | sqlite_autoindex_validation_contract_provider_manifests_1 | PRIMARY KEY (provider_manifest_id) |
55
+
56
+ ## Relations
57
+
58
+ ![er](validation_contract_provider_manifests.svg)
59
+
60
+ ---
61
+
62
+ > Generated by [tbls](https://github.com/k1LoW/tbls)
@@ -0,0 +1,49 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <!-- Generated by graphviz version 12.1.2 (20240928.0832)
5
+ -->
6
+ <!-- Title: validation_contract_provider_manifests Pages: 1 -->
7
+ <svg width="484pt" height="407pt"
8
+ viewBox="0.00 0.00 483.98 407.20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
+ <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 403.2)">
10
+ <title>validation_contract_provider_manifests</title>
11
+ <polygon fill="white" stroke="none" points="-4,4 -4,-403.2 479.98,-403.2 479.98,4 -4,4"/>
12
+ <!-- validation_contract_provider_manifests -->
13
+ <g id="node1" class="node">
14
+ <title>validation_contract_provider_manifests</title>
15
+ <polygon fill="#efefef" stroke="none" points="46.2,-77 46.2,-123 416.37,-123 416.37,-77 46.2,-77"/>
16
+ <polygon fill="none" stroke="black" points="46.2,-77 46.2,-123 416.37,-123 416.37,-77 46.2,-77"/>
17
+ <text text-anchor="start" x="53.2" y="-100.8" font-family="Arial Bold" font-size="18.00">validation_contract_provider_manifests</text>
18
+ <text text-anchor="start" x="340.11" y="-100.8" font-family="Arial" font-size="14.00">    </text>
19
+ <text text-anchor="start" x="371.23" y="-100.8" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
20
+ <text text-anchor="start" x="113.01" y="-86.4" font-family="Arial" font-size="14.00" fill="#333333">validation provider manifest를 관리한다.</text>
21
+ <polygon fill="none" stroke="black" points="46.2,-46.2 46.2,-77 416.37,-77 416.37,-46.2 46.2,-46.2"/>
22
+ <text text-anchor="start" x="53.2" y="-58.4" font-family="Arial" font-size="14.00">provider_manifest_id </text>
23
+ <text text-anchor="start" x="187.05" y="-58.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
24
+ <polygon fill="none" stroke="black" stroke-width="3" points="44.7,-44.7 44.7,-124.5 417.87,-124.5 417.87,-44.7 44.7,-44.7"/>
25
+ </g>
26
+ <!-- validation_contract_profiles -->
27
+ <g id="node2" class="node">
28
+ <title>validation_contract_profiles</title>
29
+ <polygon fill="#efefef" stroke="none" points="53.88,-310 53.88,-356 408.68,-356 408.68,-310 53.88,-310"/>
30
+ <polygon fill="none" stroke="black" points="53.88,-310 53.88,-356 408.68,-356 408.68,-310 53.88,-310"/>
31
+ <text text-anchor="start" x="95.19" y="-333.8" font-family="Arial Bold" font-size="18.00">validation_contract_profiles</text>
32
+ <text text-anchor="start" x="298.12" y="-333.8" font-family="Arial" font-size="14.00">    </text>
33
+ <text text-anchor="start" x="329.24" y="-333.8" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
34
+ <text text-anchor="start" x="60.88" y="-319.4" font-family="Arial" font-size="14.00" fill="#333333">provider manifest가 제공하는 validation profile을 관리한다.</text>
35
+ <polygon fill="none" stroke="black" points="53.88,-279.2 53.88,-310 408.68,-310 408.68,-279.2 53.88,-279.2"/>
36
+ <text text-anchor="start" x="60.88" y="-291.4" font-family="Arial" font-size="14.00">validation_profile_id </text>
37
+ <text text-anchor="start" x="188.52" y="-291.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
38
+ <polygon fill="none" stroke="black" points="53.88,-248.4 53.88,-279.2 408.68,-279.2 408.68,-248.4 53.88,-248.4"/>
39
+ <text text-anchor="start" x="60.88" y="-260.6" font-family="Arial" font-size="14.00">provider_manifest_id </text>
40
+ <text text-anchor="start" x="194.73" y="-260.6" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
41
+ </g>
42
+ <!-- validation_contract_profiles&#45;&gt;validation_contract_provider_manifests -->
43
+ <g id="edge1" class="edge">
44
+ <title>validation_contract_profiles:provider_manifest_id&#45;&gt;validation_contract_provider_manifests:provider_manifest_id</title>
45
+ <path fill="none" stroke="black" d="M231.86,-237.05C242.65,-146.75 401.47,-254.35 462.57,-169.2 478.5,-146.99 481.85,-65.57 462.57,-46.2 426.3,-9.78 231.28,6.2 231.28,-45.2"/>
46
+ <polygon fill="black" stroke="black" points="231.86,-237.08 226.81,-246.82 231.56,-242.41 231.32,-246.73 231.32,-246.73 231.32,-246.73 231.56,-242.41 235.79,-247.32 231.86,-237.08"/>
47
+ </g>
48
+ </g>
49
+ </svg>
@@ -0,0 +1,91 @@
1
+ # validation_contract_rules
2
+
3
+ ## Description
4
+
5
+ validation profile에 포함된 rule contract를 관리한다.
6
+
7
+ <details>
8
+ <summary><strong>Table Definition</strong></summary>
9
+
10
+ ```sql
11
+ CREATE TABLE validation_contract_rules (
12
+ validation_rule_id CHAR(36) PRIMARY KEY
13
+ CHECK (length(validation_rule_id) = 36),
14
+ validation_profile_id CHAR(36) NOT NULL
15
+ CHECK (length(validation_profile_id) = 36),
16
+ rule_id VARCHAR(256) NOT NULL,
17
+ provider_module VARCHAR(256) NOT NULL,
18
+ validation_type_code VARCHAR(64) NOT NULL,
19
+ execution_mode_code VARCHAR(64) NOT NULL,
20
+ severity_code VARCHAR(64) NOT NULL,
21
+ applies_to_type_code VARCHAR(128) NOT NULL,
22
+ applies_to_ref VARCHAR(256),
23
+ source_component_ref VARCHAR(256),
24
+ parameters_json JSON
25
+ CHECK (parameters_json IS NULL OR json_valid(parameters_json)),
26
+ message TEXT NOT NULL,
27
+ remediation TEXT,
28
+ sort_order INTEGER NOT NULL DEFAULT 0,
29
+ created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
30
+ updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
31
+ metadata_json JSON
32
+ CHECK (metadata_json IS NULL OR json_valid(metadata_json)),
33
+ FOREIGN KEY (validation_profile_id)
34
+ REFERENCES validation_contract_profiles (validation_profile_id)
35
+ ON DELETE CASCADE,
36
+ UNIQUE (validation_profile_id, rule_id)
37
+ )
38
+ ```
39
+
40
+ </details>
41
+
42
+ ## Columns
43
+
44
+ | Name | Type | Default | Nullable | Parents |
45
+ | --------------------- | ------------ | ----------------- | -------- | --------------------------------------------------------------- |
46
+ | validation_rule_id | CHAR(36) | | true | |
47
+ | validation_profile_id | CHAR(36) | | false | [validation_contract_profiles](validation_contract_profiles.md) |
48
+ | rule_id | VARCHAR(256) | | false | |
49
+ | provider_module | VARCHAR(256) | | false | |
50
+ | validation_type_code | VARCHAR(64) | | false | |
51
+ | execution_mode_code | VARCHAR(64) | | false | |
52
+ | severity_code | VARCHAR(64) | | false | |
53
+ | applies_to_type_code | VARCHAR(128) | | false | |
54
+ | applies_to_ref | VARCHAR(256) | | true | |
55
+ | source_component_ref | VARCHAR(256) | | true | |
56
+ | parameters_json | JSON | | true | |
57
+ | message | TEXT | | false | |
58
+ | remediation | TEXT | | true | |
59
+ | sort_order | INTEGER | 0 | false | |
60
+ | created_at | DATETIME | CURRENT_TIMESTAMP | false | |
61
+ | updated_at | DATETIME | CURRENT_TIMESTAMP | false | |
62
+ | metadata_json | JSON | | true | |
63
+
64
+ ## Constraints
65
+
66
+ | Name | Type | Definition |
67
+ | -------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
68
+ | validation_rule_id | PRIMARY KEY | PRIMARY KEY (validation_rule_id) |
69
+ | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (validation_profile_id) REFERENCES validation_contract_profiles (validation_profile_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
70
+ | sqlite_autoindex_validation_contract_rules_2 | UNIQUE | UNIQUE (validation_profile_id, rule_id) |
71
+ | sqlite_autoindex_validation_contract_rules_1 | PRIMARY KEY | PRIMARY KEY (validation_rule_id) |
72
+ | - | CHECK | CHECK (length(validation_rule_id) = 36) |
73
+ | - | CHECK | CHECK (length(validation_profile_id) = 36) |
74
+ | - | CHECK | CHECK (parameters_json IS NULL OR json_valid(parameters_json)) |
75
+ | - | CHECK | CHECK (metadata_json IS NULL OR json_valid(metadata_json)) |
76
+
77
+ ## Indexes
78
+
79
+ | Name | Definition |
80
+ | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
81
+ | idx_validation_contract_rules_profile | CREATE INDEX idx_validation_contract_rules_profile<br /> ON validation_contract_rules (validation_profile_id) |
82
+ | sqlite_autoindex_validation_contract_rules_2 | UNIQUE (validation_profile_id, rule_id) |
83
+ | sqlite_autoindex_validation_contract_rules_1 | PRIMARY KEY (validation_rule_id) |
84
+
85
+ ## Relations
86
+
87
+ ![er](validation_contract_rules.svg)
88
+
89
+ ---
90
+
91
+ > Generated by [tbls](https://github.com/k1LoW/tbls)
@@ -0,0 +1,52 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <!-- Generated by graphviz version 12.1.2 (20240928.0832)
5
+ -->
6
+ <!-- Title: validation_contract_rules Pages: 1 -->
7
+ <svg width="449pt" height="438pt"
8
+ viewBox="0.00 0.00 449.20 438.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
+ <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 434)">
10
+ <title>validation_contract_rules</title>
11
+ <polygon fill="white" stroke="none" points="-4,4 -4,-434 445.2,-434 445.2,4 -4,4"/>
12
+ <!-- validation_contract_rules -->
13
+ <g id="node1" class="node">
14
+ <title>validation_contract_rules</title>
15
+ <polygon fill="#efefef" stroke="none" points="64.21,-337.8 64.21,-383.8 376.99,-383.8 376.99,-337.8 64.21,-337.8"/>
16
+ <polygon fill="none" stroke="black" points="64.21,-337.8 64.21,-383.8 376.99,-383.8 376.99,-337.8 64.21,-337.8"/>
17
+ <text text-anchor="start" x="94.5" y="-361.6" font-family="Arial Bold" font-size="18.00">validation_contract_rules</text>
18
+ <text text-anchor="start" x="277.44" y="-361.6" font-family="Arial" font-size="14.00">    </text>
19
+ <text text-anchor="start" x="308.56" y="-361.6" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
20
+ <text text-anchor="start" x="71.21" y="-347.2" font-family="Arial" font-size="14.00" fill="#333333">validation profile에 포함된 rule contract를 관리한다.</text>
21
+ <polygon fill="none" stroke="black" points="64.21,-307 64.21,-337.8 376.99,-337.8 376.99,-307 64.21,-307"/>
22
+ <text text-anchor="start" x="71.21" y="-319.2" font-family="Arial" font-size="14.00">validation_rule_id </text>
23
+ <text text-anchor="start" x="184.06" y="-319.2" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
24
+ <polygon fill="none" stroke="black" points="64.21,-276.2 64.21,-307 376.99,-307 376.99,-276.2 64.21,-276.2"/>
25
+ <text text-anchor="start" x="71.21" y="-288.4" font-family="Arial" font-size="14.00">validation_profile_id </text>
26
+ <text text-anchor="start" x="198.85" y="-288.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
27
+ <polygon fill="none" stroke="black" stroke-width="3" points="62.71,-274.7 62.71,-385.3 378.49,-385.3 378.49,-274.7 62.71,-274.7"/>
28
+ </g>
29
+ <!-- validation_contract_profiles -->
30
+ <g id="node2" class="node">
31
+ <title>validation_contract_profiles</title>
32
+ <polygon fill="#efefef" stroke="none" points="43.2,-104.8 43.2,-150.8 398,-150.8 398,-104.8 43.2,-104.8"/>
33
+ <polygon fill="none" stroke="black" points="43.2,-104.8 43.2,-150.8 398,-150.8 398,-104.8 43.2,-104.8"/>
34
+ <text text-anchor="start" x="84.51" y="-128.6" font-family="Arial Bold" font-size="18.00">validation_contract_profiles</text>
35
+ <text text-anchor="start" x="287.44" y="-128.6" font-family="Arial" font-size="14.00">    </text>
36
+ <text text-anchor="start" x="318.55" y="-128.6" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
37
+ <text text-anchor="start" x="50.2" y="-114.2" font-family="Arial" font-size="14.00" fill="#333333">provider manifest가 제공하는 validation profile을 관리한다.</text>
38
+ <polygon fill="none" stroke="black" points="43.2,-74 43.2,-104.8 398,-104.8 398,-74 43.2,-74"/>
39
+ <text text-anchor="start" x="50.2" y="-86.2" font-family="Arial" font-size="14.00">validation_profile_id </text>
40
+ <text text-anchor="start" x="177.84" y="-86.2" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
41
+ <polygon fill="none" stroke="black" points="43.2,-43.2 43.2,-74 398,-74 398,-43.2 43.2,-43.2"/>
42
+ <text text-anchor="start" x="50.2" y="-55.4" font-family="Arial" font-size="14.00">provider_manifest_id </text>
43
+ <text text-anchor="start" x="184.05" y="-55.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
44
+ </g>
45
+ <!-- validation_contract_rules&#45;&gt;validation_contract_profiles -->
46
+ <g id="edge1" class="edge">
47
+ <title>validation_contract_rules:validation_profile_id&#45;&gt;validation_contract_profiles:validation_profile_id</title>
48
+ <path fill="none" stroke="black" d="M221.3,-264.91C231.64,-194.93 352.83,-263.62 398,-194 423.3,-155 445.49,-89.4 399,-89.4"/>
49
+ <polygon fill="black" stroke="black" points="221.31,-264.89 216.13,-274.56 220.94,-270.21 220.65,-274.53 220.65,-274.53 220.65,-274.53 220.94,-270.21 225.11,-275.17 221.31,-264.89"/>
50
+ </g>
51
+ </g>
52
+ </svg>
@@ -0,0 +1,47 @@
1
+ # validation_contract_schema_migrations
2
+
3
+ ## Description
4
+
5
+ validation contract registry migration 적용 이력을 관리한다.
6
+
7
+ <details>
8
+ <summary><strong>Table Definition</strong></summary>
9
+
10
+ ```sql
11
+ CREATE TABLE validation_contract_schema_migrations (
12
+ migration_id VARCHAR(128) PRIMARY KEY,
13
+ migration_name VARCHAR(256) NOT NULL,
14
+ applied_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
15
+ )
16
+ ```
17
+
18
+ </details>
19
+
20
+ ## Columns
21
+
22
+ | Name | Type | Default | Nullable |
23
+ | -------------- | ------------ | ----------------- | -------- |
24
+ | migration_id | VARCHAR(128) | | true |
25
+ | migration_name | VARCHAR(256) | | false |
26
+ | applied_at | DATETIME | CURRENT_TIMESTAMP | false |
27
+
28
+ ## Constraints
29
+
30
+ | Name | Type | Definition |
31
+ | -------------------------------------------------------- | ----------- | -------------------------- |
32
+ | migration_id | PRIMARY KEY | PRIMARY KEY (migration_id) |
33
+ | sqlite_autoindex_validation_contract_schema_migrations_1 | PRIMARY KEY | PRIMARY KEY (migration_id) |
34
+
35
+ ## Indexes
36
+
37
+ | Name | Definition |
38
+ | -------------------------------------------------------- | -------------------------- |
39
+ | sqlite_autoindex_validation_contract_schema_migrations_1 | PRIMARY KEY (migration_id) |
40
+
41
+ ## Relations
42
+
43
+ ![er](validation_contract_schema_migrations.svg)
44
+
45
+ ---
46
+
47
+ > Generated by [tbls](https://github.com/k1LoW/tbls)
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <!-- Generated by graphviz version 12.1.2 (20240928.0832)
5
+ -->
6
+ <!-- Title: validation_contract_schema_migrations Pages: 1 -->
7
+ <svg width="472pt" height="177pt"
8
+ viewBox="0.00 0.00 471.57 177.20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
+ <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 173.2)">
10
+ <title>validation_contract_schema_migrations</title>
11
+ <polygon fill="white" stroke="none" points="-4,4 -4,-173.2 467.57,-173.2 467.57,4 -4,4"/>
12
+ <!-- validation_contract_schema_migrations -->
13
+ <g id="node1" class="node">
14
+ <title>validation_contract_schema_migrations</title>
15
+ <polygon fill="#efefef" stroke="none" points="46.2,-77 46.2,-123 417.37,-123 417.37,-77 46.2,-77"/>
16
+ <polygon fill="none" stroke="black" points="46.2,-77 46.2,-123 417.37,-123 417.37,-77 46.2,-77"/>
17
+ <text text-anchor="start" x="53.2" y="-100.8" font-family="Arial Bold" font-size="18.00">validation_contract_schema_migrations</text>
18
+ <text text-anchor="start" x="341.11" y="-100.8" font-family="Arial" font-size="14.00">    </text>
19
+ <text text-anchor="start" x="372.23" y="-100.8" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
20
+ <text text-anchor="start" x="59.45" y="-86.4" font-family="Arial" font-size="14.00" fill="#333333">validation contract registry migration 적용 이력을 관리한다.</text>
21
+ <polygon fill="none" stroke="black" points="46.2,-46.2 46.2,-77 417.37,-77 417.37,-46.2 46.2,-46.2"/>
22
+ <text text-anchor="start" x="53.2" y="-58.4" font-family="Arial" font-size="14.00">migration_id </text>
23
+ <text text-anchor="start" x="133.35" y="-58.4" font-family="Arial" font-size="14.00" fill="#666666">[VARCHAR(128)]</text>
24
+ <polygon fill="none" stroke="black" stroke-width="3" points="44.7,-44.7 44.7,-124.5 418.87,-124.5 418.87,-44.7 44.7,-44.7"/>
25
+ </g>
26
+ </g>
27
+ </svg>