@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.
Files changed (154) hide show
  1. package/README.md +26 -6
  2. package/dist/src/batch.d.ts +6 -0
  3. package/dist/src/batch.js +6 -0
  4. package/dist/src/batch.js.map +1 -0
  5. package/dist/src/cli.d.ts +161 -0
  6. package/dist/src/command-spec.d.ts +90 -0
  7. package/dist/src/command-spec.js +400 -0
  8. package/dist/src/command-spec.js.map +1 -0
  9. package/dist/src/lib/artifacts.d.ts +9 -0
  10. package/dist/src/lib/auth-identity-receipt.d.ts +160 -0
  11. package/dist/src/lib/batch/attempt-recovery.d.ts +12 -0
  12. package/dist/src/lib/batch/attempt-recovery.js +183 -0
  13. package/dist/src/lib/batch/attempt-recovery.js.map +1 -0
  14. package/dist/src/lib/batch/canonical-contracts.d.ts +21 -0
  15. package/dist/src/lib/batch/canonical-contracts.js +180 -0
  16. package/dist/src/lib/batch/canonical-contracts.js.map +1 -0
  17. package/dist/src/lib/batch/engine.d.ts +2 -0
  18. package/dist/src/lib/batch/engine.js +294 -0
  19. package/dist/src/lib/batch/engine.js.map +1 -0
  20. package/dist/src/lib/batch/errors.d.ts +51 -0
  21. package/dist/src/lib/batch/errors.js +81 -0
  22. package/dist/src/lib/batch/errors.js.map +1 -0
  23. package/dist/src/lib/batch/item-projection.d.ts +10 -0
  24. package/dist/src/lib/batch/item-projection.js +118 -0
  25. package/dist/src/lib/batch/item-projection.js.map +1 -0
  26. package/dist/src/lib/batch/run-lock.d.ts +4 -0
  27. package/dist/src/lib/batch/run-lock.js +155 -0
  28. package/dist/src/lib/batch/run-lock.js.map +1 -0
  29. package/dist/src/lib/batch/scheduler-runtime.d.ts +29 -0
  30. package/dist/src/lib/batch/scheduler-runtime.js +114 -0
  31. package/dist/src/lib/batch/scheduler-runtime.js.map +1 -0
  32. package/dist/src/lib/batch/types.d.ts +183 -0
  33. package/dist/src/lib/batch/types.js +2 -0
  34. package/dist/src/lib/batch/types.js.map +1 -0
  35. package/dist/src/lib/dataset-author.d.ts +39 -0
  36. package/dist/src/lib/dataset-bilingual.d.ts +165 -0
  37. package/dist/src/lib/dataset-classification.d.ts +279 -0
  38. package/dist/src/lib/dataset-command.d.ts +53 -0
  39. package/dist/src/lib/dataset-contract.d.ts +82 -0
  40. package/dist/src/lib/dataset-curation-queue.d.ts +219 -0
  41. package/dist/src/lib/dataset-evidence-search.d.ts +134 -0
  42. package/dist/src/lib/dataset-import-lca.d.ts +136 -0
  43. package/dist/src/lib/dataset-local.d.ts +23 -0
  44. package/dist/src/lib/dataset-maintenance-alias-request.d.ts +12 -0
  45. package/dist/src/lib/dataset-maintenance-alias-rewrite.d.ts +111 -0
  46. package/dist/src/lib/dataset-maintenance-apply.d.ts +458 -0
  47. package/dist/src/lib/dataset-maintenance-clear-account.d.ts +161 -0
  48. package/dist/src/lib/dataset-maintenance-contract.d.ts +317 -0
  49. package/dist/src/lib/dataset-maintenance-derivatives.d.ts +48 -0
  50. package/dist/src/lib/dataset-maintenance-flow-identity-approval-claim.d.ts +50 -0
  51. package/dist/src/lib/dataset-maintenance-flow-identity-capture.d.ts +110 -0
  52. package/dist/src/lib/dataset-maintenance-flow-identity-command.d.ts +15 -0
  53. package/dist/src/lib/dataset-maintenance-flow-identity-contract.d.ts +387 -0
  54. package/dist/src/lib/dataset-maintenance-flow-identity-execution-contract.d.ts +456 -0
  55. package/dist/src/lib/dataset-maintenance-flow-identity-freeze.d.ts +99 -0
  56. package/dist/src/lib/dataset-maintenance-flow-identity-plan.d.ts +85 -0
  57. package/dist/src/lib/dataset-maintenance-flow-identity-recovery.d.ts +268 -0
  58. package/dist/src/lib/dataset-maintenance-flow-identity-run.d.ts +123 -0
  59. package/dist/src/lib/dataset-maintenance-flow-identity-seal.d.ts +50 -0
  60. package/dist/src/lib/dataset-maintenance-flow-identity-verify.d.ts +85 -0
  61. package/dist/src/lib/dataset-maintenance-flow-identity-wire.d.ts +32 -0
  62. package/dist/src/lib/dataset-maintenance-pagination.d.ts +58 -0
  63. package/dist/src/lib/dataset-maintenance-plan.d.ts +40 -0
  64. package/dist/src/lib/dataset-maintenance-protected-artifacts.d.ts +16 -0
  65. package/dist/src/lib/dataset-maintenance-protected-before.d.ts +71 -0
  66. package/dist/src/lib/dataset-maintenance-protected-contract.d.ts +385 -0
  67. package/dist/src/lib/dataset-maintenance-protected-freeze.d.ts +148 -0
  68. package/dist/src/lib/dataset-maintenance-protected-preparation.d.ts +76 -0
  69. package/dist/src/lib/dataset-maintenance-protected-run.d.ts +252 -0
  70. package/dist/src/lib/dataset-maintenance-protected-seal.d.ts +93 -0
  71. package/dist/src/lib/dataset-maintenance-protected-toolchain.d.ts +31 -0
  72. package/dist/src/lib/dataset-maintenance-protected-verify.d.ts +99 -0
  73. package/dist/src/lib/dataset-maintenance-remote.d.ts +212 -0
  74. package/dist/src/lib/dataset-maintenance-support-validation.d.ts +18 -0
  75. package/dist/src/lib/dataset-maintenance-verify.d.ts +102 -0
  76. package/dist/src/lib/dataset-patch.d.ts +193 -0
  77. package/dist/src/lib/dataset-references-rewrite.d.ts +77 -0
  78. package/dist/src/lib/dataset-remote-refresh.d.ts +64 -0
  79. package/dist/src/lib/dataset-remote-verify.d.ts +168 -0
  80. package/dist/src/lib/dataset-save-draft-run.d.ts +283 -0
  81. package/dist/src/lib/dataset-save-draft-run.js +54 -21
  82. package/dist/src/lib/dataset-save-draft-run.js.map +1 -1
  83. package/dist/src/lib/dataset-source-upload-attachments.d.ts +109 -0
  84. package/dist/src/lib/dataset-validate.d.ts +62 -0
  85. package/dist/src/lib/dotenv.d.ts +6 -0
  86. package/dist/src/lib/env.d.ts +59 -0
  87. package/dist/src/lib/errors.d.ts +18 -0
  88. package/dist/src/lib/flow-build-alias-map.d.ts +80 -0
  89. package/dist/src/lib/flow-fetch-rows.d.ts +70 -0
  90. package/dist/src/lib/flow-get.d.ts +35 -0
  91. package/dist/src/lib/flow-governance.d.ts +22 -0
  92. package/dist/src/lib/flow-list.d.ts +57 -0
  93. package/dist/src/lib/flow-materialize-decisions.d.ts +67 -0
  94. package/dist/src/lib/flow-payload-validation.d.ts +32 -0
  95. package/dist/src/lib/flow-publish-reviewed-data.d.ts +262 -0
  96. package/dist/src/lib/flow-publish-version.d.ts +193 -0
  97. package/dist/src/lib/flow-qa.d.ts +289 -0
  98. package/dist/src/lib/flow-read.d.ts +70 -0
  99. package/dist/src/lib/flow-regen-product.d.ts +431 -0
  100. package/dist/src/lib/flow-remediate.d.ts +133 -0
  101. package/dist/src/lib/http.d.ts +25 -0
  102. package/dist/src/lib/identity-preflight.d.ts +235 -0
  103. package/dist/src/lib/io.d.ts +2 -0
  104. package/dist/src/lib/kb-search.d.ts +23 -0
  105. package/dist/src/lib/lca-release.d.ts +105 -0
  106. package/dist/src/lib/lifecyclemodel-auto-build.d.ts +223 -0
  107. package/dist/src/lib/lifecyclemodel-bundle-save.d.ts +71 -0
  108. package/dist/src/lib/lifecyclemodel-graph.d.ts +91 -0
  109. package/dist/src/lib/lifecyclemodel-orchestrate.d.ts +349 -0
  110. package/dist/src/lib/lifecyclemodel-publish-build.d.ts +77 -0
  111. package/dist/src/lib/lifecyclemodel-publish-resulting-process.d.ts +27 -0
  112. package/dist/src/lib/lifecyclemodel-qa.d.ts +206 -0
  113. package/dist/src/lib/lifecyclemodel-resulting-process.d.ts +204 -0
  114. package/dist/src/lib/lifecyclemodel-save-draft-run.d.ts +96 -0
  115. package/dist/src/lib/lifecyclemodel-validate-build.d.ts +78 -0
  116. package/dist/src/lib/llm.d.ts +51 -0
  117. package/dist/src/lib/package-version.d.ts +3 -0
  118. package/dist/src/lib/process-auto-build.d.ts +168 -0
  119. package/dist/src/lib/process-batch-build.d.ts +97 -0
  120. package/dist/src/lib/process-dedup-review.d.ts +253 -0
  121. package/dist/src/lib/process-flow-build-plan.d.ts +108 -0
  122. package/dist/src/lib/process-get.d.ts +26 -0
  123. package/dist/src/lib/process-list.d.ts +87 -0
  124. package/dist/src/lib/process-payload-validation.d.ts +27 -0
  125. package/dist/src/lib/process-publish-build.d.ts +148 -0
  126. package/dist/src/lib/process-qa.d.ts +243 -0
  127. package/dist/src/lib/process-refresh-references.d.ts +179 -0
  128. package/dist/src/lib/process-required-fields.d.ts +142 -0
  129. package/dist/src/lib/process-resume-build.d.ts +77 -0
  130. package/dist/src/lib/process-save-draft-run.d.ts +72 -0
  131. package/dist/src/lib/process-save-draft.d.ts +53 -0
  132. package/dist/src/lib/process-scope-statistics.d.ts +210 -0
  133. package/dist/src/lib/process-verify-rows.d.ts +71 -0
  134. package/dist/src/lib/publish.d.ts +219 -0
  135. package/dist/src/lib/remote.d.ts +19 -0
  136. package/dist/src/lib/run.d.ts +60 -0
  137. package/dist/src/lib/runtime-rulesets.d.ts +29 -0
  138. package/dist/src/lib/state-lock.d.ts +25 -0
  139. package/dist/src/lib/state-lock.js +23 -1
  140. package/dist/src/lib/state-lock.js.map +1 -1
  141. package/dist/src/lib/supabase-client.d.ts +47 -0
  142. package/dist/src/lib/supabase-data-api-contract.d.ts +304 -0
  143. package/dist/src/lib/supabase-data-api-replay.d.ts +74 -0
  144. package/dist/src/lib/supabase-json-ordered-write.d.ts +65 -0
  145. package/dist/src/lib/supabase-rest.d.ts +26 -0
  146. package/dist/src/lib/supabase-session.d.ts +115 -0
  147. package/dist/src/lib/tidas-languages.d.ts +3 -0
  148. package/dist/src/lib/tidas-sdk-package-validator.d.ts +111 -0
  149. package/dist/src/lib/tidas-sdk-validation.d.ts +42 -0
  150. package/dist/src/lib/unstructured.d.ts +32 -0
  151. package/dist/src/lib/user-api-key.d.ts +16 -0
  152. package/dist/src/lib/validation.d.ts +82 -0
  153. package/dist/src/main.d.ts +4 -0
  154. package/package.json +13 -2
