@soddong/agentic-domain-artifact 0.7.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.
- package/.tbls.yml +46 -0
- package/CHANGELOG.md +53 -0
- package/README.md +254 -0
- package/dist/database.d.ts +8 -0
- package/dist/database.d.ts.map +1 -0
- package/dist/database.js +76 -0
- package/dist/database.js.map +1 -0
- package/dist/fixtures.d.ts +7 -0
- package/dist/fixtures.d.ts.map +1 -0
- package/dist/fixtures.js +88 -0
- package/dist/fixtures.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/repositories.d.ts +29 -0
- package/dist/repositories.d.ts.map +1 -0
- package/dist/repositories.js +305 -0
- package/dist/repositories.js.map +1 -0
- package/dist/seed-apply.d.ts +22 -0
- package/dist/seed-apply.d.ts.map +1 -0
- package/dist/seed-apply.js +150 -0
- package/dist/seed-apply.js.map +1 -0
- package/dist/service.d.ts +32 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +282 -0
- package/dist/service.js.map +1 -0
- package/dist/types.d.ts +264 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/docs/build.md +19 -0
- package/docs/configuration.md +27 -0
- package/docs/delivery.md +22 -0
- package/docs/operations.md +27 -0
- package/docs/publishing.md +29 -0
- package/docs/schema/generated/README.md +28 -0
- package/docs/schema/generated/artifact_code_groups.md +57 -0
- package/docs/schema/generated/artifact_code_groups.svg +49 -0
- package/docs/schema/generated/artifact_codes.md +71 -0
- package/docs/schema/generated/artifact_codes.svg +49 -0
- package/docs/schema/generated/artifact_component_instances.md +79 -0
- package/docs/schema/generated/artifact_component_instances.svg +177 -0
- package/docs/schema/generated/artifact_instances.md +79 -0
- package/docs/schema/generated/artifact_instances.svg +177 -0
- package/docs/schema/generated/artifact_resource_links.md +89 -0
- package/docs/schema/generated/artifact_resource_links.svg +74 -0
- package/docs/schema/generated/artifact_review_decision_refs.md +89 -0
- package/docs/schema/generated/artifact_review_decision_refs.svg +102 -0
- package/docs/schema/generated/artifact_schema_migrations.md +47 -0
- package/docs/schema/generated/artifact_schema_migrations.svg +27 -0
- package/docs/schema/generated/artifact_status_events.md +96 -0
- package/docs/schema/generated/artifact_status_events.svg +102 -0
- package/docs/schema/generated/artifact_trace_links.md +93 -0
- package/docs/schema/generated/artifact_trace_links.svg +74 -0
- package/docs/schema/generated/artifact_validation_result_refs.md +82 -0
- package/docs/schema/generated/artifact_validation_result_refs.svg +74 -0
- package/docs/schema/generated/schema.json +1799 -0
- package/docs/schema/generated/schema.mmd +132 -0
- package/docs/schema/generated/schema.svg +260 -0
- package/docs/usage.md +190 -0
- package/package.json +28 -0
- package/src/database/migrations/0001_artifact_base.sql +345 -0
package/.tbls.yml
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: agentic-domain-artifact
|
|
2
|
+
desc: Agentic Platform artifact instance domain database.
|
|
3
|
+
|
|
4
|
+
dsn: ${AGENTIC_DOMAIN_ARTIFACT_SCHEMA_DSN}
|
|
5
|
+
docPath: ${AGENTIC_DOMAIN_ARTIFACT_SCHEMA_DOC_PATH}
|
|
6
|
+
|
|
7
|
+
format:
|
|
8
|
+
adjust: true
|
|
9
|
+
sort: false
|
|
10
|
+
number: false
|
|
11
|
+
hideColumnsWithoutValues: true
|
|
12
|
+
|
|
13
|
+
er:
|
|
14
|
+
skip: false
|
|
15
|
+
format: svg
|
|
16
|
+
comment: true
|
|
17
|
+
hideDef: true
|
|
18
|
+
showColumnTypes:
|
|
19
|
+
related: true
|
|
20
|
+
primary: true
|
|
21
|
+
distance: 1
|
|
22
|
+
|
|
23
|
+
include:
|
|
24
|
+
- artifact_*
|
|
25
|
+
|
|
26
|
+
comments:
|
|
27
|
+
- table: artifact_schema_migrations
|
|
28
|
+
tableComment: artifact 패키지의 migration 적용 이력을 관리한다.
|
|
29
|
+
- table: artifact_code_groups
|
|
30
|
+
tableComment: 코드 그룹을 정의한다.
|
|
31
|
+
- table: artifact_codes
|
|
32
|
+
tableComment: 코드 그룹별 코드 값을 정의한다.
|
|
33
|
+
- table: artifact_instances
|
|
34
|
+
tableComment: 실제 산출물 instance를 관리한다.
|
|
35
|
+
- table: artifact_component_instances
|
|
36
|
+
tableComment: 실제 산출물 안의 본문, 부록 등 component instance를 관리한다.
|
|
37
|
+
- table: artifact_resource_links
|
|
38
|
+
tableComment: 산출물 instance 또는 component instance와 document/file/resource를 연결한다.
|
|
39
|
+
- table: artifact_trace_links
|
|
40
|
+
tableComment: 실제 산출물 instance와 방법론, 산출물 표준, 외부 실행 결과 간 trace를 관리한다.
|
|
41
|
+
- table: artifact_validation_result_refs
|
|
42
|
+
tableComment: validation 실행 결과의 외부 참조를 관리한다.
|
|
43
|
+
- table: artifact_review_decision_refs
|
|
44
|
+
tableComment: 산출물 instance 또는 component에 대한 검토 결정 외부 참조를 관리한다.
|
|
45
|
+
- table: artifact_status_events
|
|
46
|
+
tableComment: 산출물 instance 또는 component의 상태 전이 이력을 관리한다.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
- `sampleExecution` seed section을 처리하는 `applyAgenticSeed()` handler를 추가한다.
|
|
6
|
+
- AI-Agent SDLC Build Planning seed bundle의 sample execution placeholder를 artifact instance로 등록할 수 있게 한다.
|
|
7
|
+
- sample execution의 methodology, lifecycle, phase, process, project 참조를 `artifact_trace_links`에 보존한다.
|
|
8
|
+
- sample execution seed apply idempotency dev-test를 추가한다.
|
|
9
|
+
|
|
10
|
+
## 0.6.0
|
|
11
|
+
|
|
12
|
+
- `ArtifactService.createArtifactInstanceFromActivityOutputs()` API를 추가한다.
|
|
13
|
+
- methodology Activity output DTO를 기준으로 artifact instance, component instance, trace link, resource link를 한 번에 생성할 수 있게 한다.
|
|
14
|
+
- `ArtifactService.bindDocumentToArtifactComponent()` API를 추가한다.
|
|
15
|
+
- ADoc `documentId`를 artifact component의 primary `DOCUMENT_ID` resource로 연결하는 표준 helper를 제공한다.
|
|
16
|
+
- artifact 자체 dev-test와 4모듈 통합 dev-test가 신규 helper를 사용하도록 보강한다.
|
|
17
|
+
|
|
18
|
+
## 0.5.0
|
|
19
|
+
|
|
20
|
+
- `ArtifactStatusEvent` 모델과 `artifact_status_events` 테이블을 추가한다.
|
|
21
|
+
- `ArtifactService.transitionArtifactStatus()`와 `listArtifactStatusEvents()` API를 추가한다.
|
|
22
|
+
- Artifact instance 단위 lifecycle transition을 지원하고 상태 전이 이력을 기록한다.
|
|
23
|
+
- `in_review -> approved` 전이는 approved review decision ref를 요구한다.
|
|
24
|
+
- `in_review -> draft` 전이는 changes requested review decision ref를 요구한다.
|
|
25
|
+
- Gate Evaluation Helper가 artifact status `approved` 또는 `published` 여부를 함께 확인하게 한다.
|
|
26
|
+
|
|
27
|
+
## 0.4.0
|
|
28
|
+
|
|
29
|
+
- `ArtifactReviewDecisionRef` 모델과 `artifact_review_decision_refs` 테이블을 추가한다.
|
|
30
|
+
- `ArtifactService.addArtifactReviewDecisionRef()`와 `listArtifactReviewDecisionRefs()` API를 추가한다.
|
|
31
|
+
- `ArtifactAggregate`와 handoff resolve 결과에 review decision refs를 포함한다.
|
|
32
|
+
- `resolveArtifactHandoff()`가 `review_decision` required result ref를 approved review decision ref로 해석하게 한다.
|
|
33
|
+
- 4모듈 통합 dev-test에 Gate Evaluation Helper를 추가해 validation result, review decision, handoff readiness를 함께 검증한다.
|
|
34
|
+
|
|
35
|
+
## 0.3.0
|
|
36
|
+
|
|
37
|
+
- Handoff resolve public API를 추가한다.
|
|
38
|
+
- `resolveArtifactHandoff()`로 Handoff 계약에 필요한 artifact instance, component, primary resource, validation result reference를 해석할 수 있게 한다.
|
|
39
|
+
- `findLatestArtifactInstanceByStandard()`로 artifact standard code/version 기준 최신 artifact instance 후보를 조회할 수 있게 한다.
|
|
40
|
+
- Handoff resolve 결과에 missing component/resource/result ref를 구조화해 반환한다.
|
|
41
|
+
|
|
42
|
+
## 0.2.0
|
|
43
|
+
|
|
44
|
+
- SQLite 기반 artifact instance schema를 추가한다.
|
|
45
|
+
- `ArtifactInstance`, `ArtifactComponentInstance`, `ArtifactResourceLink`, `ArtifactTraceLink`, `ArtifactValidationResultRef` 모델을 추가한다.
|
|
46
|
+
- `ArtifactService`와 `ArtifactRepository` 생성/조회 API를 추가한다.
|
|
47
|
+
- Business Process Definition artifact fixture를 추가한다.
|
|
48
|
+
- schema generated docs와 npm publish/consumer 검증 경로를 추가한다.
|
|
49
|
+
|
|
50
|
+
## 0.1.0
|
|
51
|
+
|
|
52
|
+
- Iteration 0 package skeleton을 추가한다.
|
|
53
|
+
- 최소 public package info API를 제공한다.
|
package/README.md
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
# @soddong/agentic-domain-artifact
|
|
2
|
+
|
|
3
|
+
`@soddong/agentic-domain-artifact`는 Agentic Platform의 실제 산출물 instance 도메인 패키지입니다.
|
|
4
|
+
|
|
5
|
+
이 패키지는 산출물 표준을 기반으로 실행 프로젝트에서 생성되는 산출물 instance, component instance, document/file/resource 연결, trace 관계, validation result reference, review decision reference를 소유합니다.
|
|
6
|
+
|
|
7
|
+
## 현재 범위
|
|
8
|
+
|
|
9
|
+
Iteration 0에서는 패키지 skeleton과 Continuous Publish/Delivery 기반을 제공했습니다. 현재는 0.7.0 기준으로 SQLite schema, repository/service, Business Process Definition fixture, Handoff resolve API, review decision reference, lifecycle status event, Activity output 기반 artifact 조립 helper, document binding helper, sampleExecution seed apply handler, schema generated docs를 제공합니다.
|
|
10
|
+
|
|
11
|
+
| 구분 | 상태 |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| 패키지 skeleton | 포함 |
|
|
14
|
+
| 기본 문서 | 포함 |
|
|
15
|
+
| build/typecheck | 포함 |
|
|
16
|
+
| 최소 public API | 포함 |
|
|
17
|
+
| Artifact DB migration | 포함 |
|
|
18
|
+
| Repository/Service | 포함 |
|
|
19
|
+
| Handoff resolve API | Handoff 계약에 필요한 artifact instance/component/resource/result ref 해석 포함 |
|
|
20
|
+
| Review decision reference | 검토/승인 결정 외부 참조 포함 |
|
|
21
|
+
| Lifecycle transition | artifact instance 상태 전이와 status event 이력 포함 |
|
|
22
|
+
| Activity output assembly | methodology Activity output DTO 기반 artifact/component/resource/trace 생성 helper 포함 |
|
|
23
|
+
| Document binding helper | ADoc documentId를 component primary DOCUMENT_ID resource로 연결하는 helper 포함 |
|
|
24
|
+
| Seed apply handler | `sampleExecution` placeholder artifact 등록 포함 |
|
|
25
|
+
| Fixture | Business Process Definition 예시 포함 |
|
|
26
|
+
| Validator | 후속 iteration |
|
|
27
|
+
| Agent contribution | 후속 iteration |
|
|
28
|
+
| CLI | 1차 구현 제외 |
|
|
29
|
+
| Adapter | 1차 구현 제외 |
|
|
30
|
+
|
|
31
|
+
## 도메인 책임
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
@soddong/agentic-domain-artifact
|
|
35
|
+
- Artifact Instance
|
|
36
|
+
- Artifact Component Instance
|
|
37
|
+
- Artifact Resource Link
|
|
38
|
+
- Artifact Trace Link
|
|
39
|
+
- Artifact Validation Result Reference
|
|
40
|
+
- Artifact Review Decision Reference
|
|
41
|
+
- Artifact Status Event
|
|
42
|
+
- Artifact status
|
|
43
|
+
- Artifact document binding
|
|
44
|
+
- Artifact review/approval lifecycle
|
|
45
|
+
- Artifact trace
|
|
46
|
+
- Artifact output metadata
|
|
47
|
+
- Sample execution placeholder
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 제외 범위
|
|
51
|
+
|
|
52
|
+
| 제외 항목 | 담당 후보 |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| 산출물 표준 정의 | `@soddong/agentic-domain-artifact-standard` |
|
|
55
|
+
| Document 저장 구조 | `@soddong/agentic-domain-document` |
|
|
56
|
+
| Methodology Activity/Stage 요구 관계 | `@soddong/agentic-domain-methodology` |
|
|
57
|
+
| 검증 실행 엔진 | `@soddong/agentic-capability-validation` |
|
|
58
|
+
| Render 실행 | `@soddong/agentic-capability-render` |
|
|
59
|
+
|
|
60
|
+
## 기본 API 예시
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import {
|
|
64
|
+
ArtifactService,
|
|
65
|
+
initializeArtifactDatabase,
|
|
66
|
+
openArtifactDatabase,
|
|
67
|
+
getArtifactPackageInfo
|
|
68
|
+
} from "@soddong/agentic-domain-artifact";
|
|
69
|
+
|
|
70
|
+
console.log(getArtifactPackageInfo());
|
|
71
|
+
|
|
72
|
+
const init = initializeArtifactDatabase({ projectRoot: process.cwd() });
|
|
73
|
+
console.log(init.tables);
|
|
74
|
+
|
|
75
|
+
const db = openArtifactDatabase({ projectRoot: process.cwd() });
|
|
76
|
+
const service = new ArtifactService(db);
|
|
77
|
+
|
|
78
|
+
const artifact = service.createArtifactInstance({
|
|
79
|
+
artifactCode: "component-a-business-process-definition",
|
|
80
|
+
artifactName: "A컴포넌트 비즈니스 프로세스 정의서",
|
|
81
|
+
artifactStandardCode: "business_process_definition",
|
|
82
|
+
artifactStandardVersion: "1.0.0"
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const appendix = service.addArtifactComponentInstance({
|
|
86
|
+
artifactInstanceId: artifact.artifactInstanceId,
|
|
87
|
+
artifactComponentCode: "appendix_l3_process",
|
|
88
|
+
artifactComponentRoleCode: "APPENDIX",
|
|
89
|
+
componentInstanceName: "A컴포넌트 L3 프로세스 부록"
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
service.addArtifactResourceLink({
|
|
93
|
+
artifactInstanceId: artifact.artifactInstanceId,
|
|
94
|
+
artifactComponentInstanceId: appendix.artifactComponentInstanceId,
|
|
95
|
+
resourceTypeCode: "DOCUMENT_ID",
|
|
96
|
+
resourceRef: "adoc-document-id-for-appendix-l3-process",
|
|
97
|
+
isPrimary: true
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
service.addArtifactReviewDecisionRef({
|
|
101
|
+
artifactInstanceId: artifact.artifactInstanceId,
|
|
102
|
+
reviewScopeCode: "artifact_instance",
|
|
103
|
+
decisionCode: "approved",
|
|
104
|
+
reviewerRef: "user://reviewer",
|
|
105
|
+
decisionReason: "후행 Stage 전달을 승인한다.",
|
|
106
|
+
decisionResultRef: "execution://review/component-a-business-process-definition/0.1.0"
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const aggregate = service.getArtifactAggregate(artifact.artifactInstanceId);
|
|
110
|
+
console.log(aggregate.components);
|
|
111
|
+
|
|
112
|
+
db.close();
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Activity Output 기반 조립 예시
|
|
116
|
+
|
|
117
|
+
`artifact`는 `methodology` 패키지를 직접 의존하지 않습니다. runtime/application layer가 methodology Activity output을 중립 DTO로 변환해 전달하면, `artifact`는 실제 artifact instance, component instance, resource link, trace link를 생성합니다.
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
const created = service.createArtifactInstanceFromActivityOutputs({
|
|
121
|
+
artifact: {
|
|
122
|
+
artifactCode: "component-a-business-process-definition",
|
|
123
|
+
artifactName: "A컴포넌트 비즈니스 프로세스 정의서",
|
|
124
|
+
artifactStandardCode: "business_process_definition",
|
|
125
|
+
artifactStandardVersion: "1.0.0"
|
|
126
|
+
},
|
|
127
|
+
activityOutputs: [
|
|
128
|
+
{
|
|
129
|
+
sourceRefId: "methodology-activity-output-main",
|
|
130
|
+
artifactComponentCode: "main_document",
|
|
131
|
+
artifactComponentRoleCode: "MAIN",
|
|
132
|
+
componentInstanceName: "본문",
|
|
133
|
+
resource: {
|
|
134
|
+
resourceTypeCode: "DOCUMENT_ID",
|
|
135
|
+
resourceRef: "adoc-document-id-main",
|
|
136
|
+
isPrimary: true
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
sourceRefId: "methodology-activity-output-l3",
|
|
141
|
+
artifactComponentCode: "appendix_l3_process",
|
|
142
|
+
artifactComponentRoleCode: "APPENDIX",
|
|
143
|
+
componentInstanceName: "L3 프로세스 부록",
|
|
144
|
+
resource: {
|
|
145
|
+
resourceTypeCode: "DOCUMENT_ID",
|
|
146
|
+
resourceRef: "adoc-document-id-l3",
|
|
147
|
+
isPrimary: true
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
console.log(created.aggregate.components);
|
|
154
|
+
console.log(created.aggregate.traceLinks);
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
기존 component에 ADoc document를 나중에 연결해야 하는 경우에는 `bindDocumentToArtifactComponent()`를 사용합니다.
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
service.bindDocumentToArtifactComponent({
|
|
161
|
+
artifactInstanceId: created.artifact.artifactInstanceId,
|
|
162
|
+
artifactComponentInstanceId: created.components[0].artifactComponentInstanceId,
|
|
163
|
+
documentId: "adoc-document-id-main",
|
|
164
|
+
metadata: {
|
|
165
|
+
documentProfileCode: "business_process_definition.main_document"
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Handoff Resolve API 예시
|
|
171
|
+
|
|
172
|
+
`artifact`는 `methodology`가 정의한 Handoff Requirement 자체를 소유하지 않습니다. 대신 runtime/application 계층이 Handoff Requirement에서 필요한 값을 중립 DTO로 변환해 전달하면, `artifact`는 실제 artifact instance, component instance, resource link, validation result reference, review decision reference를 해석합니다.
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
const handoff = service.resolveArtifactHandoff({
|
|
176
|
+
artifactStandardCode: "business_process_definition",
|
|
177
|
+
artifactStandardVersion: "1.0.0",
|
|
178
|
+
requiredComponentCodes: [
|
|
179
|
+
"main_document",
|
|
180
|
+
"appendix_l3_process",
|
|
181
|
+
"appendix_scenario",
|
|
182
|
+
"appendix_l4_detail"
|
|
183
|
+
],
|
|
184
|
+
requiredResultRefs: [
|
|
185
|
+
"validation_result",
|
|
186
|
+
"review_decision"
|
|
187
|
+
],
|
|
188
|
+
requiredResourceTypeCode: "DOCUMENT_ID"
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
if (!handoff.resolved) {
|
|
192
|
+
console.log(handoff.missing);
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
이 API는 document 본문을 조회하지 않습니다. 반환된 `DOCUMENT_ID` resource는 `@soddong/agentic-domain-document`의 reader/service가 해석합니다.
|
|
197
|
+
|
|
198
|
+
## Sample Execution Seed Apply 예시
|
|
199
|
+
|
|
200
|
+
AI-Agent SDLC seed bundle의 `sampleExecution`은 실제 산출물 본문이 아니라 seed 적용 가능성을 검증하는 최소 실행 placeholder입니다. `artifact`는 이를 `sample_execution` 표준을 가진 artifact instance로 등록하고, 방법론/프로세스/프로젝트 참조를 trace link로 보존합니다.
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
import { applyAgenticSeed } from "@soddong/agentic-domain-artifact";
|
|
204
|
+
|
|
205
|
+
await applyAgenticSeed({
|
|
206
|
+
sourcePackageName: "@soddong/agentic-methodology-ai-agent-sdlc",
|
|
207
|
+
sourcePackageVersion: "0.2.0",
|
|
208
|
+
bundleCode: "ai-agent-sdlc-build-planning",
|
|
209
|
+
bundleVersion: "0.2.0",
|
|
210
|
+
methodologyCode: "ai_agent_sdlc",
|
|
211
|
+
sourceSection: "sampleExecution",
|
|
212
|
+
targetOperation: "prepare_sample_execution",
|
|
213
|
+
itemKey: "ai_agent_sdlc_build_planning_minimal_sample",
|
|
214
|
+
mode: "apply",
|
|
215
|
+
itemPayload: {
|
|
216
|
+
sampleCode: "ai_agent_sdlc_build_planning_minimal_sample",
|
|
217
|
+
methodologyCode: "ai_agent_sdlc",
|
|
218
|
+
lifecycleCode: "incremental_build_lifecycle",
|
|
219
|
+
phaseCode: "build_planning_phase",
|
|
220
|
+
processCode: "build_planning_process",
|
|
221
|
+
projectCode: "sample-ai-agent-sdlc-build-planning-project"
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## 모듈 경계
|
|
227
|
+
|
|
228
|
+
`artifact`는 실제 산출물 instance를 관리합니다. 산출물 표준의 본문/부록 구조는 `artifact-standard`가 정의하고, 실제 document 본문 저장은 `document`가 담당합니다.
|
|
229
|
+
|
|
230
|
+
```text
|
|
231
|
+
artifact-standard
|
|
232
|
+
business_process_definition@1.0.0
|
|
233
|
+
DocumentComponent: appendix_l3_process
|
|
234
|
+
|
|
235
|
+
methodology
|
|
236
|
+
Activity output:
|
|
237
|
+
artifactStandardCode: business_process_definition
|
|
238
|
+
artifactComponentCode: appendix_l3_process
|
|
239
|
+
|
|
240
|
+
artifact
|
|
241
|
+
ArtifactInstance:
|
|
242
|
+
component-a-business-process-definition@0.1.0
|
|
243
|
+
ArtifactComponentInstance:
|
|
244
|
+
main_document
|
|
245
|
+
appendix_l3_process
|
|
246
|
+
appendix_scenario
|
|
247
|
+
appendix_l4_detail
|
|
248
|
+
ArtifactResourceLink:
|
|
249
|
+
DOCUMENT_ID adoc-document-id-for-each-component
|
|
250
|
+
ArtifactTraceLink:
|
|
251
|
+
produced_by methodology_activity_artifact_requirement
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
최신 조립 기준에서는 하나의 Stage 안에서 산출물 구성 요소별 Activity output을 생성하고, `artifact`가 각 output에 대응하는 component instance, `DOCUMENT_ID` resource link, trace link를 관리합니다.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import Database from "better-sqlite3";
|
|
2
|
+
import type { ArtifactDatabaseInitResult, ArtifactDatabaseOptions } from "./types.js";
|
|
3
|
+
export declare function resolveArtifactDatabasePath(options?: ArtifactDatabaseOptions): string;
|
|
4
|
+
export declare function listArtifactTables(db: Database.Database): string[];
|
|
5
|
+
export declare function applyArtifactBaseMigration(db: Database.Database): void;
|
|
6
|
+
export declare function openArtifactDatabase(options?: ArtifactDatabaseOptions): Database.Database;
|
|
7
|
+
export declare function initializeArtifactDatabase(options?: ArtifactDatabaseOptions): ArtifactDatabaseInitResult;
|
|
8
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAGtC,OAAO,KAAK,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAuBtF,wBAAgB,2BAA2B,CAAC,OAAO,GAAE,uBAA4B,GAAG,MAAM,CAiBzF;AAOD,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,MAAM,EAAE,CAYlE;AAED,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAEtE;AAED,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,uBAA4B,GAAG,QAAQ,CAAC,QAAQ,CAkB7F;AAED,wBAAgB,0BAA0B,CAAC,OAAO,GAAE,uBAA4B,GAAG,0BAA0B,CAc5G"}
|
package/dist/database.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import Database from "better-sqlite3";
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync } from "node:fs";
|
|
3
|
+
import { dirname, isAbsolute, join } from "node:path";
|
|
4
|
+
const DEFAULT_DATABASE_PATH = ".agentic/platform.sqlite";
|
|
5
|
+
function readProjectConfig(projectRoot) {
|
|
6
|
+
const configPath = join(projectRoot, "agentic.config.json");
|
|
7
|
+
if (!existsSync(configPath)) {
|
|
8
|
+
return {};
|
|
9
|
+
}
|
|
10
|
+
return JSON.parse(readFileSync(configPath, "utf8"));
|
|
11
|
+
}
|
|
12
|
+
export function resolveArtifactDatabasePath(options = {}) {
|
|
13
|
+
if (options.databasePath !== undefined) {
|
|
14
|
+
return isAbsolute(options.databasePath)
|
|
15
|
+
? options.databasePath
|
|
16
|
+
: join(options.projectRoot ?? process.cwd(), options.databasePath);
|
|
17
|
+
}
|
|
18
|
+
const projectRoot = options.projectRoot ?? process.cwd();
|
|
19
|
+
const config = readProjectConfig(projectRoot);
|
|
20
|
+
const database = config.runtime?.database;
|
|
21
|
+
if (database?.type !== undefined && database.type !== "sqlite") {
|
|
22
|
+
throw new Error(`Unsupported artifact database type: ${database.type}`);
|
|
23
|
+
}
|
|
24
|
+
const configuredPath = database?.path ?? DEFAULT_DATABASE_PATH;
|
|
25
|
+
return isAbsolute(configuredPath) ? configuredPath : join(projectRoot, configuredPath);
|
|
26
|
+
}
|
|
27
|
+
function readArtifactBaseMigration() {
|
|
28
|
+
const migrationUrl = new URL("../src/database/migrations/0001_artifact_base.sql", import.meta.url);
|
|
29
|
+
return readFileSync(migrationUrl, "utf8");
|
|
30
|
+
}
|
|
31
|
+
export function listArtifactTables(db) {
|
|
32
|
+
const rows = db
|
|
33
|
+
.prepare(`SELECT name
|
|
34
|
+
FROM sqlite_master
|
|
35
|
+
WHERE type = 'table'
|
|
36
|
+
AND name LIKE 'artifact_%'
|
|
37
|
+
ORDER BY name`)
|
|
38
|
+
.all();
|
|
39
|
+
return rows.map((row) => row.name);
|
|
40
|
+
}
|
|
41
|
+
export function applyArtifactBaseMigration(db) {
|
|
42
|
+
db.exec(readArtifactBaseMigration());
|
|
43
|
+
}
|
|
44
|
+
export function openArtifactDatabase(options = {}) {
|
|
45
|
+
const databasePath = resolveArtifactDatabasePath(options);
|
|
46
|
+
mkdirSync(dirname(databasePath), { recursive: true });
|
|
47
|
+
const db = new Database(databasePath);
|
|
48
|
+
try {
|
|
49
|
+
db.pragma("journal_mode = WAL");
|
|
50
|
+
db.pragma("foreign_keys = ON");
|
|
51
|
+
if (options.applyMigration !== false) {
|
|
52
|
+
applyArtifactBaseMigration(db);
|
|
53
|
+
}
|
|
54
|
+
return db;
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
db.close();
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export function initializeArtifactDatabase(options = {}) {
|
|
62
|
+
const databasePath = resolveArtifactDatabasePath(options);
|
|
63
|
+
const created = !existsSync(databasePath);
|
|
64
|
+
const db = openArtifactDatabase(options);
|
|
65
|
+
try {
|
|
66
|
+
return {
|
|
67
|
+
databasePath,
|
|
68
|
+
created,
|
|
69
|
+
tables: listArtifactTables(db)
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
db.close();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=database.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.js","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAYtD,MAAM,qBAAqB,GAAG,0BAA0B,CAAC;AAEzD,SAAS,iBAAiB,CAAC,WAAmB;IAC5C,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAC;IAE5D,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC5B,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAkB,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,UAAmC,EAAE;IAC/E,IAAI,OAAO,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC;YACrC,CAAC,CAAC,OAAO,CAAC,YAA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CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,UAAmC,EAAE;IACxE,MAAM,YAAY,GAAG,2BAA2B,CAAC,OAAO,CAAC,CAAC;IAC1D,SAAS,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEtD,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,YAAY,CAAC,CAAC;IACtC,IAAI,CAAC;QACH,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;QAChC,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAE/B,IAAI,OAAO,CAAC,cAAc,KAAK,KAAK,EAAE,CAAC;YACrC,0BAA0B,CAAC,EAAE,CAAC,CAAC;QACjC,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,EAAE,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,UAAmC,EAAE;IAC9E,MAAM,YAAY,GAAG,2BAA2B,CAAC,OAAO,CAAC,CAAC;IAC1D,MAAM,OAAO,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAC1C,MAAM,EAAE,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAEzC,IAAI,CAAC;QACH,OAAO;YACL,YAAY;YACZ,OAAO;YACP,MAAM,EAAE,kBAAkB,CAAC,EAAE,CAAC;SAC/B,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ArtifactService } from "./service.js";
|
|
2
|
+
import type { ArtifactAggregate } from "./types.js";
|
|
3
|
+
export interface BusinessProcessArtifactFixtureResult {
|
|
4
|
+
readonly aggregate: ArtifactAggregate;
|
|
5
|
+
}
|
|
6
|
+
export declare function seedBusinessProcessDefinitionArtifact(service: ArtifactService): BusinessProcessArtifactFixtureResult;
|
|
7
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,WAAW,oCAAoC;IACnD,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;CACvC;AAED,wBAAgB,qCAAqC,CAAC,OAAO,EAAE,eAAe,GAAG,oCAAoC,CA+FpH"}
|
package/dist/fixtures.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export function seedBusinessProcessDefinitionArtifact(service) {
|
|
2
|
+
const artifact = service.createArtifactInstance({
|
|
3
|
+
artifactCode: "component-a-business-process-definition",
|
|
4
|
+
artifactName: "A컴포넌트 비즈니스 프로세스 정의서",
|
|
5
|
+
artifactVersion: "0.1.0",
|
|
6
|
+
artifactStandardCode: "business_process_definition",
|
|
7
|
+
artifactStandardVersion: "1.0.0",
|
|
8
|
+
artifactStatusCode: "draft",
|
|
9
|
+
methodologyActivityId: "11111111-1111-4111-8111-111111111001",
|
|
10
|
+
ownerRoleCode: "business_architect",
|
|
11
|
+
metadata: {
|
|
12
|
+
componentCode: "component-a"
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
const mainDocument = service.addArtifactComponentInstance({
|
|
16
|
+
artifactInstanceId: artifact.artifactInstanceId,
|
|
17
|
+
artifactComponentCode: "main_document",
|
|
18
|
+
artifactComponentRoleCode: "MAIN",
|
|
19
|
+
componentInstanceName: "A컴포넌트 비즈니스 프로세스 정의서 본문",
|
|
20
|
+
componentStatusCode: "draft",
|
|
21
|
+
sortOrder: 10
|
|
22
|
+
});
|
|
23
|
+
const l3Appendix = service.addArtifactComponentInstance({
|
|
24
|
+
artifactInstanceId: artifact.artifactInstanceId,
|
|
25
|
+
artifactComponentCode: "appendix_l3_process",
|
|
26
|
+
artifactComponentRoleCode: "APPENDIX",
|
|
27
|
+
componentInstanceName: "A컴포넌트 L3 프로세스 부록",
|
|
28
|
+
componentStatusCode: "draft",
|
|
29
|
+
sortOrder: 20
|
|
30
|
+
});
|
|
31
|
+
const scenarioAppendix = service.addArtifactComponentInstance({
|
|
32
|
+
artifactInstanceId: artifact.artifactInstanceId,
|
|
33
|
+
artifactComponentCode: "appendix_scenario",
|
|
34
|
+
artifactComponentRoleCode: "APPENDIX",
|
|
35
|
+
componentInstanceName: "A컴포넌트 시나리오 부록",
|
|
36
|
+
componentStatusCode: "draft",
|
|
37
|
+
sortOrder: 30
|
|
38
|
+
});
|
|
39
|
+
service.addArtifactResourceLink({
|
|
40
|
+
artifactInstanceId: artifact.artifactInstanceId,
|
|
41
|
+
artifactComponentInstanceId: mainDocument.artifactComponentInstanceId,
|
|
42
|
+
resourceTypeCode: "DOCUMENT_ID",
|
|
43
|
+
resourceRef: "document-main-component-a-business-process",
|
|
44
|
+
resourceRoleCode: "CONTENT",
|
|
45
|
+
isPrimary: true
|
|
46
|
+
});
|
|
47
|
+
service.addArtifactResourceLink({
|
|
48
|
+
artifactInstanceId: artifact.artifactInstanceId,
|
|
49
|
+
artifactComponentInstanceId: l3Appendix.artifactComponentInstanceId,
|
|
50
|
+
resourceTypeCode: "FILE_PATH",
|
|
51
|
+
resourceRef: "outputs/component-a/business-process/appendix_l3_process.md",
|
|
52
|
+
resourceRoleCode: "CONTENT",
|
|
53
|
+
isPrimary: true
|
|
54
|
+
});
|
|
55
|
+
service.addArtifactResourceLink({
|
|
56
|
+
artifactInstanceId: artifact.artifactInstanceId,
|
|
57
|
+
artifactComponentInstanceId: scenarioAppendix.artifactComponentInstanceId,
|
|
58
|
+
resourceTypeCode: "FILE_PATH",
|
|
59
|
+
resourceRef: "outputs/component-a/business-process/appendix_scenario.md",
|
|
60
|
+
resourceRoleCode: "CONTENT",
|
|
61
|
+
isPrimary: true
|
|
62
|
+
});
|
|
63
|
+
service.addArtifactTraceLink({
|
|
64
|
+
artifactInstanceId: artifact.artifactInstanceId,
|
|
65
|
+
artifactComponentInstanceId: l3Appendix.artifactComponentInstanceId,
|
|
66
|
+
sourceTypeCode: "methodology_activity_artifact_requirement",
|
|
67
|
+
sourceRefId: "11111111-1111-4111-8111-111111111101",
|
|
68
|
+
traceTypeCode: "produced_by",
|
|
69
|
+
artifactStandardCode: artifact.artifactStandardCode,
|
|
70
|
+
artifactStandardVersion: artifact.artifactStandardVersion,
|
|
71
|
+
artifactComponentCode: l3Appendix.artifactComponentCode,
|
|
72
|
+
metadata: {
|
|
73
|
+
activityCode: "component_business_process_definition"
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
service.addArtifactValidationResultRef({
|
|
77
|
+
artifactInstanceId: artifact.artifactInstanceId,
|
|
78
|
+
artifactComponentInstanceId: l3Appendix.artifactComponentInstanceId,
|
|
79
|
+
validationProviderId: "agentic-domain-artifact-standard.validation",
|
|
80
|
+
validationProfileId: "business_process_definition.default",
|
|
81
|
+
validationResultRef: "execution://validation/component-a-business-process-definition/0.1.0",
|
|
82
|
+
validationStatusCode: "not_run"
|
|
83
|
+
});
|
|
84
|
+
return {
|
|
85
|
+
aggregate: service.getArtifactAggregate(artifact.artifactInstanceId)
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,qCAAqC,CAAC,OAAwB;IAC5E,MAAM,QAAQ,GAAG,OAAO,CAAC,sBAAsB,CAAC;QAC9C,YAAY,EAAE,yCAAyC;QACvD,YAAY,EAAE,qBAAqB;QACnC,eAAe,EAAE,OAAO;QACxB,oB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
|
|
1
|
+
export declare const agenticDomainArtifactPackage: {
|
|
2
|
+
readonly name: "@soddong/agentic-domain-artifact";
|
|
3
|
+
readonly version: "0.7.0";
|
|
4
|
+
readonly layer: "domain";
|
|
5
|
+
readonly logicalSchema: "artifact";
|
|
6
|
+
readonly sqliteTablePrefix: "artifact_";
|
|
7
|
+
readonly cli: "not-provided";
|
|
8
|
+
readonly adapter: "not-provided";
|
|
9
|
+
};
|
|
10
|
+
export interface ArtifactPackageInfo {
|
|
11
|
+
readonly name: "@soddong/agentic-domain-artifact";
|
|
12
|
+
readonly version: "0.7.0";
|
|
13
|
+
readonly layer: "domain";
|
|
14
|
+
readonly logicalSchema: "artifact";
|
|
15
|
+
readonly sqliteTablePrefix: "artifact_";
|
|
16
|
+
readonly cli: "not-provided";
|
|
17
|
+
readonly adapter: "not-provided";
|
|
18
|
+
}
|
|
19
|
+
export declare function getArtifactPackageInfo(): ArtifactPackageInfo;
|
|
20
|
+
export { applyArtifactBaseMigration, initializeArtifactDatabase, listArtifactTables, openArtifactDatabase, resolveArtifactDatabasePath } from "./database.js";
|
|
21
|
+
export { seedBusinessProcessDefinitionArtifact } from "./fixtures.js";
|
|
22
|
+
export { ArtifactRepository } from "./repositories.js";
|
|
23
|
+
export { applyAgenticSeed, type AgenticSeedApplyInput, type AgenticSeedApplyResult } from "./seed-apply.js";
|
|
24
|
+
export { ArtifactService } from "./service.js";
|
|
25
|
+
export type * from "./types.js";
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B;;;;;;;;CAQ/B,CAAC;AAEX,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,kCAAkC,CAAC;IAClD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC;IACnC,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC;IACxC,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;CAClC;AAED,wBAAgB,sBAAsB,IAAI,mBAAmB,CAE5D;AAED,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,kBAAkB,EAClB,oBAAoB,EACpB,2BAA2B,EAC5B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,qCAAqC,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,KAAK,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,mBAAmB,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const agenticDomainArtifactPackage = {
|
|
2
|
+
name: "@soddong/agentic-domain-artifact",
|
|
3
|
+
version: "0.7.0",
|
|
4
|
+
layer: "domain",
|
|
5
|
+
logicalSchema: "artifact",
|
|
6
|
+
sqliteTablePrefix: "artifact_",
|
|
7
|
+
cli: "not-provided",
|
|
8
|
+
adapter: "not-provided"
|
|
9
|
+
};
|
|
10
|
+
export function getArtifactPackageInfo() {
|
|
11
|
+
return agenticDomainArtifactPackage;
|
|
12
|
+
}
|
|
13
|
+
export { applyArtifactBaseMigration, initializeArtifactDatabase, listArtifactTables, openArtifactDatabase, resolveArtifactDatabasePath } from "./database.js";
|
|
14
|
+
export { seedBusinessProcessDefinitionArtifact } from "./fixtures.js";
|
|
15
|
+
export { ArtifactRepository } from "./repositories.js";
|
|
16
|
+
export { applyAgenticSeed } from "./seed-apply.js";
|
|
17
|
+
export { ArtifactService } from "./service.js";
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,IAAI,EAAE,kCAAkC;IACxC,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,QAAQ;IACf,aAAa,EAAE,UAAU;IACzB,iBAAiB,EAAE,WAAW;IAC9B,GAAG,EAAE,cAAc;IACnB,OAAO,EAAE,cAAc;CACf,CAAC;AAYX,MAAM,UAAU,sBAAsB;IACpC,OAAO,4BAA4B,CAAC;AACtC,CAAC;AAED,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,kBAAkB,EAClB,oBAAoB,EACpB,2BAA2B,EAC5B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,qCAAqC,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAA2D,MAAM,iBAAiB,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type Database from "better-sqlite3";
|
|
2
|
+
import type { AddArtifactComponentInstanceInput, AddArtifactReviewDecisionRefInput, AddArtifactResourceLinkInput, AddArtifactTraceLinkInput, AddArtifactValidationResultRefInput, ArtifactAggregate, ArtifactComponentInstanceRecord, ArtifactInstanceRecord, ArtifactReviewDecisionRefRecord, ArtifactResourceLinkRecord, ArtifactStatusEventRecord, ArtifactTraceLinkRecord, ArtifactValidationResultRefRecord, CreateArtifactInstanceInput, TransitionArtifactStatusInput } from "./types.js";
|
|
3
|
+
export declare class ArtifactRepository {
|
|
4
|
+
private readonly db;
|
|
5
|
+
constructor(db: Database.Database);
|
|
6
|
+
createArtifactInstance(artifactInstanceId: string, input: CreateArtifactInstanceInput): ArtifactInstanceRecord;
|
|
7
|
+
getArtifactInstance(artifactInstanceId: string): ArtifactInstanceRecord;
|
|
8
|
+
getArtifactInstanceByCodeVersion(artifactCode: string, artifactVersion: string): ArtifactInstanceRecord | undefined;
|
|
9
|
+
findLatestArtifactInstanceByStandard(artifactStandardCode: string, artifactStandardVersion: string): ArtifactInstanceRecord | undefined;
|
|
10
|
+
getArtifactAggregate(artifactInstanceId: string): ArtifactAggregate;
|
|
11
|
+
addArtifactComponentInstance(artifactComponentInstanceId: string, input: AddArtifactComponentInstanceInput): ArtifactComponentInstanceRecord;
|
|
12
|
+
listArtifactComponentInstances(artifactInstanceId: string): ArtifactComponentInstanceRecord[];
|
|
13
|
+
addArtifactResourceLink(artifactResourceLinkId: string, input: AddArtifactResourceLinkInput): ArtifactResourceLinkRecord;
|
|
14
|
+
listArtifactResourceLinks(artifactInstanceId: string): ArtifactResourceLinkRecord[];
|
|
15
|
+
addArtifactTraceLink(artifactTraceLinkId: string, input: AddArtifactTraceLinkInput): ArtifactTraceLinkRecord;
|
|
16
|
+
listArtifactTraceLinks(artifactInstanceId: string): ArtifactTraceLinkRecord[];
|
|
17
|
+
addArtifactValidationResultRef(artifactValidationResultRefId: string, input: AddArtifactValidationResultRefInput): ArtifactValidationResultRefRecord;
|
|
18
|
+
listArtifactValidationResultRefs(artifactInstanceId: string): ArtifactValidationResultRefRecord[];
|
|
19
|
+
addArtifactReviewDecisionRef(artifactReviewDecisionRefId: string, input: AddArtifactReviewDecisionRefInput): ArtifactReviewDecisionRefRecord;
|
|
20
|
+
listArtifactReviewDecisionRefs(artifactInstanceId: string): ArtifactReviewDecisionRefRecord[];
|
|
21
|
+
getArtifactReviewDecisionRef(artifactReviewDecisionRefId: string): ArtifactReviewDecisionRefRecord;
|
|
22
|
+
updateArtifactStatus(artifactInstanceId: string, toStatusCode: TransitionArtifactStatusInput["toStatusCode"]): ArtifactInstanceRecord;
|
|
23
|
+
addArtifactStatusEvent(artifactStatusEventId: string, input: TransitionArtifactStatusInput & {
|
|
24
|
+
readonly fromStatusCode: TransitionArtifactStatusInput["toStatusCode"];
|
|
25
|
+
}): ArtifactStatusEventRecord;
|
|
26
|
+
listArtifactStatusEvents(artifactInstanceId: string): ArtifactStatusEventRecord[];
|
|
27
|
+
private getById;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=repositories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repositories.d.ts","sourceRoot":"","sources":["../src/repositories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EACV,iCAAiC,EACjC,iCAAiC,EACjC,4BAA4B,EAC5B,yBAAyB,EACzB,mCAAmC,EACnC,iBAAiB,EACjB,+BAA+B,EAC/B,sBAAsB,EACtB,+BAA+B,EAC/B,0BAA0B,EAC1B,yBAAyB,EACzB,uBAAuB,EACvB,iCAAiC,EACjC,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,YAAY,CAAC;AAwIpB,qBAAa,kBAAkB;IACjB,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,QAAQ,CAAC,QAAQ;IAElD,sBAAsB,CAAC,kBAAkB,EAAE,MAAM,EAAE,KAAK,EAAE,2BAA2B,GAAG,sBAAsB;IAwB9G,mBAAmB,CAAC,kBAAkB,EAAE,MAAM,GAAG,sBAAsB;IAYvE,gCAAgC,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,sBAAsB,GAAG,SAAS;IAanH,oCAAoC,CAClC,oBAAoB,EAAE,MAAM,EAC5B,uBAAuB,EAAE,MAAM,GAC9B,sBAAsB,GAAG,SAAS;IAerC,oBAAoB,CAAC,kBAAkB,EAAE,MAAM,GAAG,iBAAiB;IAYnE,4BAA4B,CAC1B,2BAA2B,EAAE,MAAM,EACnC,KAAK,EAAE,iCAAiC,GACvC,+BAA+B;IAwBlC,8BAA8B,CAAC,kBAAkB,EAAE,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