@captain_z/zsk 1.7.0 → 1.8.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/dist/bin.js +196 -12
- package/dist/bin.js.map +1 -1
- package/dist/commands/check.js +107 -16
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/config.d.ts +11 -0
- package/dist/commands/config.js +132 -3
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/demo.js +2 -2
- package/dist/commands/demo.js.map +1 -1
- package/dist/commands/dispatch.d.ts +11 -0
- package/dist/commands/dispatch.js +69 -0
- package/dist/commands/dispatch.js.map +1 -0
- package/dist/commands/doctor.d.ts +4 -0
- package/dist/commands/doctor.js +102 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/gate.d.ts +9 -0
- package/dist/commands/gate.js +48 -0
- package/dist/commands/gate.js.map +1 -0
- package/dist/commands/issue.d.ts +2 -1
- package/dist/commands/issue.js +72 -27
- package/dist/commands/issue.js.map +1 -1
- package/dist/commands/module.js +32 -0
- package/dist/commands/module.js.map +1 -1
- package/dist/commands/prep.d.ts +2 -4
- package/dist/commands/prep.js +1 -37
- package/dist/commands/prep.js.map +1 -1
- package/dist/commands/prepare.d.ts +17 -0
- package/dist/commands/prepare.js +259 -0
- package/dist/commands/prepare.js.map +1 -0
- package/dist/commands/project-init.d.ts +1 -0
- package/dist/commands/project-init.js +28 -24
- package/dist/commands/project-init.js.map +1 -1
- package/dist/commands/template.d.ts +2 -0
- package/dist/commands/template.js +34 -0
- package/dist/commands/template.js.map +1 -0
- package/dist/core/config.d.ts +86 -1
- package/dist/core/config.js +181 -21
- package/dist/core/config.js.map +1 -1
- package/dist/core/origin-detection.d.ts +10 -0
- package/dist/core/origin-detection.js +135 -0
- package/dist/core/origin-detection.js.map +1 -0
- package/dist/core/prepare-lifecycle.d.ts +54 -0
- package/dist/core/prepare-lifecycle.js +302 -0
- package/dist/core/prepare-lifecycle.js.map +1 -0
- package/dist/core/prepare-sync.d.ts +82 -0
- package/dist/core/prepare-sync.js +1499 -0
- package/dist/core/prepare-sync.js.map +1 -0
- package/dist/core/raw-manifest.d.ts +20 -0
- package/dist/core/raw-manifest.js +105 -4
- package/dist/core/raw-manifest.js.map +1 -1
- package/dist/core/source-draft.d.ts +14 -0
- package/dist/core/source-draft.js +251 -0
- package/dist/core/source-draft.js.map +1 -0
- package/dist/core/staffing-plan.d.ts +206 -0
- package/dist/core/staffing-plan.js +1115 -0
- package/dist/core/staffing-plan.js.map +1 -0
- package/dist/core/stage-quality.d.ts +56 -0
- package/dist/core/stage-quality.js +487 -0
- package/dist/core/stage-quality.js.map +1 -0
- package/dist/core/template-registry.d.ts +29 -0
- package/dist/core/template-registry.js +289 -0
- package/dist/core/template-registry.js.map +1 -0
- package/dist/core/workspace-layout.d.ts +5 -3
- package/dist/core/workspace-layout.js +34 -20
- package/dist/core/workspace-layout.js.map +1 -1
- package/package.json +2 -2
- package/schemas/zsk-config.schema.json +257 -111
- package/templates/issue/default/issue.md +5 -1
- package/templates/module/frontend-module/design.md +93 -0
- package/templates/module/frontend-module/proposal.md +43 -1
- package/templates/module/frontend-module/spec.md +30 -0
- package/templates/module/frontend-module/tasks.md +43 -0
- package/templates/project-init/.zsk/config.yaml +8 -94
- package/templates/project-init/.zsk/docs/PROJECT-CONFIG.md +34 -11
- package/templates/project-init/.zsk/docs/SYSTEM-SPEC.md +37 -5
- package/templates/project-init/.zsk/modules/index.md +7 -0
- package/templates/project-init/.zsk/raws/index.md +15 -0
- package/templates/project-init/.zsk/raws/manifest.json +4 -0
- package/templates/project-init/.zsk/raws/prepare/backend/index.md +4 -0
- package/templates/project-init/.zsk/raws/prepare/design/index.md +3 -0
- package/templates/project-init/.zsk/raws/prepare/index.md +4 -0
- package/templates/project-init/.zsk/raws/prepare/product/index.md +4 -0
- package/templates/project-init/.zsk/raws/prepare/qa/index.md +4 -0
- package/templates/project-init/.zsk/raws/prepare/ux/index.md +3 -0
- package/templates/project-init/.zsk/roles.yaml +129 -0
- package/templates/project-init/.zsk/evidence/.gitkeep +0 -1
- package/templates/project-init/.zsk/issues/README.md +0 -58
- package/templates/project-init/.zsk/issues/_taxonomy.md +0 -35
- package/templates/project-init/.zsk/issues/index.md +0 -7
- package/templates/project-init/.zsk/modules/.gitkeep +0 -1
- package/templates/project-init/.zsk/plans/.gitkeep +0 -1
- package/templates/project-init/.zsk/playwright/.gitkeep +0 -1
- package/templates/project-init/.zsk/resources/.gitkeep +0 -1
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { access, mkdir, readFile, stat, writeFile } from "node:fs/promises";
|
|
3
|
+
import { join, resolve } from "node:path";
|
|
4
|
+
import YAML from "yaml";
|
|
5
|
+
import { flattenProjectSources, resolveSourceSnapshot } from "./config.js";
|
|
6
|
+
import { hasRemoteOriginLocator, inferSourceOrigin } from "./origin-detection.js";
|
|
7
|
+
import { draftProjectConfig } from "./source-draft.js";
|
|
8
|
+
import { getWorkspacePath } from "./workspace-layout.js";
|
|
9
|
+
export async function buildPrepareArtifactBundle(target, config, runId = createPrepareRunId()) {
|
|
10
|
+
const draft = await draftProjectConfig(target);
|
|
11
|
+
const generatedAt = new Date().toISOString();
|
|
12
|
+
const inventory = await buildRepoInventory(target, draft.candidates, generatedAt);
|
|
13
|
+
const acquisitionPlan = await buildAcquisitionPlan(target, config, draft.candidates, generatedAt);
|
|
14
|
+
const artifacts = resolvePrepareArtifacts(target, config, runId);
|
|
15
|
+
return {
|
|
16
|
+
inventory,
|
|
17
|
+
draftContent: `${YAML.stringify(draft.config)}\n`,
|
|
18
|
+
acquisitionPlan,
|
|
19
|
+
blockedSources: renderBlockedSources(acquisitionPlan),
|
|
20
|
+
correspondenceQuestions: renderCorrespondenceQuestions(acquisitionPlan),
|
|
21
|
+
artifacts,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export async function writePrepareArtifactBundle(bundle) {
|
|
25
|
+
const { artifacts } = bundle;
|
|
26
|
+
await mkdir(artifacts.dir, { recursive: true });
|
|
27
|
+
await writeFile(artifacts.inventoryPath, `${JSON.stringify(bundle.inventory, null, 2)}\n`, "utf8");
|
|
28
|
+
await writeFile(artifacts.draftPath, bundle.draftContent, "utf8");
|
|
29
|
+
await writeFile(artifacts.acquisitionPlanPath, `${JSON.stringify(bundle.acquisitionPlan, null, 2)}\n`, "utf8");
|
|
30
|
+
await writeFile(artifacts.blockedSourcesPath, bundle.blockedSources, "utf8");
|
|
31
|
+
await writeFile(artifacts.correspondenceQuestionsPath, bundle.correspondenceQuestions, "utf8");
|
|
32
|
+
}
|
|
33
|
+
export function resolvePrepareArtifacts(target, config, runId) {
|
|
34
|
+
const root = resolve(target, getWorkspacePath(config, "evidenceRoot"), "prepare", runId);
|
|
35
|
+
return {
|
|
36
|
+
runId,
|
|
37
|
+
dir: root,
|
|
38
|
+
inventoryPath: join(root, "repo-inventory.json"),
|
|
39
|
+
draftPath: join(root, "config-draft.yaml"),
|
|
40
|
+
acquisitionPlanPath: join(root, "acquisition-plan.json"),
|
|
41
|
+
blockedSourcesPath: join(root, "blocked-sources.md"),
|
|
42
|
+
correspondenceQuestionsPath: join(root, "correspondence-questions.md"),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export function createPrepareRunId(now = new Date()) {
|
|
46
|
+
return now.toISOString().replace(/[:.]/g, "-");
|
|
47
|
+
}
|
|
48
|
+
async function buildRepoInventory(target, candidates, generatedAt) {
|
|
49
|
+
const records = await Promise.all(candidates.map(async (candidate) => ({
|
|
50
|
+
...candidate,
|
|
51
|
+
...(await describeFile(resolve(target, candidate.originPath))),
|
|
52
|
+
})));
|
|
53
|
+
return {
|
|
54
|
+
version: 1,
|
|
55
|
+
generatedAt,
|
|
56
|
+
records,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
async function buildAcquisitionPlan(target, config, candidates, generatedAt) {
|
|
60
|
+
const records = [];
|
|
61
|
+
const configured = flattenProjectSources(config.sources);
|
|
62
|
+
const matched = new Set();
|
|
63
|
+
for (const entry of configured) {
|
|
64
|
+
const record = await describeConfiguredSource(target, config, entry);
|
|
65
|
+
records.push(record);
|
|
66
|
+
if (record.originRef)
|
|
67
|
+
matched.add(record.originRef);
|
|
68
|
+
if (record.snapshot)
|
|
69
|
+
matched.add(record.snapshot);
|
|
70
|
+
}
|
|
71
|
+
for (const candidate of candidates) {
|
|
72
|
+
if (matched.has(candidate.originPath) || matched.has(candidate.snapshot))
|
|
73
|
+
continue;
|
|
74
|
+
const file = resolve(target, candidate.originPath);
|
|
75
|
+
const exists = await pathExists(file);
|
|
76
|
+
records.push({
|
|
77
|
+
sourceKey: ["prepare", candidate.lane, candidate.sourceKey].join("-"),
|
|
78
|
+
provider: candidate.sourceKey,
|
|
79
|
+
sourcePath: join("prepare", candidate.lane, candidate.sourceKey),
|
|
80
|
+
rawLane: candidate.lane,
|
|
81
|
+
sourceType: candidate.sourceType,
|
|
82
|
+
originKind: "local",
|
|
83
|
+
originRef: candidate.originPath,
|
|
84
|
+
snapshot: candidate.snapshot,
|
|
85
|
+
snapshotExists: await pathExists(resolve(target, candidate.snapshot)),
|
|
86
|
+
status: candidate.confidence === "confirmed" && exists ? "ready" : exists ? "needs-confirmation" : "source-gap",
|
|
87
|
+
reason: !exists
|
|
88
|
+
? "drafted repository source no longer exists at the detected local path"
|
|
89
|
+
: candidate.confidence === "confirmed"
|
|
90
|
+
? "discovered repository source can be drafted into grouped prepare config"
|
|
91
|
+
: "scanner confidence is probable; confirm the grouped prepare lane before promoting this draft",
|
|
92
|
+
source: "draft",
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
records.sort((a, b) => `${a.source}:${a.sourcePath}:${a.provider}`.localeCompare(`${b.source}:${b.sourcePath}:${b.provider}`));
|
|
96
|
+
return {
|
|
97
|
+
version: 1,
|
|
98
|
+
generatedAt,
|
|
99
|
+
records,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
async function describeConfiguredSource(target, config, entry) {
|
|
103
|
+
const source = entry.source;
|
|
104
|
+
const origin = inferSourceOrigin(source);
|
|
105
|
+
const snapshot = resolveSourceSnapshot(config, entry);
|
|
106
|
+
const snapshotPath = resolve(target, snapshot);
|
|
107
|
+
const snapshotExists = await pathExists(snapshotPath);
|
|
108
|
+
const { status, reason } = await classifyConfiguredSource(target, source, snapshotPath, snapshotExists);
|
|
109
|
+
return {
|
|
110
|
+
sourceKey: entry.id,
|
|
111
|
+
provider: entry.provider,
|
|
112
|
+
sourcePath: entry.path,
|
|
113
|
+
rawLane: entry.rawLane,
|
|
114
|
+
sourceType: source.type ?? source.kind,
|
|
115
|
+
originKind: origin.kind,
|
|
116
|
+
originProvider: origin.provider,
|
|
117
|
+
originRef: origin.ref,
|
|
118
|
+
snapshot,
|
|
119
|
+
snapshotExists,
|
|
120
|
+
status,
|
|
121
|
+
reason,
|
|
122
|
+
source: "config",
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
async function classifyConfiguredSource(target, source, snapshotPath, snapshotExists) {
|
|
126
|
+
const origin = inferSourceOrigin(source);
|
|
127
|
+
const originKind = origin.kind;
|
|
128
|
+
const localOriginPath = resolveLocalOriginPath(target, source);
|
|
129
|
+
if (localOriginPath) {
|
|
130
|
+
const originInfo = await safeStat(localOriginPath);
|
|
131
|
+
if (!originInfo) {
|
|
132
|
+
return {
|
|
133
|
+
status: "source-gap",
|
|
134
|
+
reason: "configured local origin path does not exist",
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
if (snapshotPath) {
|
|
138
|
+
const snapshotInfo = await safeStat(snapshotPath);
|
|
139
|
+
if (snapshotInfo && originInfo.mtimeMs > snapshotInfo.mtimeMs) {
|
|
140
|
+
return {
|
|
141
|
+
status: "stale",
|
|
142
|
+
reason: "materialized snapshot is older than the local origin source",
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
status: "ready",
|
|
148
|
+
reason: "configured local origin is available for read-only prepare acquisition",
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
if (snapshotExists) {
|
|
152
|
+
return {
|
|
153
|
+
status: "ready",
|
|
154
|
+
reason: "materialized snapshot already exists for this source",
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
if (isAuthBlockedOriginKind(originKind)) {
|
|
158
|
+
return {
|
|
159
|
+
status: "blocked-auth",
|
|
160
|
+
reason: `detected ${originKind} origin from config; acquisition requires a confirmed adapter/auth contract`,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
if (needsAcquisitionConfirmation(source)) {
|
|
164
|
+
return {
|
|
165
|
+
status: "needs-confirmation",
|
|
166
|
+
reason: originKind === "repository"
|
|
167
|
+
? "detected repository origin from config; confirm clone/fetch policy and credentials before acquisition"
|
|
168
|
+
: "detected remote or provider-managed origin from config; confirm acquisition method before prepare can acquire it",
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
if (originKind && !isSupportedReadOnlyOriginKind(originKind)) {
|
|
172
|
+
return {
|
|
173
|
+
status: "needs-confirmation",
|
|
174
|
+
reason: "origin kind is project-specific; confirm the prepare acquisition method before treating it as authoritative",
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
return {
|
|
178
|
+
status: "source-gap",
|
|
179
|
+
reason: "source needs a local path, materialized snapshot, or supported provider adapter",
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function resolveLocalOriginPath(target, source) {
|
|
183
|
+
const origin = source.origin;
|
|
184
|
+
const kind = origin?.kind ?? source.kind;
|
|
185
|
+
const path = origin?.path ?? source.path;
|
|
186
|
+
if (!path)
|
|
187
|
+
return null;
|
|
188
|
+
if (kind === "local" || kind === "openapi" || !kind)
|
|
189
|
+
return resolve(target, path);
|
|
190
|
+
if (origin && !hasRemoteOriginLocator(source))
|
|
191
|
+
return resolve(target, path);
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
function needsAcquisitionConfirmation(source) {
|
|
195
|
+
const origin = inferSourceOrigin(source);
|
|
196
|
+
return origin.remote || origin.method === "provider";
|
|
197
|
+
}
|
|
198
|
+
function isAuthBlockedOriginKind(kind) {
|
|
199
|
+
return kind ? ["confluence", "jira"].includes(kind) : false;
|
|
200
|
+
}
|
|
201
|
+
function isSupportedReadOnlyOriginKind(kind) {
|
|
202
|
+
return ["local", "openapi", "manual", "script", "skill"].includes(kind);
|
|
203
|
+
}
|
|
204
|
+
function renderBlockedSources(plan) {
|
|
205
|
+
const blocked = plan.records.filter((record) => record.status !== "ready");
|
|
206
|
+
const lines = [
|
|
207
|
+
"# Blocked Sources",
|
|
208
|
+
"",
|
|
209
|
+
blocked.length === 0
|
|
210
|
+
? "No blocked prepare sources."
|
|
211
|
+
: "Sources that cannot proceed through the read-only prepare lifecycle without follow-up:",
|
|
212
|
+
"",
|
|
213
|
+
];
|
|
214
|
+
if (blocked.length === 0)
|
|
215
|
+
return `${lines.join("\n")}\n`;
|
|
216
|
+
for (const record of blocked) {
|
|
217
|
+
lines.push(`- \`${record.sourcePath}\` [${record.status}]`);
|
|
218
|
+
lines.push(` - provider: \`${record.provider}\``);
|
|
219
|
+
if (record.originKind)
|
|
220
|
+
lines.push(` - origin: \`${record.originKind}\`${record.originRef ? ` -> \`${record.originRef}\`` : ""}`);
|
|
221
|
+
if (record.originProvider && record.originProvider !== record.originKind)
|
|
222
|
+
lines.push(` - detected platform: \`${record.originProvider}\``);
|
|
223
|
+
if (record.snapshot)
|
|
224
|
+
lines.push(` - snapshot: \`${record.snapshot}\``);
|
|
225
|
+
lines.push(` - reason: ${record.reason}`);
|
|
226
|
+
}
|
|
227
|
+
lines.push("");
|
|
228
|
+
return `${lines.join("\n")}\n`;
|
|
229
|
+
}
|
|
230
|
+
function renderCorrespondenceQuestions(plan) {
|
|
231
|
+
const questions = [];
|
|
232
|
+
for (const record of plan.records) {
|
|
233
|
+
if (record.status === "needs-confirmation") {
|
|
234
|
+
if (record.source === "draft") {
|
|
235
|
+
questions.push(`- Confirm the prepare lane and source mapping for \`${record.sourcePath}\` before promoting \`${record.originRef}\` into \`.zsk/config.yaml\`.`);
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
questions.push(`- Confirm the acquisition method and authority for \`${record.sourcePath}\` before treating \`${record.originRef ?? record.originKind ?? record.provider}\` as a prepare source.`);
|
|
239
|
+
}
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
if (record.source === "draft") {
|
|
243
|
+
questions.push(`- Confirm whether drafted source \`${record.originRef}\` should be promoted into \`.zsk/config.yaml\` as \`${record.sourcePath}\`.`);
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
if (record.status === "source-gap") {
|
|
247
|
+
questions.push(`- Provide or correct the local origin/snapshot for \`${record.sourcePath}\` (${record.provider}).`);
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
if (record.status === "blocked-auth") {
|
|
251
|
+
questions.push(`- Define the auth/adapter contract for \`${record.sourcePath}\` before enabling acquisition from \`${record.originKind}\`.`);
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
if (record.status === "unsupported-provider") {
|
|
255
|
+
questions.push(`- Decide whether to add a provider adapter or require a materialized snapshot for \`${record.sourcePath}\`.`);
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
if (record.status === "stale") {
|
|
259
|
+
questions.push(`- Refresh the snapshot for \`${record.sourcePath}\` or explicitly accept the current divergence from its local origin.`);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
const lines = [
|
|
263
|
+
"# Correspondence Questions",
|
|
264
|
+
"",
|
|
265
|
+
questions.length === 0 ? "No correspondence questions." : questions.join("\n"),
|
|
266
|
+
"",
|
|
267
|
+
];
|
|
268
|
+
return `${lines.join("\n")}\n`;
|
|
269
|
+
}
|
|
270
|
+
async function describeFile(path) {
|
|
271
|
+
const info = await safeStat(path);
|
|
272
|
+
if (!info) {
|
|
273
|
+
return { exists: false, size: null, hash: null };
|
|
274
|
+
}
|
|
275
|
+
return {
|
|
276
|
+
exists: true,
|
|
277
|
+
size: Number(info.size),
|
|
278
|
+
hash: info.isFile() ? await sha256(path) : null,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
async function safeStat(path) {
|
|
282
|
+
try {
|
|
283
|
+
return await stat(path);
|
|
284
|
+
}
|
|
285
|
+
catch {
|
|
286
|
+
return null;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
async function pathExists(path) {
|
|
290
|
+
try {
|
|
291
|
+
await access(path);
|
|
292
|
+
return true;
|
|
293
|
+
}
|
|
294
|
+
catch {
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
async function sha256(path) {
|
|
299
|
+
const content = await readFile(path);
|
|
300
|
+
return createHash("sha256").update(content).digest("hex");
|
|
301
|
+
}
|
|
302
|
+
//# sourceMappingURL=prepare-lifecycle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepare-lifecycle.js","sourceRoot":"","sources":["../../src/core/prepare-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAA2D,MAAM,aAAa,CAAC;AACpI,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAA6B,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AA+DzD,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,MAAc,EACd,MA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C,KAAK,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { type ProjectConfig } from "./config.js";
|
|
2
|
+
export type PrepareSyncOptions = {
|
|
3
|
+
source?: string;
|
|
4
|
+
all?: boolean;
|
|
5
|
+
allowNetwork?: boolean;
|
|
6
|
+
authState?: string;
|
|
7
|
+
authProfile?: string;
|
|
8
|
+
browser?: boolean;
|
|
9
|
+
dryRun?: boolean;
|
|
10
|
+
runId?: string;
|
|
11
|
+
};
|
|
12
|
+
export type PrepareSyncStatus = "materialized" | "metadata-only" | "blocked-auth" | "source-gap" | "skipped" | "failed";
|
|
13
|
+
export type PrepareSyncResult = {
|
|
14
|
+
envelopeVersion?: 1;
|
|
15
|
+
sourceKey: string;
|
|
16
|
+
sourcePath: string;
|
|
17
|
+
rawLane?: string;
|
|
18
|
+
provider?: string;
|
|
19
|
+
adapter?: string;
|
|
20
|
+
strategy: string;
|
|
21
|
+
status: PrepareSyncStatus;
|
|
22
|
+
origin?: string;
|
|
23
|
+
resolvedOrigin?: string;
|
|
24
|
+
contentType?: string;
|
|
25
|
+
snapshot?: string;
|
|
26
|
+
snapshotHash?: string;
|
|
27
|
+
previousSnapshotHash?: string;
|
|
28
|
+
metadata?: Record<string, unknown>;
|
|
29
|
+
changed: boolean;
|
|
30
|
+
reason: string;
|
|
31
|
+
validation: Record<string, "pass" | "fail" | "skipped">;
|
|
32
|
+
};
|
|
33
|
+
export type PrepareSyncArtifacts = {
|
|
34
|
+
runId: string;
|
|
35
|
+
dir: string;
|
|
36
|
+
adapterResultsDir: string;
|
|
37
|
+
authCheckPath: string;
|
|
38
|
+
downstreamImpactPath: string;
|
|
39
|
+
authScriptPath: string;
|
|
40
|
+
authStatePath: string;
|
|
41
|
+
migrationPlanPath: string;
|
|
42
|
+
};
|
|
43
|
+
export type PrepareSyncBundle = {
|
|
44
|
+
artifacts: PrepareSyncArtifacts;
|
|
45
|
+
results: PrepareSyncResult[];
|
|
46
|
+
downstreamImpact: string;
|
|
47
|
+
};
|
|
48
|
+
export type PrepareAuthCheckStatus = "ready" | "reachable" | "missing-auth" | "blocked-auth" | "source-gap" | "failed";
|
|
49
|
+
export type PrepareAuthCheckResult = {
|
|
50
|
+
sourceKey: string;
|
|
51
|
+
sourcePath: string;
|
|
52
|
+
rawLane?: string;
|
|
53
|
+
provider?: string;
|
|
54
|
+
origin?: string;
|
|
55
|
+
method: string;
|
|
56
|
+
status: PrepareAuthCheckStatus;
|
|
57
|
+
authSources: string[];
|
|
58
|
+
directAuthAvailable: boolean;
|
|
59
|
+
networkAttempted: boolean;
|
|
60
|
+
httpStatus?: number;
|
|
61
|
+
contentType?: string;
|
|
62
|
+
reason: string;
|
|
63
|
+
validation: Record<string, "pass" | "fail" | "skipped">;
|
|
64
|
+
};
|
|
65
|
+
export type PrepareAuthCheckBundle = {
|
|
66
|
+
artifacts: PrepareSyncArtifacts;
|
|
67
|
+
results: PrepareAuthCheckResult[];
|
|
68
|
+
};
|
|
69
|
+
export declare function resolvePrepareSyncArtifacts(target: string, config: ProjectConfig, runId: string): PrepareSyncArtifacts;
|
|
70
|
+
export declare function syncPrepareSources(target: string, config: ProjectConfig, opts?: PrepareSyncOptions): Promise<PrepareSyncBundle>;
|
|
71
|
+
export declare function writeAuthLoginHelper(target: string, config: ProjectConfig, opts?: {
|
|
72
|
+
url?: string;
|
|
73
|
+
out?: string;
|
|
74
|
+
profile?: string;
|
|
75
|
+
runId?: string;
|
|
76
|
+
}): Promise<PrepareSyncArtifacts>;
|
|
77
|
+
export declare function checkPrepareAuth(target: string, config: ProjectConfig, opts?: PrepareSyncOptions): Promise<PrepareAuthCheckBundle>;
|
|
78
|
+
export declare function buildRawMigrationPlan(target: string, config: ProjectConfig, runId?: string): Promise<{
|
|
79
|
+
artifacts: PrepareSyncArtifacts;
|
|
80
|
+
content: string;
|
|
81
|
+
}>;
|
|
82
|
+
export declare function createSyncRunId(now?: Date): string;
|