@younndai/lyt-mesh 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 +135 -0
  4. package/dist/cli.d.ts +3 -0
  5. package/dist/cli.d.ts.map +1 -0
  6. package/dist/cli.js +34 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/commands/clone-all.d.ts +3 -0
  9. package/dist/commands/clone-all.d.ts.map +1 -0
  10. package/dist/commands/clone-all.js +66 -0
  11. package/dist/commands/clone-all.js.map +1 -0
  12. package/dist/commands/mesh-init.d.ts +3 -0
  13. package/dist/commands/mesh-init.d.ts.map +1 -0
  14. package/dist/commands/mesh-init.js +70 -0
  15. package/dist/commands/mesh-init.js.map +1 -0
  16. package/dist/commands/pod-status.d.ts +3 -0
  17. package/dist/commands/pod-status.d.ts.map +1 -0
  18. package/dist/commands/pod-status.js +67 -0
  19. package/dist/commands/pod-status.js.map +1 -0
  20. package/dist/commands/source.d.ts +3 -0
  21. package/dist/commands/source.d.ts.map +1 -0
  22. package/dist/commands/source.js +83 -0
  23. package/dist/commands/source.js.map +1 -0
  24. package/dist/commands/status.d.ts +4 -0
  25. package/dist/commands/status.d.ts.map +1 -0
  26. package/dist/commands/status.js +121 -0
  27. package/dist/commands/status.js.map +1 -0
  28. package/dist/commands/sync.d.ts +3 -0
  29. package/dist/commands/sync.d.ts.map +1 -0
  30. package/dist/commands/sync.js +234 -0
  31. package/dist/commands/sync.js.map +1 -0
  32. package/dist/commands/validate.d.ts +3 -0
  33. package/dist/commands/validate.d.ts.map +1 -0
  34. package/dist/commands/validate.js +66 -0
  35. package/dist/commands/validate.js.map +1 -0
  36. package/dist/discovery/github.d.ts +19 -0
  37. package/dist/discovery/github.d.ts.map +1 -0
  38. package/dist/discovery/github.js +90 -0
  39. package/dist/discovery/github.js.map +1 -0
  40. package/dist/discovery/walk.d.ts +28 -0
  41. package/dist/discovery/walk.d.ts.map +1 -0
  42. package/dist/discovery/walk.js +78 -0
  43. package/dist/discovery/walk.js.map +1 -0
  44. package/dist/flows/clone-all.d.ts +53 -0
  45. package/dist/flows/clone-all.d.ts.map +1 -0
  46. package/dist/flows/clone-all.js +123 -0
  47. package/dist/flows/clone-all.js.map +1 -0
  48. package/dist/flows/mesh-init-validate.d.ts +22 -0
  49. package/dist/flows/mesh-init-validate.d.ts.map +1 -0
  50. package/dist/flows/mesh-init-validate.js +195 -0
  51. package/dist/flows/mesh-init-validate.js.map +1 -0
  52. package/dist/flows/mesh-init.d.ts +46 -0
  53. package/dist/flows/mesh-init.d.ts.map +1 -0
  54. package/dist/flows/mesh-init.js +302 -0
  55. package/dist/flows/mesh-init.js.map +1 -0
  56. package/dist/flows/pod-status.d.ts +37 -0
  57. package/dist/flows/pod-status.d.ts.map +1 -0
  58. package/dist/flows/pod-status.js +269 -0
  59. package/dist/flows/pod-status.js.map +1 -0
  60. package/dist/flows/status.d.ts +16 -0
  61. package/dist/flows/status.d.ts.map +1 -0
  62. package/dist/flows/status.js +76 -0
  63. package/dist/flows/status.js.map +1 -0
  64. package/dist/flows/sync-check.d.ts +38 -0
  65. package/dist/flows/sync-check.d.ts.map +1 -0
  66. package/dist/flows/sync-check.js +180 -0
  67. package/dist/flows/sync-check.js.map +1 -0
  68. package/dist/flows/sync-watch.d.ts +24 -0
  69. package/dist/flows/sync-watch.d.ts.map +1 -0
  70. package/dist/flows/sync-watch.js +217 -0
  71. package/dist/flows/sync-watch.js.map +1 -0
  72. package/dist/flows/sync.d.ts +45 -0
  73. package/dist/flows/sync.d.ts.map +1 -0
  74. package/dist/flows/sync.js +513 -0
  75. package/dist/flows/sync.js.map +1 -0
  76. package/dist/flows/validate.d.ts +22 -0
  77. package/dist/flows/validate.d.ts.map +1 -0
  78. package/dist/flows/validate.js +62 -0
  79. package/dist/flows/validate.js.map +1 -0
  80. package/dist/index.d.ts +35 -0
  81. package/dist/index.d.ts.map +1 -0
  82. package/dist/index.js +39 -0
  83. package/dist/index.js.map +1 -0
  84. package/dist/mesh-command.d.ts +3 -0
  85. package/dist/mesh-command.d.ts.map +1 -0
  86. package/dist/mesh-command.js +31 -0
  87. package/dist/mesh-command.js.map +1 -0
  88. package/dist/source/repo.d.ts +14 -0
  89. package/dist/source/repo.d.ts.map +1 -0
  90. package/dist/source/repo.js +71 -0
  91. package/dist/source/repo.js.map +1 -0
  92. package/dist/source/types.d.ts +22 -0
  93. package/dist/source/types.d.ts.map +1 -0
  94. package/dist/source/types.js +49 -0
  95. package/dist/source/types.js.map +1 -0
  96. package/package.json +77 -0
