@tiangong-lca/cli 0.1.0 → 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 +58 -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/cli.js +130 -0
- package/dist/src/cli.js.map +1 -1
- 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/auth-identity-receipt.js +634 -0
- package/dist/src/lib/auth-identity-receipt.js.map +1 -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/http.js.map +1 -1
- 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 +17 -3
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { buildAliasPlanRequest } from './dataset-maintenance-alias-request.js';
|
|
2
|
+
import { writePrivateImmutableJson } from './dataset-maintenance-protected-artifacts.js';
|
|
3
|
+
import { parseMaintenancePlan, type DatasetMaintenancePlan, type DatasetMaintenanceRemoteRow, type JsonObject } from './dataset-maintenance-contract.js';
|
|
4
|
+
import { PROTECTED_EXECUTION_CONTRACT, assertProtectedApprovalBindings, assertProtectedFreezeMatchesPlan, buildProtectedAdmitRequest, buildProtectedExecutionIdentity, buildProtectedPreflightRequest, parseProtectedAdmissionProof, parseProtectedApproval, parseProtectedFreeze, parseProtectedGateProof, parseProtectedPreflightProof, parseProtectedStatusProof, type DatasetMaintenanceProtectedApproval, type DatasetMaintenanceProtectedFreeze, type ProtectedAdmissionProof, type ProtectedExecutionIdentity, type ProtectedExecutionStatusProof, type ProtectedGateProof, type ProtectedPreflightProof, type ProtectedReportStatus } from './dataset-maintenance-protected-contract.js';
|
|
5
|
+
import { verifyProtectedExecution, type ProtectedVerificationResult } from './dataset-maintenance-protected-verify.js';
|
|
6
|
+
import { admitMaintenanceAliasExecution, captureMaintenanceAliasExecutionGate, fetchMaintenanceAccountRows, preflightMaintenanceAliasExecution, readMaintenanceAliasExecution, resolveMaintenanceRemoteContext, type DatasetMaintenanceRemoteContext } from './dataset-maintenance-remote.js';
|
|
7
|
+
import type { FetchLike } from './http.js';
|
|
8
|
+
import { withStateFileLock } from './state-lock.js';
|
|
9
|
+
export type RunDatasetMaintenanceProtectedOptions = {
|
|
10
|
+
planPath: string;
|
|
11
|
+
freezePath: string;
|
|
12
|
+
approvalPath: string;
|
|
13
|
+
outDir: string;
|
|
14
|
+
commit: boolean;
|
|
15
|
+
statusOnly: boolean;
|
|
16
|
+
approveExecution?: string;
|
|
17
|
+
confirm?: string;
|
|
18
|
+
waitSeconds?: number;
|
|
19
|
+
pollMs?: number;
|
|
20
|
+
pageSize?: number;
|
|
21
|
+
timeoutMs?: number;
|
|
22
|
+
env: NodeJS.ProcessEnv;
|
|
23
|
+
fetchImpl: FetchLike;
|
|
24
|
+
now?: Date;
|
|
25
|
+
sleep?: (ms: number) => Promise<void>;
|
|
26
|
+
};
|
|
27
|
+
export type DatasetMaintenanceProtectedReport = {
|
|
28
|
+
schema_version: typeof PROTECTED_EXECUTION_CONTRACT.report_schema;
|
|
29
|
+
generated_at_utc: string;
|
|
30
|
+
mode: 'commit' | 'status_only';
|
|
31
|
+
status: ProtectedReportStatus;
|
|
32
|
+
request_id: string;
|
|
33
|
+
identity_sha256: string;
|
|
34
|
+
plan_sha256: string;
|
|
35
|
+
operation_id: string;
|
|
36
|
+
actor: {
|
|
37
|
+
user_id: string;
|
|
38
|
+
email: string;
|
|
39
|
+
};
|
|
40
|
+
project_ref: string;
|
|
41
|
+
admission: ProtectedAdmissionProof | null;
|
|
42
|
+
database_status: ProtectedExecutionStatusProof | null;
|
|
43
|
+
issues: Array<{
|
|
44
|
+
code: string;
|
|
45
|
+
message: string;
|
|
46
|
+
details?: unknown;
|
|
47
|
+
}>;
|
|
48
|
+
artifacts: {
|
|
49
|
+
execution_seal: string;
|
|
50
|
+
preflight_evidence: string;
|
|
51
|
+
gate_receipts: string;
|
|
52
|
+
submission_attempt: string;
|
|
53
|
+
admission_response: string;
|
|
54
|
+
admission_transport_error: string;
|
|
55
|
+
status_progress: string;
|
|
56
|
+
primary_readback: string;
|
|
57
|
+
reference_readback: string;
|
|
58
|
+
audit_readback: string;
|
|
59
|
+
derivative_readback: string;
|
|
60
|
+
terminal_report: string;
|
|
61
|
+
attempt_report: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
type PreparedProtectedExecution = {
|
|
65
|
+
planPath: string;
|
|
66
|
+
planDir: string;
|
|
67
|
+
freezePath: string;
|
|
68
|
+
approvalPath: string;
|
|
69
|
+
outDir: string;
|
|
70
|
+
plan: DatasetMaintenancePlan;
|
|
71
|
+
freeze: DatasetMaintenanceProtectedFreeze;
|
|
72
|
+
approval: DatasetMaintenanceProtectedApproval;
|
|
73
|
+
identity: ProtectedExecutionIdentity;
|
|
74
|
+
aliasPlanRequest: JsonObject;
|
|
75
|
+
artifacts: DatasetMaintenanceProtectedReport['artifacts'];
|
|
76
|
+
};
|
|
77
|
+
declare function normalizeWaitSeconds(value?: number): number;
|
|
78
|
+
declare function normalizePollMs(value?: number): number;
|
|
79
|
+
declare function clock(options: RunDatasetMaintenanceProtectedOptions): Date;
|
|
80
|
+
declare function errorDetails(error: unknown): {
|
|
81
|
+
name: string;
|
|
82
|
+
message: string;
|
|
83
|
+
code: string | null;
|
|
84
|
+
};
|
|
85
|
+
declare function readArtifact(options: {
|
|
86
|
+
filePath: string;
|
|
87
|
+
label: string;
|
|
88
|
+
}): {
|
|
89
|
+
resolved: string;
|
|
90
|
+
value: unknown;
|
|
91
|
+
text: string;
|
|
92
|
+
file_sha256: string;
|
|
93
|
+
};
|
|
94
|
+
declare function assertCanonicalParsedArtifact(options: {
|
|
95
|
+
label: string;
|
|
96
|
+
text: string;
|
|
97
|
+
value: unknown;
|
|
98
|
+
}): void;
|
|
99
|
+
declare function appendPrivateJsonLine(filePath: string, value: unknown): string;
|
|
100
|
+
declare function nextAttemptReportPath(outDir: string): string;
|
|
101
|
+
declare function allocateAttemptArtifacts(prepared: PreparedProtectedExecution): PreparedProtectedExecution;
|
|
102
|
+
type ProtectedPreparationDependencies = {
|
|
103
|
+
readArtifact: typeof readArtifact;
|
|
104
|
+
parsePlan: typeof parseMaintenancePlan;
|
|
105
|
+
buildAliasPlan: typeof buildAliasPlanRequest;
|
|
106
|
+
parseFreeze: typeof parseProtectedFreeze;
|
|
107
|
+
parseApproval: typeof parseProtectedApproval;
|
|
108
|
+
assertFreezeMatchesPlan: typeof assertProtectedFreezeMatchesPlan;
|
|
109
|
+
assertApprovalBindings: typeof assertProtectedApprovalBindings;
|
|
110
|
+
buildIdentity: typeof buildProtectedExecutionIdentity;
|
|
111
|
+
};
|
|
112
|
+
declare function prepareProtectedExecutionWithDependencies(options: RunDatasetMaintenanceProtectedOptions, dependencies: ProtectedPreparationDependencies): PreparedProtectedExecution;
|
|
113
|
+
declare function prepareProtectedExecution(options: RunDatasetMaintenanceProtectedOptions): PreparedProtectedExecution;
|
|
114
|
+
declare function assertContextBindings(options: {
|
|
115
|
+
prepared: PreparedProtectedExecution;
|
|
116
|
+
context: DatasetMaintenanceRemoteContext;
|
|
117
|
+
confirm?: string;
|
|
118
|
+
commit: boolean;
|
|
119
|
+
}): void;
|
|
120
|
+
declare function projectedRows(options: {
|
|
121
|
+
plan: DatasetMaintenancePlan;
|
|
122
|
+
planDir: string;
|
|
123
|
+
currentRows: DatasetMaintenanceRemoteRow[];
|
|
124
|
+
}): DatasetMaintenanceRemoteRow[];
|
|
125
|
+
declare function assertStrictBeforeState(options: {
|
|
126
|
+
prepared: PreparedProtectedExecution;
|
|
127
|
+
currentRows: DatasetMaintenanceRemoteRow[];
|
|
128
|
+
completeness: unknown;
|
|
129
|
+
}): void;
|
|
130
|
+
declare function assertSupportSnapshots(options: {
|
|
131
|
+
prepared: PreparedProtectedExecution;
|
|
132
|
+
context: DatasetMaintenanceRemoteContext;
|
|
133
|
+
}): Promise<void>;
|
|
134
|
+
declare function assertDerivativeBaselines(options: {
|
|
135
|
+
prepared: PreparedProtectedExecution;
|
|
136
|
+
context: DatasetMaintenanceRemoteContext;
|
|
137
|
+
}): Promise<void>;
|
|
138
|
+
type ProtectedGateDependencies = {
|
|
139
|
+
captureGate: typeof captureMaintenanceAliasExecutionGate;
|
|
140
|
+
parseGate: typeof parseProtectedGateProof;
|
|
141
|
+
appendReceipt: typeof appendPrivateJsonLine;
|
|
142
|
+
nowIso: () => string;
|
|
143
|
+
};
|
|
144
|
+
declare function captureProtectedGatesWithDependencies(options: {
|
|
145
|
+
prepared: PreparedProtectedExecution;
|
|
146
|
+
context: DatasetMaintenanceRemoteContext;
|
|
147
|
+
preflight: ProtectedPreflightProof;
|
|
148
|
+
receiptPath: string;
|
|
149
|
+
}, dependencies: ProtectedGateDependencies): Promise<{
|
|
150
|
+
proofs: ProtectedGateProof[];
|
|
151
|
+
results: {
|
|
152
|
+
primary_support_plan: ProtectedGateProof['result'];
|
|
153
|
+
execution_unused: ProtectedGateProof['result'];
|
|
154
|
+
derivative_quiescence: ProtectedGateProof['result'];
|
|
155
|
+
};
|
|
156
|
+
}>;
|
|
157
|
+
declare function captureProtectedGates(options: {
|
|
158
|
+
prepared: PreparedProtectedExecution;
|
|
159
|
+
context: DatasetMaintenanceRemoteContext;
|
|
160
|
+
preflight: ProtectedPreflightProof;
|
|
161
|
+
receiptPath: string;
|
|
162
|
+
}): Promise<{
|
|
163
|
+
proofs: ProtectedGateProof[];
|
|
164
|
+
results: {
|
|
165
|
+
primary_support_plan: ProtectedGateProof['result'];
|
|
166
|
+
execution_unused: ProtectedGateProof['result'];
|
|
167
|
+
derivative_quiescence: ProtectedGateProof['result'];
|
|
168
|
+
};
|
|
169
|
+
}>;
|
|
170
|
+
declare function validateExistingMarker(markerPath: string, identity: ProtectedExecutionIdentity): JsonObject | null;
|
|
171
|
+
type ProtectedReadDependencies = {
|
|
172
|
+
readExecution: typeof readMaintenanceAliasExecution;
|
|
173
|
+
parseStatus: typeof parseProtectedStatusProof;
|
|
174
|
+
verifyExecution: typeof verifyProtectedExecution;
|
|
175
|
+
nowMs: () => number;
|
|
176
|
+
};
|
|
177
|
+
declare function readAndVerifyWithDependencies(options: {
|
|
178
|
+
command: RunDatasetMaintenanceProtectedOptions;
|
|
179
|
+
prepared: PreparedProtectedExecution;
|
|
180
|
+
context: DatasetMaintenanceRemoteContext;
|
|
181
|
+
}, dependencies: ProtectedReadDependencies): Promise<{
|
|
182
|
+
proof: ProtectedExecutionStatusProof | null;
|
|
183
|
+
verification: ProtectedVerificationResult;
|
|
184
|
+
}>;
|
|
185
|
+
declare function readAndVerify(options: {
|
|
186
|
+
command: RunDatasetMaintenanceProtectedOptions;
|
|
187
|
+
prepared: PreparedProtectedExecution;
|
|
188
|
+
context: DatasetMaintenanceRemoteContext;
|
|
189
|
+
}): Promise<{
|
|
190
|
+
proof: ProtectedExecutionStatusProof | null;
|
|
191
|
+
verification: ProtectedVerificationResult;
|
|
192
|
+
}>;
|
|
193
|
+
declare function buildReport(options: {
|
|
194
|
+
command: RunDatasetMaintenanceProtectedOptions;
|
|
195
|
+
prepared: PreparedProtectedExecution;
|
|
196
|
+
admission: ProtectedAdmissionProof | null;
|
|
197
|
+
proof: ProtectedExecutionStatusProof | null;
|
|
198
|
+
verification: ProtectedVerificationResult;
|
|
199
|
+
}): DatasetMaintenanceProtectedReport;
|
|
200
|
+
declare function canonicalTerminalReport(report: DatasetMaintenanceProtectedReport): JsonObject;
|
|
201
|
+
declare function persistVerificationArtifacts(options: {
|
|
202
|
+
prepared: PreparedProtectedExecution;
|
|
203
|
+
proof: ProtectedExecutionStatusProof | null;
|
|
204
|
+
verification: ProtectedVerificationResult;
|
|
205
|
+
report: DatasetMaintenanceProtectedReport;
|
|
206
|
+
}): void;
|
|
207
|
+
type ProtectedRuntimeDependencies = {
|
|
208
|
+
withStateLock: typeof withStateFileLock;
|
|
209
|
+
resolveContext: typeof resolveMaintenanceRemoteContext;
|
|
210
|
+
fetchAccountRows: typeof fetchMaintenanceAccountRows;
|
|
211
|
+
assertSupport: typeof assertSupportSnapshots;
|
|
212
|
+
assertBaselines: typeof assertDerivativeBaselines;
|
|
213
|
+
buildPreflightRequest: typeof buildProtectedPreflightRequest;
|
|
214
|
+
preflightExecution: typeof preflightMaintenanceAliasExecution;
|
|
215
|
+
parsePreflight: typeof parseProtectedPreflightProof;
|
|
216
|
+
captureGates: typeof captureProtectedGates;
|
|
217
|
+
buildAdmitRequest: typeof buildProtectedAdmitRequest;
|
|
218
|
+
admitExecution: typeof admitMaintenanceAliasExecution;
|
|
219
|
+
parseAdmission: typeof parseProtectedAdmissionProof;
|
|
220
|
+
readAndVerify: typeof readAndVerify;
|
|
221
|
+
};
|
|
222
|
+
declare function runPreparedProtectedExecution(options: RunDatasetMaintenanceProtectedOptions, basePrepared: PreparedProtectedExecution, dependencies: ProtectedRuntimeDependencies): Promise<DatasetMaintenanceProtectedReport>;
|
|
223
|
+
export declare function runDatasetMaintenanceProtected(options: RunDatasetMaintenanceProtectedOptions): Promise<DatasetMaintenanceProtectedReport>;
|
|
224
|
+
export declare const __testInternals: {
|
|
225
|
+
allocateAttemptArtifacts: typeof allocateAttemptArtifacts;
|
|
226
|
+
appendPrivateJsonLine: typeof appendPrivateJsonLine;
|
|
227
|
+
assertCanonicalParsedArtifact: typeof assertCanonicalParsedArtifact;
|
|
228
|
+
assertContextBindings: typeof assertContextBindings;
|
|
229
|
+
assertDerivativeBaselines: typeof assertDerivativeBaselines;
|
|
230
|
+
assertStrictBeforeState: typeof assertStrictBeforeState;
|
|
231
|
+
assertSupportSnapshots: typeof assertSupportSnapshots;
|
|
232
|
+
buildReport: typeof buildReport;
|
|
233
|
+
canonicalTerminalReport: typeof canonicalTerminalReport;
|
|
234
|
+
clock: typeof clock;
|
|
235
|
+
errorDetails: typeof errorDetails;
|
|
236
|
+
nextAttemptReportPath: typeof nextAttemptReportPath;
|
|
237
|
+
normalizePollMs: typeof normalizePollMs;
|
|
238
|
+
normalizeWaitSeconds: typeof normalizeWaitSeconds;
|
|
239
|
+
prepareProtectedExecution: typeof prepareProtectedExecution;
|
|
240
|
+
prepareProtectedExecutionWithDependencies: typeof prepareProtectedExecutionWithDependencies;
|
|
241
|
+
projectedRows: typeof projectedRows;
|
|
242
|
+
readArtifact: typeof readArtifact;
|
|
243
|
+
readAndVerify: typeof readAndVerify;
|
|
244
|
+
readAndVerifyWithDependencies: typeof readAndVerifyWithDependencies;
|
|
245
|
+
runPreparedProtectedExecution: typeof runPreparedProtectedExecution;
|
|
246
|
+
captureProtectedGates: typeof captureProtectedGates;
|
|
247
|
+
captureProtectedGatesWithDependencies: typeof captureProtectedGatesWithDependencies;
|
|
248
|
+
persistVerificationArtifacts: typeof persistVerificationArtifacts;
|
|
249
|
+
validateExistingMarker: typeof validateExistingMarker;
|
|
250
|
+
writePrivateImmutableJson: typeof writePrivateImmutableJson;
|
|
251
|
+
};
|
|
252
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { readProtectedJsonArtifact, readProtectedTextArtifact, materializePrivateArtifactDirectoryAtomically, writePrivateImmutableJson, writePrivateImmutableText } from './dataset-maintenance-protected-artifacts.js';
|
|
2
|
+
import { parseProtectedFreeze } from './dataset-maintenance-protected-contract.js';
|
|
3
|
+
import { parseProtectedApprovalRequest, sealProtectedApproval } from './dataset-maintenance-protected-preparation.js';
|
|
4
|
+
export declare const PROTECTED_APPROVAL_SEAL_ARTIFACTS: {
|
|
5
|
+
readonly human_approval_text: 'protected-human-approval.txt';
|
|
6
|
+
readonly approval: 'protected-approval.json';
|
|
7
|
+
readonly report: 'protected-approval-seal-report.json';
|
|
8
|
+
};
|
|
9
|
+
export type SealDatasetMaintenanceProtectedApprovalOptions = {
|
|
10
|
+
freezePath: string;
|
|
11
|
+
approvalRequestPath: string;
|
|
12
|
+
humanApprovalPath: string;
|
|
13
|
+
outDir: string;
|
|
14
|
+
approveFreezeFile: string;
|
|
15
|
+
approveRequest: string;
|
|
16
|
+
approveText: string;
|
|
17
|
+
confirm: string;
|
|
18
|
+
approvedAtUtc: string;
|
|
19
|
+
now?: Date;
|
|
20
|
+
};
|
|
21
|
+
export type DatasetMaintenanceProtectedApprovalSealReport = {
|
|
22
|
+
schema_version: 'dataset-alias-protected-approval-seal-report.v1';
|
|
23
|
+
generated_at_utc: string;
|
|
24
|
+
approval_authority_at_utc: string;
|
|
25
|
+
status: 'sealed';
|
|
26
|
+
execution_submitted: false;
|
|
27
|
+
environment: 'production';
|
|
28
|
+
project_ref: string;
|
|
29
|
+
account: {
|
|
30
|
+
user_id: string;
|
|
31
|
+
email: string;
|
|
32
|
+
};
|
|
33
|
+
plan_sha256: string;
|
|
34
|
+
operation_id: string;
|
|
35
|
+
freeze_file_sha256: string;
|
|
36
|
+
freeze_sha256: string;
|
|
37
|
+
approval_request_file_sha256: string;
|
|
38
|
+
approval_request_sha256: string;
|
|
39
|
+
approval_text_sha256: string;
|
|
40
|
+
approval_file_sha256: string;
|
|
41
|
+
approval_identity_sha256: string;
|
|
42
|
+
assertions: {
|
|
43
|
+
byte_exact_human_text: true;
|
|
44
|
+
explicit_freeze_file_hash: true;
|
|
45
|
+
explicit_request_hash: true;
|
|
46
|
+
explicit_text_hash: true;
|
|
47
|
+
explicit_account_confirmation: true;
|
|
48
|
+
authentication_calls: 0;
|
|
49
|
+
network_calls: 0;
|
|
50
|
+
database_calls: 0;
|
|
51
|
+
preflight_calls: 0;
|
|
52
|
+
gate_calls: 0;
|
|
53
|
+
admission_calls: 0;
|
|
54
|
+
execution_calls: 0;
|
|
55
|
+
};
|
|
56
|
+
artifacts: {
|
|
57
|
+
human_approval_text: string;
|
|
58
|
+
approval: string;
|
|
59
|
+
report: string;
|
|
60
|
+
};
|
|
61
|
+
artifact_sha256: {
|
|
62
|
+
human_approval_text: string;
|
|
63
|
+
approval: string;
|
|
64
|
+
report: null;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
type SealProtectedDependencies = {
|
|
68
|
+
readJson: typeof readProtectedJsonArtifact;
|
|
69
|
+
readText: typeof readProtectedTextArtifact;
|
|
70
|
+
parseFreeze: typeof parseProtectedFreeze;
|
|
71
|
+
parseApprovalRequest: typeof parseProtectedApprovalRequest;
|
|
72
|
+
sealApproval: typeof sealProtectedApproval;
|
|
73
|
+
writeJson: typeof writePrivateImmutableJson;
|
|
74
|
+
writeText: typeof writePrivateImmutableText;
|
|
75
|
+
materializeArtifacts: typeof materializePrivateArtifactDirectoryAtomically;
|
|
76
|
+
};
|
|
77
|
+
declare function requiredToken(value: string, label: string): string;
|
|
78
|
+
declare function requiredHash(value: string, label: string): string;
|
|
79
|
+
declare function assertCanonicalJsonArtifact(options: {
|
|
80
|
+
label: string;
|
|
81
|
+
text: string;
|
|
82
|
+
value: unknown;
|
|
83
|
+
}): void;
|
|
84
|
+
declare function artifactPaths(outDir: string): DatasetMaintenanceProtectedApprovalSealReport['artifacts'];
|
|
85
|
+
export declare function sealDatasetMaintenanceProtectedApproval(options: SealDatasetMaintenanceProtectedApprovalOptions, dependencies?: SealProtectedDependencies): Promise<DatasetMaintenanceProtectedApprovalSealReport>;
|
|
86
|
+
export declare const __testInternals: {
|
|
87
|
+
DEFAULT_SEAL_DEPENDENCIES: SealProtectedDependencies;
|
|
88
|
+
artifactPaths: typeof artifactPaths;
|
|
89
|
+
assertCanonicalJsonArtifact: typeof assertCanonicalJsonArtifact;
|
|
90
|
+
requiredHash: typeof requiredHash;
|
|
91
|
+
requiredToken: typeof requiredToken;
|
|
92
|
+
};
|
|
93
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const PROTECTED_TOOLCHAIN_EVIDENCE_SCHEMA: 'dataset-alias-protected-toolchain-evidence.v1';
|
|
2
|
+
export type DatasetMaintenanceProtectedToolchainEvidence = {
|
|
3
|
+
schema_version: typeof PROTECTED_TOOLCHAIN_EVIDENCE_SCHEMA;
|
|
4
|
+
environment: 'production';
|
|
5
|
+
project_ref: string;
|
|
6
|
+
verified_at_utc: string;
|
|
7
|
+
database_engine: {
|
|
8
|
+
repository: 'tiangong-lca/database-engine';
|
|
9
|
+
production_main_commit_sha: string;
|
|
10
|
+
production_readback_evidence_sha256: string;
|
|
11
|
+
status: 'released_and_read_back';
|
|
12
|
+
};
|
|
13
|
+
cli: {
|
|
14
|
+
repository: 'tiangong-lca/tiangong-cli';
|
|
15
|
+
package_name: '@tiangong-lca/cli';
|
|
16
|
+
package_version: string;
|
|
17
|
+
release_commit_sha: string;
|
|
18
|
+
release_evidence_sha256: string;
|
|
19
|
+
status: 'published_and_verified';
|
|
20
|
+
};
|
|
21
|
+
workspace: {
|
|
22
|
+
repository: 'tiangong-lca/workspace';
|
|
23
|
+
integration_commit_sha: string;
|
|
24
|
+
integration_issue_url: string;
|
|
25
|
+
status: 'integrated';
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare function parseProtectedToolchainEvidence(value: unknown, expected: {
|
|
29
|
+
projectRef: string;
|
|
30
|
+
cliVersion: string;
|
|
31
|
+
}): DatasetMaintenanceProtectedToolchainEvidence;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { type DatasetMaintenancePlan, type DatasetMaintenanceRemoteRow } from './dataset-maintenance-contract.js';
|
|
2
|
+
import { type ProtectedDerivativeSnapshot, type ProtectedExecutionIdentity, type ProtectedExecutionStatusProof, type ProtectedReportStatus, type ProtectedTerminalTargetProof } from './dataset-maintenance-protected-contract.js';
|
|
3
|
+
import { fetchMaintenanceAccountRows, fetchMaintenanceDerivativeTargetRows, type DatasetMaintenanceDerivativeRemoteRow, type DatasetMaintenanceRemoteContext } from './dataset-maintenance-remote.js';
|
|
4
|
+
export type ProtectedVerificationIssue = {
|
|
5
|
+
code: string;
|
|
6
|
+
message: string;
|
|
7
|
+
details?: unknown;
|
|
8
|
+
};
|
|
9
|
+
export type ProtectedLiveDerivativeReadback = {
|
|
10
|
+
table: 'flows' | 'processes';
|
|
11
|
+
id: string;
|
|
12
|
+
version: string;
|
|
13
|
+
user_id: string;
|
|
14
|
+
state_code: 0;
|
|
15
|
+
json_ordered_sha256: string;
|
|
16
|
+
extracted_md_present: true;
|
|
17
|
+
embedding_ft_present: true;
|
|
18
|
+
embedding_ft_at: string;
|
|
19
|
+
};
|
|
20
|
+
export type ProtectedVerificationResult = {
|
|
21
|
+
status: ProtectedReportStatus;
|
|
22
|
+
issues: ProtectedVerificationIssue[];
|
|
23
|
+
account_readback: {
|
|
24
|
+
rows: DatasetMaintenanceRemoteRow[];
|
|
25
|
+
source_urls: string[];
|
|
26
|
+
completeness: unknown;
|
|
27
|
+
} | null;
|
|
28
|
+
derivative_readback: {
|
|
29
|
+
rows: ProtectedLiveDerivativeReadback[];
|
|
30
|
+
snapshots: ProtectedDerivativeSnapshot[];
|
|
31
|
+
source_urls: string[];
|
|
32
|
+
} | null;
|
|
33
|
+
};
|
|
34
|
+
export declare function inspectProtectedLiveDerivative(row: DatasetMaintenanceDerivativeRemoteRow): ProtectedLiveDerivativeReadback | null;
|
|
35
|
+
declare function expectedFinalRows(options: {
|
|
36
|
+
plan: DatasetMaintenancePlan;
|
|
37
|
+
planDir: string;
|
|
38
|
+
rows: DatasetMaintenanceRemoteRow[];
|
|
39
|
+
}): DatasetMaintenanceRemoteRow[];
|
|
40
|
+
declare function verifyStatusStructure(options: {
|
|
41
|
+
identity: ProtectedExecutionIdentity;
|
|
42
|
+
proof: ProtectedExecutionStatusProof;
|
|
43
|
+
}): ProtectedVerificationIssue[];
|
|
44
|
+
declare function verifyAuditClosure(proof: ProtectedExecutionStatusProof): ProtectedVerificationIssue[];
|
|
45
|
+
declare function verifyTerminalTargets(options: {
|
|
46
|
+
identity: ProtectedExecutionIdentity;
|
|
47
|
+
proof: ProtectedExecutionStatusProof;
|
|
48
|
+
}): ProtectedVerificationIssue[];
|
|
49
|
+
declare function verifyFinalAccountRows(options: {
|
|
50
|
+
plan: DatasetMaintenancePlan;
|
|
51
|
+
planDir: string;
|
|
52
|
+
rows: DatasetMaintenanceRemoteRow[];
|
|
53
|
+
completeness: unknown;
|
|
54
|
+
}): ProtectedVerificationIssue[];
|
|
55
|
+
declare function matchLiveTargets(options: {
|
|
56
|
+
proofs: ProtectedTerminalTargetProof[];
|
|
57
|
+
live: ProtectedLiveDerivativeReadback[];
|
|
58
|
+
snapshots: ProtectedDerivativeSnapshot[];
|
|
59
|
+
primaryClosure: unknown;
|
|
60
|
+
plan: DatasetMaintenancePlan;
|
|
61
|
+
identity: ProtectedExecutionIdentity;
|
|
62
|
+
}): ProtectedVerificationIssue[];
|
|
63
|
+
declare function fetchProtectedDerivativeSnapshots(options: {
|
|
64
|
+
context: DatasetMaintenanceRemoteContext;
|
|
65
|
+
identity: ProtectedExecutionIdentity;
|
|
66
|
+
}): Promise<ProtectedDerivativeSnapshot[]>;
|
|
67
|
+
type ProtectedVerificationDependencies = {
|
|
68
|
+
fetchAccountRows: typeof fetchMaintenanceAccountRows;
|
|
69
|
+
fetchDerivativeRows: typeof fetchMaintenanceDerivativeTargetRows;
|
|
70
|
+
fetchSnapshots: typeof fetchProtectedDerivativeSnapshots;
|
|
71
|
+
};
|
|
72
|
+
declare function verifyProtectedExecutionWithDependencies(options: {
|
|
73
|
+
plan: DatasetMaintenancePlan;
|
|
74
|
+
planDir: string;
|
|
75
|
+
identity: ProtectedExecutionIdentity;
|
|
76
|
+
proof: ProtectedExecutionStatusProof;
|
|
77
|
+
context: DatasetMaintenanceRemoteContext;
|
|
78
|
+
pageSize?: number;
|
|
79
|
+
}, dependencies: ProtectedVerificationDependencies): Promise<ProtectedVerificationResult>;
|
|
80
|
+
export declare function verifyProtectedExecution(options: {
|
|
81
|
+
plan: DatasetMaintenancePlan;
|
|
82
|
+
planDir: string;
|
|
83
|
+
identity: ProtectedExecutionIdentity;
|
|
84
|
+
proof: ProtectedExecutionStatusProof;
|
|
85
|
+
context: DatasetMaintenanceRemoteContext;
|
|
86
|
+
pageSize?: number;
|
|
87
|
+
}): Promise<ProtectedVerificationResult>;
|
|
88
|
+
export declare const __testInternals: {
|
|
89
|
+
expectedFinalRows: typeof expectedFinalRows;
|
|
90
|
+
fetchProtectedDerivativeSnapshots: typeof fetchProtectedDerivativeSnapshots;
|
|
91
|
+
inspectProtectedLiveDerivative: typeof inspectProtectedLiveDerivative;
|
|
92
|
+
matchLiveTargets: typeof matchLiveTargets;
|
|
93
|
+
verifyAuditClosure: typeof verifyAuditClosure;
|
|
94
|
+
verifyFinalAccountRows: typeof verifyFinalAccountRows;
|
|
95
|
+
verifyStatusStructure: typeof verifyStatusStructure;
|
|
96
|
+
verifyTerminalTargets: typeof verifyTerminalTargets;
|
|
97
|
+
verifyProtectedExecutionWithDependencies: typeof verifyProtectedExecutionWithDependencies;
|
|
98
|
+
};
|
|
99
|
+
export {};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import type { FetchLike, ResponseLike } from './http.js';
|
|
2
|
+
import { type DatasetMaintenanceTableCompleteness, type DatasetMaintenanceSnapshotCompleteness } from './dataset-maintenance-pagination.js';
|
|
3
|
+
import { type DatasetMaintenanceMutableTable, type DatasetMaintenanceRemoteRow, type DatasetMaintenanceScanTable, type JsonObject } from './dataset-maintenance-contract.js';
|
|
4
|
+
export type DatasetMaintenanceRemoteContext = {
|
|
5
|
+
project_ref: string;
|
|
6
|
+
rest_base_url: string;
|
|
7
|
+
publishable_key: string;
|
|
8
|
+
access_token: string;
|
|
9
|
+
account: {
|
|
10
|
+
user_id: string;
|
|
11
|
+
email: string;
|
|
12
|
+
session_source: string;
|
|
13
|
+
};
|
|
14
|
+
fetch_impl: FetchLike;
|
|
15
|
+
timeout_ms: number;
|
|
16
|
+
};
|
|
17
|
+
export type DatasetMaintenanceDerivativeRemoteRow = {
|
|
18
|
+
table: 'flows' | 'processes';
|
|
19
|
+
id: string;
|
|
20
|
+
version: string;
|
|
21
|
+
user_id: string;
|
|
22
|
+
state_code: number;
|
|
23
|
+
raw: JsonObject;
|
|
24
|
+
};
|
|
25
|
+
export declare function normalizeMaintenancePageSize(value?: number): number;
|
|
26
|
+
export declare function normalizeMaintenanceTimeout(value?: number): number;
|
|
27
|
+
declare function fetchJsonResponse(options: {
|
|
28
|
+
context: Pick<DatasetMaintenanceRemoteContext, 'publishable_key' | 'access_token' | 'fetch_impl' | 'timeout_ms'>;
|
|
29
|
+
url: string;
|
|
30
|
+
init?: RequestInit;
|
|
31
|
+
label: string;
|
|
32
|
+
redactResponseDetails?: boolean;
|
|
33
|
+
}): Promise<{
|
|
34
|
+
body: unknown;
|
|
35
|
+
headers: ResponseLike['headers'];
|
|
36
|
+
}>;
|
|
37
|
+
declare function fetchJson(options: {
|
|
38
|
+
context: Pick<DatasetMaintenanceRemoteContext, 'publishable_key' | 'access_token' | 'fetch_impl' | 'timeout_ms'>;
|
|
39
|
+
url: string;
|
|
40
|
+
init?: RequestInit;
|
|
41
|
+
label: string;
|
|
42
|
+
redactResponseDetails?: boolean;
|
|
43
|
+
}): Promise<unknown>;
|
|
44
|
+
declare function selectForTable(table: DatasetMaintenanceScanTable, includeJson?: boolean): string;
|
|
45
|
+
declare function normalizeRemoteRow(table: DatasetMaintenanceScanTable, value: unknown, includeJson?: boolean): DatasetMaintenanceRemoteRow | null;
|
|
46
|
+
declare function normalizeRemoteRows(table: DatasetMaintenanceScanTable, value: unknown, label: string, includeJson?: boolean): DatasetMaintenanceRemoteRow[];
|
|
47
|
+
export declare function resolveMaintenanceRemoteContext(options: {
|
|
48
|
+
env: NodeJS.ProcessEnv;
|
|
49
|
+
fetchImpl: FetchLike;
|
|
50
|
+
timeoutMs?: number;
|
|
51
|
+
now?: Date;
|
|
52
|
+
}): Promise<DatasetMaintenanceRemoteContext>;
|
|
53
|
+
export declare function fetchMaintenanceExactRows(options: {
|
|
54
|
+
context: DatasetMaintenanceRemoteContext;
|
|
55
|
+
table: DatasetMaintenanceScanTable;
|
|
56
|
+
id: string;
|
|
57
|
+
version: string;
|
|
58
|
+
includeJson?: boolean;
|
|
59
|
+
}): Promise<{
|
|
60
|
+
rows: DatasetMaintenanceRemoteRow[];
|
|
61
|
+
source_url: string;
|
|
62
|
+
}>;
|
|
63
|
+
export declare function fetchMaintenanceAccountRows(options: {
|
|
64
|
+
context: DatasetMaintenanceRemoteContext;
|
|
65
|
+
userId: string;
|
|
66
|
+
pageSize?: number;
|
|
67
|
+
}): Promise<{
|
|
68
|
+
rows: DatasetMaintenanceRemoteRow[];
|
|
69
|
+
source_urls: string[];
|
|
70
|
+
completeness: DatasetMaintenanceSnapshotCompleteness<DatasetMaintenanceScanTable>;
|
|
71
|
+
}>;
|
|
72
|
+
export declare function fetchMaintenanceAccountTableRows(options: {
|
|
73
|
+
context: DatasetMaintenanceRemoteContext;
|
|
74
|
+
userId: string;
|
|
75
|
+
table: DatasetMaintenanceScanTable;
|
|
76
|
+
stateCode?: number;
|
|
77
|
+
includeJson?: boolean;
|
|
78
|
+
pageSize?: number;
|
|
79
|
+
}): Promise<{
|
|
80
|
+
rows: DatasetMaintenanceRemoteRow[];
|
|
81
|
+
source_urls: string[];
|
|
82
|
+
completeness: DatasetMaintenanceTableCompleteness;
|
|
83
|
+
}>;
|
|
84
|
+
/**
|
|
85
|
+
* Read every row visible to the authenticated owner for one maintenance table.
|
|
86
|
+
*
|
|
87
|
+
* This deliberately omits a user_id predicate. It is a SELECT-only RLS view used
|
|
88
|
+
* by destructive maintenance admission to prove that a draft flow has no inbound
|
|
89
|
+
* reference from either an owner row or another row visible to the owner session.
|
|
90
|
+
*/
|
|
91
|
+
export declare function fetchMaintenanceVisibleTableRows(options: {
|
|
92
|
+
context: DatasetMaintenanceRemoteContext;
|
|
93
|
+
table: DatasetMaintenanceScanTable;
|
|
94
|
+
includeJson?: boolean;
|
|
95
|
+
pageSize?: number;
|
|
96
|
+
}): Promise<{
|
|
97
|
+
rows: DatasetMaintenanceRemoteRow[];
|
|
98
|
+
source_urls: string[];
|
|
99
|
+
completeness: DatasetMaintenanceTableCompleteness;
|
|
100
|
+
}>;
|
|
101
|
+
export type MaintenanceRpcDomainFailure = JsonObject & {
|
|
102
|
+
ok: false;
|
|
103
|
+
code: string;
|
|
104
|
+
status: string | number;
|
|
105
|
+
};
|
|
106
|
+
export declare function isMaintenanceRpcDomainFailure(value: unknown): value is MaintenanceRpcDomainFailure;
|
|
107
|
+
export declare function preflightMaintenanceAliasExecution(options: {
|
|
108
|
+
context: DatasetMaintenanceRemoteContext;
|
|
109
|
+
request: JsonObject;
|
|
110
|
+
}): Promise<JsonObject>;
|
|
111
|
+
export declare function admitMaintenanceAliasExecution(options: {
|
|
112
|
+
context: DatasetMaintenanceRemoteContext;
|
|
113
|
+
request: JsonObject;
|
|
114
|
+
}): Promise<JsonObject>;
|
|
115
|
+
export declare function captureMaintenanceAliasExecutionGate(options: {
|
|
116
|
+
context: DatasetMaintenanceRemoteContext;
|
|
117
|
+
requestId: string;
|
|
118
|
+
preflightToken: string;
|
|
119
|
+
gateName: 'primary_support_plan' | 'execution_unused' | 'derivative_quiescence';
|
|
120
|
+
}): Promise<JsonObject>;
|
|
121
|
+
export declare function readMaintenanceAliasExecution(options: {
|
|
122
|
+
context: DatasetMaintenanceRemoteContext;
|
|
123
|
+
requestId: string;
|
|
124
|
+
}): Promise<JsonObject>;
|
|
125
|
+
export declare function fetchMaintenanceDerivativeTargetRows(options: {
|
|
126
|
+
context: DatasetMaintenanceRemoteContext;
|
|
127
|
+
targets: Array<{
|
|
128
|
+
table: 'flows' | 'processes';
|
|
129
|
+
id: string;
|
|
130
|
+
version: string;
|
|
131
|
+
}>;
|
|
132
|
+
concurrency?: number;
|
|
133
|
+
}): Promise<{
|
|
134
|
+
rows: DatasetMaintenanceDerivativeRemoteRow[];
|
|
135
|
+
source_urls: string[];
|
|
136
|
+
}>;
|
|
137
|
+
export declare function fetchMaintenanceDerivativeSnapshot(options: {
|
|
138
|
+
context: DatasetMaintenanceRemoteContext;
|
|
139
|
+
table?: 'flows' | 'processes';
|
|
140
|
+
id: string;
|
|
141
|
+
version: string;
|
|
142
|
+
}): Promise<JsonObject>;
|
|
143
|
+
export declare function applyMaintenanceDerivativeRebuild(options: {
|
|
144
|
+
context: DatasetMaintenanceRemoteContext;
|
|
145
|
+
plan: JsonObject;
|
|
146
|
+
}): Promise<JsonObject>;
|
|
147
|
+
export declare function readMaintenanceDerivativeRebuild(options: {
|
|
148
|
+
context: DatasetMaintenanceRemoteContext;
|
|
149
|
+
requestId: string;
|
|
150
|
+
}): Promise<JsonObject>;
|
|
151
|
+
export declare function applyMaintenanceAliasPlan(options: {
|
|
152
|
+
context: DatasetMaintenanceRemoteContext;
|
|
153
|
+
plan: JsonObject;
|
|
154
|
+
}): Promise<JsonObject>;
|
|
155
|
+
export declare function preflightMaintenanceFlowIdentityScope(options: {
|
|
156
|
+
context: DatasetMaintenanceRemoteContext;
|
|
157
|
+
request: JsonObject;
|
|
158
|
+
}): Promise<JsonObject>;
|
|
159
|
+
export declare function lookupMaintenanceFlowIdentityScope(options: {
|
|
160
|
+
context: DatasetMaintenanceRemoteContext;
|
|
161
|
+
request: JsonObject;
|
|
162
|
+
}): Promise<JsonObject>;
|
|
163
|
+
export declare function rewriteMaintenanceFlowIdentityProcess(options: {
|
|
164
|
+
context: DatasetMaintenanceRemoteContext;
|
|
165
|
+
scopeId: string;
|
|
166
|
+
request: JsonObject;
|
|
167
|
+
authorization: JsonObject;
|
|
168
|
+
}): Promise<JsonObject>;
|
|
169
|
+
export declare function readMaintenanceFlowIdentityScope(options: {
|
|
170
|
+
context: DatasetMaintenanceRemoteContext;
|
|
171
|
+
scopeId: string;
|
|
172
|
+
}): Promise<JsonObject>;
|
|
173
|
+
export declare function finalizeMaintenanceFlowIdentityScope(options: {
|
|
174
|
+
context: DatasetMaintenanceRemoteContext;
|
|
175
|
+
scopeId: string;
|
|
176
|
+
request: JsonObject;
|
|
177
|
+
authorization: JsonObject;
|
|
178
|
+
}): Promise<JsonObject>;
|
|
179
|
+
export declare function recoverMaintenanceFlowIdentityScope(options: {
|
|
180
|
+
context: DatasetMaintenanceRemoteContext;
|
|
181
|
+
scopeId: string;
|
|
182
|
+
request: JsonObject;
|
|
183
|
+
}): Promise<JsonObject>;
|
|
184
|
+
export declare function attestMaintenanceFlowIdentityCapture(options: {
|
|
185
|
+
context: DatasetMaintenanceRemoteContext;
|
|
186
|
+
request: JsonObject;
|
|
187
|
+
}): Promise<JsonObject>;
|
|
188
|
+
export declare function saveDraftMaintenanceRow(options: {
|
|
189
|
+
context: DatasetMaintenanceRemoteContext;
|
|
190
|
+
table: DatasetMaintenanceMutableTable;
|
|
191
|
+
id: string;
|
|
192
|
+
version: string;
|
|
193
|
+
payload: JsonObject;
|
|
194
|
+
modelId: string | null;
|
|
195
|
+
ruleVerification: boolean | null;
|
|
196
|
+
audit: JsonObject;
|
|
197
|
+
}): Promise<JsonObject>;
|
|
198
|
+
export declare function deleteMaintenanceRow(options: {
|
|
199
|
+
context: DatasetMaintenanceRemoteContext;
|
|
200
|
+
table: DatasetMaintenanceMutableTable;
|
|
201
|
+
id: string;
|
|
202
|
+
version: string;
|
|
203
|
+
audit: JsonObject;
|
|
204
|
+
}): Promise<JsonObject>;
|
|
205
|
+
export declare const __testInternals: {
|
|
206
|
+
fetchJson: typeof fetchJson;
|
|
207
|
+
fetchJsonResponse: typeof fetchJsonResponse;
|
|
208
|
+
normalizeRemoteRow: typeof normalizeRemoteRow;
|
|
209
|
+
normalizeRemoteRows: typeof normalizeRemoteRows;
|
|
210
|
+
selectForTable: typeof selectForTable;
|
|
211
|
+
};
|
|
212
|
+
export {};
|