@younndai/lyt 0.9.0

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 (96) hide show
  1. package/LICENSE +200 -0
  2. package/NOTICE +23 -0
  3. package/README.md +117 -0
  4. package/dist/automator-bodies/arc-builder.d.ts +13 -0
  5. package/dist/automator-bodies/arc-builder.d.ts.map +1 -0
  6. package/dist/automator-bodies/arc-builder.js +34 -0
  7. package/dist/automator-bodies/arc-builder.js.map +1 -0
  8. package/dist/automator-bodies/index.d.ts +20 -0
  9. package/dist/automator-bodies/index.d.ts.map +1 -0
  10. package/dist/automator-bodies/index.js +32 -0
  11. package/dist/automator-bodies/index.js.map +1 -0
  12. package/dist/automator-bodies/lane-builder.d.ts +12 -0
  13. package/dist/automator-bodies/lane-builder.d.ts.map +1 -0
  14. package/dist/automator-bodies/lane-builder.js +34 -0
  15. package/dist/automator-bodies/lane-builder.js.map +1 -0
  16. package/dist/automator-bodies/metadata-filler.d.ts +34 -0
  17. package/dist/automator-bodies/metadata-filler.d.ts.map +1 -0
  18. package/dist/automator-bodies/metadata-filler.js +211 -0
  19. package/dist/automator-bodies/metadata-filler.js.map +1 -0
  20. package/dist/automator-run.d.ts +27 -0
  21. package/dist/automator-run.d.ts.map +1 -0
  22. package/dist/automator-run.js +137 -0
  23. package/dist/automator-run.js.map +1 -0
  24. package/dist/bench/graded-corpus.d.ts +5 -0
  25. package/dist/bench/graded-corpus.d.ts.map +1 -0
  26. package/dist/bench/graded-corpus.js +121 -0
  27. package/dist/bench/graded-corpus.js.map +1 -0
  28. package/dist/bench/invariant-corpus.d.ts +18 -0
  29. package/dist/bench/invariant-corpus.d.ts.map +1 -0
  30. package/dist/bench/invariant-corpus.js +181 -0
  31. package/dist/bench/invariant-corpus.js.map +1 -0
  32. package/dist/bench/ir-metrics.d.ts +33 -0
  33. package/dist/bench/ir-metrics.d.ts.map +1 -0
  34. package/dist/bench/ir-metrics.js +79 -0
  35. package/dist/bench/ir-metrics.js.map +1 -0
  36. package/dist/bench/latency-bench.d.ts +15 -0
  37. package/dist/bench/latency-bench.d.ts.map +1 -0
  38. package/dist/bench/latency-bench.js +68 -0
  39. package/dist/bench/latency-bench.js.map +1 -0
  40. package/dist/bench/latency-corpus.d.ts +4 -0
  41. package/dist/bench/latency-corpus.d.ts.map +1 -0
  42. package/dist/bench/latency-corpus.js +109 -0
  43. package/dist/bench/latency-corpus.js.map +1 -0
  44. package/dist/bench/pod-harness.d.ts +16 -0
  45. package/dist/bench/pod-harness.d.ts.map +1 -0
  46. package/dist/bench/pod-harness.js +127 -0
  47. package/dist/bench/pod-harness.js.map +1 -0
  48. package/dist/bench/run-bench.d.ts +20 -0
  49. package/dist/bench/run-bench.d.ts.map +1 -0
  50. package/dist/bench/run-bench.js +86 -0
  51. package/dist/bench/run-bench.js.map +1 -0
  52. package/dist/cli-automator-run.d.ts +7 -0
  53. package/dist/cli-automator-run.d.ts.map +1 -0
  54. package/dist/cli-automator-run.js +80 -0
  55. package/dist/cli-automator-run.js.map +1 -0
  56. package/dist/cli.d.ts +3 -0
  57. package/dist/cli.d.ts.map +1 -0
  58. package/dist/cli.js +161 -0
  59. package/dist/cli.js.map +1 -0
  60. package/dist/commands/bench.d.ts +3 -0
  61. package/dist/commands/bench.d.ts.map +1 -0
  62. package/dist/commands/bench.js +92 -0
  63. package/dist/commands/bench.js.map +1 -0
  64. package/dist/commands/capture.d.ts +4 -0
  65. package/dist/commands/capture.d.ts.map +1 -0
  66. package/dist/commands/capture.js +251 -0
  67. package/dist/commands/capture.js.map +1 -0
  68. package/dist/commands/init.d.ts +12 -0
  69. package/dist/commands/init.d.ts.map +1 -0
  70. package/dist/commands/init.js +741 -0
  71. package/dist/commands/init.js.map +1 -0
  72. package/dist/commands/primer.d.ts +3 -0
  73. package/dist/commands/primer.d.ts.map +1 -0
  74. package/dist/commands/primer.js +199 -0
  75. package/dist/commands/primer.js.map +1 -0
  76. package/dist/commands/reindex.d.ts +3 -0
  77. package/dist/commands/reindex.d.ts.map +1 -0
  78. package/dist/commands/reindex.js +105 -0
  79. package/dist/commands/reindex.js.map +1 -0
  80. package/dist/commands/search.d.ts +3 -0
  81. package/dist/commands/search.d.ts.map +1 -0
  82. package/dist/commands/search.js +224 -0
  83. package/dist/commands/search.js.map +1 -0
  84. package/dist/flows/heal.d.ts +29 -0
  85. package/dist/flows/heal.d.ts.map +1 -0
  86. package/dist/flows/heal.js +146 -0
  87. package/dist/flows/heal.js.map +1 -0
  88. package/dist/flows/init-bootstrap.d.ts +93 -0
  89. package/dist/flows/init-bootstrap.d.ts.map +1 -0
  90. package/dist/flows/init-bootstrap.js +561 -0
  91. package/dist/flows/init-bootstrap.js.map +1 -0
  92. package/dist/index.d.ts +11 -0
  93. package/dist/index.d.ts.map +1 -0
  94. package/dist/index.js +27 -0
  95. package/dist/index.js.map +1 -0
  96. package/package.json +81 -0