@@ -0,0 +1,67 @@
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
+ import { Command } from "commander";
17
+ import { podStatusFlow } from "../flows/pod-status.js";
18
+ // Brief B (D31 §5, B.4) — `lyt status`: the top-level publish-drift TRUST
19
+ // surface. Distinct verb from `lyt mesh status` (the mesh-graph renderer): this
20
+ // answers "is my stuff published / safe?" per vault + pod. Read-only.
21
+ export function buildPodStatusCommand() {
22
+ const cmd = new Command("status");
23
+ cmd
24
+ .description("Show pod + per-vault publish drift (unpushed / no-remote / stale-index / clean). Read-only trust surface; run `lyt sync` to resolve drift.")
25
+ .option("--json", "Emit JSON instead of human-readable output.")
26
+ .option("--no-fetch", "Skip `git fetch` (faster; ahead counts may be stale).")
27
+ .action(async (opts) => {
28
+ const result = await podStatusFlow({ noFetch: opts.fetch === false });
29
+ if (opts.json === true) {
30
+ // eslint-disable-next-line no-console
31
+ console.log(JSON.stringify(result, null, 2));
32
+ process.exit(result.ok ? 0 : 1);
33
+ }
34
+ printStatusHuman(result);
35
+ process.exit(result.ok ? 0 : 1);
36
+ });
37
+ return cmd;
38
+ }
39
+ function printStatusHuman(r) {
40
+ // Pod line.
41
+ const podGlyph = r.pod.status === "clean" || r.pod.status === "no-pod" ? "✓" : "⚠";
42
+ // eslint-disable-next-line no-console
43
+ console.log(`${podGlyph} pod${r.pod.handle ? ` (${r.pod.handle}/lyt-pod)` : ""}: ${r.pod.status} — ${r.pod.detail}`);
44
+ if (r.vaults.length === 0) {
45
+ // eslint-disable-next-line no-console
46
+ console.log(" (no vaults registered — run `lyt init`)");
47
+ }
48
+ for (const v of r.vaults) {
49
+ const glyph = v.status === "clean" ? "✓" : "⚠";
50
+ // eslint-disable-next-line no-console
51
+ console.log(` ${glyph} ${v.status.padEnd(13)} ${v.name}: ${v.detail}`);
52
+ }
53
+ for (const u of r.unregistered) {
54
+ // eslint-disable-next-line no-console
55
+ console.log(` ⚠ unregistered ${u} (on disk, not in the registry — \`lyt vault adopt\`)`);
56
+ }
57
+ // Summary.
58
+ if (r.ok) {
59
+ // eslint-disable-next-line no-console
60
+ console.log(`\nAll published + clean (${r.summary.clean}/${r.summary.total} vault(s)).`);
61
+ }
62
+ else {
63
+ // eslint-disable-next-line no-console
64
+ console.log(`\n${r.summary.needsPublish} vault(s) need publishing — run \`lyt sync\` to publish your pod to GitHub.`);
65
+ }
66
+ }
67
+ //# sourceMappingURL=pod-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pod-status.js","sourceRoot":"","sources":["../../src/commands/pod-status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAwB,MAAM,wBAAwB,CAAC;AAE7E,0EAA0E;AAC1E,gFAAgF;AAChF,sEAAsE;AACtE,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"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../src/commands/source.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,kBAAkB,IAAI,OAAO,CAoE5C"}
@@ -0,0 +1,83 @@
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
+ import { Command } from "commander";
17
+ import { addSource, listSources, removeSource, withRegistry } from "../source/repo.js";
18
+ import { parseScope, serializeScope } from "../source/types.js";
19
+ export function buildSourceCommand() {
20
+ const cmd = new Command("source");
21
+ cmd.description("Manage VaultSource records (where Lyt looks for vaults to clone)");
22
+ const add = new Command("add");
23
+ add
24
+ .description("Register a new vault source")
25
+ .argument("<name>", "Soft label for this source (e.g. 'younndai', 'acme', 'personal')")
26
+ .requiredOption("--host <host>", "Git host hostname (e.g. github.com)")
27
+ .requiredOption("--owner <owner>", "Org or user under that host (e.g. younndai)")
28
+ .option("--scope <scope>", "Which repos count: 'all' | 'topic=<tag>' | 'repos=<a,b,c>'", "topic=lyt-vault")
29
+ .action(async (name, opts) => {
30
+ const scope = parseScope(opts.scope);
31
+ const row = await withRegistry((db) => addSource(db, { name, host: opts.host, owner: opts.owner, scope }));
32
+ // eslint-disable-next-line no-console
33
+ console.log(`Added source '${row.name}' (${row.host}/${row.owner}, scope=${serializeScope(row.scope)}).`);
34
+ });
35
+ cmd.addCommand(add);
36
+ const list = new Command("list");
37
+ list
38
+ .description("List configured vault sources")
39
+ .option("--json", "Emit machine-readable JSON")
40
+ .action(async (opts) => {
41
+ const sources = await withRegistry(listSources);
42
+ if (opts.json) {
43
+ // eslint-disable-next-line no-console
44
+ console.log(JSON.stringify({
45
+ sources: sources.map((s) => ({ ...s, scope: serializeScope(s.scope) })),
46
+ }, null, 2));
47
+ return;
48
+ }
49
+ // eslint-disable-next-line no-console
50
+ console.log(formatSourceTable(sources));
51
+ });
52
+ cmd.addCommand(list);
53
+ const remove = new Command("remove");
54
+ remove
55
+ .description("Remove a configured vault source by name")
56
+ .argument("<name>", "Source name")
57
+ .action(async (name) => {
58
+ const removed = await withRegistry((db) => removeSource(db, name));
59
+ if (!removed) {
60
+ // eslint-disable-next-line no-console
61
+ console.log(`No source named '${name}'.`);
62
+ return;
63
+ }
64
+ // eslint-disable-next-line no-console
65
+ console.log(`Removed source '${name}'.`);
66
+ });
67
+ cmd.addCommand(remove);
68
+ return cmd;
69
+ }
70
+ function formatSourceTable(sources) {
71
+ if (sources.length === 0) {
72
+ return "(no vault sources configured — run 'lyt mesh source add <name> --host <host> --owner <owner>')";
73
+ }
74
+ const headers = ["NAME", "HOST", "OWNER", "SCOPE", "ADDED"];
75
+ const rows = sources.map((s) => [s.name, s.host, s.owner, serializeScope(s.scope), s.addedAt]);
76
+ const widths = headers.map((h, i) => Math.max(h.length, ...rows.map((r) => (r[i] ?? "").length)));
77
+ const line = (cols) => cols
78
+ .map((c, i) => c.padEnd(widths[i] ?? 0))
79
+ .join(" ")
80
+ .trimEnd();
81
+ return [line(headers), line(headers.map((h) => "-".repeat(h.length))), ...rows.map(line)].join("\n");
82
+ }
83
+ //# sourceMappingURL=source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/commands/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,YA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,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAC5F,IAAI,CACL,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Command } from "commander";
2
+ export type StatusFormat = "text" | "dot" | "json";
3
+ export declare function buildStatusCommand(): Command;
4
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAEnD,wBAAgB,kBAAkB,IAAI,OAAO,CA6B5C"}
@@ -0,0 +1,121 @@
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
+ import { Command } from "commander";
17
+ import { statusFlow } from "../flows/status.js";
18
+ export function buildStatusCommand() {
19
+ const cmd = new Command("status");
20
+ cmd
21
+ .description("Render the local mesh graph: vault list grouped by parent_vault subtrees. Pure registry read; no network.")
22
+ .option("--format <format>", "Output format: text | dot | json", "text")
23
+ .action(async (opts) => {
24
+ const fmt = (opts.format ?? "text");
25
+ if (fmt !== "text" && fmt !== "dot" && fmt !== "json") {
26
+ process.stderr.write(`Unknown --format '${opts.format}'. Use one of: text, dot, json.\n`);
27
+ process.exitCode = 1;
28
+ return;
29
+ }
30
+ const outcome = await statusFlow();
31
+ if (fmt === "json") {
32
+ // eslint-disable-next-line no-console
33
+ console.log(JSON.stringify(outcome, null, 2));
34
+ return;
35
+ }
36
+ if (fmt === "dot") {
37
+ // eslint-disable-next-line no-console
38
+ console.log(renderDot(outcome));
39
+ return;
40
+ }
41
+ // eslint-disable-next-line no-console
42
+ console.log(renderText(outcome));
43
+ });
44
+ return cmd;
45
+ }
46
+ function renderText(outcome) {
47
+ if (outcome.vaults.length === 0) {
48
+ return "(no vaults registered — run 'lyt vault init <name>' or 'lyt mesh clone-all')";
49
+ }
50
+ const byRidHex = new Map(outcome.vaults.map((v) => [v.ridHex, v]));
51
+ const lines = [];
52
+ const headers = ["NAME", "RID", "STATUS", "TIER_HINT", "PARENT"];
53
+ const rows = [];
54
+ for (const cluster of outcome.clusters) {
55
+ for (let i = 0; i < cluster.members.length; i++) {
56
+ const ridHex = cluster.members[i];
57
+ const v = byRidHex.get(ridHex);
58
+ if (!v)
59
+ continue;
60
+ const indent = i === 0 ? "" : " ";
61
+ const tomb = v.status === "tombstoned" ? " [tombstoned]" : "";
62
+ rows.push([
63
+ `${indent}${v.name}${tomb}`,
64
+ v.ridHex,
65
+ v.status,
66
+ v.tierHint ?? "",
67
+ v.parentVaultHex ?? "",
68
+ ]);
69
+ }
70
+ }
71
+ const widths = headers.map((h, i) => Math.max(h.length, ...rows.map((r) => (r[i] ?? "").length)));
72
+ const formatLine = (cols) => cols
73
+ .map((c, i) => c.padEnd(widths[i] ?? 0))
74
+ .join(" ")
75
+ .trimEnd();
76
+ lines.push(formatLine(headers));
77
+ lines.push(formatLine(headers.map((h) => "-".repeat(h.length))));
78
+ for (const r of rows)
79
+ lines.push(formatLine(r));
80
+ return lines.join("\n");
81
+ }
82
+ function renderDot(outcome) {
83
+ const byRidHex = new Map(outcome.vaults.map((v) => [v.ridHex, v]));
84
+ const lines = [
85
+ "digraph mesh {",
86
+ " rankdir=LR;",
87
+ ' node [shape=box, fontname="Helvetica"];',
88
+ ];
89
+ for (const cluster of outcome.clusters) {
90
+ const root = byRidHex.get(cluster.rootRid);
91
+ if (!root)
92
+ continue;
93
+ lines.push(` subgraph cluster_${safeId(root.ridHex)} {`);
94
+ lines.push(` label=${quote(root.name)};`);
95
+ for (const ridHex of cluster.members) {
96
+ const v = byRidHex.get(ridHex);
97
+ if (!v)
98
+ continue;
99
+ const style = v.status === "tombstoned" ? "dashed" : "solid";
100
+ lines.push(` ${safeId(v.ridHex)} [label=${quote(v.name)}, tooltip=${quote(v.ridHex)}, style=${style}];`);
101
+ }
102
+ lines.push(" }");
103
+ }
104
+ // Parent_vault subtree edges (the only edge surface in v1.A.1b).
105
+ for (const v of outcome.vaults) {
106
+ if (v.parentVaultHex === null)
107
+ continue;
108
+ if (!byRidHex.has(v.parentVaultHex))
109
+ continue;
110
+ lines.push(` ${safeId(v.parentVaultHex)} -> ${safeId(v.ridHex)} [label="parent_vault"];`);
111
+ }
112
+ lines.push("}");
113
+ return lines.join("\n");
114
+ }
115
+ function safeId(ridHex) {
116
+ return `n_${ridHex.replace(/[^a-zA-Z0-9_]/g, "_")}`;
117
+ }
118
+ function quote(s) {
119
+ return `"${s.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
120
+ }
121
+ //# sourceMappingURL=status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAE,UAAU,EAAsB,MAAM,oBAAoB,CAAC;AAIpE,MAAM,UAAU,kBAAkB;IAChC,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,GAAG;SACA,WAAW,CACV,2GAA2G,CAC5G;SACA,MAAM,CAAC,mBAAmB,EAAE,kCAAkC,EAAE,MAAM,CAAC;SACvE,MAAM,CAAC,KAAK,EAAE,IAAyB,EAAE,EAAE;QAC1C,MAAM,GAAG,G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,CAAC,GAAG,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare function buildSyncCommand(): Command;
3
+ //# sourceMappingURL=sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBpC,wBAAgB,gBAAgB,IAAI,OAAO,CAuJ1C"}
@@ -0,0 +1,234 @@
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
+ import { Command } from "commander";
17
+ import { createInterface } from "node:readline/promises";
18
+ import { connectPodFlow, podNeedsConnect, reconcilePublishFlow, withSpinner, } from "@younndai/lyt-vault";
19
+ import { syncCheckFlow } from "../flows/sync-check.js";
20
+ import { syncFlow } from "../flows/sync.js";
21
+ import { syncWatchFlow } from "../flows/sync-watch.js";
22
+ export function buildSyncCommand() {
23
+ const cmd = new Command("sync");
24
+ cmd
25
+ .description("Sync registered active vaults with their remotes (commit + push + pull --rebase). Use --watch for a foreground daemon, --check for read-only freshness reporting.")
26
+ .option("--check", "Report per-vault freshness without writing. Pairs with --json or --quiet.")
27
+ .option("--json", "With --check, emit JSON instead of human-readable output.")
28
+ .option("--quiet", "With --check, emit nothing; exit code only (0 clean, 1 needs-sync).")
29
+ .option("--watch", "Foreground daemon: watch registered active vaults; auto-commit + incremental FTS reconcile (event-driven).")
30
+ .option("--resolve-mesh-context", "On .lyt/mesh-context.md conflict during pull, auto-checkout-theirs + regen-context + continue. Off by default (fail-loud preserved).")
31
+ .option("--commit-debounce <ms>", "Watch mode: debounce after last change (default 30000)")
32
+ .option("--no-publish", "Skip the federation publish pass (regen pod.yon + create-missing repos + push pod). Local sync only.")
33
+ .option("--message <msg>", "Override the per-vault commit message (e.g. an agent-supplied semantic summary). When omitted, a deterministic metadata-driven message is built from git status + figment titles (no LLM).")
34
+ .action(async (opts) => {
35
+ if (opts.check === true && opts.watch === true) {
36
+ // eslint-disable-next-line no-console
37
+ console.error("lyt sync: --check and --watch are mutually exclusive.");
38
+ process.exit(1);
39
+ }
40
+ if (opts.check === true) {
41
+ const result = await syncCheckFlow();
42
+ if (opts.quiet === true) {
43
+ process.exit(result.exitCode);
44
+ }
45
+ if (opts.json === true) {
46
+ // eslint-disable-next-line no-console
47
+ console.log(JSON.stringify({ reports: result.reports, summary: result.summary, exitCode: result.exitCode }, null, 2));
48
+ process.exit(result.exitCode);
49
+ }
50
+ printCheckHuman(result.reports, result.summary);
51
+ process.exit(result.exitCode);
52
+ }
53
+ if (opts.watch === true) {
54
+ const handle = await syncWatchFlow({
55
+ commitDebounceMs: numericOpt(opts.commitDebounce),
56
+ resolveMeshContext: opts.resolveMeshContext === true,
57
+ onTick: (report) => {
58
+ const ts = new Date().toISOString();
59
+ // eslint-disable-next-line no-console
60
+ console.log(`[${ts}] ${report.name}: ${report.status} — ${report.message}`);
61
+ },
62
+ });
63
+ // eslint-disable-next-line no-console
64
+ console.log("lyt sync --watch: watching every registered active vault. Ctrl+C to stop.");
65
+ process.on("SIGINT", () => {
66
+ // eslint-disable-next-line no-console
67
+ console.log("\nlyt sync --watch: SIGINT received, flushing in-flight changes...");
68
+ void handle.stop().then(() => process.exit(0));
69
+ });
70
+ // Keep the process alive — watcher is persistent.
71
+ return;
72
+ }
73
+ // V-DX-1 — liveness spinner over the local commit + pull --rebase
74
+ // pre-push window (gh-federation already covers the outward publish push
75
+ // in reconcilePublishFlow below, which runs after this resolves — no
76
+ // nested spinner). --json/--quiet stay spinner-free; non-TTY prints
77
+ // "Syncing…" once (zero escape codes).
78
+ const syncArgs = {
79
+ resolveMeshContext: opts.resolveMeshContext === true,
80
+ ...(opts.message !== undefined ? { message: opts.message } : {}),
81
+ };
82
+ const result = opts.json !== true && opts.quiet !== true
83
+ ? await withSpinner("", () => syncFlow(syncArgs), { op: "sync" })
84
+ : await syncFlow(syncArgs);
85
+ printSyncHuman(result.reports);
86
+ // Arc §10.4 friction-capture nudge — silent in JSON/quiet modes
87
+ // (handler-shaped only). Hints are derived in syncFlow; the command
88
+ // owns the emission policy so machine-readable callers stay clean.
89
+ if (opts.json !== true && opts.quiet !== true && result.frictionHints.length > 0) {
90
+ for (const hint of result.frictionHints) {
91
+ // eslint-disable-next-line no-console
92
+ console.error(` > ${hint.message}`);
93
+ }
94
+ }
95
+ // Brief D (D.3, OD-D1) — `lyt sync` SELF-HEALS to connect a local-first
96
+ // pod (no separate `lyt connect` verb). When the pod is provisional
97
+ // (local-only), reconcile it to the real gh handle (guide auth → resolve →
98
+ // remap-state → create pod repo + wire remote) BEFORE the publish pass.
99
+ // The D.3-GUARD surfaces an existing-remote collision as an HIL (adopt
100
+ // default) and DOES NOT blind-push (nothing overwritten). gh-unauthed and
101
+ // the guard both DEFER publish (not a failure — a clear next step).
102
+ let connectDeferredPublish = false;
103
+ if (opts.publish !== false && (await podNeedsConnect())) {
104
+ const connect = await connectPodFlow({
105
+ confirmAdoptExistingRemote: async ({ existingRemote }) => {
106
+ // Non-TTY → default adopt (the safe, non-destructive choice).
107
+ if (process.stdin.isTTY !== true)
108
+ return true;
109
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
110
+ try {
111
+ const ans = (await rl.question(`\nYou already have a pod on GitHub (${existingRemote}). Adopt it? ` +
112
+ `Your local notes are preserved on disk (nothing is overwritten). [Y/n]: `))
113
+ .trim()
114
+ .toLowerCase();
115
+ return ans === "" || ans === "y" || ans === "yes";
116
+ }
117
+ finally {
118
+ rl.close();
119
+ }
120
+ },
121
+ });
122
+ if (opts.json !== true && opts.quiet !== true) {
123
+ printConnectHuman(connect);
124
+ }
125
+ // reconciled → fall through to publish the now-connected pod. Any other
126
+ // status (gh-unauthed, guard-existing-remote, no-pod, invalid handle)
127
+ // defers the outward publish this run — no clobber, clear next step.
128
+ if (connect.status !== "reconciled")
129
+ connectDeferredPublish = true;
130
+ }
131
+ // Brief B (B.2) — the federation publish/reconcile pass: regen pod.yon →
132
+ // create-missing vault repos + push → commit + push the pod, all
133
+ // resumable via outbox.db. Running `lyt sync` IS the consent for this
134
+ // outward step (the handler explicitly invoked it). --no-publish skips it
135
+ // (local sync only). Skipped cleanly when there's no pod.
136
+ let publish;
137
+ if (opts.publish !== false && !connectDeferredPublish) {
138
+ publish = await reconcilePublishFlow({ push: true });
139
+ if (opts.json !== true && opts.quiet !== true) {
140
+ printPublishHuman(publish);
141
+ }
142
+ }
143
+ const syncOk = result.ok;
144
+ const publishOk = publish === undefined || publish.skipped || publish.ok;
145
+ process.exit(syncOk && publishOk ? 0 : 1);
146
+ });
147
+ return cmd;
148
+ }
149
+ function numericOpt(s) {
150
+ if (s === undefined)
151
+ return undefined;
152
+ const n = Number(s);
153
+ return Number.isFinite(n) && n > 0 ? n : undefined;
154
+ }
155
+ function printSyncHuman(reports) {
156
+ if (reports.length === 0) {
157
+ // eslint-disable-next-line no-console
158
+ console.log("lyt sync: no vaults found in registry.");
159
+ return;
160
+ }
161
+ // eslint-disable-next-line no-console
162
+ console.log(`lyt sync: ${reports.length} vault(s) processed`);
163
+ for (const r of reports) {
164
+ // eslint-disable-next-line no-console
165
+ console.log(` ${r.status.padEnd(20)} ${r.name}: ${r.message}`);
166
+ }
167
+ }
168
+ // Brief D (D.3) — surface the connect self-heal outcome. "not-needed"/"no-pod"
169
+ // are silent (a normal `lyt sync` on a connected pod must stay quiet). Other
170
+ // statuses carry an actionable handler message.
171
+ function printConnectHuman(c) {
172
+ if (c.status === "not-needed" || c.status === "no-pod")
173
+ return;
174
+ // eslint-disable-next-line no-console
175
+ console.log(`lyt sync (connect): ${c.message}`);
176
+ for (const w of c.warnings) {
177
+ // eslint-disable-next-line no-console
178
+ console.error(` > ${w}`);
179
+ }
180
+ }
181
+ function printPublishHuman(p) {
182
+ if (p.skipped) {
183
+ if (p.reason !== "no-single-pod" && p.reason !== "no-federation-state") {
184
+ // eslint-disable-next-line no-console
185
+ console.log(`lyt sync (publish): skipped — ${p.reason ?? "no pod"}`);
186
+ }
187
+ return;
188
+ }
189
+ const pushedVaults = p.vaultOutcomes.filter((o) => o.pushed).length;
190
+ // eslint-disable-next-line no-console
191
+ console.log(`lyt sync (publish): ${pushedVaults}/${p.vaultOutcomes.length} vault(s) pushed · pod ${p.podPushed ? "pushed" : "not pushed"}`);
192
+ for (const o of p.vaultOutcomes) {
193
+ if (o.status === "published" || o.status === "pulled-then-published")
194
+ continue;
195
+ // eslint-disable-next-line no-console
196
+ console.log(` ${o.status.padEnd(14)} ${o.vaultName}: ${o.message}`);
197
+ }
198
+ if (p.outboxRemaining > 0) {
199
+ // eslint-disable-next-line no-console
200
+ console.log(` ⚠ ${p.outboxRemaining} publish op(s) pending in the outbox — re-run \`lyt sync\` to finish (resumable).`);
201
+ }
202
+ }
203
+ function printCheckHuman(reports, summary) {
204
+ if (reports.length === 0) {
205
+ // eslint-disable-next-line no-console
206
+ console.log("lyt sync --check: no vaults found in registry.");
207
+ return;
208
+ }
209
+ const needsSync = summary.dirty + summary.ahead + summary.behind + summary.diverged;
210
+ const summaryLine = needsSync > 0
211
+ ? `${needsSync} vault(s) need sync (${summary.dirty} dirty, ${summary.ahead} ahead, ${summary.behind} behind, ${summary.diverged} diverged)`
212
+ : "All vaults clean";
213
+ // eslint-disable-next-line no-console
214
+ console.log(`lyt sync --check: ${summaryLine}`);
215
+ if (summary.frozen > 0 || summary.noUpstream > 0 || summary.skippedNonActive > 0) {
216
+ // eslint-disable-next-line no-console
217
+ console.log(` ${summary.frozen} frozen · ${summary.noUpstream} no-upstream · ${summary.skippedNonActive} non-active`);
218
+ }
219
+ for (const r of reports) {
220
+ const extras = [];
221
+ if (r.frozen && r.remaining)
222
+ extras.push(`(${r.remaining} left)`);
223
+ if (r.status.startsWith("ahead-") ||
224
+ r.status.startsWith("behind-") ||
225
+ r.status === "diverged") {
226
+ extras.push(`ahead=${r.ahead} behind=${r.behind}`);
227
+ }
228
+ if (r.status === "dirty")
229
+ extras.push(`${r.dirtyCount} change(s)`);
230
+ // eslint-disable-next-line no-console
231
+ console.log(` ${r.status.padEnd(14)} ${r.name}${extras.length > 0 ? " " + extras.join(" ") : ""}`);
232
+ }
233
+ }
234
+ //# sourceMappingURL=sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EACL,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,WAAW,GAGZ,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,aAAa,EAAyB,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAwB,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,UAAU,gBAAgB;IAC9B,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,GAAG;SACA,WAAW,CACV,mKAAmK,CACpK;SACA,MAAM,CAAC,SAAS,EAAE,2EAA2E,CAAC;SAC9F,MAAM,CAAC,QAAQ,EAAE,2DAA2D,CAAC;SAC7E,MAAM,CAAC,SAAS,EAAE,qEAAqE,CAAC;SACxF,MAAM,CACL,SAAS,EACT,4GAA4G,CAC7G;SACA,MAAM,CACL,wBA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;YAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,UAAU,YAAY,CAAC,CAAC;QACnE,sCAAsC;QACtC,OAAO,CAAC,GAAG,CACT,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CACtF,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from "commander";
2
+ export declare function buildValidateCommand(): Command;
3
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,wBAAgB,oBAAoB,IAAI,OAAO,CAsB9C"}