@tiangong-ai/cli 0.0.34 → 0.0.36
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/AGENTS.md +18 -6
- package/README.md +147 -2
- package/dist/research/orchestration.js +651 -24
- package/dist/research/orchestration.js.map +1 -1
- package/dist/research/workspace/audit-bundle.d.ts +44 -0
- package/dist/research/workspace/audit-bundle.js +357 -0
- package/dist/research/workspace/audit-bundle.js.map +1 -0
- package/dist/research/workspace/input-plan.js +27 -1
- package/dist/research/workspace/input-plan.js.map +1 -1
- package/dist/research/workspace/preflight.d.ts +34 -2
- package/dist/research/workspace/preflight.js +145 -1
- package/dist/research/workspace/preflight.js.map +1 -1
- package/dist/research/workspace/projects.d.ts +32 -5
- package/dist/research/workspace/projects.js +263 -7
- package/dist/research/workspace/projects.js.map +1 -1
- package/dist/research/workspace/publication-workflow.d.ts +146 -0
- package/dist/research/workspace/publication-workflow.js +994 -0
- package/dist/research/workspace/publication-workflow.js.map +1 -0
- package/dist/research/workspace/publication.d.ts +110 -0
- package/dist/research/workspace/publication.js +246 -0
- package/dist/research/workspace/publication.js.map +1 -0
- package/dist/research/workspace/research-policy-wizard.d.ts +40 -0
- package/dist/research/workspace/research-policy-wizard.js +167 -0
- package/dist/research/workspace/research-policy-wizard.js.map +1 -0
- package/dist/research/workspace/research-policy.d.ts +70 -0
- package/dist/research/workspace/research-policy.js +886 -0
- package/dist/research/workspace/research-policy.js.map +1 -0
- package/dist/research/workspace/runtime.d.ts +17 -0
- package/dist/research/workspace/runtime.js +84 -2
- package/dist/research/workspace/runtime.js.map +1 -1
- package/dist/research/workspace/sanitization.js +9 -3
- package/dist/research/workspace/sanitization.js.map +1 -1
- package/dist/research/workspace/scientific-design.d.ts +336 -0
- package/dist/research/workspace/scientific-design.js +1845 -0
- package/dist/research/workspace/scientific-design.js.map +1 -0
- package/dist/research/workspace/scientific-review.d.ts +101 -0
- package/dist/research/workspace/scientific-review.js +1167 -0
- package/dist/research/workspace/scientific-review.js.map +1 -0
- package/dist/research/workspace/setup-catalog.js +2 -2
- package/dist/research/workspace/setup-wizard.d.ts +18 -1
- package/dist/research/workspace/setup-wizard.js +1 -1
- package/dist/research/workspace/setup-wizard.js.map +1 -1
- package/dist/research/workspace/setup.d.ts +1 -0
- package/dist/research/workspace/setup.js +64 -0
- package/dist/research/workspace/setup.js.map +1 -1
- package/dist/research/workspace/types.d.ts +58 -0
- package/dist/research/workspace/workspace.js +25 -7
- package/dist/research/workspace/workspace.js.map +1 -1
- package/package.json +4 -2
|
@@ -50,17 +50,23 @@ function sanitizeUrls(value) {
|
|
|
50
50
|
const source = trailing ? bounded.source.slice(0, -trailing.length) : bounded.source;
|
|
51
51
|
try {
|
|
52
52
|
const url = new URL(source);
|
|
53
|
+
let changed = false;
|
|
53
54
|
if (url.username || url.password) {
|
|
54
55
|
url.username = "REDACTED";
|
|
55
56
|
url.password = "";
|
|
57
|
+
changed = true;
|
|
56
58
|
}
|
|
57
59
|
for (const key of [...url.searchParams.keys()]) {
|
|
58
|
-
if (SENSITIVE_QUERY_KEY.test(key))
|
|
60
|
+
if (SENSITIVE_QUERY_KEY.test(key)) {
|
|
59
61
|
url.searchParams.set(key, "[REDACTED]");
|
|
62
|
+
changed = true;
|
|
63
|
+
}
|
|
60
64
|
}
|
|
61
|
-
if (SENSITIVE_URL_FRAGMENT.test(url.hash))
|
|
65
|
+
if (SENSITIVE_URL_FRAGMENT.test(url.hash)) {
|
|
62
66
|
url.hash = "REDACTED";
|
|
63
|
-
|
|
67
|
+
changed = true;
|
|
68
|
+
}
|
|
69
|
+
return changed ? `${url.toString()}${trailing}${bounded.suffix}` : candidate;
|
|
64
70
|
}
|
|
65
71
|
catch {
|
|
66
72
|
return candidate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitization.js","sourceRoot":"","sources":["../../../src/research/workspace/sanitization.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GACjB,4JAA4J,CAA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AAK,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/E,CAAC;IACH,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAC3C,CAAC;AAED,SAAS,YAAY,CAAC,IAAY,EAAE,KAAa;IAC/C,OAAO,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
export type ScientificStudyKind = "causal-empirical" | "observational-empirical" | "predictive-model" | "mechanism-model" | "cross-model-comparison" | "scenario-analysis" | "material-flow-accounting" | "systematic-synthesis" | "methods-data-resource";
|
|
2
|
+
export type ScientificResultClass = "causal-estimate" | "observational-estimate" | "validated-forecast" | "model-output" | "scenario-output" | "accounting-output" | "systematic-synthesis" | "method-performance";
|
|
3
|
+
export interface ScientificDesignContract {
|
|
4
|
+
schemaVersion: 1;
|
|
5
|
+
projectId: string;
|
|
6
|
+
workingTitle: string;
|
|
7
|
+
identity: {
|
|
8
|
+
centralStudyKind: ScientificStudyKind;
|
|
9
|
+
contributionStatement: string;
|
|
10
|
+
components: Array<{
|
|
11
|
+
kind: ScientificStudyKind;
|
|
12
|
+
role: "central" | "supporting" | "contextual";
|
|
13
|
+
purpose: string;
|
|
14
|
+
bridgeEdgeIds: string[];
|
|
15
|
+
}>;
|
|
16
|
+
modelStructures: Array<{
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
family: string;
|
|
20
|
+
version: string;
|
|
21
|
+
equationSet: string;
|
|
22
|
+
coefficientSet: string;
|
|
23
|
+
implementationArtifactSha256: string;
|
|
24
|
+
implementationArtifactLocator: string;
|
|
25
|
+
implementationEntrypoint: string;
|
|
26
|
+
implementationStatus: "executable-frozen" | "pending-source-acquisition";
|
|
27
|
+
implementationFreezeBeforeGate: "research-design" | "evidence-construct" | "pilot-methods";
|
|
28
|
+
environmentLockSha256: string;
|
|
29
|
+
environmentLockLocator: string;
|
|
30
|
+
environmentLockStatus: "exact-frozen" | "pending-runtime-lock";
|
|
31
|
+
environmentLockFreezeBeforeGate: "research-design" | "evidence-construct" | "pilot-methods";
|
|
32
|
+
artifactHashBasis: "raw-file-bytes";
|
|
33
|
+
baselineRole: "candidate" | "reference" | "strongest-available";
|
|
34
|
+
baselineSelectionJustification: string;
|
|
35
|
+
sourceEvidenceRoleIds: string[];
|
|
36
|
+
}>;
|
|
37
|
+
allowedClaimVerbs: string[];
|
|
38
|
+
targetJournals: {
|
|
39
|
+
primary: string;
|
|
40
|
+
alternate: string;
|
|
41
|
+
fallback: string;
|
|
42
|
+
approvalStatus: "candidate-only" | "policy-approved";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
policyRuleDispositions: Array<{
|
|
46
|
+
ruleId: string;
|
|
47
|
+
status: "satisfied-by-design" | "planned" | "scope-limited" | "incompatible";
|
|
48
|
+
dueGate: "research-design" | "evidence-construct" | "pilot-methods" | "publication-freeze";
|
|
49
|
+
rationale: string;
|
|
50
|
+
claimIds: string[];
|
|
51
|
+
evidenceRoleIds: string[];
|
|
52
|
+
validationPlanIds: string[];
|
|
53
|
+
knownGapIds: string[];
|
|
54
|
+
uncertaintyParameterIds: string[];
|
|
55
|
+
modelStructureIds: string[];
|
|
56
|
+
}>;
|
|
57
|
+
estimands: Array<{
|
|
58
|
+
id: string;
|
|
59
|
+
role: "central" | "supporting" | "contextual";
|
|
60
|
+
population: string;
|
|
61
|
+
analysisUnit: string;
|
|
62
|
+
exposure: string;
|
|
63
|
+
comparator: string;
|
|
64
|
+
outcome: string;
|
|
65
|
+
spatialScale: string;
|
|
66
|
+
timeHorizon: string;
|
|
67
|
+
resultClass: ScientificResultClass;
|
|
68
|
+
}>;
|
|
69
|
+
claims: Array<{
|
|
70
|
+
id: string;
|
|
71
|
+
role: "central" | "supporting" | "contextual";
|
|
72
|
+
statement: string;
|
|
73
|
+
resultClass: ScientificResultClass;
|
|
74
|
+
edgeIds: string[];
|
|
75
|
+
endpointIds: string[];
|
|
76
|
+
comparisonIds: string[];
|
|
77
|
+
estimandIds: string[];
|
|
78
|
+
quantityIds: string[];
|
|
79
|
+
evidenceRoleIds: string[];
|
|
80
|
+
hypothesisMode: "two-sided" | "directional" | "descriptive" | "not-applicable";
|
|
81
|
+
nullOutcomeStatement: string | null;
|
|
82
|
+
}>;
|
|
83
|
+
edges: Array<{
|
|
84
|
+
id: string;
|
|
85
|
+
role: "central" | "supporting" | "contextual";
|
|
86
|
+
fromConstruct: string;
|
|
87
|
+
toConstruct: string;
|
|
88
|
+
evidenceMode: "direct-observation" | "model-bridge" | "accounting-bridge" | "assumption-only";
|
|
89
|
+
requiredJoinKeys: string[];
|
|
90
|
+
temporalAlignment: string;
|
|
91
|
+
spatialAlignment: string;
|
|
92
|
+
fromModelStructureIds: string[];
|
|
93
|
+
toModelStructureIds: string[];
|
|
94
|
+
fromEndpointIds: string[];
|
|
95
|
+
toEndpointIds: string[];
|
|
96
|
+
operatorId: string;
|
|
97
|
+
operatorDefinition: string;
|
|
98
|
+
aggregationRule: string;
|
|
99
|
+
scaleReconciliation: string;
|
|
100
|
+
quantityIds: string[];
|
|
101
|
+
uncertaintyParameterIds: string[];
|
|
102
|
+
sameSectionRequired: boolean;
|
|
103
|
+
sameEventRequired: boolean;
|
|
104
|
+
status: "planned" | "constructible" | "blocked";
|
|
105
|
+
blockingReason: string | null;
|
|
106
|
+
}>;
|
|
107
|
+
endpoints: Array<{
|
|
108
|
+
id: string;
|
|
109
|
+
label: string;
|
|
110
|
+
physicalConstruct: string;
|
|
111
|
+
scale: string;
|
|
112
|
+
unit: string;
|
|
113
|
+
timeBasis: string;
|
|
114
|
+
modelStructureId: string | null;
|
|
115
|
+
truthRole: "field-observation" | "experimental-reference" | "engineering-model" | "proxy" | "scenario-output" | "accounting-output";
|
|
116
|
+
}>;
|
|
117
|
+
comparisons: Array<{
|
|
118
|
+
id: string;
|
|
119
|
+
leftEndpointId: string;
|
|
120
|
+
rightEndpointId: string;
|
|
121
|
+
operation: "error" | "accuracy" | "validation" | "agreement" | "discrepancy" | "ranking" | "qualitative-boundary";
|
|
122
|
+
axis: "same-endpoint-cross-model" | "model-to-observation" | "decision-consequence" | "qualitative-boundary";
|
|
123
|
+
quantityIds: string[];
|
|
124
|
+
thresholdIds: string[];
|
|
125
|
+
decisionRule: string;
|
|
126
|
+
reportingLevel: string;
|
|
127
|
+
truthEndpointId: string | null;
|
|
128
|
+
}>;
|
|
129
|
+
quantities: Array<{
|
|
130
|
+
id: string;
|
|
131
|
+
label: string;
|
|
132
|
+
quantityType: "share" | "material" | "rate" | "count" | "index" | "other";
|
|
133
|
+
unit: string;
|
|
134
|
+
numeratorType: string;
|
|
135
|
+
denominatorType: string;
|
|
136
|
+
denominatorDescription: string;
|
|
137
|
+
normalizationMode: "symmetric" | "directional-convention" | "not-applicable";
|
|
138
|
+
normalizationJustification: string;
|
|
139
|
+
valueMode: "signed" | "absolute" | "nonnegative" | "categorical";
|
|
140
|
+
uncertaintyParameterIds: string[];
|
|
141
|
+
spatialScope: string;
|
|
142
|
+
temporalScope: string;
|
|
143
|
+
allowedTerms: string[];
|
|
144
|
+
prohibitedTerms: string[];
|
|
145
|
+
}>;
|
|
146
|
+
validationPlans: Array<{
|
|
147
|
+
id: string;
|
|
148
|
+
claimIds: string[];
|
|
149
|
+
role: "internal-holdout" | "temporal-holdout" | "section-holdout" | "external-dgp" | "cross-model-reference" | "background-constraint" | "not-applicable";
|
|
150
|
+
parameterDatasetIds: string[];
|
|
151
|
+
comparisonDatasetIds: string[];
|
|
152
|
+
datasetRoles: Array<{
|
|
153
|
+
datasetId: string;
|
|
154
|
+
role: "parameter-source" | "endpoint-definition-source" | "non-independent-cross-check" | "independent-validation" | "background-context";
|
|
155
|
+
sharedUpstreamIds: string[];
|
|
156
|
+
justification: string;
|
|
157
|
+
}>;
|
|
158
|
+
factorIds: string[];
|
|
159
|
+
exposureIdentifierAvailable: boolean;
|
|
160
|
+
independentDataGeneratingProcess: boolean;
|
|
161
|
+
outcomeBlind: boolean;
|
|
162
|
+
originalUnitCount: number;
|
|
163
|
+
independentClusterCount: number;
|
|
164
|
+
effectiveIndependentUnits: number;
|
|
165
|
+
originalUnitDefinition: string;
|
|
166
|
+
independentClusterDefinition: string;
|
|
167
|
+
nestingRule: string;
|
|
168
|
+
reportingUnitDefinition: string;
|
|
169
|
+
clusterKeyIds: string[];
|
|
170
|
+
independenceJustification: string;
|
|
171
|
+
resamplingUnit: string;
|
|
172
|
+
resamplingIterations: number;
|
|
173
|
+
resamplingMethod: "exact-enumeration" | "cluster-bootstrap" | "none";
|
|
174
|
+
resamplingStateSpaceSize: number;
|
|
175
|
+
reportingPrecision: string;
|
|
176
|
+
minimumDetectableDifference: string | null;
|
|
177
|
+
independentValidation: {
|
|
178
|
+
status: "available" | "planned" | "unavailable-scope-bounded" | "not-required";
|
|
179
|
+
gapId: string | null;
|
|
180
|
+
justification: string;
|
|
181
|
+
};
|
|
182
|
+
status: "planned" | "feasible" | "impossible";
|
|
183
|
+
blockingReason: string | null;
|
|
184
|
+
}>;
|
|
185
|
+
thresholds: Array<{
|
|
186
|
+
id: string;
|
|
187
|
+
claimId: string;
|
|
188
|
+
quantityId: string;
|
|
189
|
+
type: "analytic" | "scenario" | "estimated" | "policy-trigger";
|
|
190
|
+
reportedAs: "analytic-threshold" | "scenario-threshold" | "estimated-threshold" | "policy-trigger";
|
|
191
|
+
criterion: string;
|
|
192
|
+
criterionQuantityIds: string[];
|
|
193
|
+
numericValue: number | null;
|
|
194
|
+
unit: string;
|
|
195
|
+
direction: "above" | "below" | "outside" | "equal" | "categorical";
|
|
196
|
+
basis: "reporting-convention" | "domain-standard" | "decision-consequence" | "policy";
|
|
197
|
+
basisJustification: string;
|
|
198
|
+
stabilityMode: "sign" | "classification" | "range" | "none";
|
|
199
|
+
stabilityQuantityId: string | null;
|
|
200
|
+
stabilityRule: string;
|
|
201
|
+
sensitivityReportingRule: string;
|
|
202
|
+
assumptionIds: string[];
|
|
203
|
+
sensitivityParameterIds: string[];
|
|
204
|
+
}>;
|
|
205
|
+
evidenceRoles: Array<{
|
|
206
|
+
id: string;
|
|
207
|
+
role: "central-model-source" | "central-data-documentation" | "closest-prior-work" | "counterevidence" | "method-identification" | "material-conversion" | "overlay-rule" | "cross-model-validation" | "pavement-context" | "limitation-boundary" | "target-journal-recent-work" | "background";
|
|
208
|
+
claimIds: string[];
|
|
209
|
+
coverageDimensionIds: string[];
|
|
210
|
+
sourceTypeRequirements: string[];
|
|
211
|
+
peerReviewedRequired: boolean;
|
|
212
|
+
required: boolean;
|
|
213
|
+
minimumFullText: number;
|
|
214
|
+
minimumIndependentSources: number;
|
|
215
|
+
minimumDatedSources: number;
|
|
216
|
+
}>;
|
|
217
|
+
knownGaps: Array<{
|
|
218
|
+
id: string;
|
|
219
|
+
description: string;
|
|
220
|
+
sourceProjectId: string | null;
|
|
221
|
+
sourceArtifacts: Array<{
|
|
222
|
+
sha256: string;
|
|
223
|
+
objectLocator: string;
|
|
224
|
+
hashBasis: "raw-file-bytes";
|
|
225
|
+
kind: "scientific-review-packet" | "scientific-review" | "evidence-snapshot" | "publication-assessment" | "owner-attestation";
|
|
226
|
+
}>;
|
|
227
|
+
lineageStatus: "verified" | "owner-attested" | "unverified";
|
|
228
|
+
disposition: "unresolved" | "closed" | "scope-narrowed" | "user-handoff" | "external-handoff";
|
|
229
|
+
evidenceRefs: Array<{
|
|
230
|
+
kind: "claim" | "quantity" | "validation-plan" | "edge" | "evidence-role";
|
|
231
|
+
id: string;
|
|
232
|
+
}>;
|
|
233
|
+
}>;
|
|
234
|
+
uncertaintyParameters: Array<{
|
|
235
|
+
id: string;
|
|
236
|
+
label: string;
|
|
237
|
+
distributionOrRange: string;
|
|
238
|
+
states: Array<{
|
|
239
|
+
id: string;
|
|
240
|
+
label: string;
|
|
241
|
+
value: string;
|
|
242
|
+
unit: string;
|
|
243
|
+
}>;
|
|
244
|
+
stateValueType: "numeric" | "categorical";
|
|
245
|
+
stateValueStatus: "frozen" | "pending-source-acquisition";
|
|
246
|
+
freezeBeforeGate: "research-design" | "evidence-construct" | "pilot-methods";
|
|
247
|
+
factorIds: string[];
|
|
248
|
+
applicationPoint: string;
|
|
249
|
+
compositionRule: string;
|
|
250
|
+
preservesFactorLevelIdentity: boolean;
|
|
251
|
+
sourceEvidenceRoleIds: string[];
|
|
252
|
+
quantityIds: string[];
|
|
253
|
+
}>;
|
|
254
|
+
uncertaintyGroups: Array<{
|
|
255
|
+
id: string;
|
|
256
|
+
parameterIds: string[];
|
|
257
|
+
combinationMode: "one-at-a-time" | "full-factorial" | "explicit-joint-states";
|
|
258
|
+
jointStateIds: string[];
|
|
259
|
+
jointStateBindings: Array<{
|
|
260
|
+
jointStateId: string;
|
|
261
|
+
parameterStateIds: string[];
|
|
262
|
+
}>;
|
|
263
|
+
applicationRule: string;
|
|
264
|
+
sharedAcrossModelStructureIds: string[];
|
|
265
|
+
}>;
|
|
266
|
+
factors: Array<{
|
|
267
|
+
id: string;
|
|
268
|
+
label: string;
|
|
269
|
+
role: "exposure" | "blocking" | "scenario";
|
|
270
|
+
observationalStatus: "observed" | "modeled-only" | "externally-defined";
|
|
271
|
+
applicabilityBoundary: string;
|
|
272
|
+
evidenceRoleIds: string[];
|
|
273
|
+
levels: Array<{
|
|
274
|
+
id: string;
|
|
275
|
+
label: string;
|
|
276
|
+
definition: string;
|
|
277
|
+
attributes: Array<{
|
|
278
|
+
id: string;
|
|
279
|
+
label: string;
|
|
280
|
+
value: string;
|
|
281
|
+
unit: string;
|
|
282
|
+
}>;
|
|
283
|
+
}>;
|
|
284
|
+
}>;
|
|
285
|
+
baselinePlan: {
|
|
286
|
+
sameInputInformation: boolean;
|
|
287
|
+
comparableCalibrationBudget: boolean;
|
|
288
|
+
sameEndpoint: boolean;
|
|
289
|
+
frozenBeforeAnalysis: boolean;
|
|
290
|
+
decisionLossMetrics: Array<{
|
|
291
|
+
id: string;
|
|
292
|
+
label: string;
|
|
293
|
+
comparisonIds: string[];
|
|
294
|
+
quantityIds: string[];
|
|
295
|
+
decisionRule: string;
|
|
296
|
+
reportingLevel: string;
|
|
297
|
+
}>;
|
|
298
|
+
};
|
|
299
|
+
contextPlan: {
|
|
300
|
+
maxEstimatedTokens: number;
|
|
301
|
+
estimatedTokens: number;
|
|
302
|
+
claimCriticalCapsuleIds: string[];
|
|
303
|
+
backgroundIndexOnly: boolean;
|
|
304
|
+
centralEvidenceFits: boolean;
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
export interface ScientificDesignIssue {
|
|
308
|
+
code: string;
|
|
309
|
+
severity: "blocking" | "major" | "minor";
|
|
310
|
+
message: string;
|
|
311
|
+
objectIds: string[];
|
|
312
|
+
}
|
|
313
|
+
export interface ScientificDesignEvaluation {
|
|
314
|
+
schemaVersion: 1;
|
|
315
|
+
projectId: string;
|
|
316
|
+
centralStudyKind: ScientificStudyKind;
|
|
317
|
+
readyForDesignReview: boolean;
|
|
318
|
+
issues: ScientificDesignIssue[];
|
|
319
|
+
issueCodes: string[];
|
|
320
|
+
effectiveIndependentUnits: number;
|
|
321
|
+
requiredEvidenceRoles: number;
|
|
322
|
+
}
|
|
323
|
+
export interface VerifiedScientificDesign {
|
|
324
|
+
schemaVersion: 1;
|
|
325
|
+
contract: ScientificDesignContract;
|
|
326
|
+
sha256: string;
|
|
327
|
+
bytes: number;
|
|
328
|
+
}
|
|
329
|
+
export declare function scientificDesignSchema(): Record<string, unknown>;
|
|
330
|
+
export declare function parseScientificDesign(value: unknown): ScientificDesignContract;
|
|
331
|
+
export declare function readAndVerifyScientificDesign(path: string, expectedProjectId?: string): Promise<VerifiedScientificDesign>;
|
|
332
|
+
export declare function evaluateScientificDesign(design: ScientificDesignContract): ScientificDesignEvaluation;
|
|
333
|
+
export declare function scientificDesignPolicyGaps(design: ScientificDesignContract, policy: {
|
|
334
|
+
resolvedRules: string[];
|
|
335
|
+
targetJournal: string | null;
|
|
336
|
+
}): string[];
|