@@ -0,0 +1,235 @@
1
+ import type { FetchLike } from './http.js';
2
+ import { type JsonObject } from './dataset-local.js';
3
+ import { type SafeParseSchema, type SdkValidationFactory } from './tidas-sdk-validation.js';
4
+ type IdentityPreflightKind = 'process' | 'flow';
5
+ export type IdentityPreflightDecision = 'reuse' | 'update_same_row' | 'version_bump' | 'create_new' | 'block_duplicate' | 'manual_review';
6
+ export type IdentityPreflightStatus = 'passed' | 'blocked' | 'needs_review';
7
+ export type IdentityPreflightFinding = {
8
+ code: string;
9
+ severity: 'info' | 'warning' | 'blocker';
10
+ message: string;
11
+ candidate_index?: number;
12
+ };
13
+ type ValidationSummary = {
14
+ status: 'passed' | 'failed' | 'not_applicable';
15
+ validator: string | null;
16
+ issue_count: number;
17
+ issues: Array<{
18
+ path: string;
19
+ message: string;
20
+ code: string;
21
+ }>;
22
+ };
23
+ type IdentityProfile = {
24
+ id: string | null;
25
+ version: string | null;
26
+ state_code: number | null;
27
+ names: string[];
28
+ normalized_names: string[];
29
+ identity_key: string;
30
+ exchange_signature: string[];
31
+ fields: Record<string, string | null | string[]>;
32
+ };
33
+ export type IdentityPreflightCandidateReport = {
34
+ index: number;
35
+ id: string | null;
36
+ version: string | null;
37
+ state_code: number | null;
38
+ names: string[];
39
+ fields: Record<string, string | null | string[]>;
40
+ exchange_signature: string[];
41
+ identity_key: string;
42
+ match_score: number;
43
+ match_reasons: string[];
44
+ decision_hint: IdentityPreflightDecision | null;
45
+ };
46
+ export type IdentityPreflightCandidateSourceReport = {
47
+ path: string;
48
+ kind: 'embedded_request' | 'file' | 'directory' | 'remote_search';
49
+ row_count: number;
50
+ scanned_files: string[];
51
+ endpoint?: string;
52
+ query?: string;
53
+ filter?: JsonObject | null;
54
+ options?: JsonObject | null;
55
+ };
56
+ export type IdentityPreflightReport = {
57
+ schema_version: 1;
58
+ generated_at_utc: string;
59
+ kind: IdentityPreflightKind;
60
+ status: IdentityPreflightStatus;
61
+ decision: IdentityPreflightDecision;
62
+ confidence: 'high' | 'medium' | 'low';
63
+ input_path: string;
64
+ out_dir: string | null;
65
+ target: {
66
+ id: string | null;
67
+ version: string | null;
68
+ names: string[];
69
+ fields: Record<string, string | null | string[]>;
70
+ identity_key: string;
71
+ exchange_signature: string[];
72
+ schema_validation: ValidationSummary;
73
+ };
74
+ candidates: IdentityPreflightCandidateReport[];
75
+ candidate_sources: IdentityPreflightCandidateSourceReport[];
76
+ findings: IdentityPreflightFinding[];
77
+ blockers: IdentityPreflightFinding[];
78
+ next_action: 'reuse_existing' | 'repair_existing_draft' | 'prepare_version_update' | 'materialize_new_payload' | 'stop_duplicate' | 'queue_manual_review';
79
+ files: {
80
+ identity_decision: string | null;
81
+ candidates: string | null;
82
+ candidate_sources: string | null;
83
+ };
84
+ };
85
+ export type RunIdentityPreflightOptions = {
86
+ inputPath: string;
87
+ outDir?: string | null;
88
+ rawInput?: unknown;
89
+ candidateInputPaths?: string[];
90
+ remoteCandidateSearch?: boolean;
91
+ remoteQuery?: string | null;
92
+ remoteFilter?: JsonObject | null;
93
+ remoteLimit?: number | null;
94
+ remoteDataSource?: string | null;
95
+ env?: NodeJS.ProcessEnv;
96
+ fetchImpl?: FetchLike;
97
+ timeoutMs?: number;
98
+ now?: Date;
99
+ schemas?: Partial<Record<IdentityPreflightKind, SafeParseSchema>>;
100
+ };
101
+ export type RunProcessIdentityPreflightOptions = RunIdentityPreflightOptions;
102
+ export type RunFlowIdentityPreflightOptions = RunIdentityPreflightOptions;
103
+ export type ProcessIdentityPreflightReport = IdentityPreflightReport & {
104
+ kind: 'process';
105
+ };
106
+ export type FlowIdentityPreflightReport = IdentityPreflightReport & {
107
+ kind: 'flow';
108
+ };
109
+ type NormalizedInput = {
110
+ target: JsonObject;
111
+ candidates: JsonObject[];
112
+ candidateInputPaths: string[];
113
+ remoteCandidateSearch: RemoteCandidateSearchConfig;
114
+ };
115
+ type CandidateEvaluation = {
116
+ report: IdentityPreflightCandidateReport;
117
+ findings: IdentityPreflightFinding[];
118
+ };
119
+ type RemoteCandidateSearchConfig = {
120
+ enabled: boolean;
121
+ query: string | null;
122
+ filter: JsonObject | null;
123
+ profileHints: JsonObject | null;
124
+ limit: number | null;
125
+ dataSource: string | null;
126
+ matchThreshold: number | null;
127
+ lexicalWeight: number | null;
128
+ semanticWeight: number | null;
129
+ rrfK: number | null;
130
+ pageSize: number | null;
131
+ pageCurrent: number | null;
132
+ };
133
+ declare function normalizePositiveInteger(value: unknown, label: string): number | null;
134
+ declare function normalizeNonNegativeNumber(value: unknown, label: string): number | null;
135
+ declare function normalizeMatchThreshold(value: unknown): number | null;
136
+ declare function normalizeRemoteCandidateSearch(value: unknown): RemoteCandidateSearchConfig;
137
+ declare function normalizePreflightInput(rawInput: unknown, kind: IdentityPreflightKind): NormalizedInput;
138
+ interface CandidateInputStats {
139
+ isFile(): boolean;
140
+ isDirectory(): boolean;
141
+ }
142
+ declare function collectCandidateFilesFromStats(resolved: string, stats: CandidateInputStats): string[];
143
+ declare function readCandidateSource(candidatePath: string): {
144
+ rows: JsonObject[];
145
+ source: IdentityPreflightCandidateSourceReport;
146
+ };
147
+ declare function mergeRemoteCandidateSearchConfig(inputConfig: RemoteCandidateSearchConfig, options: RunIdentityPreflightOptions): RemoteCandidateSearchConfig;
148
+ declare function isRemoteQueryNoiseText(value: string): boolean;
149
+ declare function queryFieldValues(value: string | null | string[], limit?: number): string[];
150
+ declare function appendQueryLine(lines: string[], label: string, value: string | null | string[], limit?: number): void;
151
+ declare function exchangeFlowRefsFromSignature(signature: string[]): string[];
152
+ declare function compactRemoteQuery(lines: string[], fallback: string): string | null;
153
+ declare function defaultRemoteQuery(profile: IdentityProfile): string | null;
154
+ declare function remoteSearchFilter(kind: IdentityPreflightKind, profile: IdentityProfile, explicitFilter: JsonObject | null): JsonObject | null;
155
+ declare function remoteSearchOptions(config: RemoteCandidateSearchConfig): JsonObject | null;
156
+ declare function rowsFromRemoteSearchResponse(value: unknown): JsonObject[];
157
+ declare function schemaForKind(kind: IdentityPreflightKind, schemas: Partial<Record<IdentityPreflightKind, SafeParseSchema>> | undefined): {
158
+ validator: string;
159
+ schema: SafeParseSchema;
160
+ createEntity: SdkValidationFactory | null;
161
+ };
162
+ declare function processReferenceExchange(root: JsonObject): JsonObject | null;
163
+ declare function processReferenceFlowValues(root: JsonObject): {
164
+ ids: string[];
165
+ names: string[];
166
+ };
167
+ declare function processProfile(row: JsonObject): IdentityProfile;
168
+ declare function flowProfile(row: JsonObject): IdentityProfile;
169
+ declare function identityKeyFromProfile(kind: IdentityPreflightKind, names: string[], fields: Record<string, string | null | string[]>, exchangeSignature: string[]): string;
170
+ declare function applyIdentityProfileHints(profile: IdentityProfile, hints: JsonObject | null, kind: IdentityPreflightKind): IdentityProfile;
171
+ declare function profileForKind(row: JsonObject, kind: IdentityPreflightKind): IdentityProfile;
172
+ declare function expandedFlowNameVariants(value: string): string[];
173
+ declare function flowNameVariants(names: string[]): string[];
174
+ declare function nameTokens(names: string[]): Set<string>;
175
+ declare function tokenOverlapRatio(left: Set<string>, right: Set<string>): number;
176
+ declare function tokenCoverageRatio(left: Set<string>, right: Set<string>): number;
177
+ declare function hasConflictingFlowName(target: IdentityProfile, candidate: IdentityProfile): boolean;
178
+ declare function sameNonEmptyField(left: string | null | string[], right: string | null | string[]): boolean;
179
+ declare function sameCasField(left: string | null | string[], right: string | null | string[]): boolean;
180
+ declare function elementaryCompartmentKey(value: string): string | null;
181
+ declare function sameElementaryCompartment(left: string | null | string[], right: string | null | string[]): boolean;
182
+ declare function candidateEvaluation(target: IdentityProfile, candidate: IdentityProfile, kind: IdentityPreflightKind, index: number): CandidateEvaluation;
183
+ declare function chooseDecision(evaluations: CandidateEvaluation[], validation: ValidationSummary, kind: IdentityPreflightKind): {
184
+ decision: IdentityPreflightDecision;
185
+ confidence: 'high' | 'medium' | 'low';
186
+ findings: IdentityPreflightFinding[];
187
+ };
188
+ declare function statusForDecision(decision: IdentityPreflightDecision, blockers: IdentityPreflightFinding[]): IdentityPreflightStatus;
189
+ declare function nextActionForDecision(decision: IdentityPreflightDecision): IdentityPreflightReport['next_action'];
190
+ export declare function runIdentityPreflight(kind: IdentityPreflightKind, options: RunIdentityPreflightOptions): Promise<IdentityPreflightReport>;
191
+ export declare function runProcessIdentityPreflight(options: RunProcessIdentityPreflightOptions): Promise<ProcessIdentityPreflightReport>;
192
+ export declare function runFlowIdentityPreflight(options: RunFlowIdentityPreflightOptions): Promise<FlowIdentityPreflightReport>;
193
+ export declare const __testInternals: {
194
+ appendQueryLine: typeof appendQueryLine;
195
+ applyIdentityProfileHints: typeof applyIdentityProfileHints;
196
+ candidateEvaluation: typeof candidateEvaluation;
197
+ chooseDecision: typeof chooseDecision;
198
+ collectCandidateFilesFromStats: typeof collectCandidateFilesFromStats;
199
+ compactRemoteQuery: typeof compactRemoteQuery;
200
+ defaultRemoteQuery: typeof defaultRemoteQuery;
201
+ elementaryCompartmentKey: typeof elementaryCompartmentKey;
202
+ entityFactoryExports: Record<IdentityPreflightKind, "CAS_NUMBER_CHECKSUM_ERROR_CODE" | "CAS_NUMBER_PATTERN" | "CHINESE_CHARACTER_RE" | "ContactCategorySchema" | "ContactSchema" | "DEFAULT_VALIDATION_CONFIG" | "DEFAULT_XML_PARSE_OPTIONS" | "DEFAULT_XML_UNPARSE_OPTIONS" | "ErrorSeverity" | "FlowElementaryCategorySchema" | "FlowProductCategorySchema" | "FlowPropertyCategorySchema" | "FlowPropertySchema" | "FlowSchema" | "LCIAMethodCategorySchema" | "LCIAMethodSchema" | "LifeCycleModelSchema" | "LocationCategorySchema" | "ProcessCategorySchema" | "ProcessSchema" | "SUPPORTED_CATEGORIES" | "SourceCategorySchema" | "SourceSchema" | "TIDAS_LANGUAGE_CODES" | "TIDAS_LANGUAGE_CODE_SET" | "TidasContact" | "TidasEntity" | "TidasFlow" | "TidasFlowProperty" | "TidasLCIAMethod" | "TidasLifeCycleModel" | "TidasProcess" | "TidasSource" | "TidasUnitGroup" | "UnitGroupCategorySchema" | "UnitGroupSchema" | "ValidationUtils" | "batchSuggest" | "buildCategoryReport" | "buildPackageReport" | "categoryValidate" | "collectClassificationIssues" | "collectFlowSchemaGapIssues" | "collectLocalizedTextIssues" | "compareMethodologyWithSchema" | "convertDirectory" | "convertFormat" | "copyEilcdAssets" | "copyRuntimeAssetDir" | "copyTidasAssets" | "createContact" | "createContactFromJSON" | "createContactsBatch" | "createFlow" | "createFlowFromJSON" | "createFlowPropertiesBatch" | "createFlowProperty" | "createFlowPropertyFromJSON" | "createFlowsBatch" | "createLCIAMethod" | "createLCIAMethodFromJSON" | "createLCIAMethodsBatch" | "createLifeCycleModel" | "createLifeCycleModelFromJSON" | "createLifeCycleModelsBatch" | "createProcess" | "createProcessFromJSON" | "createProcessesBatch" | "createSource" | "createSourceFromJSON" | "createSourcesBatch" | "createStaticValidationMethod" | "createTidasEntity" | "createUnitGroup" | "createUnitGroupFromJSON" | "createUnitGroupsBatch" | "createValidationMethod" | "datasetFromXml" | "datasetToXml" | "deepClone" | "default" | "extractMethodologyPaths" | "extractSchemaPaths" | "get" | "getAvailableDataTypes" | "getAvailableTidasContractKinds" | "getGlobalValidationConfig" | "getGlobalValidationMode" | "getTidasContractPack" | "getTidasMethodologyData" | "getTidasMethodologyText" | "getTidasRuntimeRuleset" | "getTidasSchemaData" | "getTidasSchemaText" | "globalConfig" | "isValidCASNumber" | "loadConfigFromEnvironment" | "merge" | "normalizeMethodologyPath" | "normalizeTidasContractKind" | "parseWithZod" | "parseXml" | "resetGlobalConfig" | "resolveRuntimeAssetDir" | "resolveRuntimeAssetsDir" | "set" | "setGlobalValidationConfig" | "setGlobalValidationMode" | "suggestData" | "suggestRawData" | "summarizeIssues" | "unparseXml" | "updatePath" | "validateBatch" | "validateBundledMethodologies" | "validateElementaryFlowsClassificationHierarchy" | "validateLocalizedTextLanguageConstraints" | "validateMethodologySchemaParity" | "validatePackageDir" | "validateProcessesClassificationHierarchy" | "validateProductFlowsClassificationHierarchy" | "validateSourcesClassificationHierarchy" | "validateSuggestionApiKey" | "validateWithZod">;
203
+ exchangeFlowRefsFromSignature: typeof exchangeFlowRefsFromSignature;
204
+ expandedFlowNameVariants: typeof expandedFlowNameVariants;
205
+ flowNameVariants: typeof flowNameVariants;
206
+ flowProfile: typeof flowProfile;
207
+ hasConflictingFlowName: typeof hasConflictingFlowName;
208
+ identityKeyFromProfile: typeof identityKeyFromProfile;
209
+ isRemoteQueryNoiseText: typeof isRemoteQueryNoiseText;
210
+ mergeRemoteCandidateSearchConfig: typeof mergeRemoteCandidateSearchConfig;
211
+ nameTokens: typeof nameTokens;
212
+ nextActionForDecision: typeof nextActionForDecision;
213
+ normalizeMatchThreshold: typeof normalizeMatchThreshold;
214
+ normalizeNonNegativeNumber: typeof normalizeNonNegativeNumber;
215
+ normalizePreflightInput: typeof normalizePreflightInput;
216
+ normalizeRemoteCandidateSearch: typeof normalizeRemoteCandidateSearch;
217
+ normalizePositiveInteger: typeof normalizePositiveInteger;
218
+ processProfile: typeof processProfile;
219
+ processReferenceExchange: typeof processReferenceExchange;
220
+ processReferenceFlowValues: typeof processReferenceFlowValues;
221
+ profileForKind: typeof profileForKind;
222
+ queryFieldValues: typeof queryFieldValues;
223
+ readCandidateSource: typeof readCandidateSource;
224
+ remoteSearchOptions: typeof remoteSearchOptions;
225
+ remoteSearchFilter: typeof remoteSearchFilter;
226
+ rowsFromRemoteSearchResponse: typeof rowsFromRemoteSearchResponse;
227
+ sameCasField: typeof sameCasField;
228
+ sameElementaryCompartment: typeof sameElementaryCompartment;
229
+ sameNonEmptyField: typeof sameNonEmptyField;
230
+ schemaForKind: typeof schemaForKind;
231
+ statusForDecision: typeof statusForDecision;
232
+ tokenCoverageRatio: typeof tokenCoverageRatio;
233
+ tokenOverlapRatio: typeof tokenOverlapRatio;
234
+ };
235
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare function readJsonInput(inputPath: string): unknown;
2
+ export declare function stringifyJson(value: unknown, compact: boolean): string;
@@ -0,0 +1,23 @@
1
+ import type { EnvSpec } from './env.js';
2
+ import type { FetchLike } from './http.js';
3
+ export declare const KB_SEARCH_ENV_KEYS: {
4
+ readonly apiBaseUrl: 'TIANGONG_LCA_KB_SEARCH_API_BASE_URL';
5
+ readonly apiKey: 'TIANGONG_LCA_KB_SEARCH_API_KEY';
6
+ readonly region: 'TIANGONG_LCA_KB_SEARCH_REGION';
7
+ };
8
+ export declare const KB_SEARCH_ENV_SPECS: EnvSpec[];
9
+ export type KbSearchCorpus = 'esg' | 'sci' | 'patent' | 'report' | 'standard' | 'textbook';
10
+ export type KbSearchRuntimeEnv = {
11
+ apiBaseUrl: string | null;
12
+ apiKey: string | null;
13
+ region: string | null;
14
+ };
15
+ export type ExecuteKbSearchOptions = {
16
+ corpus: KbSearchCorpus;
17
+ payload: unknown;
18
+ env: KbSearchRuntimeEnv;
19
+ timeoutMs: number;
20
+ fetchImpl: FetchLike;
21
+ };
22
+ export declare function readKbSearchRuntimeEnv(env: NodeJS.ProcessEnv): KbSearchRuntimeEnv;
23
+ export declare function executeKbSearch(options: ExecuteKbSearchOptions): Promise<unknown>;
@@ -0,0 +1,105 @@
1
+ import type { FetchLike, ResponseLike } from './http.js';
2
+ import { requireSupabaseRestRuntime } from './supabase-client.js';
3
+ export declare const LCA_RELEASE_ACTIONS: readonly ['prepare', 'upload', 'finalize', 'approve', 'publish', 'readback-verify', 'unpublish', 'status', 'current', 'calculation-bundle', 'calculation-artifact', 'artifact-download'];
4
+ export type LcaReleaseAction = (typeof LCA_RELEASE_ACTIONS)[number];
5
+ export type LcaReleaseOutput = {
6
+ path: string;
7
+ sha256: string;
8
+ byteSize: number;
9
+ mediaType: string;
10
+ };
11
+ export type LcaReleaseReport = {
12
+ schemaVersion: 'tiangong.cli.lca-release.v1';
13
+ action: LcaReleaseAction;
14
+ status: 'planned' | 'completed';
15
+ complete: boolean;
16
+ summary: Record<string, unknown>;
17
+ data?: unknown;
18
+ output?: LcaReleaseOutput;
19
+ request?: Record<string, unknown>;
20
+ warnings: string[];
21
+ nextCommands: string[];
22
+ };
23
+ export type RunLcaReleaseOptions = {
24
+ action: LcaReleaseAction;
25
+ inputPath: string | null;
26
+ outputPath: string | null;
27
+ releaseRunId: string | null;
28
+ packageId: string | null;
29
+ artifactId: string | null;
30
+ artifactPath: string | null;
31
+ env: NodeJS.ProcessEnv;
32
+ timeoutMs: number;
33
+ dryRun: boolean;
34
+ force: boolean;
35
+ fetchImpl: FetchLike;
36
+ };
37
+ type JsonRecord = Record<string, unknown>;
38
+ type LocalUploadArtifact = {
39
+ profileId: string;
40
+ format: string;
41
+ sha256: string;
42
+ byteSize: number;
43
+ mediaType: string;
44
+ filePath: string;
45
+ };
46
+ declare function isRecord(value: unknown): value is JsonRecord;
47
+ declare function requiredString(value: unknown, field: string): string;
48
+ declare function requiredId(value: string | null, flag: string): string;
49
+ declare function requiredPath(value: string | null, flag: string): string;
50
+ declare function sha256Bytes(bytes: Uint8Array): string;
51
+ declare function outputRef(outputPath: string, bytes: Uint8Array, mediaType: string): LcaReleaseOutput;
52
+ declare function writeOutput(outputPath: string, bytes: Uint8Array, mediaType: string, force: boolean): LcaReleaseOutput;
53
+ declare function writeJsonOutput(outputPath: string, value: unknown, force: boolean): LcaReleaseOutput;
54
+ declare function commandAction(action: LcaReleaseAction): string;
55
+ declare function buildCommandPayload(options: RunLcaReleaseOptions, userApiKey: string): {
56
+ body: JsonRecord;
57
+ inputPath: string | null;
58
+ };
59
+ declare function edgeUrl(apiBaseUrl: string): string;
60
+ declare function readJsonResponse(response: ResponseLike, url: string): Promise<JsonRecord>;
61
+ declare function invokeCommand(options: {
62
+ url: string;
63
+ publishableKey: string;
64
+ accessToken: string;
65
+ body: JsonRecord;
66
+ timeoutMs: number;
67
+ fetchImpl: FetchLike;
68
+ }): Promise<JsonRecord>;
69
+ declare function parseLocalUploadArtifacts(value: JsonRecord, inputPath: string): LocalUploadArtifact[];
70
+ declare function parseUploadResponse(payload: JsonRecord, local: LocalUploadArtifact[]): {
71
+ local: LocalUploadArtifact;
72
+ storageBucket: string;
73
+ objectKey: string;
74
+ token: string;
75
+ }[];
76
+ declare function runUpload(options: RunLcaReleaseOptions, runtime: ReturnType<typeof requireSupabaseRestRuntime>, url: string): Promise<LcaReleaseReport>;
77
+ declare function downloadBytes(signedUrl: string, timeoutMs: number, fetchImpl: FetchLike): Promise<Uint8Array>;
78
+ declare function selectDownload(action: 'artifact-download' | 'calculation-artifact', data: unknown, artifactPath: string | null): JsonRecord;
79
+ declare function nextCommands(action: LcaReleaseAction, data: unknown): string[];
80
+ declare function summarize(action: LcaReleaseAction, data: unknown): Record<string, unknown>;
81
+ export declare function runLcaRelease(options: RunLcaReleaseOptions): Promise<LcaReleaseReport>;
82
+ export declare function renderLcaReleaseReport(report: LcaReleaseReport): string;
83
+ export declare const __testInternals: {
84
+ buildCommandPayload: typeof buildCommandPayload;
85
+ commandAction: typeof commandAction;
86
+ downloadBytes: typeof downloadBytes;
87
+ edgeUrl: typeof edgeUrl;
88
+ invokeCommand: typeof invokeCommand;
89
+ isRecord: typeof isRecord;
90
+ nextCommands: typeof nextCommands;
91
+ outputRef: typeof outputRef;
92
+ parseLocalUploadArtifacts: typeof parseLocalUploadArtifacts;
93
+ parseUploadResponse: typeof parseUploadResponse;
94
+ readJsonResponse: typeof readJsonResponse;
95
+ requiredId: typeof requiredId;
96
+ requiredPath: typeof requiredPath;
97
+ requiredString: typeof requiredString;
98
+ runUpload: typeof runUpload;
99
+ selectDownload: typeof selectDownload;
100
+ sha256Bytes: typeof sha256Bytes;
101
+ summarize: typeof summarize;
102
+ writeJsonOutput: typeof writeJsonOutput;
103
+ writeOutput: typeof writeOutput;
104
+ };
105
+ export {};
@@ -0,0 +1,223 @@
1
+ import { type RunLayout } from './run.js';
2
+ type JsonRecord = Record<string, unknown>;
3
+ type LifecyclemodelAutoBuildStatus = 'completed_local_lifecyclemodel_auto_build_run';
4
+ export type LifecyclemodelAutoBuildLayout = RunLayout & {
5
+ requestDir: string;
6
+ selectionDir: string;
7
+ discoveryDir: string;
8
+ modelsDir: string;
9
+ requestSnapshotPath: string;
10
+ normalizedRequestPath: string;
11
+ runPlanPath: string;
12
+ resolvedManifestPath: string;
13
+ selectionBriefPath: string;
14
+ referenceModelSummaryPath: string;
15
+ invocationIndexPath: string;
16
+ runManifestPath: string;
17
+ reportPath: string;
18
+ };
19
+ export type NormalizedLifecyclemodelAutoBuildRequest = {
20
+ schema_version: 1;
21
+ request_path: string;
22
+ run_id: string;
23
+ run_root: string;
24
+ manifest: JsonRecord;
25
+ local_runs: string[];
26
+ };
27
+ type ProcessRecord = {
28
+ processUuid: string;
29
+ version: string;
30
+ raw: JsonRecord;
31
+ referenceExchangeInternalId: string;
32
+ referenceFlowUuid: string;
33
+ referenceDirection: 'Input' | 'Output';
34
+ referenceAmount: number;
35
+ inputAmounts: Record<string, number>;
36
+ outputAmounts: Record<string, number>;
37
+ nameEn: string;
38
+ nameZh: string;
39
+ routeEn: string;
40
+ mixEn: string;
41
+ geographyCode: string;
42
+ classificationPath: string[];
43
+ tokenSet: Set<string>;
44
+ sourceKind: 'local_run_export';
45
+ sourceLabel: string;
46
+ includedProcessRefCount: number;
47
+ };
48
+ type Edge = {
49
+ src: string;
50
+ dst: string;
51
+ flowUuid: string;
52
+ downstreamInputAmount: number;
53
+ confidence: number;
54
+ reasons: string[];
55
+ };
56
+ export type LifecyclemodelAutoBuildLocalReport = {
57
+ run_dir: string;
58
+ run_name: string;
59
+ model_file: string;
60
+ summary_file: string;
61
+ connections_file: string;
62
+ process_catalog_file: string;
63
+ summary: JsonRecord;
64
+ };
65
+ export type LifecyclemodelAutoBuildReport = {
66
+ schema_version: 1;
67
+ generated_at_utc: string;
68
+ status: LifecyclemodelAutoBuildStatus;
69
+ request_path: string;
70
+ run_id: string;
71
+ run_root: string;
72
+ local_run_count: number;
73
+ built_model_count: number;
74
+ files: {
75
+ request_snapshot: string;
76
+ normalized_request: string;
77
+ run_plan: string;
78
+ resolved_manifest: string;
79
+ selection_brief: string;
80
+ reference_model_summary: string;
81
+ invocation_index: string;
82
+ run_manifest: string;
83
+ report: string;
84
+ };
85
+ local_build_reports: LifecyclemodelAutoBuildLocalReport[];
86
+ next_actions: string[];
87
+ };
88
+ export type RunLifecyclemodelAutoBuildOptions = {
89
+ inputPath: string;
90
+ outDir?: string | null;
91
+ now?: Date;
92
+ cwd?: string;
93
+ inputValue?: unknown;
94
+ runIdOverride?: string;
95
+ };
96
+ declare function ensureList<T = unknown>(value: unknown): T[];
97
+ declare function copyJson<T>(value: T): T;
98
+ declare function numberOrZero(value: unknown): number;
99
+ declare function firstText(value: unknown): string;
100
+ declare function langTextMap(value: unknown): Record<string, string>;
101
+ declare function localizedText(value: unknown, preferred?: string): string;
102
+ declare function multilangText(value: unknown): [string, string];
103
+ declare function multilangFromText(enText: string, zhText?: string): Array<Record<string, string>>;
104
+ declare function buildNameSummary(nameInfo: JsonRecord): Array<Record<string, string>>;
105
+ declare function extractClassificationPath(classificationInfo: unknown): string[];
106
+ declare function classificationOverlap(left: string[], right: string[]): number;
107
+ declare function uuid5FromText(namespaceUuid: string, value: string): string;
108
+ declare function formatNumber(value: number): string;
109
+ declare function toJsonNumber(value: number): number;
110
+ declare function deepMerge(base: unknown, override: unknown): unknown;
111
+ declare function normalizeLocalRuns(value: unknown, requestDir: string): string[];
112
+ declare function buildLayout(runRoot: string, runId: string): LifecyclemodelAutoBuildLayout;
113
+ export declare function normalizeLifecyclemodelAutoBuildRequest(input: unknown, options: {
114
+ inputPath: string;
115
+ outDir?: string | null;
116
+ now?: Date;
117
+ runIdOverride?: string;
118
+ }): NormalizedLifecyclemodelAutoBuildRequest;
119
+ declare function buildSelectionBrief(manifest: JsonRecord): string;
120
+ declare function buildReferenceModelSummary(manifest: JsonRecord): JsonRecord;
121
+ declare function buildPlan(normalized: NormalizedLifecyclemodelAutoBuildRequest, layout: LifecyclemodelAutoBuildLayout, now: Date): JsonRecord;
122
+ declare function extractFlowDatasetFromState(state: JsonRecord): JsonRecord;
123
+ declare function resolvePublicationBlock(dataset: JsonRecord): JsonRecord;
124
+ declare function loadProcessRecord(filePath: string, sourceKind: 'local_run_export', sourceLabel: string): ProcessRecord;
125
+ declare function scoreEdgeCandidate(src: ProcessRecord, dst: ProcessRecord, flowUuid: string, downstreamAmount: number): {
126
+ confidence: number;
127
+ reasons: string[];
128
+ };
129
+ declare function inferEdges(processMap: Record<string, ProcessRecord>): Edge[];
130
+ declare function chooseReferenceProcess(processMap: Record<string, ProcessRecord>, edges: Edge[], state: JsonRecord, preferredProcessIds: Set<string>): string;
131
+ declare function collectReachable(finalProcessId: string, edges: Edge[]): Set<string>;
132
+ declare function topologicalOrder(processIds: Set<string>, edges: Edge[]): string[];
133
+ declare function computeMultiplicationFactors(processMap: Record<string, ProcessRecord>, reachable: Set<string>, edges: Edge[], order: string[], finalProcessId: string): Record<string, number>;
134
+ declare function exchangeAmount(exchange: JsonRecord): number;
135
+ declare function cloneExchangeWithAmount(exchange: JsonRecord, amount: number, internalId: string, quantitativeReference?: boolean): JsonRecord;
136
+ declare function buildProcessInstances(processMap: Record<string, ProcessRecord>, order: string[], edges: Edge[], factors: Record<string, number>): {
137
+ processInstances: JsonRecord[];
138
+ internalIds: Record<string, string>;
139
+ };
140
+ declare function buildLifecycleModelDataset(runName: string, state: JsonRecord, processMap: Record<string, ProcessRecord>, order: string[], edges: Edge[], factors: Record<string, number>, finalProcessId: string): {
141
+ model: JsonRecord;
142
+ summary: JsonRecord;
143
+ };
144
+ export declare function runLifecyclemodelAutoBuild(options: RunLifecyclemodelAutoBuildOptions): Promise<LifecyclemodelAutoBuildReport>;
145
+ export declare const __testInternals: {
146
+ DEFAULT_MANIFEST: {
147
+ readonly run_label: 'lifecyclemodel-automated-builder';
148
+ readonly allow_remote_write: false;
149
+ readonly discovery: {
150
+ readonly sources: readonly [{
151
+ readonly kind: 'account_processes';
152
+ readonly selector: 'all-accessible';
153
+ }, {
154
+ readonly kind: 'public_open_data';
155
+ readonly table: 'processes';
156
+ readonly filters: {
157
+ readonly state_code: 100;
158
+ };
159
+ }];
160
+ readonly supporting_open_tables: readonly ['flows', 'sources', 'lifecyclemodels'];
161
+ readonly batch_limit: 200;
162
+ readonly reference_model_queries: readonly [];
163
+ readonly reference_model_select_limit: 3;
164
+ };
165
+ readonly selection: {
166
+ readonly mode: 'graph_first_local_build';
167
+ readonly max_models: 25;
168
+ readonly max_processes_per_model: 12;
169
+ readonly decision_factors: readonly ['shared product system or classification lineage', 'explicit exchange connectivity', 'quantitative reference completeness', 'geography and time coherence'];
170
+ };
171
+ readonly reuse: {
172
+ readonly reusable_process_dirs: readonly [];
173
+ readonly include_reference_model_resulting_processes: true;
174
+ };
175
+ readonly output: {
176
+ readonly write_local_models: true;
177
+ readonly emit_validation_report: false;
178
+ };
179
+ readonly local_runs: readonly [];
180
+ readonly publish: {
181
+ readonly enabled: false;
182
+ readonly mode: 'deferred_to_publish_build';
183
+ readonly target_runs: readonly [];
184
+ readonly select_after_insert: true;
185
+ readonly max_attempts: 5;
186
+ readonly retry_delay_seconds: 2;
187
+ };
188
+ };
189
+ copyJson: typeof copyJson;
190
+ ensureList: typeof ensureList;
191
+ numberOrZero: typeof numberOrZero;
192
+ firstText: typeof firstText;
193
+ langTextMap: typeof langTextMap;
194
+ localizedText: typeof localizedText;
195
+ multilangText: typeof multilangText;
196
+ multilangFromText: typeof multilangFromText;
197
+ deepMerge: typeof deepMerge;
198
+ buildLayout: typeof buildLayout;
199
+ buildSelectionBrief: typeof buildSelectionBrief;
200
+ buildReferenceModelSummary: typeof buildReferenceModelSummary;
201
+ normalizeLocalRuns: typeof normalizeLocalRuns;
202
+ uuid5FromText: typeof uuid5FromText;
203
+ extractClassificationPath: typeof extractClassificationPath;
204
+ classificationOverlap: typeof classificationOverlap;
205
+ extractFlowDatasetFromState: typeof extractFlowDatasetFromState;
206
+ resolvePublicationBlock: typeof resolvePublicationBlock;
207
+ loadProcessRecord: typeof loadProcessRecord;
208
+ scoreEdgeCandidate: typeof scoreEdgeCandidate;
209
+ inferEdges: typeof inferEdges;
210
+ chooseReferenceProcess: typeof chooseReferenceProcess;
211
+ collectReachable: typeof collectReachable;
212
+ topologicalOrder: typeof topologicalOrder;
213
+ computeMultiplicationFactors: typeof computeMultiplicationFactors;
214
+ exchangeAmount: typeof exchangeAmount;
215
+ cloneExchangeWithAmount: typeof cloneExchangeWithAmount;
216
+ buildProcessInstances: typeof buildProcessInstances;
217
+ buildLifecycleModelDataset: typeof buildLifecycleModelDataset;
218
+ buildPlan: typeof buildPlan;
219
+ formatNumber: typeof formatNumber;
220
+ buildNameSummary: typeof buildNameSummary;
221
+ toJsonNumber: typeof toJsonNumber;
222
+ };
223
+ export {};
@@ -0,0 +1,71 @@
1
+ import type { FetchLike } from './http.js';
2
+ type JsonObject = Record<string, unknown>;
3
+ export type LifecyclemodelPublishMetadata = {
4
+ json_tg?: JsonObject;
5
+ processMutations?: JsonObject[];
6
+ ruleVerification?: boolean;
7
+ };
8
+ type LifecyclemodelVisibleRow = {
9
+ id: string;
10
+ version: string;
11
+ };
12
+ type LifecyclemodelBundlePlan = {
13
+ mode: 'create' | 'update';
14
+ modelId: string;
15
+ version?: string;
16
+ parent: {
17
+ jsonOrdered: JsonObject;
18
+ jsonTg: JsonObject;
19
+ ruleVerification?: boolean;
20
+ };
21
+ processMutations: JsonObject[];
22
+ };
23
+ export type LifecyclemodelBundleWriteResult = {
24
+ status: 'success';
25
+ operation: 'create' | 'update' | 'update_after_create_conflict';
26
+ mode: 'create' | 'update';
27
+ transport: 'save_lifecycle_model_bundle';
28
+ response: JsonObject;
29
+ };
30
+ declare function trimToken(value: unknown): string | null;
31
+ declare function firstNonEmpty(...values: unknown[]): string | null;
32
+ declare function matchingResultingProcessType(instance: JsonObject, payload: JsonObject): 'primary' | 'secondary';
33
+ export declare function deriveLifecyclemodelJsonTg(payload: JsonObject): JsonObject;
34
+ declare function mergeLifecyclemodelJsonTg(explicit: JsonObject | null, derived: JsonObject): JsonObject;
35
+ export declare function buildLifecyclemodelBundlePlan(options: {
36
+ id: string;
37
+ version: string;
38
+ payload: JsonObject;
39
+ metadata?: LifecyclemodelPublishMetadata | null;
40
+ mode: 'create' | 'update';
41
+ }): LifecyclemodelBundlePlan;
42
+ declare function parseVisibleRows(payload: unknown, url: string): LifecyclemodelVisibleRow[];
43
+ declare function exactVisibleRows(options: {
44
+ id: string;
45
+ version: string;
46
+ env: NodeJS.ProcessEnv;
47
+ fetchImpl: FetchLike;
48
+ timeoutMs: number;
49
+ }): Promise<LifecyclemodelVisibleRow[]>;
50
+ declare function requireLifecyclemodelBundleResponse(payload: unknown, url: string): JsonObject;
51
+ export declare function syncLifecyclemodelBundleRecord(options: {
52
+ id: string;
53
+ version: string;
54
+ payload: JsonObject;
55
+ metadata?: LifecyclemodelPublishMetadata | null;
56
+ env: NodeJS.ProcessEnv;
57
+ fetchImpl: FetchLike;
58
+ timeoutMs?: number;
59
+ }): Promise<LifecyclemodelBundleWriteResult>;
60
+ export declare const __testInternals: {
61
+ buildLifecyclemodelBundlePlan: typeof buildLifecyclemodelBundlePlan;
62
+ deriveLifecyclemodelJsonTg: typeof deriveLifecyclemodelJsonTg;
63
+ exactVisibleRows: typeof exactVisibleRows;
64
+ firstNonEmpty: typeof firstNonEmpty;
65
+ matchingResultingProcessType: typeof matchingResultingProcessType;
66
+ mergeLifecyclemodelJsonTg: typeof mergeLifecyclemodelJsonTg;
67
+ parseVisibleRows: typeof parseVisibleRows;
68
+ requireLifecyclemodelBundleResponse: typeof requireLifecyclemodelBundleResponse;
69
+ trimToken: typeof trimToken;
70
+ };
71
+ export {};