@kinloom/cli 0.0.0-stage → 0.1.1

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 (50) hide show
  1. package/dist/cli.d.ts +13 -0
  2. package/dist/cli.d.ts.map +1 -0
  3. package/dist/cli.js +444 -0
  4. package/dist/cli.js.map +1 -0
  5. package/dist/client.d.ts +110 -0
  6. package/dist/client.d.ts.map +1 -0
  7. package/dist/client.js +277 -0
  8. package/dist/client.js.map +1 -0
  9. package/dist/commands/dataFiles.d.ts +26 -0
  10. package/dist/commands/dataFiles.d.ts.map +1 -0
  11. package/dist/commands/dataFiles.js +136 -0
  12. package/dist/commands/dataFiles.js.map +1 -0
  13. package/dist/commands/exportYaml.d.ts +22 -0
  14. package/dist/commands/exportYaml.d.ts.map +1 -0
  15. package/dist/commands/exportYaml.js +106 -0
  16. package/dist/commands/exportYaml.js.map +1 -0
  17. package/dist/commands/init.d.ts +14 -0
  18. package/dist/commands/init.d.ts.map +1 -0
  19. package/dist/commands/init.js +251 -0
  20. package/dist/commands/init.js.map +1 -0
  21. package/dist/commands/reconcile.d.ts +17 -0
  22. package/dist/commands/reconcile.d.ts.map +1 -0
  23. package/dist/commands/reconcile.js +92 -0
  24. package/dist/commands/reconcile.js.map +1 -0
  25. package/dist/commands/seed.d.ts +27 -0
  26. package/dist/commands/seed.d.ts.map +1 -0
  27. package/dist/commands/seed.js +274 -0
  28. package/dist/commands/seed.js.map +1 -0
  29. package/dist/commands/sliceGedcom.d.ts +22 -0
  30. package/dist/commands/sliceGedcom.d.ts.map +1 -0
  31. package/dist/commands/sliceGedcom.js +63 -0
  32. package/dist/commands/sliceGedcom.js.map +1 -0
  33. package/dist/commands/submitBatch.d.ts +21 -0
  34. package/dist/commands/submitBatch.d.ts.map +1 -0
  35. package/dist/commands/submitBatch.js +140 -0
  36. package/dist/commands/submitBatch.js.map +1 -0
  37. package/dist/commands/uploadMedia.d.ts +23 -0
  38. package/dist/commands/uploadMedia.d.ts.map +1 -0
  39. package/dist/commands/uploadMedia.js +176 -0
  40. package/dist/commands/uploadMedia.js.map +1 -0
  41. package/dist/errors.d.ts +31 -0
  42. package/dist/errors.d.ts.map +1 -0
  43. package/dist/errors.js +74 -0
  44. package/dist/errors.js.map +1 -0
  45. package/dist/index.d.ts +12 -0
  46. package/dist/index.d.ts.map +1 -0
  47. package/dist/index.js +12 -0
  48. package/dist/index.js.map +1 -0
  49. package/package.json +37 -4
  50. package/README.md +0 -3
