@tiangong-lca/cli 0.1.1 → 0.1.2
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 +26 -6
- package/dist/src/batch.d.ts +6 -0
- package/dist/src/batch.js +6 -0
- package/dist/src/batch.js.map +1 -0
- package/dist/src/cli.d.ts +161 -0
- package/dist/src/command-spec.d.ts +90 -0
- package/dist/src/command-spec.js +400 -0
- package/dist/src/command-spec.js.map +1 -0
- package/dist/src/lib/artifacts.d.ts +9 -0
- package/dist/src/lib/auth-identity-receipt.d.ts +160 -0
- package/dist/src/lib/batch/attempt-recovery.d.ts +12 -0
- package/dist/src/lib/batch/attempt-recovery.js +183 -0
- package/dist/src/lib/batch/attempt-recovery.js.map +1 -0
- package/dist/src/lib/batch/canonical-contracts.d.ts +21 -0
- package/dist/src/lib/batch/canonical-contracts.js +180 -0
- package/dist/src/lib/batch/canonical-contracts.js.map +1 -0
- package/dist/src/lib/batch/engine.d.ts +2 -0
- package/dist/src/lib/batch/engine.js +294 -0
- package/dist/src/lib/batch/engine.js.map +1 -0
- package/dist/src/lib/batch/errors.d.ts +51 -0
- package/dist/src/lib/batch/errors.js +81 -0
- package/dist/src/lib/batch/errors.js.map +1 -0
- package/dist/src/lib/batch/item-projection.d.ts +10 -0
- package/dist/src/lib/batch/item-projection.js +118 -0
- package/dist/src/lib/batch/item-projection.js.map +1 -0
- package/dist/src/lib/batch/run-lock.d.ts +4 -0
- package/dist/src/lib/batch/run-lock.js +155 -0
- package/dist/src/lib/batch/run-lock.js.map +1 -0
- package/dist/src/lib/batch/scheduler-runtime.d.ts +29 -0
- package/dist/src/lib/batch/scheduler-runtime.js +114 -0
- package/dist/src/lib/batch/scheduler-runtime.js.map +1 -0
- package/dist/src/lib/batch/types.d.ts +183 -0
- package/dist/src/lib/batch/types.js +2 -0
- package/dist/src/lib/batch/types.js.map +1 -0
- package/dist/src/lib/dataset-author.d.ts +39 -0
- package/dist/src/lib/dataset-bilingual.d.ts +165 -0
- package/dist/src/lib/dataset-classification.d.ts +279 -0
- package/dist/src/lib/dataset-command.d.ts +53 -0
- package/dist/src/lib/dataset-contract.d.ts +82 -0
- package/dist/src/lib/dataset-curation-queue.d.ts +219 -0
- package/dist/src/lib/dataset-evidence-search.d.ts +134 -0
- package/dist/src/lib/dataset-import-lca.d.ts +136 -0
- package/dist/src/lib/dataset-local.d.ts +23 -0
- package/dist/src/lib/dataset-maintenance-alias-request.d.ts +12 -0
- package/dist/src/lib/dataset-maintenance-alias-rewrite.d.ts +111 -0
- package/dist/src/lib/dataset-maintenance-apply.d.ts +458 -0
- package/dist/src/lib/dataset-maintenance-clear-account.d.ts +161 -0
- package/dist/src/lib/dataset-maintenance-contract.d.ts +317 -0
- package/dist/src/lib/dataset-maintenance-derivatives.d.ts +48 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-approval-claim.d.ts +50 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-capture.d.ts +110 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-command.d.ts +15 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-contract.d.ts +387 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-execution-contract.d.ts +456 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-freeze.d.ts +99 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-plan.d.ts +85 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-recovery.d.ts +268 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-run.d.ts +123 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-seal.d.ts +50 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-verify.d.ts +85 -0
- package/dist/src/lib/dataset-maintenance-flow-identity-wire.d.ts +32 -0
- package/dist/src/lib/dataset-maintenance-pagination.d.ts +58 -0
- package/dist/src/lib/dataset-maintenance-plan.d.ts +40 -0
- package/dist/src/lib/dataset-maintenance-protected-artifacts.d.ts +16 -0
- package/dist/src/lib/dataset-maintenance-protected-before.d.ts +71 -0
- package/dist/src/lib/dataset-maintenance-protected-contract.d.ts +385 -0
- package/dist/src/lib/dataset-maintenance-protected-freeze.d.ts +148 -0
- package/dist/src/lib/dataset-maintenance-protected-preparation.d.ts +76 -0
- package/dist/src/lib/dataset-maintenance-protected-run.d.ts +252 -0
- package/dist/src/lib/dataset-maintenance-protected-seal.d.ts +93 -0
- package/dist/src/lib/dataset-maintenance-protected-toolchain.d.ts +31 -0
- package/dist/src/lib/dataset-maintenance-protected-verify.d.ts +99 -0
- package/dist/src/lib/dataset-maintenance-remote.d.ts +212 -0
- package/dist/src/lib/dataset-maintenance-support-validation.d.ts +18 -0
- package/dist/src/lib/dataset-maintenance-verify.d.ts +102 -0
- package/dist/src/lib/dataset-patch.d.ts +193 -0
- package/dist/src/lib/dataset-references-rewrite.d.ts +77 -0
- package/dist/src/lib/dataset-remote-refresh.d.ts +64 -0
- package/dist/src/lib/dataset-remote-verify.d.ts +168 -0
- package/dist/src/lib/dataset-save-draft-run.d.ts +283 -0
- package/dist/src/lib/dataset-save-draft-run.js +54 -21
- package/dist/src/lib/dataset-save-draft-run.js.map +1 -1
- package/dist/src/lib/dataset-source-upload-attachments.d.ts +109 -0
- package/dist/src/lib/dataset-validate.d.ts +62 -0
- package/dist/src/lib/dotenv.d.ts +6 -0
- package/dist/src/lib/env.d.ts +59 -0
- package/dist/src/lib/errors.d.ts +18 -0
- package/dist/src/lib/flow-build-alias-map.d.ts +80 -0
- package/dist/src/lib/flow-fetch-rows.d.ts +70 -0
- package/dist/src/lib/flow-get.d.ts +35 -0
- package/dist/src/lib/flow-governance.d.ts +22 -0
- package/dist/src/lib/flow-list.d.ts +57 -0
- package/dist/src/lib/flow-materialize-decisions.d.ts +67 -0
- package/dist/src/lib/flow-payload-validation.d.ts +32 -0
- package/dist/src/lib/flow-publish-reviewed-data.d.ts +262 -0
- package/dist/src/lib/flow-publish-version.d.ts +193 -0
- package/dist/src/lib/flow-qa.d.ts +289 -0
- package/dist/src/lib/flow-read.d.ts +70 -0
- package/dist/src/lib/flow-regen-product.d.ts +431 -0
- package/dist/src/lib/flow-remediate.d.ts +133 -0
- package/dist/src/lib/http.d.ts +25 -0
- package/dist/src/lib/identity-preflight.d.ts +235 -0
- package/dist/src/lib/io.d.ts +2 -0
- package/dist/src/lib/kb-search.d.ts +23 -0
- package/dist/src/lib/lca-release.d.ts +105 -0
- package/dist/src/lib/lifecyclemodel-auto-build.d.ts +223 -0
- package/dist/src/lib/lifecyclemodel-bundle-save.d.ts +71 -0
- package/dist/src/lib/lifecyclemodel-graph.d.ts +91 -0
- package/dist/src/lib/lifecyclemodel-orchestrate.d.ts +349 -0
- package/dist/src/lib/lifecyclemodel-publish-build.d.ts +77 -0
- package/dist/src/lib/lifecyclemodel-publish-resulting-process.d.ts +27 -0
- package/dist/src/lib/lifecyclemodel-qa.d.ts +206 -0
- package/dist/src/lib/lifecyclemodel-resulting-process.d.ts +204 -0
- package/dist/src/lib/lifecyclemodel-save-draft-run.d.ts +96 -0
- package/dist/src/lib/lifecyclemodel-validate-build.d.ts +78 -0
- package/dist/src/lib/llm.d.ts +51 -0
- package/dist/src/lib/package-version.d.ts +3 -0
- package/dist/src/lib/process-auto-build.d.ts +168 -0
- package/dist/src/lib/process-batch-build.d.ts +97 -0
- package/dist/src/lib/process-dedup-review.d.ts +253 -0
- package/dist/src/lib/process-flow-build-plan.d.ts +108 -0
- package/dist/src/lib/process-get.d.ts +26 -0
- package/dist/src/lib/process-list.d.ts +87 -0
- package/dist/src/lib/process-payload-validation.d.ts +27 -0
- package/dist/src/lib/process-publish-build.d.ts +148 -0
- package/dist/src/lib/process-qa.d.ts +243 -0
- package/dist/src/lib/process-refresh-references.d.ts +179 -0
- package/dist/src/lib/process-required-fields.d.ts +142 -0
- package/dist/src/lib/process-resume-build.d.ts +77 -0
- package/dist/src/lib/process-save-draft-run.d.ts +72 -0
- package/dist/src/lib/process-save-draft.d.ts +53 -0
- package/dist/src/lib/process-scope-statistics.d.ts +210 -0
- package/dist/src/lib/process-verify-rows.d.ts +71 -0
- package/dist/src/lib/publish.d.ts +219 -0
- package/dist/src/lib/remote.d.ts +19 -0
- package/dist/src/lib/run.d.ts +60 -0
- package/dist/src/lib/runtime-rulesets.d.ts +29 -0
- package/dist/src/lib/state-lock.d.ts +25 -0
- package/dist/src/lib/state-lock.js +23 -1
- package/dist/src/lib/state-lock.js.map +1 -1
- package/dist/src/lib/supabase-client.d.ts +47 -0
- package/dist/src/lib/supabase-data-api-contract.d.ts +304 -0
- package/dist/src/lib/supabase-data-api-replay.d.ts +74 -0
- package/dist/src/lib/supabase-json-ordered-write.d.ts +65 -0
- package/dist/src/lib/supabase-rest.d.ts +26 -0
- package/dist/src/lib/supabase-session.d.ts +115 -0
- package/dist/src/lib/tidas-languages.d.ts +3 -0
- package/dist/src/lib/tidas-sdk-package-validator.d.ts +111 -0
- package/dist/src/lib/tidas-sdk-validation.d.ts +42 -0
- package/dist/src/lib/unstructured.d.ts +32 -0
- package/dist/src/lib/user-api-key.d.ts +16 -0
- package/dist/src/lib/validation.d.ts +82 -0
- package/dist/src/main.d.ts +4 -0
- package/package.json +13 -2
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { type JsonObject } from './dataset-local.js';
|
|
2
|
+
export type LifecyclemodelGraphFormat = 'json' | 'dot' | 'svg' | 'all';
|
|
3
|
+
export type LifecyclemodelGraphFinding = {
|
|
4
|
+
severity: 'error' | 'warning';
|
|
5
|
+
code: string;
|
|
6
|
+
model_index: number;
|
|
7
|
+
model_id: string | null;
|
|
8
|
+
path: string;
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
export type LifecyclemodelGraphModelReport = {
|
|
12
|
+
index: number;
|
|
13
|
+
id: string | null;
|
|
14
|
+
version: string | null;
|
|
15
|
+
node_count: number;
|
|
16
|
+
edge_count: number;
|
|
17
|
+
finding_count: number;
|
|
18
|
+
files: {
|
|
19
|
+
graph_json: string | null;
|
|
20
|
+
dot: string | null;
|
|
21
|
+
svg: string | null;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export type LifecyclemodelGraphReport = {
|
|
25
|
+
generated_at_utc: string;
|
|
26
|
+
input_path: string;
|
|
27
|
+
out_dir: string;
|
|
28
|
+
format: LifecyclemodelGraphFormat;
|
|
29
|
+
check_connections: boolean;
|
|
30
|
+
status: 'completed' | 'completed_with_findings';
|
|
31
|
+
counts: {
|
|
32
|
+
models: number;
|
|
33
|
+
nodes: number;
|
|
34
|
+
edges: number;
|
|
35
|
+
findings: number;
|
|
36
|
+
};
|
|
37
|
+
files: {
|
|
38
|
+
report: string;
|
|
39
|
+
findings: string;
|
|
40
|
+
};
|
|
41
|
+
models: LifecyclemodelGraphModelReport[];
|
|
42
|
+
findings: LifecyclemodelGraphFinding[];
|
|
43
|
+
};
|
|
44
|
+
export type RunLifecyclemodelGraphOptions = {
|
|
45
|
+
inputPath: string;
|
|
46
|
+
outDir: string;
|
|
47
|
+
format?: string | null;
|
|
48
|
+
checkConnections?: boolean | null;
|
|
49
|
+
rawInput?: unknown;
|
|
50
|
+
now?: Date;
|
|
51
|
+
};
|
|
52
|
+
type XflowNode = {
|
|
53
|
+
id: string;
|
|
54
|
+
x: number;
|
|
55
|
+
y: number;
|
|
56
|
+
width: number;
|
|
57
|
+
height: number;
|
|
58
|
+
data: JsonObject;
|
|
59
|
+
};
|
|
60
|
+
type XflowEdge = {
|
|
61
|
+
id: string;
|
|
62
|
+
source: {
|
|
63
|
+
cell?: string;
|
|
64
|
+
};
|
|
65
|
+
target: {
|
|
66
|
+
cell?: string;
|
|
67
|
+
};
|
|
68
|
+
data: JsonObject;
|
|
69
|
+
};
|
|
70
|
+
declare function normalizeFormat(value: string | null | undefined): LifecyclemodelGraphFormat;
|
|
71
|
+
declare function asArray(value: unknown): unknown[];
|
|
72
|
+
declare function normalizeNodes(jsonTg: JsonObject): XflowNode[];
|
|
73
|
+
declare function normalizeEdges(jsonTg: JsonObject): XflowEdge[];
|
|
74
|
+
declare function labelFromNode(node: XflowNode): string;
|
|
75
|
+
declare function buildDot(modelId: string | null, nodes: XflowNode[], edges: XflowEdge[]): string;
|
|
76
|
+
declare function buildSvg(nodes: XflowNode[], edges: XflowEdge[]): string;
|
|
77
|
+
declare function checkEdges(modelIndex: number, modelId: string | null, nodes: XflowNode[], edges: XflowEdge[]): LifecyclemodelGraphFinding[];
|
|
78
|
+
declare function safeStem(index: number, id: string | null): string;
|
|
79
|
+
export declare function runLifecyclemodelGraph(options: RunLifecyclemodelGraphOptions): Promise<LifecyclemodelGraphReport>;
|
|
80
|
+
export declare const __testInternals: {
|
|
81
|
+
asArray: typeof asArray;
|
|
82
|
+
buildDot: typeof buildDot;
|
|
83
|
+
buildSvg: typeof buildSvg;
|
|
84
|
+
checkEdges: typeof checkEdges;
|
|
85
|
+
labelFromNode: typeof labelFromNode;
|
|
86
|
+
normalizeFormat: typeof normalizeFormat;
|
|
87
|
+
normalizeNodes: typeof normalizeNodes;
|
|
88
|
+
normalizeEdges: typeof normalizeEdges;
|
|
89
|
+
safeStem: typeof safeStem;
|
|
90
|
+
};
|
|
91
|
+
export {};
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import type { FetchLike } from './http.js';
|
|
2
|
+
type JsonRecord = Record<string, unknown>;
|
|
3
|
+
type OrchestrateAction = 'plan' | 'execute' | 'publish';
|
|
4
|
+
type NodeKind = 'reference_flow' | 'process' | 'lifecyclemodel' | 'resulting_process' | 'subsystem';
|
|
5
|
+
type RequestedAction = 'auto' | 'reuse_existing_resulting_process' | 'reuse_existing_process' | 'reuse_existing_model' | 'build_process' | 'build_submodel' | 'cutoff' | 'unresolved';
|
|
6
|
+
type Resolution = 'unresolved' | 'cutoff' | 'reused_existing_resulting_process' | 'reused_existing_process' | 'reused_existing_model' | 'build_via_process_automated_builder' | 'build_via_lifecyclemodel_automated_builder';
|
|
7
|
+
type InvocationKind = 'process_builder' | 'lifecyclemodel_builder' | 'projector';
|
|
8
|
+
type InvocationStatus = 'success' | 'failed' | 'skipped_due_to_fail_fast' | 'skipped_due_to_dependency_failed' | 'skipped_due_to_dependency_skipped_due_to_fail_fast' | 'skipped_due_to_dependency_skipped_due_to_dependency_failed';
|
|
9
|
+
type Candidate = JsonRecord & {
|
|
10
|
+
id: string;
|
|
11
|
+
score: number;
|
|
12
|
+
};
|
|
13
|
+
type ProcessBuilderConfig = {
|
|
14
|
+
flow_file: string | null;
|
|
15
|
+
flow_json: unknown;
|
|
16
|
+
run_id: string | null;
|
|
17
|
+
publish: boolean;
|
|
18
|
+
commit: boolean;
|
|
19
|
+
forward_args: string[];
|
|
20
|
+
};
|
|
21
|
+
type SubmodelBuilderConfig = {
|
|
22
|
+
manifest: string | null;
|
|
23
|
+
out_dir: string | null;
|
|
24
|
+
dry_run: boolean;
|
|
25
|
+
};
|
|
26
|
+
type ProjectorConfig = {
|
|
27
|
+
command: 'prepare' | 'build' | 'project';
|
|
28
|
+
request: string | null;
|
|
29
|
+
model_file: string | null;
|
|
30
|
+
out_dir: string | null;
|
|
31
|
+
projection_role: 'primary' | 'all';
|
|
32
|
+
run_always: boolean;
|
|
33
|
+
publish_processes: boolean;
|
|
34
|
+
publish_relations: boolean;
|
|
35
|
+
};
|
|
36
|
+
type OrchestrateNode = {
|
|
37
|
+
node_id: string;
|
|
38
|
+
kind: NodeKind;
|
|
39
|
+
label: string;
|
|
40
|
+
entity: JsonRecord;
|
|
41
|
+
requested_action: RequestedAction;
|
|
42
|
+
depends_on: string[];
|
|
43
|
+
parent_node_id: string | null;
|
|
44
|
+
existing_resulting_process_candidates: Candidate[];
|
|
45
|
+
existing_process_candidates: Candidate[];
|
|
46
|
+
existing_lifecyclemodel_candidates: Candidate[];
|
|
47
|
+
process_builder?: ProcessBuilderConfig;
|
|
48
|
+
submodel_builder?: SubmodelBuilderConfig;
|
|
49
|
+
projector?: ProjectorConfig;
|
|
50
|
+
resolution?: Resolution;
|
|
51
|
+
resolution_reason?: string;
|
|
52
|
+
selected_candidate?: Candidate | null;
|
|
53
|
+
boundary_reason?: string | null;
|
|
54
|
+
planned_invocations: string[];
|
|
55
|
+
};
|
|
56
|
+
type PlanInvocation = {
|
|
57
|
+
invocation_id: string;
|
|
58
|
+
node_id: string;
|
|
59
|
+
kind: InvocationKind;
|
|
60
|
+
config: JsonRecord;
|
|
61
|
+
artifact_dir: string;
|
|
62
|
+
depends_on_invocation_id?: string;
|
|
63
|
+
last_status?: InvocationStatus;
|
|
64
|
+
last_exit_code?: number | null;
|
|
65
|
+
last_result_file?: string | null;
|
|
66
|
+
artifacts?: JsonRecord;
|
|
67
|
+
};
|
|
68
|
+
type NormalizedPublishConfig = {
|
|
69
|
+
intent: 'dry_run' | 'prepare_only' | 'publish';
|
|
70
|
+
prepare_lifecyclemodel_payload: boolean;
|
|
71
|
+
prepare_resulting_process_payload: boolean;
|
|
72
|
+
prepare_relation_payload: boolean;
|
|
73
|
+
};
|
|
74
|
+
type ExecutionSummary = {
|
|
75
|
+
executed_at: string;
|
|
76
|
+
successful_invocations: number;
|
|
77
|
+
failed_invocations: number;
|
|
78
|
+
blocked_invocations: number;
|
|
79
|
+
status: 'completed' | 'failed';
|
|
80
|
+
};
|
|
81
|
+
type AssemblyPlan = {
|
|
82
|
+
skill: 'lifecyclemodel-recursive-orchestrator';
|
|
83
|
+
request_id: string;
|
|
84
|
+
created_at: string;
|
|
85
|
+
request_file: string;
|
|
86
|
+
goal: JsonRecord;
|
|
87
|
+
root: JsonRecord;
|
|
88
|
+
orchestration: JsonRecord;
|
|
89
|
+
candidate_sources: JsonRecord;
|
|
90
|
+
publish: NormalizedPublishConfig;
|
|
91
|
+
notes: string[];
|
|
92
|
+
nodes: OrchestrateNode[];
|
|
93
|
+
edges: Array<{
|
|
94
|
+
from: string;
|
|
95
|
+
to: string;
|
|
96
|
+
relation: string;
|
|
97
|
+
}>;
|
|
98
|
+
invocations: PlanInvocation[];
|
|
99
|
+
planner_summary: {
|
|
100
|
+
status: 'planned' | 'executed';
|
|
101
|
+
message: string;
|
|
102
|
+
};
|
|
103
|
+
warnings: string[];
|
|
104
|
+
unresolved: Array<{
|
|
105
|
+
node_id: string;
|
|
106
|
+
label: string;
|
|
107
|
+
reason: string;
|
|
108
|
+
}>;
|
|
109
|
+
boundaries: Array<{
|
|
110
|
+
node_id: string;
|
|
111
|
+
reason: string;
|
|
112
|
+
}>;
|
|
113
|
+
artifacts: {
|
|
114
|
+
root: string;
|
|
115
|
+
request_normalized: string;
|
|
116
|
+
assembly_plan: string;
|
|
117
|
+
graph_manifest: string;
|
|
118
|
+
lineage_manifest: string;
|
|
119
|
+
boundary_report: string;
|
|
120
|
+
invocations_dir: string;
|
|
121
|
+
publish_bundle: string;
|
|
122
|
+
publish_summary: string;
|
|
123
|
+
};
|
|
124
|
+
summary: {
|
|
125
|
+
node_count: number;
|
|
126
|
+
edge_count: number;
|
|
127
|
+
invocation_count: number;
|
|
128
|
+
unresolved_count: number;
|
|
129
|
+
};
|
|
130
|
+
execution_summary?: ExecutionSummary;
|
|
131
|
+
};
|
|
132
|
+
type InvocationExecutionResult = {
|
|
133
|
+
invocation_id: string;
|
|
134
|
+
node_id: string;
|
|
135
|
+
kind: InvocationKind;
|
|
136
|
+
status: InvocationStatus;
|
|
137
|
+
exit_code: number | null;
|
|
138
|
+
result_file: string;
|
|
139
|
+
planned_artifacts?: JsonRecord;
|
|
140
|
+
artifacts?: JsonRecord;
|
|
141
|
+
error?: string;
|
|
142
|
+
dry_run?: boolean;
|
|
143
|
+
};
|
|
144
|
+
type GraphManifest = {
|
|
145
|
+
root: JsonRecord;
|
|
146
|
+
nodes: JsonRecord[];
|
|
147
|
+
edges: JsonRecord[];
|
|
148
|
+
boundaries: JsonRecord[];
|
|
149
|
+
unresolved: JsonRecord[];
|
|
150
|
+
stats: JsonRecord;
|
|
151
|
+
};
|
|
152
|
+
type LineageManifest = {
|
|
153
|
+
root_request: JsonRecord;
|
|
154
|
+
builder_invocations: JsonRecord[];
|
|
155
|
+
node_resolution_log: JsonRecord[];
|
|
156
|
+
published_dependencies: JsonRecord[];
|
|
157
|
+
resulting_process_relations: JsonRecord[];
|
|
158
|
+
unresolved_history: JsonRecord[];
|
|
159
|
+
};
|
|
160
|
+
export type LifecyclemodelOrchestratePlanReport = {
|
|
161
|
+
schema_version: 1;
|
|
162
|
+
generated_at_utc: string;
|
|
163
|
+
action: 'plan';
|
|
164
|
+
status: 'planned';
|
|
165
|
+
request_id: string;
|
|
166
|
+
out_dir: string;
|
|
167
|
+
counts: {
|
|
168
|
+
nodes: number;
|
|
169
|
+
edges: number;
|
|
170
|
+
invocations: number;
|
|
171
|
+
unresolved: number;
|
|
172
|
+
};
|
|
173
|
+
files: {
|
|
174
|
+
request_normalized: string;
|
|
175
|
+
assembly_plan: string;
|
|
176
|
+
graph_manifest: string;
|
|
177
|
+
lineage_manifest: string;
|
|
178
|
+
boundary_report: string;
|
|
179
|
+
};
|
|
180
|
+
warnings: string[];
|
|
181
|
+
};
|
|
182
|
+
export type LifecyclemodelOrchestrateExecuteReport = {
|
|
183
|
+
schema_version: 1;
|
|
184
|
+
generated_at_utc: string;
|
|
185
|
+
action: 'execute';
|
|
186
|
+
status: 'completed' | 'failed';
|
|
187
|
+
request_id: string;
|
|
188
|
+
out_dir: string;
|
|
189
|
+
execution: {
|
|
190
|
+
successful_invocations: number;
|
|
191
|
+
failed_invocations: number;
|
|
192
|
+
blocked_invocations: number;
|
|
193
|
+
};
|
|
194
|
+
files: {
|
|
195
|
+
request_normalized: string;
|
|
196
|
+
assembly_plan: string;
|
|
197
|
+
graph_manifest: string;
|
|
198
|
+
lineage_manifest: string;
|
|
199
|
+
boundary_report: string;
|
|
200
|
+
invocations_dir: string;
|
|
201
|
+
};
|
|
202
|
+
warnings: string[];
|
|
203
|
+
};
|
|
204
|
+
export type LifecyclemodelOrchestratePublishReport = {
|
|
205
|
+
schema_version: 1;
|
|
206
|
+
generated_at_utc: string;
|
|
207
|
+
action: 'publish';
|
|
208
|
+
status: 'prepared_local_publish_bundle';
|
|
209
|
+
request_id: string;
|
|
210
|
+
run_dir: string;
|
|
211
|
+
counts: {
|
|
212
|
+
lifecyclemodels: number;
|
|
213
|
+
projected_processes: number;
|
|
214
|
+
resulting_process_relations: number;
|
|
215
|
+
process_build_runs: number;
|
|
216
|
+
};
|
|
217
|
+
files: {
|
|
218
|
+
assembly_plan: string;
|
|
219
|
+
graph_manifest: string;
|
|
220
|
+
lineage_manifest: string;
|
|
221
|
+
publish_bundle: string;
|
|
222
|
+
publish_summary: string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
export type LifecyclemodelOrchestrateReport = LifecyclemodelOrchestratePlanReport | LifecyclemodelOrchestrateExecuteReport | LifecyclemodelOrchestratePublishReport;
|
|
226
|
+
export type RunLifecyclemodelOrchestrateOptions = {
|
|
227
|
+
action: OrchestrateAction;
|
|
228
|
+
inputPath?: string;
|
|
229
|
+
outDir?: string | null;
|
|
230
|
+
runDir?: string;
|
|
231
|
+
allowProcessBuild?: boolean;
|
|
232
|
+
allowSubmodelBuild?: boolean;
|
|
233
|
+
publishLifecyclemodels?: boolean;
|
|
234
|
+
publishResultingProcessRelations?: boolean;
|
|
235
|
+
now?: Date;
|
|
236
|
+
env?: NodeJS.ProcessEnv;
|
|
237
|
+
fetchImpl?: FetchLike;
|
|
238
|
+
};
|
|
239
|
+
declare function invariant<T>(value: T | null | undefined, message: string, details?: JsonRecord): T;
|
|
240
|
+
declare function safeSlug(value: string): string;
|
|
241
|
+
declare function requireObject(value: unknown, label: string): JsonRecord;
|
|
242
|
+
declare function requireEnum<T extends string>(value: unknown, allowed: readonly T[], label: string): T;
|
|
243
|
+
declare function requireBoolean(value: unknown, label: string): boolean;
|
|
244
|
+
declare function requireInteger(value: unknown, label: string): number;
|
|
245
|
+
declare function resolveInputPath(baseDir: string, raw: unknown): string | null;
|
|
246
|
+
declare function defaultCandidateSources(): JsonRecord;
|
|
247
|
+
declare function entityFromRoot(root: JsonRecord): JsonRecord;
|
|
248
|
+
declare function normalizePublishConfig(publish: JsonRecord): NormalizedPublishConfig;
|
|
249
|
+
declare function serializeInvocationConfig(value: ProcessBuilderConfig | SubmodelBuilderConfig | ProjectorConfig | undefined, message: string, details?: JsonRecord): JsonRecord;
|
|
250
|
+
declare function normalizeInvocationFailure(error: unknown): {
|
|
251
|
+
exit_code: number;
|
|
252
|
+
error: string;
|
|
253
|
+
};
|
|
254
|
+
declare function normalizeCandidate(raw: unknown): Candidate;
|
|
255
|
+
declare function normalizeCandidateList(value: unknown): Candidate[];
|
|
256
|
+
declare function normalizeRequestedAction(value: unknown): RequestedAction;
|
|
257
|
+
declare function normalizeDependsOn(value: unknown): string[];
|
|
258
|
+
declare function normalizeProcessBuilderConfig(value: unknown, baseDir: string): ProcessBuilderConfig | undefined;
|
|
259
|
+
declare function normalizeSubmodelBuilderConfig(value: unknown, baseDir: string): SubmodelBuilderConfig | undefined;
|
|
260
|
+
declare function normalizeProjectorConfig(value: unknown, baseDir: string): ProjectorConfig | undefined;
|
|
261
|
+
declare function normalizeNode(rawNode: JsonRecord, index: number, baseDir: string): OrchestrateNode;
|
|
262
|
+
declare function deriveRootNode(root: JsonRecord, goal: JsonRecord, baseDir: string): OrchestrateNode;
|
|
263
|
+
declare function buildEdges(requestEdges: unknown[], nodes: OrchestrateNode[]): Array<{
|
|
264
|
+
from: string;
|
|
265
|
+
to: string;
|
|
266
|
+
relation: string;
|
|
267
|
+
}>;
|
|
268
|
+
declare function topoSortNodes(nodes: OrchestrateNode[]): {
|
|
269
|
+
ordered: OrchestrateNode[];
|
|
270
|
+
warnings: string[];
|
|
271
|
+
};
|
|
272
|
+
declare function selectResolution(node: OrchestrateNode, orchestration: JsonRecord): {
|
|
273
|
+
resolution: Resolution;
|
|
274
|
+
selected_candidate: Candidate | null;
|
|
275
|
+
reason: string;
|
|
276
|
+
boundary_reason: string | null;
|
|
277
|
+
};
|
|
278
|
+
declare function shouldRunProjector(node: OrchestrateNode, resolution: Resolution): boolean;
|
|
279
|
+
declare function validateRequestShape(request: JsonRecord): void;
|
|
280
|
+
declare function buildPlan(request: JsonRecord, requestPath: string, outDir: string, now: Date): AssemblyPlan;
|
|
281
|
+
declare function executionStatusByNode(plan: AssemblyPlan, executionResults: InvocationExecutionResult[]): Record<string, string>;
|
|
282
|
+
declare function buildGraphManifest(plan: AssemblyPlan, executionResults: InvocationExecutionResult[]): GraphManifest;
|
|
283
|
+
declare function buildLineageManifest(plan: AssemblyPlan, executionResults: InvocationExecutionResult[]): LineageManifest;
|
|
284
|
+
declare function buildBoundaryReport(plan: AssemblyPlan, executionResults: InvocationExecutionResult[]): JsonRecord;
|
|
285
|
+
declare function requireFile(filePath: string, label: string): void;
|
|
286
|
+
declare function parseInlineJson(value: unknown, label: string): JsonRecord;
|
|
287
|
+
declare function executeProcessBuilderInvocation(invocation: PlanInvocation, plan: AssemblyPlan, resultFile: string, now: Date): Promise<InvocationExecutionResult>;
|
|
288
|
+
declare function executeLifecyclemodelBuilderInvocation(invocation: PlanInvocation, resultFile: string, now: Date): Promise<InvocationExecutionResult>;
|
|
289
|
+
declare function inferProjectorModelFile(invocation: PlanInvocation, executionMap: Map<string, InvocationExecutionResult>): string | null;
|
|
290
|
+
declare function collectProjectorDependencyArtifacts(invocation: PlanInvocation, executionMap: Map<string, InvocationExecutionResult>): {
|
|
291
|
+
processCatalogPath: string | null;
|
|
292
|
+
sourceRunDirs: string[];
|
|
293
|
+
};
|
|
294
|
+
declare function buildProjectorRequest(invocation: PlanInvocation, modelFile: string, plan: AssemblyPlan, processCatalogPath: string | null, sourceRunDirs: string[]): JsonRecord;
|
|
295
|
+
declare function executeProjectorInvocation(invocation: PlanInvocation, plan: AssemblyPlan, executionMap: Map<string, InvocationExecutionResult>, resultFile: string, now: Date, env: NodeJS.ProcessEnv, fetchImpl: FetchLike | undefined): Promise<InvocationExecutionResult>;
|
|
296
|
+
declare function executePlan(plan: AssemblyPlan, now: Date, env: NodeJS.ProcessEnv, fetchImpl: FetchLike | undefined): Promise<{
|
|
297
|
+
results: InvocationExecutionResult[];
|
|
298
|
+
executionSummary: ExecutionSummary;
|
|
299
|
+
}>;
|
|
300
|
+
declare function loadInvocationResults(invocationsDir: string): InvocationExecutionResult[];
|
|
301
|
+
declare function collectPublishBundle(runDir: string, plan: AssemblyPlan, graphManifest: GraphManifest, lineageManifest: LineageManifest, executionResults: InvocationExecutionResult[], publishLifecyclemodels: boolean, publishResultingProcessRelations: boolean): JsonRecord;
|
|
302
|
+
declare function normalizeRequestForArtifacts(plan: AssemblyPlan): JsonRecord;
|
|
303
|
+
export declare function runLifecyclemodelOrchestrate(options: RunLifecyclemodelOrchestrateOptions): Promise<LifecyclemodelOrchestrateReport>;
|
|
304
|
+
export declare const __testInternals: {
|
|
305
|
+
invariant: typeof invariant;
|
|
306
|
+
safeSlug: typeof safeSlug;
|
|
307
|
+
requireObject: typeof requireObject;
|
|
308
|
+
requireEnum: typeof requireEnum;
|
|
309
|
+
requireBoolean: typeof requireBoolean;
|
|
310
|
+
requireInteger: typeof requireInteger;
|
|
311
|
+
resolveInputPath: typeof resolveInputPath;
|
|
312
|
+
defaultCandidateSources: typeof defaultCandidateSources;
|
|
313
|
+
entityFromRoot: typeof entityFromRoot;
|
|
314
|
+
normalizeCandidate: typeof normalizeCandidate;
|
|
315
|
+
normalizeCandidateList: typeof normalizeCandidateList;
|
|
316
|
+
normalizeRequestedAction: typeof normalizeRequestedAction;
|
|
317
|
+
normalizeDependsOn: typeof normalizeDependsOn;
|
|
318
|
+
normalizePublishConfig: typeof normalizePublishConfig;
|
|
319
|
+
serializeInvocationConfig: typeof serializeInvocationConfig;
|
|
320
|
+
normalizeInvocationFailure: typeof normalizeInvocationFailure;
|
|
321
|
+
normalizeProcessBuilderConfig: typeof normalizeProcessBuilderConfig;
|
|
322
|
+
normalizeSubmodelBuilderConfig: typeof normalizeSubmodelBuilderConfig;
|
|
323
|
+
normalizeProjectorConfig: typeof normalizeProjectorConfig;
|
|
324
|
+
normalizeNode: typeof normalizeNode;
|
|
325
|
+
deriveRootNode: typeof deriveRootNode;
|
|
326
|
+
buildEdges: typeof buildEdges;
|
|
327
|
+
topoSortNodes: typeof topoSortNodes;
|
|
328
|
+
selectResolution: typeof selectResolution;
|
|
329
|
+
shouldRunProjector: typeof shouldRunProjector;
|
|
330
|
+
validateRequestShape: typeof validateRequestShape;
|
|
331
|
+
buildPlan: typeof buildPlan;
|
|
332
|
+
executionStatusByNode: typeof executionStatusByNode;
|
|
333
|
+
buildGraphManifest: typeof buildGraphManifest;
|
|
334
|
+
buildLineageManifest: typeof buildLineageManifest;
|
|
335
|
+
buildBoundaryReport: typeof buildBoundaryReport;
|
|
336
|
+
requireFile: typeof requireFile;
|
|
337
|
+
parseInlineJson: typeof parseInlineJson;
|
|
338
|
+
inferProjectorModelFile: typeof inferProjectorModelFile;
|
|
339
|
+
collectProjectorDependencyArtifacts: typeof collectProjectorDependencyArtifacts;
|
|
340
|
+
executeProcessBuilderInvocation: typeof executeProcessBuilderInvocation;
|
|
341
|
+
executeLifecyclemodelBuilderInvocation: typeof executeLifecyclemodelBuilderInvocation;
|
|
342
|
+
executeProjectorInvocation: typeof executeProjectorInvocation;
|
|
343
|
+
executePlan: typeof executePlan;
|
|
344
|
+
collectPublishBundle: typeof collectPublishBundle;
|
|
345
|
+
normalizeRequestForArtifacts: typeof normalizeRequestForArtifacts;
|
|
346
|
+
loadInvocationResults: typeof loadInvocationResults;
|
|
347
|
+
buildProjectorRequest: typeof buildProjectorRequest;
|
|
348
|
+
};
|
|
349
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
type JsonObject = Record<string, unknown>;
|
|
2
|
+
type LifecyclemodelPublishValidationSummary = {
|
|
3
|
+
available: boolean;
|
|
4
|
+
ok: boolean | null;
|
|
5
|
+
report: string | null;
|
|
6
|
+
};
|
|
7
|
+
export type LifecyclemodelPublishBuildLayout = {
|
|
8
|
+
runId: string;
|
|
9
|
+
runRoot: string;
|
|
10
|
+
modelsDir: string;
|
|
11
|
+
reportsDir: string;
|
|
12
|
+
manifestsDir: string;
|
|
13
|
+
publishStageDir: string;
|
|
14
|
+
runManifestPath: string;
|
|
15
|
+
invocationIndexPath: string;
|
|
16
|
+
validationReportPath: string;
|
|
17
|
+
publishBundlePath: string;
|
|
18
|
+
publishRequestPath: string;
|
|
19
|
+
publishIntentPath: string;
|
|
20
|
+
reportPath: string;
|
|
21
|
+
};
|
|
22
|
+
export type LifecyclemodelPublishBuildReport = {
|
|
23
|
+
schema_version: 1;
|
|
24
|
+
generated_at_utc: string;
|
|
25
|
+
status: 'prepared_local_lifecyclemodel_publish_bundle';
|
|
26
|
+
run_id: string;
|
|
27
|
+
run_root: string;
|
|
28
|
+
counts: {
|
|
29
|
+
lifecyclemodels: number;
|
|
30
|
+
};
|
|
31
|
+
publish_defaults: {
|
|
32
|
+
commit: boolean;
|
|
33
|
+
publish_lifecyclemodels: boolean;
|
|
34
|
+
publish_processes: boolean;
|
|
35
|
+
publish_sources: boolean;
|
|
36
|
+
publish_relations: boolean;
|
|
37
|
+
publish_process_build_runs: boolean;
|
|
38
|
+
relation_mode: 'local_manifest_only';
|
|
39
|
+
};
|
|
40
|
+
validation: LifecyclemodelPublishValidationSummary;
|
|
41
|
+
files: {
|
|
42
|
+
run_manifest: string;
|
|
43
|
+
invocation_index: string;
|
|
44
|
+
publish_bundle: string;
|
|
45
|
+
publish_request: string;
|
|
46
|
+
publish_intent: string;
|
|
47
|
+
report: string;
|
|
48
|
+
};
|
|
49
|
+
next_actions: string[];
|
|
50
|
+
};
|
|
51
|
+
export type RunLifecyclemodelPublishBuildOptions = {
|
|
52
|
+
runDir: string;
|
|
53
|
+
now?: Date;
|
|
54
|
+
cwd?: string;
|
|
55
|
+
};
|
|
56
|
+
declare function buildLayout(runRoot: string): LifecyclemodelPublishBuildLayout;
|
|
57
|
+
declare function resolveLayout(options: RunLifecyclemodelPublishBuildOptions): LifecyclemodelPublishBuildLayout;
|
|
58
|
+
declare function readInvocationIndex(layout: LifecyclemodelPublishBuildLayout): JsonObject;
|
|
59
|
+
declare function collectLifecyclemodelPayloads(layout: LifecyclemodelPublishBuildLayout): JsonObject[];
|
|
60
|
+
declare function readValidationSummary(layout: LifecyclemodelPublishBuildLayout): LifecyclemodelPublishValidationSummary;
|
|
61
|
+
declare function buildPublishRequest(): JsonObject;
|
|
62
|
+
declare function buildPublishIntent(layout: LifecyclemodelPublishBuildLayout, lifecyclemodelCount: number): JsonObject;
|
|
63
|
+
declare function buildInvocationIndex(layout: LifecyclemodelPublishBuildLayout, invocationIndex: JsonObject, options: RunLifecyclemodelPublishBuildOptions, now: Date): JsonObject;
|
|
64
|
+
declare function buildNextActions(layout: LifecyclemodelPublishBuildLayout): string[];
|
|
65
|
+
export declare function runLifecyclemodelPublishBuild(options: RunLifecyclemodelPublishBuildOptions): Promise<LifecyclemodelPublishBuildReport>;
|
|
66
|
+
export declare const __testInternals: {
|
|
67
|
+
buildLayout: typeof buildLayout;
|
|
68
|
+
resolveLayout: typeof resolveLayout;
|
|
69
|
+
readInvocationIndex: typeof readInvocationIndex;
|
|
70
|
+
collectLifecyclemodelPayloads: typeof collectLifecyclemodelPayloads;
|
|
71
|
+
readValidationSummary: typeof readValidationSummary;
|
|
72
|
+
buildPublishRequest: typeof buildPublishRequest;
|
|
73
|
+
buildPublishIntent: typeof buildPublishIntent;
|
|
74
|
+
buildInvocationIndex: typeof buildInvocationIndex;
|
|
75
|
+
buildNextActions: typeof buildNextActions;
|
|
76
|
+
};
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type JsonObject = Record<string, unknown>;
|
|
2
|
+
export type LifecyclemodelPublishResultingProcessReport = {
|
|
3
|
+
generated_at_utc: string;
|
|
4
|
+
run_dir: string;
|
|
5
|
+
status: 'prepared_local_publish_bundle';
|
|
6
|
+
publish_processes: boolean;
|
|
7
|
+
publish_relations: boolean;
|
|
8
|
+
counts: {
|
|
9
|
+
projected_processes: number;
|
|
10
|
+
relations: number;
|
|
11
|
+
};
|
|
12
|
+
source_model: JsonObject;
|
|
13
|
+
files: {
|
|
14
|
+
projection_bundle: string;
|
|
15
|
+
projection_report: string;
|
|
16
|
+
publish_bundle: string;
|
|
17
|
+
publish_intent: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export type RunLifecyclemodelPublishResultingProcessOptions = {
|
|
21
|
+
runDir: string;
|
|
22
|
+
publishProcesses: boolean;
|
|
23
|
+
publishRelations: boolean;
|
|
24
|
+
now?: Date;
|
|
25
|
+
};
|
|
26
|
+
export declare function runLifecyclemodelPublishResultingProcess(options: RunLifecyclemodelPublishResultingProcessOptions): Promise<LifecyclemodelPublishResultingProcessReport>;
|
|
27
|
+
export {};
|