@@ -0,0 +1,561 @@
1
+ /*
2
+ * Copyright 2026 MARLINK TRADING SRL (YounndAI)
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ // v1.B.4 — `lyt init` bootstrap flow.
17
+ //
18
+ // Composes existing sub-flows from @younndai/lyt-vault (meshInitFlow,
19
+ // federationInitFlow) into an idempotent + re-runnable bootstrap with
20
+ // three branches selected by local-state probe + the --discover flag.
21
+ //
22
+ // Source: lyt-master-plan §v1.B.4:538-557 + lyt-federation-design.md
23
+ // §5:209-241 (probe order + branch table) + brief
24
+ // 2026-05-31-v1-b-4-lyt-init-bootstrap.md.
25
+ //
26
+ // Branch decision (per federation-design §5 + brief OD-7):
27
+ // 1. mode === 'discover' (set by --discover flag) → DISCOVERY
28
+ // 2. meshes count == 0 && vaults count == 0 → FRESH
29
+ // 3. otherwise (registry has ≥1 mesh OR ≥1 vault) → RE-INIT
30
+ //
31
+ // Lives in the meta package (`packages/lyt/src/flows/`) — composing
32
+ // flows from lyt-vault here would create a logical inversion (lyt-vault
33
+ // would depend on its own composition). The meta package is the
34
+ // natural composer; this flow file is the FIRST member of packages/lyt's
35
+ // flows/ directory.
36
+ //
37
+ // Open-once `registryDb?` seam from line 1 per v1.A.5 CR-B1 (10th
38
+ // application across v1.A.5 → v1.D.* → v1.B.* lineage).
39
+ import { existsSync, readFileSync } from "node:fs";
40
+ import { adoptAndPrimeFlow, backfillFigmentCaches, closeRegistry, deriveProvisionalHandle, federationInitFlow, federationRepoName, getHandleFromIdentity, getMeshByRid, isProvisionalIdentity, isValidGhHandle, listMeshes, listVaults, meshInitFlow, openRegistry, parseVaultYon, readIdentityCache, realFederationGhClient, regeneratePodManifestNonFatal, writeProvisionalIdentity, } from "@younndai/lyt-vault";
41
+ // v1.G.13 Gap 1 — fresh-state probe exposed for the meta CLI's no-flag
42
+ // wizard auto-route. Reuses the SAME predicate that initBootstrapFlow's
43
+ // internal branch decision uses (line 158): meshes.length === 0 && vaults
44
+ // .length === 0 → fresh. Lifting it as a public helper avoids duplicating
45
+ // the detector in init.ts per project rule #9.
46
+ export async function probeFreshState(registryDb) {
47
+ const ownDb = registryDb === undefined;
48
+ const db = registryDb ?? (await openRegistry());
49
+ try {
50
+ const meshes = await listMeshes(db);
51
+ const vaults = await listVaults(db);
52
+ return meshes.length === 0 && vaults.length === 0;
53
+ }
54
+ finally {
55
+ if (ownDb)
56
+ await closeRegistry(db);
57
+ }
58
+ }
59
+ // MF1 (V-A-11) — shared PROVISIONAL-cache test (read-only, no side effects). True
60
+ // when the identity cache is provisional: this machine inited LOCAL-ONLY (gh
61
+ // absent/unauthed) before. This predicate unifies the `isProvisionalIdentity` CHECK
62
+ // across the three sites (adopt router, doFreshBranch, init.ts isLocalFirstContext)
63
+ // — but each site COMPOSES it differently, and that is INTENTIONAL (a review finding): the
64
+ // router gates on this ALONE (any provisional cache ⇒ never auto-adopt,
65
+ // handle-agnostic — the safer default), while doFreshBranch ALSO requires
66
+ // `cached.handle === handle` before going local-only. So the provisional TEST
67
+ // cannot drift; the surrounding local-first DECISION is deliberately per-site.
68
+ // Returns false on a null / non-provisional (gh-cli) cache.
69
+ export function resolveLocalFirst(cached) {
70
+ return cached !== null && isProvisionalIdentity(cached);
71
+ }
72
+ // V-A-11 / MF1 — decide whether a FRESH-state init should ADOPT a remote pod
73
+ // (clone its content) instead of scaffolding an empty fresh pod. Returns the
74
+ // handle to adopt under, or null to fall through to `fresh`.
75
+ //
76
+ // Resilience-core (MF1): the gh probe is GUARDED. `repoExists` returns false ONLY
77
+ // on HTTP 404 and THROWS on everything else (no-gh ENOENT, auth, network, 5xx —
78
+ // gh-federation.ts:289-294). Any throw degrades to null (→ fresh), so a transient
79
+ // gh failure NEVER aborts the common fresh init. A provisional local-first cache
80
+ // short-circuits BEFORE any probe (a returning local-first user is never gh-probed).
81
+ async function probeAdoptable(args) {
82
+ // Gate: a provisional identity cache ⇒ local-first returner ⇒ never probe.
83
+ if (resolveLocalFirst(readIdentityCache()))
84
+ return null;
85
+ // Resolve the handle (explicit override → identity → null/gh-less ⇒ fresh).
86
+ const handle = args.handle ?? safeIdentityResolve();
87
+ if (handle === null)
88
+ return null;
89
+ // a review finding (release review fix-pass) — defense-in-depth: NEVER reach a `gh` spawn with
90
+ // a handle that isn't a valid GitHub username. The handle can come from a
91
+ // hand-editable identity cache / LYT_IDENTITY_OVERRIDE; repoExists interpolates it
92
+ // into `gh api /repos/${handle}/lyt-pod`, so a `/`-bearing or metachar handle could
93
+ // reshape the endpoint (or hit the Windows .cmd shell fallback). Mirror the
94
+ // pre-spawn guard every sibling caller enforces (federationInitFlow,
95
+ // recoverVaultsFromPodManifest, the engine's gh-walk). Invalid ⇒ not-adoptable ⇒ fresh.
96
+ if (!isValidGhHandle(handle))
97
+ return null;
98
+ // Probe the remote pod, GUARDED — reuse the SAME federationGhClient detection
99
+ // federationInitFlow uses internally (so router + flow cannot disagree).
100
+ const ghClient = args.federationGhClient ?? realFederationGhClient;
101
+ try {
102
+ const exists = await ghClient.repoExists(handle, federationRepoName());
103
+ return exists ? handle : null;
104
+ }
105
+ catch (err) {
106
+ const msg = err instanceof Error ? err.message : String(err);
107
+ // eslint-disable-next-line no-console
108
+ console.error(`lyt init: pod-exists probe failed non-fatally — ${msg}. Proceeding with a fresh init.`);
109
+ return null;
110
+ }
111
+ }
112
+ export async function initBootstrapFlow(args) {
113
+ const startedAtMs = nowMs(args.nowIso);
114
+ const ownDb = args.registryDb === undefined;
115
+ const db = args.registryDb ?? (await openRegistry());
116
+ try {
117
+ // Probe local state ONCE up front.
118
+ const meshes = await listMeshes(db);
119
+ const vaults = await listVaults(db);
120
+ // Branch decision (federation-design §5 + brief OD-7; V-A-11 adds ADOPT).
121
+ let branch;
122
+ let adoptHandle = null;
123
+ if (args.mode === "discover") {
124
+ branch = "discovery";
125
+ }
126
+ else if (meshes.length === 0 && vaults.length === 0) {
127
+ // V-A-11 — a FRESH registry prefers ADOPT when a remote `{handle}/lyt-pod`
128
+ // exists (clone its content), else scaffolds a FRESH pod. probeAdoptable is
129
+ // GUARDED (gh flake / no-gh / provisional-local-first → null → fresh), so it
130
+ // never aborts the common fresh path (MF1, SC3/SC7).
131
+ adoptHandle = await probeAdoptable(args);
132
+ branch = adoptHandle !== null ? "adopt" : "fresh";
133
+ }
134
+ else {
135
+ branch = "re-init";
136
+ }
137
+ if (branch === "adopt") {
138
+ // adoptHandle is non-null here (branch was set from it).
139
+ const result = await doAdoptBranch(args, db, adoptHandle);
140
+ // a review finding — on adopt failure surface it cleanly: no heal/materialize, the
141
+ // command layer renders the actionable error + sets a non-zero exit.
142
+ if (result.adoptError !== undefined) {
143
+ return finalize({ ...result, branch }, startedAtMs, args.nowIso);
144
+ }
145
+ // New machine cloning a pod still wants its skills + agent-manuals aligned,
146
+ // so run heal (parity with fresh + the interactive wizard). The flow already
147
+ // ran healPatterns (idempotent, version-gated) — the patterns subset double
148
+ // is a near-noop. Do NOT materialize: adopt clones EXISTING remotes; a
149
+ // materialize-publish would try to forge/commit remotes for already-remote
150
+ // vaults (wrong for adopt + would touch the push surface).
151
+ const heal = await runHealIfProvided(args);
152
+ return finalize({
153
+ ...result,
154
+ branch,
155
+ ...(heal !== null ? { heal } : {}),
156
+ }, startedAtMs, args.nowIso);
157
+ }
158
+ if (branch === "fresh") {
159
+ const result = await doFreshBranch(args, db);
160
+ const heal = await runHealIfProvided(args);
161
+ const publish = await runMaterializeIfProvided(args, db);
162
+ return finalize({
163
+ ...result,
164
+ branch,
165
+ ...(heal !== null ? { heal } : {}),
166
+ ...(publish !== null ? { publish } : {}),
167
+ }, startedAtMs, args.nowIso);
168
+ }
169
+ if (branch === "re-init") {
170
+ const result = await doReInitBranch(args, db);
171
+ const heal = await runHealIfProvided(args);
172
+ const publish = await runMaterializeIfProvided(args, db);
173
+ return finalize({
174
+ ...result,
175
+ branch,
176
+ ...(heal !== null ? { heal } : {}),
177
+ ...(publish !== null ? { publish } : {}),
178
+ }, startedAtMs, args.nowIso);
179
+ }
180
+ // DISCOVERY — read-only; never heals.
181
+ const result = await doDiscoveryBranch(args, db, meshes);
182
+ return finalize({ ...result, branch }, startedAtMs, args.nowIso);
183
+ }
184
+ finally {
185
+ if (ownDb)
186
+ await closeRegistry(db);
187
+ }
188
+ }
189
+ // W2.2 — Lane M FTS reconcile of on-disk vaults so a `lyt init` re-run leaves
190
+ // search FRESH. Operates on each vault's OWN libSQL db (under LYT_HOME), so it
191
+ // is hermetic + side-effect-local. Per-vault failure is swallowed (never-fail).
192
+ async function reconcileVaults(vaultPaths) {
193
+ const reconciled = [];
194
+ for (const p of vaultPaths) {
195
+ try {
196
+ await backfillFigmentCaches(p);
197
+ reconciled.push(p);
198
+ }
199
+ catch (err) {
200
+ const msg = err instanceof Error ? err.message : String(err);
201
+ // eslint-disable-next-line no-console
202
+ console.error(`lyt init: reconcile of ${p} failed non-fatally — ${msg}`);
203
+ }
204
+ }
205
+ return reconciled;
206
+ }
207
+ // W1.2 — run the injected heal runner, swallowing any failure so heal can
208
+ // NEVER fail an init (D30 never-fail). Returns null when no runner was
209
+ // supplied (the hermetic-test default) or when the heal threw.
210
+ async function runHealIfProvided(args) {
211
+ if (args.heal === undefined)
212
+ return null;
213
+ try {
214
+ return await args.heal();
215
+ }
216
+ catch (err) {
217
+ const msg = err instanceof Error ? err.message : String(err);
218
+ // eslint-disable-next-line no-console
219
+ console.error(`lyt init: heal step failed non-fatally — ${msg}`);
220
+ return null;
221
+ }
222
+ }
223
+ // Brief B (B.1) — run the injected materialize-publish runner, swallowing any
224
+ // failure so it can NEVER fail an init (never-fail posture, same as heal/regen).
225
+ // Returns null when no runner was supplied (hermetic-test default) or it threw.
226
+ // Runs AFTER the pod.yon regen so the pod commit captures the populated manifest.
227
+ async function runMaterializeIfProvided(args, db) {
228
+ if (args.materializePublish === undefined)
229
+ return null;
230
+ try {
231
+ return await args.materializePublish(db);
232
+ }
233
+ catch (err) {
234
+ const msg = err instanceof Error ? err.message : String(err);
235
+ // eslint-disable-next-line no-console
236
+ console.error(`lyt init: materialize-publish step failed non-fatally — ${msg}`);
237
+ return null;
238
+ }
239
+ }
240
+ // V-A-11 — route a fresh-state init with a resolvable remote pod through the
241
+ // wizard's PROVEN engine (adoptAndPrimeFlow), which clones the pod + recovers its
242
+ // vaults from pod.yon. This is the fix for the empty-scaffold `--auto` bug: the
243
+ // fresh branch's doFreshBranch scaffolds personal/main BEFORE the federation forge
244
+ // and never recovers vault CONTENT; adoptAndPrimeFlow orders it correctly
245
+ // (adopt pod → clone vaults → scaffold only if 0 recovered).
246
+ async function doAdoptBranch(args, db, handle) {
247
+ // MF2 — skipDiscover:true makes adopt MANIFEST-AUTHORITATIVE (pod.yon is the
248
+ // catalog): deterministic, and it eliminates the gh-walk-reaches-the-real-account
249
+ // hole (discoverFlow walks `gh api /user/repos`, which LYT_HOME does not sandbox).
250
+ // noPush:true — adopt writes only local, un-pushed init commits (V-A-9: a
251
+ // machine-id discriminator gates the PUSH, not the adopt). Reuse the SAME
252
+ // federationGhClient the router probed with (router + flow cannot disagree).
253
+ let adopt;
254
+ try {
255
+ adopt = await adoptAndPrimeFlow({
256
+ handle,
257
+ registryDb: db,
258
+ noPush: true,
259
+ skipDiscover: true,
260
+ ...(args.federationGhClient !== undefined
261
+ ? { federationGhClient: args.federationGhClient }
262
+ : {}),
263
+ ...(args.meshGhClient !== undefined ? { meshGhClient: args.meshGhClient } : {}),
264
+ ...(args.vaultCloneFn !== undefined ? { vaultCloneFn: args.vaultCloneFn } : {}),
265
+ });
266
+ }
267
+ catch (err) {
268
+ // a review finding (release review) — the pod/vault clone threw (network drop, private-repo
269
+ // credential miss with GIT_TERMINAL_PROMPT=0, gh/git failure). Do NOT crash and
270
+ // do NOT silently fall through to an empty `fresh` scaffold (that would
271
+ // re-introduce the exact V-A-11 empty-pod symptom). Return a structured,
272
+ // AI-actionable failure; the common pod-clone throw leaves the registry empty
273
+ // (re-runnable). The COMMAND LAYER owns all rendering — no console.error here
274
+ // (Phase-D a review finding: a flow-layer log duplicated the message + leaked a non-JSON
275
+ // line onto stderr under --json).
276
+ const reason = err instanceof Error ? err.message : String(err);
277
+ return { adoptError: { reason } };
278
+ }
279
+ return {
280
+ adopt: {
281
+ podBranch: adopt.podBranch,
282
+ podHandle: adopt.podHandle,
283
+ podLocalPath: adopt.podLocalPath,
284
+ vaultsRecoveredFromManifest: adopt.vaultsRecoveredFromManifest,
285
+ vaultsAcquired: adopt.vaultsAcquired,
286
+ manifestSkipped: adopt.manifestSkipped,
287
+ firstVaultCreated: adopt.firstVaultCreated,
288
+ primaryVaultPath: adopt.primaryVaultPath,
289
+ primaryMeshName: adopt.primaryMeshName,
290
+ reconciledVaultPaths: adopt.reconciledVaultPaths,
291
+ },
292
+ // Surface the reconcile at the top level too (parity with fresh/re-init —
293
+ // the command layer reads reconciledVaultPaths for its re-index summary).
294
+ reconciledVaultPaths: adopt.reconciledVaultPaths,
295
+ };
296
+ }
297
+ async function doFreshBranch(args, db) {
298
+ const meshName = args.customOverrides?.meshName ?? "personal";
299
+ const onPhase = args.onPhase ?? (() => { });
300
+ // V-A-1 (Phase E) — establish identity BEFORE the scaffold. meshInitFlow +
301
+ // the vault scaffold call getIdentity() / getHandleFromIdentity(), which
302
+ // HARD-THROW gh-less ("Identity refresh failed: GitHub CLI is not
303
+ // authenticated"). The provisional minting used to run AFTER meshInitFlow, so
304
+ // gh-less `lyt init --auto` threw MID-SCAFFOLD and left a partial pod
305
+ // (registry.db + patterns/ + a half-built vaults/ with no personal/main —
306
+ // the very state that then errored `no vault named 'personal/main'`).
307
+ // Resolving — or minting a PROVISIONAL local identity — FIRST means the
308
+ // scaffold's getIdentity() resolves from the just-written cache and the
309
+ // gh-less `--auto` degrades to a LOCAL pod, exactly like the interactive
310
+ // wizard (the brief's reference), instead of half-failing.
311
+ //
312
+ // D34 (OD-LOCALFIRST): no gh handle resolves → mint a provisional identity
313
+ // (default OS username) + forge LOCAL-ONLY (no gh probe, no remote). `lyt
314
+ // sync` reconciles to the real gh handle at connect. A provisional cache for
315
+ // THIS handle → stay local-only too (don't gh-probe).
316
+ let handle = args.handle ?? safeIdentityResolve();
317
+ let localOnly = false;
318
+ if (handle === null) {
319
+ handle = deriveProvisionalHandle();
320
+ writeProvisionalIdentity(handle);
321
+ localOnly = true;
322
+ }
323
+ else if (args.handle === undefined) {
324
+ // MF1 — provisional-cache → local-first via the shared resolveLocalFirst
325
+ // predicate. The handle-match guard stays: only treat as local-only when the
326
+ // provisional cache is THIS handle.
327
+ const cached = readIdentityCache();
328
+ if (cached !== null && cached.handle === handle && resolveLocalFirst(cached)) {
329
+ localOnly = true;
330
+ }
331
+ }
332
+ // (a) Scaffold the personal mesh (which scaffolds personal/main as the
333
+ // mesh's main vault per meshInitFlow). `noPush: true` per OD-3 default;
334
+ // the handler explicitly publishes later via `lyt sync` (D31 Brief B). The
335
+ // identity established above lets the scaffold's getIdentity() resolve
336
+ // locally gh-less (V-A-1).
337
+ await onPhase("git-init", "your personal mesh + main vault");
338
+ const meshResult = await meshInitFlow({
339
+ name: meshName,
340
+ noPush: true,
341
+ // Open-once seam (A.4): reuse the bootstrap's registry connection so
342
+ // mesh-init does not open a 2nd one (nested-open SQLITE_BUSY risk).
343
+ db,
344
+ ...(args.meshGhClient !== undefined ? { ghClient: args.meshGhClient } : {}),
345
+ });
346
+ // (b) Forge the federation repo locally. `pushToRemote: false` per OD-3
347
+ // default. The federation init's own three-branch state-machine handles the
348
+ // case where the remote repo already exists on GH (Branch B adopted) — we
349
+ // don't second-guess it here. localOnly (resolved above) forges the pod
350
+ // without any gh probe/remote.
351
+ let federation;
352
+ if (handle !== null) {
353
+ // Forging phase: federationInitFlow runs a sync prelude (registry probe,
354
+ // git init, pod.yon write) THEN its own per-op gh spinner for the
355
+ // `gh repo create` spawn. Re-label the spanning spinner to "Forging…"
356
+ // here so the sync prelude is covered too (it was the silent gap F7
357
+ // wrapped only the spawn — leaving the prelude dark).
358
+ await onPhase("create", `your pod repo (${handle}/lyt-pod)`);
359
+ try {
360
+ const fedResult = await federationInitFlow({
361
+ handle,
362
+ pushToRemote: false,
363
+ localOnly,
364
+ db,
365
+ ...(args.federationGhClient !== undefined ? { ghClient: args.federationGhClient } : {}),
366
+ });
367
+ federation = {
368
+ handle: fedResult.handle,
369
+ fedRidHex: fedResult.fedRidHex,
370
+ branch: fedResult.branch,
371
+ localPath: fedResult.localPath,
372
+ federationYonPath: fedResult.federationYonPath,
373
+ remoteCreated: fedResult.remoteCreated,
374
+ pushed: fedResult.pushed,
375
+ remoteFullName: fedResult.remoteFullName,
376
+ };
377
+ }
378
+ catch (err) {
379
+ // Federation init failure is NON-FATAL per OD-3 default — the
380
+ // personal mesh + personal/main vault are already on disk; the
381
+ // handler can re-invoke `lyt init` (which lands in re-init branch)
382
+ // or run `lyt federation init` directly to recover. Emit the
383
+ // failure as a console.error so the handler sees it without
384
+ // forcing the whole bootstrap to fail.
385
+ const msg = err instanceof Error ? err.message : String(err);
386
+ // eslint-disable-next-line no-console
387
+ console.error(`lyt init (fresh): federation init failed non-fatally — ${msg}`);
388
+ }
389
+ }
390
+ // D31 (Brief A) — regenerate the derived pod manifest from the now-populated
391
+ // registry so `lyt init` (fresh) leaves a POPULATED pod.yon listing
392
+ // personal/main (acceptance #1). Runs AFTER the federation forge wrote the
393
+ // skeleton + federation_state row. Non-fatal; reuses the open db.
394
+ if (handle !== null) {
395
+ await regeneratePodManifestNonFatal(db, {
396
+ handle,
397
+ ...(args.nowIso !== undefined ? { nowIso: args.nowIso } : {}),
398
+ });
399
+ }
400
+ // W2.2 — index the freshly-scaffolded vault so it is search-fresh on first
401
+ // use (mirrors the adopt path's reconcile; non-fatal).
402
+ const reconciledVaultPaths = await reconcileVaults([meshResult.mainVault.path]);
403
+ return {
404
+ meshAssignment: {
405
+ meshRidHex: meshResult.meshRidHex,
406
+ meshName: meshResult.meshName,
407
+ meshAutoCreated: true,
408
+ mainVaultName: meshResult.mainVault.name,
409
+ mainVaultPath: meshResult.mainVault.path,
410
+ },
411
+ ...(federation !== undefined ? { federation } : {}),
412
+ reconciledVaultPaths,
413
+ };
414
+ }
415
+ async function doReInitBranch(args, db) {
416
+ const vaults = await listVaults(db);
417
+ const issues = [];
418
+ for (const vault of vaults) {
419
+ const status = await probeVaultIntegrity(db, vault);
420
+ issues.push(status);
421
+ }
422
+ // W2.2 — re-index every HEALTHY vault so a re-run leaves search fresh (the
423
+ // spec's "existing structure on disk → re-sync + re-index"). Only vaults
424
+ // that probed `ok` are reconciled; missing/unparseable are skipped (their
425
+ // db isn't reliably readable). Non-fatal per vault.
426
+ const okPaths = vaults
427
+ .filter((v) => issues.find((i) => i.vaultName === v.name)?.status === "ok")
428
+ .map((v) => v.path);
429
+ const reconciledVaultPaths = await reconcileVaults(okPaths);
430
+ // D31 (Brief A) — re-init against an existing pod regenerates pod.yon so it
431
+ // reflects the ACTUAL registered vaults (acceptance #2). Non-fatal; skipped
432
+ // if the pod has no federation_state yet.
433
+ await regeneratePodManifestNonFatal(db, args.nowIso !== undefined ? { nowIso: args.nowIso } : {});
434
+ return { integrityIssues: issues, reconciledVaultPaths };
435
+ }
436
+ async function probeVaultIntegrity(db, vault) {
437
+ // (a) Disk presence.
438
+ if (!existsSync(vault.path)) {
439
+ return {
440
+ vaultName: vault.name,
441
+ status: "missing",
442
+ error: `vault path does not exist: ${vault.path}`,
443
+ };
444
+ }
445
+ // (b) vault.yon presence.
446
+ const yonPath = `${vault.path}/.lyt/vault.yon`;
447
+ if (!existsSync(yonPath)) {
448
+ return {
449
+ vaultName: vault.name,
450
+ status: "missing",
451
+ error: `vault.yon not found at ${yonPath}`,
452
+ };
453
+ }
454
+ // (c) vault.yon parses.
455
+ let parsed;
456
+ try {
457
+ parsed = parseVaultYon(readFileSync(yonPath, "utf8"));
458
+ }
459
+ catch (err) {
460
+ const msg = err instanceof Error ? err.message : String(err);
461
+ return {
462
+ vaultName: vault.name,
463
+ status: "unparseable",
464
+ error: msg,
465
+ };
466
+ }
467
+ // (d) home_mesh_rid resolves (if set).
468
+ if (vault.homeMeshRid !== null) {
469
+ const meshRow = await getMeshByRid(db, vault.homeMeshRid);
470
+ if (meshRow === null) {
471
+ return {
472
+ vaultName: vault.name,
473
+ status: "orphaned-home-mesh",
474
+ error: `home_mesh_rid does not resolve to a meshes row`,
475
+ };
476
+ }
477
+ }
478
+ // Re-bind the parsed reference so it isn't flagged unused.
479
+ void parsed.rid;
480
+ return { vaultName: vault.name, status: "ok" };
481
+ }
482
+ async function doDiscoveryBranch(args, db, meshes) {
483
+ const handle = args.handle ?? safeIdentityResolve();
484
+ if (handle === null) {
485
+ // No identity → empty discovery (read-only flow stays well-defined).
486
+ return { discoveredRepos: [] };
487
+ }
488
+ const probe = args.discoveryProbe ?? defaultDiscoveryProbe();
489
+ const probed = await probe.probe(handle);
490
+ // Filter: keep lyt-prefix OR lyt-public-topic kinds (OD-5 default — the
491
+ // .lyt/vault.yon per-repo probe is deferred to v1.C.3). Probe is
492
+ // expected to tag each row with its source `kind`; the bootstrap
493
+ // doesn't re-classify.
494
+ const filtered = probed.repos.filter((r) => r.kind === "lyt-prefix" || r.kind === "lyt-public-topic");
495
+ // Cross-check against the local registry. A repo is "already in
496
+ // registry" when one of the registered meshes has `push_target` that
497
+ // matches `<handle>/<name>` (i.e. a known mesh-main repo) OR matches
498
+ // the bare name (legacy lyt- prefix). We use a Set for O(1) lookup
499
+ // even though discovery sets are small.
500
+ const knownPushTargets = new Set();
501
+ for (const m of meshes) {
502
+ if (m.pushTarget !== null)
503
+ knownPushTargets.add(m.pushTarget);
504
+ }
505
+ // Also cross-check the vault.git_url surface in case a vault was
506
+ // adopted from a public repo that didn't go through `lyt mesh init`.
507
+ // Inexpensive ORM walk; bounded by registered vault count.
508
+ const knownVaultUrls = new Set();
509
+ const knownVaults = await listVaults(db);
510
+ for (const v of knownVaults) {
511
+ if (v.gitUrl !== null) {
512
+ // Strip protocol + .git suffix for fuzzy match against
513
+ // `<handle>/<repo>` slug shape (e.g. https://github.com/x/y.git →
514
+ // x/y).
515
+ const m = v.gitUrl.match(/[/:]([^/]+\/[^/]+?)(?:\.git)?$/);
516
+ if (m)
517
+ knownVaultUrls.add(m[1]);
518
+ }
519
+ }
520
+ // Annotate alreadyInRegistry + Lock 0.3 deterministic sort.
521
+ const annotated = filtered.map((r) => ({
522
+ fullName: r.fullName,
523
+ kind: r.kind,
524
+ alreadyInRegistry: r.alreadyInRegistry || knownPushTargets.has(r.fullName) || knownVaultUrls.has(r.fullName),
525
+ }));
526
+ annotated.sort((a, b) => a.fullName.localeCompare(b.fullName));
527
+ return { discoveredRepos: annotated };
528
+ }
529
+ // Default impl returns an empty probe — the production gh-api integration
530
+ // ships in v1.C.3 (per OD-5 default; v1.B.4 keeps discovery wired
531
+ // structurally with the probe as an injectable seam used by tests + the
532
+ // future v1.C.3 prod impl). This default makes the no-injection happy
533
+ // path predictable: discovery returns an empty list rather than throwing.
534
+ function defaultDiscoveryProbe() {
535
+ return {
536
+ async probe(_handle) {
537
+ return { repos: [] };
538
+ },
539
+ };
540
+ }
541
+ function safeIdentityResolve() {
542
+ try {
543
+ return getHandleFromIdentity();
544
+ }
545
+ catch {
546
+ return null;
547
+ }
548
+ }
549
+ function finalize(partial, startedAtMs, nowIso) {
550
+ const elapsed = nowMs(nowIso) - startedAtMs;
551
+ return {
552
+ ...partial,
553
+ durationMs: Math.max(0, elapsed),
554
+ };
555
+ }
556
+ function nowMs(nowIso) {
557
+ if (nowIso !== undefined)
558
+ return Date.parse(nowIso);
559
+ return Date.now();
560
+ }
561
+ //# sourceMappingURL=init-bootstrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-bootstrap.js","sourceRoot":"","sources":["../../src/flows/init-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,sCAAsC;AACtC,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,sEAAsE;AACtE,EAAE;AACF,qEAAqE;AACrE,kDAAkD;AAClD,2CAA2C;AAC3C,EAAE;AACF,2DAA2D;AAC3D,8DAA8D;AAC9D,oDAAoD;AACpD,4DAA4D;AAC5D,EAAE;AACF,oEAAoE;AACpE,wEAAwE;AACxE,gEAAgE;AAChE,yEAAyE;AACzE,oBAAoB;AACpB,EAAE;AACF,kEAAkE;AAClE,wDAAwD;AAExD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAInD,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,iBA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AAM,CAAC,CAAC;IACpD,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;AACpB,CAAC"}
@@ -0,0 +1,11 @@
1
+ export { buildVaultSubcommand, buildRegistrySubcommand, buildHelpCommand, buildDoctorCommand, buildPatternCommand, } from "@younndai/lyt-vault";
2
+ export { buildMeshSubcommand, buildSyncCommand } from "@younndai/lyt-mesh";
3
+ export { buildMcpSubcommand } from "@younndai/lyt-mcp";
4
+ export { buildSearchCommand } from "./commands/search.js";
5
+ export { buildPrimerCommand } from "./commands/primer.js";
6
+ export { buildLytInitCommand } from "./commands/init.js";
7
+ export { healPod, summarizeHeal } from "./flows/heal.js";
8
+ export type { HealResult, HealPodOptions, ManualHealAction, ManualHealEntry, } from "./flows/heal.js";
9
+ export { initBootstrapFlow } from "./flows/init-bootstrap.js";
10
+ export type { DiscoveredRepo, DiscoveredRepoKind, DiscoveryProbe, DiscoveryProbeResult, InitBootstrapArgs, InitBootstrapBranch, InitBootstrapCustomOverrides, InitBootstrapFederation, InitBootstrapMeshAssignment, InitBootstrapMode, InitBootstrapResult, IntegrityIssue, IntegrityStatus, } from "./flows/init-bootstrap.js";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,uBAAuB,EACvB,2BAA2B,EAC3B,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,eAAe,GAChB,MAAM,2BAA2B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Copyright 2026 MARLINK TRADING SRL (YounndAI)
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ // @younndai/lyt is primarily a CLI meta package. For programmatic access,
17
+ // import from @younndai/lyt-vault, lyt-mesh, or lyt-mcp directly. This module
18
+ // re-exports the unified subcommand factories so consumers can compose them.
19
+ export { buildVaultSubcommand, buildRegistrySubcommand, buildHelpCommand, buildDoctorCommand, buildPatternCommand, } from "@younndai/lyt-vault";
20
+ export { buildMeshSubcommand, buildSyncCommand } from "@younndai/lyt-mesh";
21
+ export { buildMcpSubcommand } from "@younndai/lyt-mcp";
22
+ export { buildSearchCommand } from "./commands/search.js";
23
+ export { buildPrimerCommand } from "./commands/primer.js";
24
+ export { buildLytInitCommand } from "./commands/init.js";
25
+ export { healPod, summarizeHeal } from "./flows/heal.js";
26
+ export { initBootstrapFlow } from "./flows/init-bootstrap.js";
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,0EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAE7E,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAOzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC"}