@@ -0,0 +1,251 @@
1
+ import { access, mkdir, writeFile } from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { parseKinloomConfig, serializeKinloomConfigYaml } from '@kinloom/core';
4
+ import { CliValidationError } from '../errors.js';
5
+ import { ARCHIVE_YAML_FILE_NAMES } from './dataFiles.js';
6
+ function slugifyIdentifier(raw) {
7
+ const slug = raw
8
+ .normalize('NFKD')
9
+ .replaceAll(/[\u0300-\u036F]/g, '')
10
+ .toLowerCase()
11
+ .replaceAll(/[^a-z0-9]+/g, '-')
12
+ .replaceAll(/^-+|-+$/g, '');
13
+ return slug || 'primary';
14
+ }
15
+ function toGedcomSourceName(family) {
16
+ const upper = family
17
+ .normalize('NFKD')
18
+ .replaceAll(/[\u0300-\u036F]/g, '')
19
+ .toUpperCase()
20
+ .replaceAll(/[^A-Z0-9]+/g, '_')
21
+ .replaceAll(/^_+|_+$/g, '');
22
+ return upper ? `${upper}_ARCHIVE` : 'KINLOOM_ARCHIVE';
23
+ }
24
+ async function fileExists(filePath) {
25
+ try {
26
+ await access(filePath);
27
+ return true;
28
+ }
29
+ catch {
30
+ return false;
31
+ }
32
+ }
33
+ const BACKUP_WORKFLOW_YAML = `name: Nightly Archive Backup
34
+
35
+ on:
36
+ workflow_dispatch:
37
+ schedule:
38
+ - cron: "0 6 * * *"
39
+
40
+ permissions:
41
+ contents: write
42
+
43
+ jobs:
44
+ backup:
45
+ runs-on: ubuntu-latest
46
+ steps:
47
+ - uses: actions/checkout@v4
48
+ - uses: actions/setup-node@v4
49
+ with:
50
+ node-version: "22"
51
+ - name: Export deterministic YAML snapshot
52
+ env:
53
+ KINLOOM_TOKEN: \${{ secrets.KINLOOM_BACKUP_TOKEN }}
54
+ run: |
55
+ npx -y @kinloom/cli@latest export-yaml \\
56
+ --site "\${{ vars.KINLOOM_SITE_URL }}" \\
57
+ --out data \\
58
+ --state-file data/.last-backup-revision
59
+ - name: Commit backup when revision advanced
60
+ run: |
61
+ if [ -z "$(git status --porcelain data)" ]; then
62
+ echo "No archive changes since last backup."
63
+ exit 0
64
+ fi
65
+ REV="$(cat data/.last-backup-revision)"
66
+ git config user.name "kinloom-backup[bot]"
67
+ git config user.email "kinloom-backup[bot]@users.noreply.github.com"
68
+ git add data
69
+ git commit -m "chore(backup): sync archive snapshot r\${REV}"
70
+ git push
71
+ `;
72
+ const RECONCILE_WORKFLOW_YAML = `name: Reconcile Archive Bundle
73
+
74
+ on:
75
+ workflow_dispatch:
76
+ schedule:
77
+ - cron: "0 7 * * 0"
78
+
79
+ jobs:
80
+ reconcile:
81
+ runs-on: ubuntu-latest
82
+ steps:
83
+ - uses: actions/checkout@v4
84
+ - uses: actions/setup-node@v4
85
+ with:
86
+ node-version: "22"
87
+ - name: Verify cached bundle matches full archive compilation
88
+ env:
89
+ KINLOOM_TOKEN: \${{ secrets.KINLOOM_BACKUP_TOKEN }}
90
+ run: |
91
+ npx -y @kinloom/cli@latest reconcile \\
92
+ --site "\${{ vars.KINLOOM_SITE_URL }}" \\
93
+ --config kinloom.config.yaml
94
+ `;
95
+ const EXTENSIONS_README_MD = `# Private Archive Extensions
96
+
97
+ Place family-specific UI or server plugins in this directory so custom storytelling
98
+ modules stay isolated from public \`@kinloom/ui\` and \`@kinloom/server\`.
99
+
100
+ ## Registering a \`KinloomUiPlugin\` (Example: Video Story)
101
+
102
+ \`\`\`tsx
103
+ import type { KinloomUiPlugin } from '@kinloom/ui';
104
+
105
+ export const videoStoryPlugin: KinloomUiPlugin = {
106
+ id: 'family-video-stories',
107
+ name: 'Family Video Stories',
108
+ routes: [
109
+ {
110
+ path: '/stories/homestead-film',
111
+ navLabel: 'Stories',
112
+ component: () => (
113
+ <section>
114
+ <h1>Homestead Oral History</h1>
115
+ <video controls preload="metadata" src="/media/example-story.mp4" />
116
+ </section>
117
+ ),
118
+ },
119
+ ],
120
+ slots: {
121
+ personDetail: ({ person }) =>
122
+ person.id === 'per_example_ancestor' ? (
123
+ <a href="/stories/homestead-film">Watch oral-history video story</a>
124
+ ) : null,
125
+ },
126
+ mediaRenderers: [
127
+ {
128
+ match: (media) => media.kind === 'video_story',
129
+ render: ({ media, src }) => (
130
+ <figure>
131
+ <video controls preload="metadata" poster={media.poster_url ?? undefined} src={src} />
132
+ <figcaption>{media.caption}</figcaption>
133
+ </figure>
134
+ ),
135
+ },
136
+ ],
137
+ };
138
+ \`\`\`
139
+
140
+ Pass \`plugins={[videoStoryPlugin]}\` into \`<KinloomApp />\` in your private site entrypoint.
141
+
142
+ ## Vite Configuration (Single React Instance)
143
+
144
+ When building a private site app with Vite, include \`resolve.dedupe\` in \`vite.config.ts\` so \`@kinloom/ui\` and your site share one React and Router instance:
145
+
146
+ \`\`\`ts
147
+ import { defineConfig } from 'vite';
148
+ import react from '@vitejs/plugin-react';
149
+
150
+ export default defineConfig({
151
+ plugins: [react()],
152
+ resolve: {
153
+ dedupe: ['react', 'react-dom', 'react-router-dom'],
154
+ },
155
+ });
156
+ \`\`\`
157
+ `;
158
+ const GITIGNORE_CONTENT = `node_modules/
159
+ dist/
160
+ .wrangler/
161
+ .env
162
+ .env.*
163
+ *.local
164
+ raw-gedcom/
165
+ `;
166
+ export async function runInitCommand(options) {
167
+ const targetDir = options.targetDir.trim();
168
+ const family = options.family.trim();
169
+ const title = options.title.trim();
170
+ const accent = options.accent?.trim() || '#7A4612';
171
+ if (!targetDir) {
172
+ throw new CliValidationError('Target directory is required for `kinloom init`.');
173
+ }
174
+ if (!family) {
175
+ throw new CliValidationError('`--family` must be a non-empty family name.');
176
+ }
177
+ if (!title) {
178
+ throw new CliValidationError('`--title` must be a non-empty site title.');
179
+ }
180
+ const branchId = slugifyIdentifier(family);
181
+ let config;
182
+ try {
183
+ config = parseKinloomConfig({
184
+ schemaVersion: 1,
185
+ site: {
186
+ title,
187
+ familyName: family,
188
+ gedcomSourceName: toGedcomSourceName(family),
189
+ description: `Archival family history explorer for the ${family} lineage.`,
190
+ },
191
+ theme: {
192
+ accent,
193
+ },
194
+ defaultBranchId: branchId,
195
+ branches: [
196
+ {
197
+ id: branchId,
198
+ label: `${family} Line`,
199
+ surnames: [family],
200
+ lineageGroups: ['pivot_ancestor', 'ancestor', 'descendant'],
201
+ supportsDirectMode: true,
202
+ },
203
+ ],
204
+ lineageSections: [
205
+ {
206
+ id: 'direct-ancestors',
207
+ title: 'Direct Ancestors',
208
+ lineageGroups: ['pivot_ancestor', 'ancestor'],
209
+ branchId,
210
+ },
211
+ {
212
+ id: 'descendants',
213
+ title: 'Descendants',
214
+ lineageGroups: ['descendant'],
215
+ branchId,
216
+ },
217
+ ],
218
+ });
219
+ }
220
+ catch (err) {
221
+ const message = err instanceof Error ? err.message : String(err);
222
+ throw new CliValidationError(`Invalid kinloom.config.yaml options: ${message}`);
223
+ }
224
+ const resolvedDir = path.resolve(targetDir);
225
+ const filesToWrite = [
226
+ ['kinloom.config.yaml', serializeKinloomConfigYaml(config)],
227
+ ...ARCHIVE_YAML_FILE_NAMES.map((name) => [path.join('data', name), '[]\n']),
228
+ [path.join('.github', 'workflows', 'backup.yml'), BACKUP_WORKFLOW_YAML],
229
+ [path.join('.github', 'workflows', 'reconcile.yml'), RECONCILE_WORKFLOW_YAML],
230
+ [path.join('extensions', 'README.md'), EXTENSIONS_README_MD],
231
+ ['.gitignore', GITIGNORE_CONTENT],
232
+ ];
233
+ const created = [];
234
+ const skipped = [];
235
+ for (const [relativePath, content] of filesToWrite) {
236
+ const fullPath = path.join(resolvedDir, relativePath);
237
+ if (!options.force && (await fileExists(fullPath))) {
238
+ skipped.push(relativePath);
239
+ continue;
240
+ }
241
+ await mkdir(path.dirname(fullPath), { recursive: true });
242
+ await writeFile(fullPath, content, 'utf8');
243
+ created.push(relativePath);
244
+ }
245
+ return {
246
+ targetDir: resolvedDir,
247
+ created,
248
+ skipped,
249
+ };
250
+ }
251
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAgBzD,SAAS,iBAAiB,CAAC,GAAW;IACpC,MAAM,IAAI,GAAG,GAAG;SACb,SAAS,CAAC,MAAM,CAAC;SACjB,UAAU,CAAC,kBAAkB,EAAE,EAAE,CAAC;SAClC,WAAW,EAAE;SACb,UAAU,CAAC,aAAa,EAAE,GAAG,CAAC;SAC9B,UAAU,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC9B,OAAO,IAAI,IAAI,SAAS,CAAC;AAC3B,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAc;IACxC,MAAM,KAAK,GAAG,MAAM;SACjB,SAAS,CAAC,MAAM,CAAC;SACjB,UAAU,CAAC,kBAAkB,EAAE,EAAE,CAAC;SAClC,WAAW,EAAE;SACb,UAAU,CAAC,aAAa,EAAE,GAAG,CAAC;SAC9B,UAAU,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC9B,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC;AACxD,CAAC;AAED,KAAK,UAA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
+ token?: string;
6
+ mode?: BuildMode;
7
+ fetchImpl?: typeof fetch;
8
+ }
9
+ export interface ReconcileCommandResult {
10
+ inSync: boolean;
11
+ headRevisionId: number;
12
+ cachedRevisionId: number | null;
13
+ mode: BuildMode;
14
+ drifts: FieldDiff[];
15
+ }
16
+ export declare function runReconcileCommand(options: ReconcileCommandOptions): Promise<ReconcileCommandResult>;
17
+ //# sourceMappingURL=reconcile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../../src/commands/reconcile.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,eAAe,CAAC;AAKvB,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAwCD,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,sBAAsB,CAAC,CA2DjC"}
@@ -0,0 +1,92 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { compileArchive, computeEntityDiff, parseKinloomConfigYaml, } from '@kinloom/core';
3
+ import { KinloomApiClient, resolveAuthToken } from '../client.js';
4
+ import { CliValidationError } from '../errors.js';
5
+ import { snapshotToCompileInput } from './dataFiles.js';
6
+ function stripUndefinedDeep(value) {
7
+ if (Array.isArray(value)) {
8
+ return value.map((item) => stripUndefinedDeep(item));
9
+ }
10
+ if (typeof value === 'object' && value !== null) {
11
+ const out = {};
12
+ for (const [k, v] of Object.entries(value)) {
13
+ if (v !== undefined) {
14
+ out[k] = stripUndefinedDeep(v);
15
+ }
16
+ }
17
+ return out;
18
+ }
19
+ return value;
20
+ }
21
+ function bundleToComparablePayload(bundle) {
22
+ const normalized = stripUndefinedDeep({
23
+ meta: {
24
+ version: bundle.meta.version,
25
+ build_mode: bundle.meta.build_mode,
26
+ max_revision_id: bundle.meta.max_revision_id,
27
+ uncited_entity_keys: bundle.meta.uncited_entity_keys,
28
+ counts: bundle.meta.counts,
29
+ },
30
+ people: bundle.people,
31
+ events: bundle.events,
32
+ residence_spans: bundle.residence_spans,
33
+ places: bundle.places,
34
+ place_ancestors: bundle.place_ancestors,
35
+ kinship: bundle.kinship,
36
+ sources: bundle.sources,
37
+ media: bundle.media ?? [],
38
+ ...(bundle.narratives !== undefined ? { narratives: bundle.narratives } : {}),
39
+ });
40
+ return normalized;
41
+ }
42
+ export async function runReconcileCommand(options) {
43
+ const configPath = options.configPath.trim();
44
+ if (!configPath) {
45
+ throw new CliValidationError('`--config` kinloom.config.yaml path is required for `kinloom reconcile`.');
46
+ }
47
+ const configText = await readFile(configPath, 'utf8');
48
+ let siteConfig;
49
+ try {
50
+ siteConfig = parseKinloomConfigYaml(configText);
51
+ }
52
+ catch (err) {
53
+ const message = err instanceof Error ? err.message : String(err);
54
+ throw new CliValidationError(`Invalid config '${configPath}': ${message}`);
55
+ }
56
+ const client = new KinloomApiClient({
57
+ baseUrl: options.siteUrl,
58
+ token: resolveAuthToken(options.token),
59
+ fetchImpl: options.fetchImpl,
60
+ });
61
+ const [bundleResult, snapshotResult] = await Promise.all([
62
+ client.getBundle(),
63
+ client.exportSnapshot(),
64
+ ]);
65
+ if (bundleResult.status !== 'ok') {
66
+ throw new Error('Expected 200 OK from GET /api/bundle during reconcile.');
67
+ }
68
+ if (snapshotResult.status !== 'ok') {
69
+ throw new Error('Expected 200 OK from GET /api/export/snapshot during reconcile.');
70
+ }
71
+ const cachedBundle = bundleResult.bundle;
72
+ const snapshot = snapshotResult.snapshot;
73
+ const mode = options.mode ?? cachedBundle.meta.build_mode;
74
+ const compileInput = snapshotToCompileInput({
75
+ snapshot,
76
+ siteConfig,
77
+ mode,
78
+ generatedAt: cachedBundle.meta.generated_at,
79
+ version: cachedBundle.meta.version,
80
+ includeEmptyNarratives: cachedBundle.narratives !== undefined,
81
+ });
82
+ const recompiled = compileArchive(compileInput).bundle;
83
+ const diff = computeEntityDiff(bundleToComparablePayload(cachedBundle), bundleToComparablePayload(recompiled));
84
+ return {
85
+ inSync: !diff.hasChanges,
86
+ headRevisionId: snapshot.head_revision_id,
87
+ cachedRevisionId: cachedBundle.meta.max_revision_id ?? null,
88
+ mode,
89
+ drifts: diff.fields,
90
+ };
91
+ }
92
+ //# sourceMappingURL=reconcile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reconcile.js","sourceRoot":"","sources":["../../src/commands/reconcile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,sBAAsB,GAKvB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAkBxD,SAAS,kBAAkB,CAAC,KAAc;IACxC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IACvD,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,MAAM,GAAG,GAA4B,EAAE,CAA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C;IACzC,MAAM,IAAI,GAAc,OAAO,CAAC,IAAI,IAAI,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;IAErE,MAAM,YAAY,GAAG,sBAAsB,CAAC;QAC1C,QAAQ;QACR,UAAU;QACV,IAAI;QACJ,WAAW,EAAE,YAAY,CAAC,IAAI,CAAC,YAAY;QAC3C,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO;QAClC,sBAAsB,EAAE,YAAY,CAAC,UAAU,KAAK,SAAS;KAC9D,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC;IACvD,MAAM,IAAI,GAAG,iBAAiB,CAC5B,yBAAyB,CAAC,YAAY,CAAC,EACvC,yBAAyB,CAAC,UAAU,CAAC,CACtC,CAAC;IAEF,OAAO;QACL,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU;QACxB,cAAc,EAAE,QAAQ,CAAC,gBAAgB;QACzC,gBAAgB,EAAE,YAAY,CAAC,IAAI,CAAC,eAAe,IAAI,IAAI;QAC3D,IAAI;QACJ,MAAM,EAAE,IAAI,CAAC,MAAM;KACpB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { type ArchiveBundle } from '@kinloom/core';
2
+ import { type SubmitBatchResponse } from '../client.js';
3
+ export interface SeedCommandOptions {
4
+ dataDir: string;
5
+ configPath: string;
6
+ siteUrl: string;
7
+ token?: string;
8
+ dryRun?: boolean;
9
+ batchId?: string;
10
+ summary?: string;
11
+ chunkSize?: number;
12
+ fetchImpl?: typeof fetch;
13
+ }
14
+ export interface SeedCommandResult {
15
+ dryRun: boolean;
16
+ batchId: string;
17
+ createdCount: number;
18
+ updatedCount: number;
19
+ unchangedCount: number;
20
+ totalEntities: number;
21
+ chunksSubmitted?: number;
22
+ precompiledCounts: ArchiveBundle['meta']['counts'];
23
+ reviewFlagsCount: number;
24
+ response?: SubmitBatchResponse;
25
+ }
26
+ export declare function runSeedCommand(options: SeedCommandOptions): Promise<SeedCommandResult>;
27
+ //# sourceMappingURL=seed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../src/commands/seed.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,aAAa,EAMnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAsC,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAK5F,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;IACnD,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC;AAsGD,wBAAsB,cAAc,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAiM5F"}
@@ -0,0 +1,274 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { readFile } from 'node:fs/promises';
3
+ import { compileArchive, computeEntityDiff, deriveKinshipEdgeId, parseKinloomConfigYaml, } from '@kinloom/core';
4
+ import { KinloomApiClient, resolveAuthToken } from '../client.js';
5
+ import { CliValidationError, KinloomApiError } from '../errors.js';
6
+ import { loadArchiveDataDir } from './dataFiles.js';
7
+ import { validateBatchSubmission } from './submitBatch.js';
8
+ function collectSeedEntries(data) {
9
+ const entries = [];
10
+ for (const place of data.places) {
11
+ entries.push({
12
+ entity_type: 'place',
13
+ entity_id: place.id,
14
+ data: place,
15
+ has_primary_source: place.has_primary_source ?? true,
16
+ });
17
+ }
18
+ for (const source of data.sources) {
19
+ entries.push({
20
+ entity_type: 'source',
21
+ entity_id: source.id,
22
+ data: source,
23
+ has_primary_source: source.has_primary_source ?? true,
24
+ });
25
+ }
26
+ for (const person of data.people) {
27
+ entries.push({
28
+ entity_type: 'person',
29
+ entity_id: person.id,
30
+ data: person,
31
+ has_primary_source: person.has_primary_source ?? true,
32
+ });
33
+ }
34
+ for (const event of data.events) {
35
+ entries.push({
36
+ entity_type: 'event',
37
+ entity_id: event.id,
38
+ data: event,
39
+ has_primary_source: event.has_primary_source ?? true,
40
+ });
41
+ }
42
+ for (const edge of data.kinship) {
43
+ entries.push({
44
+ entity_type: 'kinship_edge',
45
+ entity_id: deriveKinshipEdgeId(edge),
46
+ data: edge,
47
+ has_primary_source: true,
48
+ });
49
+ }
50
+ for (const media of data.media) {
51
+ entries.push({
52
+ entity_type: 'media',
53
+ entity_id: media.id,
54
+ data: media,
55
+ has_primary_source: media.has_primary_source ?? true,
56
+ });
57
+ }
58
+ for (const narrative of data.narratives) {
59
+ entries.push({
60
+ entity_type: 'narrative',
61
+ entity_id: narrative.id,
62
+ data: narrative,
63
+ has_primary_source: narrative.has_primary_source ?? true,
64
+ });
65
+ }
66
+ return entries;
67
+ }
68
+ function deriveDeterministicBatchId(entries) {
69
+ const hash = createHash('sha256').update(JSON.stringify(entries)).digest('hex').slice(0, 12);
70
+ return `seed-${hash}`;
71
+ }
72
+ function indexRemoteSnapshot(snapshot) {
73
+ const index = new Map();
74
+ for (const row of snapshot.entities) {
75
+ if (row.deleted_at !== null) {
76
+ continue;
77
+ }
78
+ index.set(`${row.entity_type}:${row.entity_id}`, {
79
+ revisionId: row.current_revision_id,
80
+ data: row.data,
81
+ });
82
+ }
83
+ for (const row of snapshot.kinship) {
84
+ if (row.deleted_at !== null) {
85
+ continue;
86
+ }
87
+ index.set(`kinship_edge:${row.edge_id}`, {
88
+ revisionId: row.current_revision_id,
89
+ data: row.edge,
90
+ });
91
+ }
92
+ return index;
93
+ }
94
+ export async function runSeedCommand(options) {
95
+ const dataDir = options.dataDir.trim();
96
+ const configPath = options.configPath.trim();
97
+ if (!dataDir) {
98
+ throw new CliValidationError('`--data` directory is required for `kinloom seed`.');
99
+ }
100
+ if (!configPath) {
101
+ throw new CliValidationError('`--config` kinloom.config.yaml path is required for `kinloom seed`.');
102
+ }
103
+ const configText = await readFile(configPath, 'utf8');
104
+ let siteConfig;
105
+ try {
106
+ siteConfig = parseKinloomConfigYaml(configText);
107
+ }
108
+ catch (err) {
109
+ const message = err instanceof Error ? err.message : String(err);
110
+ throw new CliValidationError(`Invalid config '${configPath}': ${message}`);
111
+ }
112
+ let data;
113
+ try {
114
+ data = await loadArchiveDataDir(dataDir);
115
+ }
116
+ catch (err) {
117
+ const message = err instanceof Error ? err.message : String(err);
118
+ throw new CliValidationError(`Invalid archive YAML in '${dataDir}': ${message}`);
119
+ }
120
+ const precompiled = compileArchive({
121
+ people: data.people,
122
+ events: data.events,
123
+ places: data.places,
124
+ sources: data.sources,
125
+ kinship: data.kinship,
126
+ media: data.media,
127
+ ...(data.narratives.length > 0 ? { narratives: data.narratives } : {}),
128
+ siteConfig,
129
+ mode: 'private',
130
+ });
131
+ const entries = collectSeedEntries(data);
132
+ const batchId = options.batchId?.trim() || deriveDeterministicBatchId(entries);
133
+ const summary = options.summary?.trim() || `Seed ${siteConfig.site.familyName} archive from YAML`;
134
+ if (options.dryRun) {
135
+ const createPatches = entries.map((entry) => ({
136
+ action: 'create',
137
+ entity_type: entry.entity_type,
138
+ entity_id: entry.entity_id,
139
+ data: entry.data,
140
+ has_primary_source: entry.has_primary_source,
141
+ }));
142
+ if (createPatches.length > 0) {
143
+ validateBatchSubmission({
144
+ batch_id: batchId,
145
+ author_type: 'system_seed',
146
+ summary,
147
+ has_primary_source: true,
148
+ patches: createPatches,
149
+ });
150
+ }
151
+ return {
152
+ dryRun: true,
153
+ batchId,
154
+ createdCount: createPatches.length,
155
+ updatedCount: 0,
156
+ unchangedCount: 0,
157
+ totalEntities: entries.length,
158
+ precompiledCounts: precompiled.bundle.meta.counts,
159
+ reviewFlagsCount: precompiled.reviewFlags.length,
160
+ };
161
+ }
162
+ const client = new KinloomApiClient({
163
+ baseUrl: options.siteUrl,
164
+ token: resolveAuthToken(options.token),
165
+ fetchImpl: options.fetchImpl,
166
+ });
167
+ let remoteIndex = null;
168
+ try {
169
+ const snapshotResult = await client.exportSnapshot();
170
+ if (snapshotResult.status === 'ok') {
171
+ remoteIndex = indexRemoteSnapshot(snapshotResult.snapshot);
172
+ }
173
+ }
174
+ catch (err) {
175
+ // Scoped write_batch tokens or minimal servers may disallow /api/export/snapshot.
176
+ if (!(err instanceof KinloomApiError && (err.kind === 'forbidden' || err.kind === 'not_found'))) {
177
+ throw err;
178
+ }
179
+ }
180
+ const patches = [];
181
+ let createdCount = 0;
182
+ let updatedCount = 0;
183
+ let unchangedCount = 0;
184
+ for (const entry of entries) {
185
+ const existing = remoteIndex?.get(`${entry.entity_type}:${entry.entity_id}`);
186
+ if (!existing) {
187
+ patches.push({
188
+ action: 'create',
189
+ entity_type: entry.entity_type,
190
+ entity_id: entry.entity_id,
191
+ data: entry.data,
192
+ has_primary_source: entry.has_primary_source,
193
+ });
194
+ createdCount += 1;
195
+ continue;
196
+ }
197
+ const diff = computeEntityDiff(existing.data, entry.data);
198
+ if (!diff.hasChanges) {
199
+ unchangedCount += 1;
200
+ continue;
201
+ }
202
+ patches.push({
203
+ action: 'update',
204
+ entity_type: entry.entity_type,
205
+ entity_id: entry.entity_id,
206
+ ...(existing.revisionId > 0 ? { parent_revision_id: existing.revisionId } : {}),
207
+ data: entry.data,
208
+ merge: false,
209
+ has_primary_source: entry.has_primary_source,
210
+ });
211
+ updatedCount += 1;
212
+ }
213
+ if (patches.length === 0) {
214
+ return {
215
+ dryRun: false,
216
+ batchId,
217
+ createdCount: 0,
218
+ updatedCount: 0,
219
+ unchangedCount,
220
+ totalEntities: entries.length,
221
+ precompiledCounts: precompiled.bundle.meta.counts,
222
+ reviewFlagsCount: precompiled.reviewFlags.length,
223
+ };
224
+ }
225
+ const chunkSize = options.chunkSize ?? 100;
226
+ if (!Number.isInteger(chunkSize) || chunkSize <= 0) {
227
+ throw new CliValidationError('`--chunk-size` must be a positive integer.');
228
+ }
229
+ let lastResponse;
230
+ let chunksSubmitted = 0;
231
+ if (patches.length <= chunkSize) {
232
+ const batch = validateBatchSubmission({
233
+ batch_id: batchId,
234
+ author_type: 'system_seed',
235
+ summary,
236
+ has_primary_source: true,
237
+ patches,
238
+ });
239
+ lastResponse = await client.submitBatch(batch);
240
+ chunksSubmitted = 1;
241
+ }
242
+ else {
243
+ const totalChunks = Math.ceil(patches.length / chunkSize);
244
+ const padWidth = String(totalChunks).length;
245
+ for (let index = 0; index < totalChunks; index += 1) {
246
+ const start = index * chunkSize;
247
+ const slice = patches.slice(start, start + chunkSize);
248
+ const partLabel = String(index + 1).padStart(padWidth, '0');
249
+ const chunkBatchId = `${batchId}-p${partLabel}`;
250
+ const batch = validateBatchSubmission({
251
+ batch_id: chunkBatchId,
252
+ author_type: 'system_seed',
253
+ summary: `${summary} (part ${index + 1}/${totalChunks})`,
254
+ has_primary_source: true,
255
+ patches: slice,
256
+ });
257
+ lastResponse = await client.submitBatch(batch);
258
+ chunksSubmitted += 1;
259
+ }
260
+ }
261
+ return {
262
+ dryRun: false,
263
+ batchId: chunksSubmitted === 1 && lastResponse ? lastResponse.batch_id : batchId,
264
+ createdCount,
265
+ updatedCount,
266
+ unchangedCount,
267
+ totalEntities: entries.length,
268
+ chunksSubmitted,
269
+ precompiledCounts: precompiled.bundle.meta.counts,
270
+ reviewFlagsCount: precompiled.reviewFlags.length,
271
+ response: lastResponse,
272
+ };
273
+ }
274
+ //# sourceMappingURL=seed.js.map