archscribe 0.0.0-stage → 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.
- package/README.md +266 -2
- package/dist/cli/archscribe.d.ts +11 -0
- package/dist/cli/archscribe.js +340 -0
- package/dist/cli/archscribe.js.map +1 -0
- package/dist/cli/check.d.ts +17 -0
- package/dist/cli/check.js +67 -0
- package/dist/cli/check.js.map +1 -0
- package/dist/cli/clean.d.ts +2 -0
- package/dist/cli/clean.js +46 -0
- package/dist/cli/clean.js.map +1 -0
- package/dist/cli/commands.d.ts +4 -0
- package/dist/cli/commands.js +21 -0
- package/dist/cli/commands.js.map +1 -0
- package/dist/cli/compare.d.ts +2 -0
- package/dist/cli/compare.js +125 -0
- package/dist/cli/compare.js.map +1 -0
- package/dist/cli/config.d.ts +2 -0
- package/dist/cli/config.js +40 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/dashboard.d.ts +1 -0
- package/dist/cli/dashboard.js +16 -0
- package/dist/cli/dashboard.js.map +1 -0
- package/dist/cli/doctor.d.ts +20 -0
- package/dist/cli/doctor.js +169 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/evaluate.d.ts +9 -0
- package/dist/cli/evaluate.js +78 -0
- package/dist/cli/evaluate.js.map +1 -0
- package/dist/cli/history.d.ts +31 -0
- package/dist/cli/history.js +167 -0
- package/dist/cli/history.js.map +1 -0
- package/dist/cli/login.d.ts +5 -0
- package/dist/cli/login.js +49 -0
- package/dist/cli/login.js.map +1 -0
- package/dist/cli/logout.d.ts +5 -0
- package/dist/cli/logout.js +36 -0
- package/dist/cli/logout.js.map +1 -0
- package/dist/cli/menu/screens.d.ts +31 -0
- package/dist/cli/menu/screens.js +230 -0
- package/dist/cli/menu/screens.js.map +1 -0
- package/dist/cli/open.d.ts +2 -0
- package/dist/cli/open.js +28 -0
- package/dist/cli/open.js.map +1 -0
- package/dist/cli/rag.d.ts +4 -0
- package/dist/cli/rag.js +20 -0
- package/dist/cli/rag.js.map +1 -0
- package/dist/cli/run.d.ts +21 -0
- package/dist/cli/run.js +163 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/run_pipeline.d.ts +2 -0
- package/dist/cli/run_pipeline.js +103 -0
- package/dist/cli/run_pipeline.js.map +1 -0
- package/dist/cli/shell.d.ts +8 -0
- package/dist/cli/shell.js +38 -0
- package/dist/cli/shell.js.map +1 -0
- package/dist/cli/state.d.ts +42 -0
- package/dist/cli/state.js +99 -0
- package/dist/cli/state.js.map +1 -0
- package/dist/cli/status.d.ts +2 -0
- package/dist/cli/status.js +59 -0
- package/dist/cli/status.js.map +1 -0
- package/dist/cli/ui/animations.d.ts +19 -0
- package/dist/cli/ui/animations.js +161 -0
- package/dist/cli/ui/animations.js.map +1 -0
- package/dist/cli/ui/index.d.ts +4 -0
- package/dist/cli/ui/index.js +5 -0
- package/dist/cli/ui/index.js.map +1 -0
- package/dist/cli/ui/keys.d.ts +25 -0
- package/dist/cli/ui/keys.js +47 -0
- package/dist/cli/ui/keys.js.map +1 -0
- package/dist/cli/ui/mascot.d.ts +4 -0
- package/dist/cli/ui/mascot.js +53 -0
- package/dist/cli/ui/mascot.js.map +1 -0
- package/dist/cli/ui/menu.d.ts +86 -0
- package/dist/cli/ui/menu.js +268 -0
- package/dist/cli/ui/menu.js.map +1 -0
- package/dist/cli/ui/motions.d.ts +22 -0
- package/dist/cli/ui/motions.js +112 -0
- package/dist/cli/ui/motions.js.map +1 -0
- package/dist/cli/ui/stage.d.ts +25 -0
- package/dist/cli/ui/stage.js +296 -0
- package/dist/cli/ui/stage.js.map +1 -0
- package/dist/cli/ui/term.d.ts +98 -0
- package/dist/cli/ui/term.js +275 -0
- package/dist/cli/ui/term.js.map +1 -0
- package/dist/core/actor-inference.d.ts +25 -0
- package/dist/core/actor-inference.js +89 -0
- package/dist/core/actor-inference.js.map +1 -0
- package/dist/core/component-groups.d.ts +35 -0
- package/dist/core/component-groups.js +93 -0
- package/dist/core/component-groups.js.map +1 -0
- package/dist/core/docx-styles.d.ts +44 -0
- package/dist/core/docx-styles.js +45 -0
- package/dist/core/docx-styles.js.map +1 -0
- package/dist/core/docx.d.ts +11 -0
- package/dist/core/docx.js +310 -0
- package/dist/core/docx.js.map +1 -0
- package/dist/core/flow-steps-uc.d.ts +10 -0
- package/dist/core/flow-steps-uc.js +109 -0
- package/dist/core/flow-steps-uc.js.map +1 -0
- package/dist/core/flow-steps.d.ts +66 -0
- package/dist/core/flow-steps.js +814 -0
- package/dist/core/flow-steps.js.map +1 -0
- package/dist/core/flow-trace.d.ts +45 -0
- package/dist/core/flow-trace.js +131 -0
- package/dist/core/flow-trace.js.map +1 -0
- package/dist/core/flow.d.ts +13 -0
- package/dist/core/flow.js +379 -0
- package/dist/core/flow.js.map +1 -0
- package/dist/core/freshness.d.ts +22 -0
- package/dist/core/freshness.js +66 -0
- package/dist/core/freshness.js.map +1 -0
- package/dist/core/manifest.d.ts +35 -0
- package/dist/core/manifest.js +99 -0
- package/dist/core/manifest.js.map +1 -0
- package/dist/core/markdown.d.ts +21 -0
- package/dist/core/markdown.js +233 -0
- package/dist/core/markdown.js.map +1 -0
- package/dist/core/parser.d.ts +22 -0
- package/dist/core/parser.js +86 -0
- package/dist/core/parser.js.map +1 -0
- package/dist/core/project-config.d.ts +18 -0
- package/dist/core/project-config.js +30 -0
- package/dist/core/project-config.js.map +1 -0
- package/dist/core/review-ledger.d.ts +36 -0
- package/dist/core/review-ledger.js +104 -0
- package/dist/core/review-ledger.js.map +1 -0
- package/dist/core/review-rerun.d.ts +16 -0
- package/dist/core/review-rerun.js +31 -0
- package/dist/core/review-rerun.js.map +1 -0
- package/dist/core/role-permissions.d.ts +21 -0
- package/dist/core/role-permissions.js +60 -0
- package/dist/core/role-permissions.js.map +1 -0
- package/dist/core/run-result.d.ts +24 -0
- package/dist/core/run-result.js +21 -0
- package/dist/core/run-result.js.map +1 -0
- package/dist/core/run-summary.d.ts +47 -0
- package/dist/core/run-summary.js +22 -0
- package/dist/core/run-summary.js.map +1 -0
- package/dist/core/uc-context-builder.d.ts +7 -0
- package/dist/core/uc-context-builder.js +30 -0
- package/dist/core/uc-context-builder.js.map +1 -0
- package/dist/core/uc-proposal.d.ts +11 -0
- package/dist/core/uc-proposal.js +49 -0
- package/dist/core/uc-proposal.js.map +1 -0
- package/dist/diagrams/activity.d.ts +21 -0
- package/dist/diagrams/activity.js +362 -0
- package/dist/diagrams/activity.js.map +1 -0
- package/dist/diagrams/architecture.d.ts +42 -0
- package/dist/diagrams/architecture.js +165 -0
- package/dist/diagrams/architecture.js.map +1 -0
- package/dist/diagrams/class.d.ts +9 -0
- package/dist/diagrams/class.js +222 -0
- package/dist/diagrams/class.js.map +1 -0
- package/dist/diagrams/class_relations.d.ts +19 -0
- package/dist/diagrams/class_relations.js +165 -0
- package/dist/diagrams/class_relations.js.map +1 -0
- package/dist/diagrams/layout/elk.d.ts +9 -0
- package/dist/diagrams/layout/elk.js +57 -0
- package/dist/diagrams/layout/elk.js.map +1 -0
- package/dist/diagrams/layout/postprocess.d.ts +17 -0
- package/dist/diagrams/layout/postprocess.js +81 -0
- package/dist/diagrams/layout/postprocess.js.map +1 -0
- package/dist/diagrams/layout/radial.d.ts +65 -0
- package/dist/diagrams/layout/radial.js +275 -0
- package/dist/diagrams/layout/radial.js.map +1 -0
- package/dist/diagrams/layout/types.d.ts +37 -0
- package/dist/diagrams/layout/types.js +2 -0
- package/dist/diagrams/layout/types.js.map +1 -0
- package/dist/diagrams/sequence-header.d.ts +58 -0
- package/dist/diagrams/sequence-header.js +102 -0
- package/dist/diagrams/sequence-header.js.map +1 -0
- package/dist/diagrams/sequence-model.d.ts +21 -0
- package/dist/diagrams/sequence-model.js +298 -0
- package/dist/diagrams/sequence-model.js.map +1 -0
- package/dist/diagrams/sequence-parts.d.ts +83 -0
- package/dist/diagrams/sequence-parts.js +239 -0
- package/dist/diagrams/sequence-parts.js.map +1 -0
- package/dist/diagrams/sequence-take.d.ts +22 -0
- package/dist/diagrams/sequence-take.js +221 -0
- package/dist/diagrams/sequence-take.js.map +1 -0
- package/dist/diagrams/sequence.d.ts +27 -0
- package/dist/diagrams/sequence.js +339 -0
- package/dist/diagrams/sequence.js.map +1 -0
- package/dist/diagrams/usecase.d.ts +9 -0
- package/dist/diagrams/usecase.js +160 -0
- package/dist/diagrams/usecase.js.map +1 -0
- package/dist/diagrams/usecase_layout.d.ts +54 -0
- package/dist/diagrams/usecase_layout.js +160 -0
- package/dist/diagrams/usecase_layout.js.map +1 -0
- package/dist/evaluation/accuracy.d.ts +23 -0
- package/dist/evaluation/accuracy.js +140 -0
- package/dist/evaluation/accuracy.js.map +1 -0
- package/dist/evaluation/collector.d.ts +32 -0
- package/dist/evaluation/collector.js +40 -0
- package/dist/evaluation/collector.js.map +1 -0
- package/dist/evaluation/completeness.d.ts +3 -0
- package/dist/evaluation/completeness.js +51 -0
- package/dist/evaluation/completeness.js.map +1 -0
- package/dist/evaluation/consistency.d.ts +12 -0
- package/dist/evaluation/consistency.js +26 -0
- package/dist/evaluation/consistency.js.map +1 -0
- package/dist/evaluation/dashboard-compare.d.ts +4 -0
- package/dist/evaluation/dashboard-compare.js +108 -0
- package/dist/evaluation/dashboard-compare.js.map +1 -0
- package/dist/evaluation/dashboard-review.d.ts +4 -0
- package/dist/evaluation/dashboard-review.js +189 -0
- package/dist/evaluation/dashboard-review.js.map +1 -0
- package/dist/evaluation/dashboard.d.ts +3 -0
- package/dist/evaluation/dashboard.js +334 -0
- package/dist/evaluation/dashboard.js.map +1 -0
- package/dist/evaluation/human-eval.d.ts +7 -0
- package/dist/evaluation/human-eval.js +34 -0
- package/dist/evaluation/human-eval.js.map +1 -0
- package/dist/evaluation/timing.d.ts +14 -0
- package/dist/evaluation/timing.js +35 -0
- package/dist/evaluation/timing.js.map +1 -0
- package/dist/evaluation/token-cost.d.ts +16 -0
- package/dist/evaluation/token-cost.js +44 -0
- package/dist/evaluation/token-cost.js.map +1 -0
- package/dist/evaluation/token-savings.d.ts +12 -0
- package/dist/evaluation/token-savings.js +60 -0
- package/dist/evaluation/token-savings.js.map +1 -0
- package/dist/knowledge/hub-grouping.d.ts +8 -0
- package/dist/knowledge/hub-grouping.js +66 -0
- package/dist/knowledge/hub-grouping.js.map +1 -0
- package/dist/knowledge/local-kb.d.ts +4 -0
- package/dist/knowledge/local-kb.js +82 -0
- package/dist/knowledge/local-kb.js.map +1 -0
- package/dist/knowledge/rag-augment.d.ts +9 -0
- package/dist/knowledge/rag-augment.js +45 -0
- package/dist/knowledge/rag-augment.js.map +1 -0
- package/dist/knowledge/rag-client.d.ts +11 -0
- package/dist/knowledge/rag-client.js +60 -0
- package/dist/knowledge/rag-client.js.map +1 -0
- package/dist/knowledge/retriever.d.ts +15 -0
- package/dist/knowledge/retriever.js +43 -0
- package/dist/knowledge/retriever.js.map +1 -0
- package/dist/knowledge/rules.d.ts +2 -0
- package/dist/knowledge/rules.js +10 -0
- package/dist/knowledge/rules.js.map +1 -0
- package/dist/knowledge/types.d.ts +28 -0
- package/dist/knowledge/types.js +2 -0
- package/dist/knowledge/types.js.map +1 -0
- package/dist/license/banner.d.ts +5 -0
- package/dist/license/banner.js +7 -0
- package/dist/license/banner.js.map +1 -0
- package/dist/license/client.d.ts +116 -0
- package/dist/license/client.js +195 -0
- package/dist/license/client.js.map +1 -0
- package/dist/license/gate.d.ts +22 -0
- package/dist/license/gate.js +50 -0
- package/dist/license/gate.js.map +1 -0
- package/dist/license/keys.d.ts +6 -0
- package/dist/license/keys.js +7 -0
- package/dist/license/keys.js.map +1 -0
- package/dist/license/login-flow.d.ts +39 -0
- package/dist/license/login-flow.js +61 -0
- package/dist/license/login-flow.js.map +1 -0
- package/dist/license/logout-flow.d.ts +18 -0
- package/dist/license/logout-flow.js +55 -0
- package/dist/license/logout-flow.js.map +1 -0
- package/dist/license/rollback.d.ts +9 -0
- package/dist/license/rollback.js +57 -0
- package/dist/license/rollback.js.map +1 -0
- package/dist/license/run-license.d.ts +24 -0
- package/dist/license/run-license.js +28 -0
- package/dist/license/run-license.js.map +1 -0
- package/dist/license/session.d.ts +62 -0
- package/dist/license/session.js +101 -0
- package/dist/license/session.js.map +1 -0
- package/dist/license/status-line.d.ts +8 -0
- package/dist/license/status-line.js +42 -0
- package/dist/license/status-line.js.map +1 -0
- package/dist/license/telemetry.d.ts +15 -0
- package/dist/license/telemetry.js +53 -0
- package/dist/license/telemetry.js.map +1 -0
- package/dist/license/verify.d.ts +11 -0
- package/dist/license/verify.js +214 -0
- package/dist/license/verify.js.map +1 -0
- package/dist/parser.jar +0 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +443 -0
- package/dist/server.js.map +1 -0
- package/dist/theory/domains.d.ts +10 -0
- package/dist/theory/domains.js +53 -0
- package/dist/theory/domains.js.map +1 -0
- package/dist/theory/facts.d.ts +8 -0
- package/dist/theory/facts.js +98 -0
- package/dist/theory/facts.js.map +1 -0
- package/dist/theory/fill.d.ts +18 -0
- package/dist/theory/fill.js +157 -0
- package/dist/theory/fill.js.map +1 -0
- package/dist/theory/references.d.ts +33 -0
- package/dist/theory/references.js +227 -0
- package/dist/theory/references.js.map +1 -0
- package/dist/theory/requirements.d.ts +21 -0
- package/dist/theory/requirements.js +100 -0
- package/dist/theory/requirements.js.map +1 -0
- package/dist/theory/scaffold.d.ts +13 -0
- package/dist/theory/scaffold.js +261 -0
- package/dist/theory/scaffold.js.map +1 -0
- package/dist/tools/analyze_project.d.ts +28 -0
- package/dist/tools/analyze_project.js +50 -0
- package/dist/tools/analyze_project.js.map +1 -0
- package/dist/tools/environment.d.ts +29 -0
- package/dist/tools/environment.js +101 -0
- package/dist/tools/environment.js.map +1 -0
- package/dist/tools/generate_report.d.ts +40 -0
- package/dist/tools/generate_report.js +490 -0
- package/dist/tools/generate_report.js.map +1 -0
- package/dist/tools/learn_usecase.d.ts +11 -0
- package/dist/tools/learn_usecase.js +58 -0
- package/dist/tools/learn_usecase.js.map +1 -0
- package/dist/tools/propose_uc_groupings.d.ts +16 -0
- package/dist/tools/propose_uc_groupings.js +94 -0
- package/dist/tools/propose_uc_groupings.js.map +1 -0
- package/dist/tools/review-tasks.d.ts +28 -0
- package/dist/tools/review-tasks.js +168 -0
- package/dist/tools/review-tasks.js.map +1 -0
- package/dist/tools/review.d.ts +28 -0
- package/dist/tools/review.js +160 -0
- package/dist/tools/review.js.map +1 -0
- package/dist/tools/scaffold.d.ts +21 -0
- package/dist/tools/scaffold.js +149 -0
- package/dist/tools/scaffold.js.map +1 -0
- package/dist/tools/scan_repo.d.ts +33 -0
- package/dist/tools/scan_repo.js +140 -0
- package/dist/tools/scan_repo.js.map +1 -0
- package/dist/types/diagram.d.ts +98 -0
- package/dist/types/diagram.js +2 -0
- package/dist/types/diagram.js.map +1 -0
- package/dist/types/evaluation.d.ts +114 -0
- package/dist/types/evaluation.js +2 -0
- package/dist/types/evaluation.js.map +1 -0
- package/dist/types/ir.d.ts +112 -0
- package/dist/types/ir.js +2 -0
- package/dist/types/ir.js.map +1 -0
- package/dist/types/license.d.ts +66 -0
- package/dist/types/license.js +3 -0
- package/dist/types/license.js.map +1 -0
- package/dist/types/report.d.ts +176 -0
- package/dist/types/report.js +2 -0
- package/dist/types/report.js.map +1 -0
- package/dist/types/theory.d.ts +110 -0
- package/dist/types/theory.js +3 -0
- package/dist/types/theory.js.map +1 -0
- package/dist/types/uc-grouping.d.ts +49 -0
- package/dist/types/uc-grouping.js +2 -0
- package/dist/types/uc-grouping.js.map +1 -0
- package/dist/utils/approval.d.ts +37 -0
- package/dist/utils/approval.js +173 -0
- package/dist/utils/approval.js.map +1 -0
- package/dist/utils/dashboard-launcher.d.ts +28 -0
- package/dist/utils/dashboard-launcher.js +215 -0
- package/dist/utils/dashboard-launcher.js.map +1 -0
- package/dist/utils/diagram-dir.d.ts +5 -0
- package/dist/utils/diagram-dir.js +33 -0
- package/dist/utils/diagram-dir.js.map +1 -0
- package/dist/utils/file.d.ts +35 -0
- package/dist/utils/file.js +76 -0
- package/dist/utils/file.js.map +1 -0
- package/dist/utils/ir-minify.d.ts +15 -0
- package/dist/utils/ir-minify.js +114 -0
- package/dist/utils/ir-minify.js.map +1 -0
- package/dist/utils/mcp-launch.d.ts +24 -0
- package/dist/utils/mcp-launch.js +37 -0
- package/dist/utils/mcp-launch.js.map +1 -0
- package/dist/utils/open.d.ts +10 -0
- package/dist/utils/open.js +24 -0
- package/dist/utils/open.js.map +1 -0
- package/dist/utils/run-history.d.ts +29 -0
- package/dist/utils/run-history.js +62 -0
- package/dist/utils/run-history.js.map +1 -0
- package/dist/utils/version.d.ts +6 -0
- package/dist/utils/version.js +25 -0
- package/dist/utils/version.js.map +1 -0
- package/dist/utils/xml.d.ts +17 -0
- package/dist/utils/xml.js +30 -0
- package/dist/utils/xml.js.map +1 -0
- package/package.json +61 -6
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/** Class-level stereotype detected from Spring annotations. */
|
|
2
|
+
export type Stereotype = "controller" | "service" | "repository" | "entity" | "component" | "class";
|
|
3
|
+
/** A Maven/Gradle dependency declared in the project build file. */
|
|
4
|
+
export interface BuildDependency {
|
|
5
|
+
groupId?: string;
|
|
6
|
+
artifactId: string;
|
|
7
|
+
version?: string | null;
|
|
8
|
+
}
|
|
9
|
+
/** Top-level metadata extracted from the project root (pom.xml / build.gradle). */
|
|
10
|
+
export interface ProjectMetadata {
|
|
11
|
+
name: string;
|
|
12
|
+
projectPath: string;
|
|
13
|
+
sourceRoot: string;
|
|
14
|
+
buildFile?: string | null;
|
|
15
|
+
javaVersion?: string | null;
|
|
16
|
+
springBootVersion?: string | null;
|
|
17
|
+
dependencies?: BuildDependency[];
|
|
18
|
+
}
|
|
19
|
+
/** A Spring MVC HTTP mapping annotation resolved to method + path. */
|
|
20
|
+
export interface RestMapping {
|
|
21
|
+
httpMethod: string;
|
|
22
|
+
path: string;
|
|
23
|
+
annotation: string;
|
|
24
|
+
}
|
|
25
|
+
/** A single method parameter. */
|
|
26
|
+
export interface ParamMetadata {
|
|
27
|
+
name: string;
|
|
28
|
+
type: string;
|
|
29
|
+
}
|
|
30
|
+
/** A method call site found inside another method's body. */
|
|
31
|
+
export interface InvocationMetadata {
|
|
32
|
+
/** Qualified class name of the call target, or null for local calls. */
|
|
33
|
+
target?: string | null;
|
|
34
|
+
method: string;
|
|
35
|
+
/** Raw expression as it appears in source (for display). */
|
|
36
|
+
expression: string;
|
|
37
|
+
/** Call order within the containing method body (0-based). */
|
|
38
|
+
order: number;
|
|
39
|
+
/** Branch context label: "if:{line}", "if:{line}-else", "try:{line}", "try:{line}-catch", "loop:{line}", etc. Null for straight-line code. */
|
|
40
|
+
branchId?: string | null;
|
|
41
|
+
/** True when the call site is directly or transitively inside a loop statement. */
|
|
42
|
+
isInsideLoop?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** A class field with its annotations and modifiers. */
|
|
45
|
+
export interface FieldMetadata {
|
|
46
|
+
name: string;
|
|
47
|
+
type: string;
|
|
48
|
+
annotations: string[];
|
|
49
|
+
modifiers: string[];
|
|
50
|
+
/** Raw text of each constructor argument; populated only for enum constants (e.g. ["EnumSet.of(A, B)"]). */
|
|
51
|
+
enumArgs?: string[];
|
|
52
|
+
}
|
|
53
|
+
/** Full metadata for a single method or constructor. */
|
|
54
|
+
export interface MethodMetadata {
|
|
55
|
+
name: string;
|
|
56
|
+
returnType?: string | null;
|
|
57
|
+
visibility?: string;
|
|
58
|
+
constructor?: boolean;
|
|
59
|
+
annotations: string[];
|
|
60
|
+
/** Raw literal text inside @PreAuthorize/@Secured/@RolesAllowed on this method, if any. */
|
|
61
|
+
securityExpr?: string | null;
|
|
62
|
+
params: ParamMetadata[];
|
|
63
|
+
restMappings: RestMapping[];
|
|
64
|
+
invocations?: InvocationMetadata[];
|
|
65
|
+
conditions?: string[];
|
|
66
|
+
thrownExceptions?: string[];
|
|
67
|
+
hasTryCatch?: boolean;
|
|
68
|
+
}
|
|
69
|
+
/** Full metadata for a single Java class, interface, enum or record. */
|
|
70
|
+
export interface ClassMetadata {
|
|
71
|
+
name: string;
|
|
72
|
+
qualifiedName: string;
|
|
73
|
+
packageName: string;
|
|
74
|
+
file: string;
|
|
75
|
+
/** "class" | "interface" | "enum" | "record" — raw Java kind string. */
|
|
76
|
+
kind: string;
|
|
77
|
+
stereotype: Stereotype;
|
|
78
|
+
superClass?: string | null;
|
|
79
|
+
lombokRequiredArgsConstructor?: boolean;
|
|
80
|
+
annotations: string[];
|
|
81
|
+
interfaces: string[];
|
|
82
|
+
fields: FieldMetadata[];
|
|
83
|
+
methods: MethodMetadata[];
|
|
84
|
+
constructors: MethodMetadata[];
|
|
85
|
+
restMappings: RestMapping[];
|
|
86
|
+
}
|
|
87
|
+
/** A directed edge in the dependency or inheritance graph. */
|
|
88
|
+
export interface DependencyEdge {
|
|
89
|
+
from: string;
|
|
90
|
+
to: string;
|
|
91
|
+
/** "injection" | "inheritance" | "implementation" | "association" */
|
|
92
|
+
type: string;
|
|
93
|
+
/** Field name or method name through which the dependency is expressed. */
|
|
94
|
+
via?: string | null;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Intermediate Representation — top-level output of the Java static-analysis
|
|
98
|
+
* parser. Everything downstream (flow builder, diagram renderers) reads from
|
|
99
|
+
* this structure.
|
|
100
|
+
*/
|
|
101
|
+
export interface IR {
|
|
102
|
+
version: string;
|
|
103
|
+
engine: string;
|
|
104
|
+
generatedAt: string;
|
|
105
|
+
project: ProjectMetadata;
|
|
106
|
+
packageTree: string[];
|
|
107
|
+
files: string[];
|
|
108
|
+
classes: ClassMetadata[];
|
|
109
|
+
dependencyGraph: DependencyEdge[];
|
|
110
|
+
inheritanceGraph: DependencyEdge[];
|
|
111
|
+
warnings: string[];
|
|
112
|
+
}
|
package/dist/types/ir.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ir.js","sourceRoot":"","sources":["../../src/types/ir.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** Subscription tier for archscribe. */
|
|
2
|
+
export type Tier = "free" | "pro";
|
|
3
|
+
/**
|
|
4
|
+
* Discriminates WHY a tier was resolved, so the CLI can show an accurate,
|
|
5
|
+
* actionable status line instead of a single catch-all message. `reason` on
|
|
6
|
+
* LicenseCheckResult stays free text for logs; `code` is what display code
|
|
7
|
+
* should switch on.
|
|
8
|
+
*/
|
|
9
|
+
export type LicenseStatusCode = "pro" | "pro_grace" | "free_plan" | "free_no_key" | "free_invalid_key" | "free_removed" | "free_revoked" | "free_expired" | "free_seat_limit" | "free_disabled" | "free_server_down" | "free_rollback" | "free_other";
|
|
10
|
+
/** Signed payload embedded inside an archscribe.license file. */
|
|
11
|
+
export interface LicensePayload {
|
|
12
|
+
licensee: string;
|
|
13
|
+
tier: Tier;
|
|
14
|
+
/** ISO-8601 timestamp of when this license was issued. */
|
|
15
|
+
issuedAt: string;
|
|
16
|
+
/** ISO-8601 timestamp after which the license is considered expired. */
|
|
17
|
+
expiresAt: string;
|
|
18
|
+
}
|
|
19
|
+
/** Result returned by loadLicense() after verifying the license file. */
|
|
20
|
+
export interface LicenseCheckResult {
|
|
21
|
+
tier: Tier;
|
|
22
|
+
/** Why this tier was resolved — drives the CLI's status-line wording (see status-line.ts). */
|
|
23
|
+
code: LicenseStatusCode;
|
|
24
|
+
licensee?: string;
|
|
25
|
+
expiresAt?: string;
|
|
26
|
+
/** Human-readable explanation of why this tier was assigned. */
|
|
27
|
+
reason: string;
|
|
28
|
+
/** True when the system clock appears to have been rolled back. */
|
|
29
|
+
suspectedRollback?: boolean;
|
|
30
|
+
/** Feature limits from the license server session — undefined for offline/research paths. */
|
|
31
|
+
features?: SessionFeatures;
|
|
32
|
+
/** Only set for code "pro_grace": remaining ms before the grace window expires. */
|
|
33
|
+
graceRemainingMs?: number;
|
|
34
|
+
}
|
|
35
|
+
/** Feature flags / limits returned by the license server and cached locally. */
|
|
36
|
+
export interface SessionFeatures {
|
|
37
|
+
maxUC: number | null;
|
|
38
|
+
maxAlternateFlows: number | null;
|
|
39
|
+
maxStepsPerFlow: number | null;
|
|
40
|
+
maxMonthlyRuns: number | null;
|
|
41
|
+
classDiagram: boolean;
|
|
42
|
+
archDiagram: boolean;
|
|
43
|
+
sequenceDiagram: boolean;
|
|
44
|
+
usecaseDiagram: boolean;
|
|
45
|
+
actorOverrides: boolean;
|
|
46
|
+
exportDocx: boolean;
|
|
47
|
+
watermark: boolean;
|
|
48
|
+
}
|
|
49
|
+
/** Cached result of a successful online license activation/heartbeat. */
|
|
50
|
+
export interface SessionCache {
|
|
51
|
+
sessionToken: string;
|
|
52
|
+
tier: Tier;
|
|
53
|
+
features: SessionFeatures;
|
|
54
|
+
licensee?: string;
|
|
55
|
+
/** ISO-8601 — when this session was first issued locally. */
|
|
56
|
+
issuedAt: string;
|
|
57
|
+
/** ISO-8601 — when the JWT expires (server-issued TTL). */
|
|
58
|
+
expiresAt: string;
|
|
59
|
+
/** ISO-8601 — last successful heartbeat; grace period anchor. */
|
|
60
|
+
lastHeartbeat: string;
|
|
61
|
+
}
|
|
62
|
+
/** Returned by applyLicenseLimits() — per-field gate decisions. */
|
|
63
|
+
export interface GateResult {
|
|
64
|
+
/** When true, actor overrides from .archscribe.json must be ignored. */
|
|
65
|
+
blockActorOverrides: boolean;
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"license.js","sourceRoot":"","sources":["../../src/types/license.ts"],"names":[],"mappings":"AAAA,iFAAiF"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import type { LicenseCheckResult } from "./license.js";
|
|
2
|
+
/** Front-matter metadata injected into Chapter 1 of the report. */
|
|
3
|
+
export interface ProjectInfo {
|
|
4
|
+
title?: string;
|
|
5
|
+
subject?: string;
|
|
6
|
+
supervisor?: string;
|
|
7
|
+
group?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
members?: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
studentId?: string;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* User-supplied selection/approval state loaded from a review markdown file.
|
|
16
|
+
* Controls which use cases and diagrams are rendered in the final report.
|
|
17
|
+
*/
|
|
18
|
+
export interface UseCaseSelection {
|
|
19
|
+
/** Hard cap on how many UCs to include (default: all). */
|
|
20
|
+
limit?: number;
|
|
21
|
+
/** Explicitly include these UC IDs (e.g. "UC001"). */
|
|
22
|
+
selected_ids?: string[];
|
|
23
|
+
/** Explicitly include by title substring match. */
|
|
24
|
+
selected_titles?: string[];
|
|
25
|
+
/** Explicitly include by endpoint string, e.g. "POST /api/auth/login". */
|
|
26
|
+
selected_endpoints?: string[];
|
|
27
|
+
/** UC IDs whose spec text is frozen — will not be regenerated. */
|
|
28
|
+
approved_ids?: string[];
|
|
29
|
+
/** UC IDs whose activity diagram is frozen. */
|
|
30
|
+
approved_activity_ids?: string[];
|
|
31
|
+
/** UC IDs whose sequence diagram is frozen. */
|
|
32
|
+
approved_sequence_ids?: string[];
|
|
33
|
+
/** Directory containing approved/frozen diagram snapshots. */
|
|
34
|
+
approved_output_dir?: string;
|
|
35
|
+
/** Free-text review notes inserted into the regeneration prompt. */
|
|
36
|
+
ai_review_notes?: string[];
|
|
37
|
+
/** Injected by the license gate (free tier): prepend trial banner to report. */
|
|
38
|
+
watermark?: boolean;
|
|
39
|
+
/** Injected by the license gate (free tier): skip class + architecture diagrams. */
|
|
40
|
+
disablePremiumDiagrams?: boolean;
|
|
41
|
+
/** Injected by the license gate (free tier): use baseline UC spec (1 generic alt flow, no exception flows). */
|
|
42
|
+
detailedUcSpec?: boolean;
|
|
43
|
+
/** Injected by the license gate: max alternate flows per UC (null = unlimited). */
|
|
44
|
+
maxAlternateFlows?: number | null;
|
|
45
|
+
/** Injected by the license gate: max steps per alternate flow (null = unlimited). */
|
|
46
|
+
maxStepsPerFlow?: number | null;
|
|
47
|
+
/** Injected by the license gate (free tier): skip DOCX export — produce MD only. */
|
|
48
|
+
disableDocx?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/** Paths and counts returned by the report generation pipeline. */
|
|
51
|
+
export interface ReportOutputs {
|
|
52
|
+
markdown_path: string;
|
|
53
|
+
/** Only set when a DOCX was actually written (Pro tier) — undefined for free tier, like class/architecture_diagram_path. */
|
|
54
|
+
docx_path?: string;
|
|
55
|
+
review_notes_path: string;
|
|
56
|
+
architecture_analysis_path?: string;
|
|
57
|
+
domain_diagram_path?: string;
|
|
58
|
+
architecture_diagram_path?: string;
|
|
59
|
+
usecase_diagram_path?: string;
|
|
60
|
+
class_diagram_path?: string;
|
|
61
|
+
activity_diagram_paths?: string[];
|
|
62
|
+
sequence_diagram_paths?: string[];
|
|
63
|
+
detected_architecture_pattern?: string;
|
|
64
|
+
chapter_count: number;
|
|
65
|
+
theory_chapters_status?: string;
|
|
66
|
+
theory_chapters_next_step?: string;
|
|
67
|
+
/** Total UC candidates discovered in the project (catalog size, independent of tier). */
|
|
68
|
+
usecase_count: number;
|
|
69
|
+
/** UCs actually generated into this report — equals usecase_count on Pro, capped on Free. */
|
|
70
|
+
usecase_selected_count: number;
|
|
71
|
+
testcase_count: number;
|
|
72
|
+
/** Full per-UC spec data built by the flow builder — used by the evaluation dashboard's Review screen. */
|
|
73
|
+
usecase_flows?: UseCaseFlow[];
|
|
74
|
+
evaluation_report_path?: string;
|
|
75
|
+
dashboard_path?: string;
|
|
76
|
+
/**
|
|
77
|
+
* The full license check resolved for this run — single source of truth
|
|
78
|
+
* for both the gate's tier decision and every display surface. Format it
|
|
79
|
+
* with formatLicenseStatusLine() (src/license/status-line.ts); derive
|
|
80
|
+
* "is this Free tier" from `license.tier === "free"`, never from counts.
|
|
81
|
+
*/
|
|
82
|
+
license?: LicenseCheckResult;
|
|
83
|
+
}
|
|
84
|
+
/** One main-flow row: what the actor does and what the system responds. */
|
|
85
|
+
export interface FlowStep {
|
|
86
|
+
/** Step label, e.g. "1", "1a". Optional for alternate-flow header rows. */
|
|
87
|
+
step?: string;
|
|
88
|
+
actor: string;
|
|
89
|
+
system: string;
|
|
90
|
+
}
|
|
91
|
+
/** An alternate or exception flow branching off the main flow. */
|
|
92
|
+
export interface AlternateFlow {
|
|
93
|
+
/** Short code, e.g. "3a" or "E1". */
|
|
94
|
+
code: string;
|
|
95
|
+
title: string;
|
|
96
|
+
steps: FlowStep[];
|
|
97
|
+
/** The logical check shown on the alt-frame condition label, e.g. "Mật khẩu hợp lệ?". */
|
|
98
|
+
guardCondition?: string;
|
|
99
|
+
}
|
|
100
|
+
/** A system/infrastructure exception flow — separate from alternate flows (Pro tier). */
|
|
101
|
+
export interface ExceptionFlow {
|
|
102
|
+
/** Short code, e.g. "E1", "E2". */
|
|
103
|
+
code: string;
|
|
104
|
+
title: string;
|
|
105
|
+
/** What triggers this exception (e.g. "Database timeout", "External service unreachable"). */
|
|
106
|
+
trigger: string;
|
|
107
|
+
steps: FlowStep[];
|
|
108
|
+
}
|
|
109
|
+
/** Structural markers for alt/loop fragments in detailed sequence steps (Pro tier). */
|
|
110
|
+
export type SeqStepFragment = "alt-open" | "alt-branch-sep" | "alt-close" | "loop-open" | "loop-close";
|
|
111
|
+
/**
|
|
112
|
+
* A flat sequence step — arrow from one participant to another.
|
|
113
|
+
* Converted to a SequenceEvent tree by the sequence diagram renderer.
|
|
114
|
+
*/
|
|
115
|
+
export interface SequenceStep {
|
|
116
|
+
from: string;
|
|
117
|
+
to: string;
|
|
118
|
+
message: string;
|
|
119
|
+
/** true = dashed return arrow */
|
|
120
|
+
dashed?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Pro-tier only: structural marker for alt/loop fragment boundaries.
|
|
123
|
+
* When set, `from`/`to`/`message` may be empty — the step is a control-flow marker.
|
|
124
|
+
*/
|
|
125
|
+
fragment?: SeqStepFragment;
|
|
126
|
+
/** Human-readable guard label for alt-open / loop-open markers. */
|
|
127
|
+
fragmentLabel?: string;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Full specification for one use case, produced by the flow builder and
|
|
131
|
+
* consumed by the markdown builder, activity renderer, and sequence renderer.
|
|
132
|
+
*/
|
|
133
|
+
export interface UseCaseFlow {
|
|
134
|
+
/** Unique ID assigned in declaration order, e.g. "UC001". */
|
|
135
|
+
id: string;
|
|
136
|
+
title: string;
|
|
137
|
+
/** Actor label — derived from Spring Security role or controller package. */
|
|
138
|
+
actor: string;
|
|
139
|
+
/** Canonical HTTP endpoint string, e.g. "POST /api/auth/login". */
|
|
140
|
+
endpoint: string;
|
|
141
|
+
controllerName: string;
|
|
142
|
+
methodName: string;
|
|
143
|
+
/** One-sentence purpose statement for the UC spec header. */
|
|
144
|
+
purpose: string;
|
|
145
|
+
/** Expanded description paragraph for the spec body. */
|
|
146
|
+
description: string;
|
|
147
|
+
preconditions: string[];
|
|
148
|
+
successPostconditions: string[];
|
|
149
|
+
failurePostconditions: string[];
|
|
150
|
+
mainSteps: FlowStep[];
|
|
151
|
+
alternateFlows: AlternateFlow[];
|
|
152
|
+
/** Infrastructure/system exception flows — Pro tier only (E1, E2). */
|
|
153
|
+
exceptionFlows?: ExceptionFlow[];
|
|
154
|
+
/** Tier used to build this flow; controls spec depth. */
|
|
155
|
+
tier: "baseline" | "pro";
|
|
156
|
+
/** Flat ordered sequence steps, ready for diagram rendering. */
|
|
157
|
+
sequenceSteps: SequenceStep[];
|
|
158
|
+
/** Qualified class names + method names traversed during call-trace analysis. */
|
|
159
|
+
sourceTrace: string[];
|
|
160
|
+
activityDiagramPath?: string;
|
|
161
|
+
sequenceDiagramPath?: string;
|
|
162
|
+
}
|
|
163
|
+
/** Lightweight catalog entry used by the use-case overview diagram. */
|
|
164
|
+
export interface UseCaseCatalogItem {
|
|
165
|
+
id: string;
|
|
166
|
+
title: string;
|
|
167
|
+
controller: string;
|
|
168
|
+
/** Project-relative source of the endpoint controller, for stable review identity. */
|
|
169
|
+
sourceFile?: string;
|
|
170
|
+
endpoint: string;
|
|
171
|
+
methodName: string;
|
|
172
|
+
/** Raw literal text of the endpoint method's security annotation, if any (see inferActor). */
|
|
173
|
+
securityExpr?: string | null;
|
|
174
|
+
/** Resolved actor name(s) for this UC (see inferActor) — one entry per distinct role. */
|
|
175
|
+
actors: string[];
|
|
176
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/types/report.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/** Types for the theory chapter scaffold system (Task 3). */
|
|
2
|
+
/** One citation entry in the IEEE-style references list. */
|
|
3
|
+
export interface CitationEntry {
|
|
4
|
+
/** Stable key matching references.ts DB (e.g. "spring-boot"). */
|
|
5
|
+
techKey: string;
|
|
6
|
+
title: string;
|
|
7
|
+
url: string;
|
|
8
|
+
publisher: string;
|
|
9
|
+
year: number;
|
|
10
|
+
}
|
|
11
|
+
/** A required section within a chapter. */
|
|
12
|
+
export interface SectionSpec {
|
|
13
|
+
sectionId: string;
|
|
14
|
+
title: string;
|
|
15
|
+
guidance: string;
|
|
16
|
+
}
|
|
17
|
+
/** One chapter's specification as parsed from thesis-requirements-vi.md. */
|
|
18
|
+
export interface ChapterSpec {
|
|
19
|
+
/** Stable ID used by fill tool, e.g. "chapter1". */
|
|
20
|
+
chapterId: string;
|
|
21
|
+
number: number;
|
|
22
|
+
title: string;
|
|
23
|
+
/** Pattern to locate this chapter in report.md, e.g. "CHƯƠNG 1:". */
|
|
24
|
+
markdownHeadingPattern: string;
|
|
25
|
+
/** Replacement heading after fill, e.g. "## CHƯƠNG 1: GIỚI THIỆU ĐỀ TÀI". */
|
|
26
|
+
newHeading: string;
|
|
27
|
+
/** Hint from <!-- @AI: --> comment in requirements file. */
|
|
28
|
+
aiGuidance: string;
|
|
29
|
+
requiredSections: SectionSpec[];
|
|
30
|
+
targetPages: string;
|
|
31
|
+
/** Pre-existing draft from docs/chapterX.md — LLM may use as starting point. */
|
|
32
|
+
existingDraft?: string;
|
|
33
|
+
}
|
|
34
|
+
/** DOCX format rules extracted from thesis-requirements-vi.md. */
|
|
35
|
+
export interface FormatRules {
|
|
36
|
+
fontFamily: string;
|
|
37
|
+
bodySizePt: number;
|
|
38
|
+
chapterHeadingSizePt: number;
|
|
39
|
+
sectionHeadingSizePt: number;
|
|
40
|
+
lineSpacingMultiple: number;
|
|
41
|
+
marginTopCm: number;
|
|
42
|
+
marginBottomCm: number;
|
|
43
|
+
marginLeftCm: number;
|
|
44
|
+
marginRightCm: number;
|
|
45
|
+
}
|
|
46
|
+
/** Real numbers extracted from IR + eval report to prevent LLM hallucination. */
|
|
47
|
+
export interface FactSheet {
|
|
48
|
+
projectName: string;
|
|
49
|
+
classCount: number;
|
|
50
|
+
endpointCount: number;
|
|
51
|
+
dependencyCount: number;
|
|
52
|
+
controllerNames: string[];
|
|
53
|
+
serviceNames: string[];
|
|
54
|
+
entityNames: string[];
|
|
55
|
+
evalResults: {
|
|
56
|
+
endpointF1: number | null;
|
|
57
|
+
classF1: number | null;
|
|
58
|
+
depF1: number | null;
|
|
59
|
+
consistencyScore: number | null;
|
|
60
|
+
tokenCostUsd: number | null;
|
|
61
|
+
processingTimeMs: number | null;
|
|
62
|
+
};
|
|
63
|
+
/** Notable statements from PROJECT_CONTEXT.md for Chapter 4/5 writing. */
|
|
64
|
+
keyStatements: string[];
|
|
65
|
+
/** Maven/Gradle dependencies from pom.xml/build.gradle via IR — used to detect tech stack. */
|
|
66
|
+
dependencies: {
|
|
67
|
+
artifactId: string;
|
|
68
|
+
groupId?: string;
|
|
69
|
+
}[];
|
|
70
|
+
/** Java version from pom.xml/build.gradle (e.g. "17"). */
|
|
71
|
+
javaVersion?: string;
|
|
72
|
+
/** Spring Boot version from pom.xml/build.gradle (e.g. "3.2.1"). */
|
|
73
|
+
springBootVersion?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Full scaffold returned by get_client_theory_scaffold.
|
|
77
|
+
* The LLM fills sections then calls write_theory_content.
|
|
78
|
+
*/
|
|
79
|
+
export interface TheoryScaffold {
|
|
80
|
+
projectName: string;
|
|
81
|
+
theoryChapters: ChapterSpec[];
|
|
82
|
+
/** Chapter number excluded from theory generation (Phân tích & thiết kế). */
|
|
83
|
+
excludedChapterNumber: number;
|
|
84
|
+
facts: FactSheet;
|
|
85
|
+
formatRules: FormatRules;
|
|
86
|
+
/** Instructions embedded in the scaffold to guide the LLM. */
|
|
87
|
+
generationGuidance: string;
|
|
88
|
+
/**
|
|
89
|
+
* Pre-assigned citation numbers for the detected tech stack.
|
|
90
|
+
* Keys are citation numbers (as strings in JSON, numbers at runtime).
|
|
91
|
+
* Used by fill.ts to validate [n] in LLM content and populate References section.
|
|
92
|
+
*/
|
|
93
|
+
citationIndex?: Record<number, CitationEntry>;
|
|
94
|
+
}
|
|
95
|
+
/** LLM-provided content for one section. */
|
|
96
|
+
export interface FilledSection {
|
|
97
|
+
sectionId: string;
|
|
98
|
+
markdown: string;
|
|
99
|
+
}
|
|
100
|
+
/** LLM-provided content for one chapter. */
|
|
101
|
+
export interface FilledChapter {
|
|
102
|
+
chapterId: string;
|
|
103
|
+
sections: FilledSection[];
|
|
104
|
+
}
|
|
105
|
+
/** Result returned by write_theory_content. */
|
|
106
|
+
export interface WriteTheoryResult {
|
|
107
|
+
markdownPath: string;
|
|
108
|
+
docxPath: string;
|
|
109
|
+
warnings: string[];
|
|
110
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theory.js","sourceRoot":"","sources":["../../src/types/theory.ts"],"names":[],"mappings":"AAAA,6DAA6D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** Raw endpoint context cho LLM phân tích — không có title tiếng Việt. */
|
|
2
|
+
export interface RawUcContext {
|
|
3
|
+
id: string;
|
|
4
|
+
endpoint: string;
|
|
5
|
+
methodName: string;
|
|
6
|
+
className: string;
|
|
7
|
+
packageName: string;
|
|
8
|
+
mergeGroup?: string;
|
|
9
|
+
relatedEndpoints?: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface HubSuggestion {
|
|
12
|
+
hubLabel: string;
|
|
13
|
+
exampleUcTitles: string[];
|
|
14
|
+
score: number;
|
|
15
|
+
}
|
|
16
|
+
/** 1 hub với danh sách UC đã được LLM approve. */
|
|
17
|
+
export interface ApprovedHub {
|
|
18
|
+
label: string;
|
|
19
|
+
ucs: Array<{
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
/** Proposal file lưu lại để audit, được tạo bởi generate_report khi có approved_hubs. */
|
|
25
|
+
export interface UcProposal {
|
|
26
|
+
version: 1;
|
|
27
|
+
projectPath: string;
|
|
28
|
+
generatedAt: string;
|
|
29
|
+
hubs: Array<{
|
|
30
|
+
label: string;
|
|
31
|
+
ucs: Array<{
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
endpoint: string;
|
|
35
|
+
originalTitle: string;
|
|
36
|
+
}>;
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
/** Output của propose_uc_groupings — LLM đọc cái này trong conversation. */
|
|
40
|
+
export interface UcGroupingContext {
|
|
41
|
+
total_uc_count: number;
|
|
42
|
+
project_name: string;
|
|
43
|
+
output_dir: string;
|
|
44
|
+
rag_hub_suggestions: HubSuggestion[];
|
|
45
|
+
uc_items: RawUcContext[];
|
|
46
|
+
merge_candidates: string[];
|
|
47
|
+
instructions: string;
|
|
48
|
+
expected_output_schema: object;
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uc-grouping.js","sourceRoot":"","sources":["../../src/types/uc-grouping.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { UseCaseSelection } from "../types/report.js";
|
|
2
|
+
/** Frozen spec text indexed by normalised UC ID, plus the resolved approval dir. */
|
|
3
|
+
export interface ApprovalSnapshots {
|
|
4
|
+
approvedDir: string;
|
|
5
|
+
approvedIds: string[];
|
|
6
|
+
/** Map of normalised UC ID → frozen spec markdown text. */
|
|
7
|
+
specs: Map<string, string>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Load approval snapshots from disk.
|
|
11
|
+
* For each approved_id, reads an existing frozen spec from
|
|
12
|
+
* `<outputDir>/approved/specs/<id>.md`. Returns an empty snapshot set when no
|
|
13
|
+
* approved IDs are configured.
|
|
14
|
+
*/
|
|
15
|
+
export declare function prepareApprovalSnapshots(outputDir: string, selection?: UseCaseSelection): ApprovalSnapshots;
|
|
16
|
+
/**
|
|
17
|
+
* Replace each UC section in `markdown` with its frozen spec from `snapshots`.
|
|
18
|
+
* Sections not present in `snapshots.specs` are left untouched.
|
|
19
|
+
*/
|
|
20
|
+
export declare function applyApprovedSpecSnapshots(markdown: string, snapshots: ApprovalSnapshots): string;
|
|
21
|
+
export declare function extractUseCaseSection(markdown: string, id: string): string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Persist approved diagram files to `<approvedDir>/diagrams/<type>/`.
|
|
24
|
+
* These copies survive review-notes resets and serve as the source of truth
|
|
25
|
+
* for approved diagram state across runs.
|
|
26
|
+
*/
|
|
27
|
+
export declare function snapshotApprovedDiagrams(approvedDir: string, activityDir: string, sequenceDir: string, approvedActivityIds: string[], approvedSequenceIds: string[]): void;
|
|
28
|
+
/**
|
|
29
|
+
* Restore previously-snapshotted approved diagrams into working output dirs.
|
|
30
|
+
* Called before rendering so approved files are not regenerated even if
|
|
31
|
+
* review-notes has been reset and no longer lists them as approved.
|
|
32
|
+
* Returns sets of UC IDs restored (so renderers can skip those).
|
|
33
|
+
*/
|
|
34
|
+
export declare function restoreApprovedDiagrams(approvedDir: string, activityDir: string, sequenceDir: string): {
|
|
35
|
+
restoredActivityIds: Set<string>;
|
|
36
|
+
restoredSequenceIds: Set<string>;
|
|
37
|
+
};
|