@datasynx/agentic-ai-cartography 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -128,7 +128,7 @@ function checkPrerequisites() {
128
128
  execSync("claude --version", { stdio: "pipe" });
129
129
  } catch {
130
130
  process.stderr.write(
131
- "\n\u274C Claude CLI nicht gefunden.\n Cartography braucht die Claude CLI als Runtime-Dependency.\n\n Installieren:\n npm install -g @anthropic-ai/claude-code\n # oder\n curl -fsSL https://claude.ai/install.sh | bash\n\n Danach: claude login\n\n"
131
+ "\n\u274C Claude CLI nicht gefunden.\n Datasynx Cartography braucht die Claude CLI als Runtime-Dependency.\n\n Installieren:\n npm install -g @anthropic-ai/claude-code\n # oder\n curl -fsSL https://claude.ai/install.sh | bash\n\n Danach: claude login\n\n"
132
132
  );
133
133
  process.exitCode = 1;
134
134
  throw new Error("Claude CLI not found");
@@ -1390,7 +1390,7 @@ var ShadowDaemon = class {
1390
1390
  function forkDaemon(config) {
1391
1391
  const child = spawn(
1392
1392
  process.execPath,
1393
- [process.argv[1] ?? "cartography", "shadow", "start", "--foreground", "--daemon-child"],
1393
+ [process.argv[1] ?? "datasynx-cartography", "shadow", "start", "--foreground", "--daemon-child"],
1394
1394
  {
1395
1395
  detached: true,
1396
1396
  stdio: "ignore",
@@ -1463,7 +1463,7 @@ function sleep(ms) {
1463
1463
  // src/client.ts
1464
1464
  var ForegroundClient = class {
1465
1465
  async run(config) {
1466
- process.stderr.write("\u{1F441} Cartography Shadow (foreground) gestartet\n");
1466
+ process.stderr.write("\u{1F441} Datasynx Cartography Shadow (foreground) gestartet\n");
1467
1467
  process.stderr.write(` Intervall: ${config.pollIntervalMs / 1e3}s | Modell: ${config.shadowModel}
1468
1468
  `);
1469
1469
  process.stderr.write(" Ctrl+C zum Beenden\n\n");
@@ -1478,7 +1478,7 @@ var AttachClient = class {
1478
1478
  } catch {
1479
1479
  process.stderr.write(`\u274C Kann nicht an Daemon ankoppeln: ${socketPath}
1480
1480
  `);
1481
- process.stderr.write(" Ist der Daemon gestartet? cartography shadow status\n");
1481
+ process.stderr.write(" Ist der Daemon gestartet? datasynx-cartography shadow status\n");
1482
1482
  process.exitCode = 1;
1483
1483
  return;
1484
1484
  }
@@ -1593,8 +1593,10 @@ if (process.env.CARTOGRAPHYY_DAEMON === "1") {
1593
1593
  }
1594
1594
  function main() {
1595
1595
  const program = new Command();
1596
- program.name("cartography").description("AI-powered Infrastructure Cartography & SOP Generation").version("0.1.0");
1597
- program.command("discover").description("Infrastruktur scannen und kartographieren").option("--entry <hosts...>", "Startpunkte", ["localhost"]).option("--depth <n>", "Max Tiefe", "8").option("--max-turns <n>", "Max Agent-Turns", "50").option("--model <m>", "Agent-Model", "claude-sonnet-4-5-20250929").option("--org <name>", "Organisation (f\xFCr Backstage)").option("-o, --output <dir>", "Output-Dir", "./cartography-output").option("--db <path>", "DB-Pfad").option("-v, --verbose", "Agent-Reasoning anzeigen", false).action(async (opts) => {
1596
+ const CMD = "datasynx-cartography";
1597
+ const VERSION = "0.1.3";
1598
+ program.name(CMD).description("AI-powered Infrastructure Cartography & SOP Generation").version(VERSION);
1599
+ program.command("discover").description("Infrastruktur scannen und kartographieren").option("--entry <hosts...>", "Startpunkte", ["localhost"]).option("--depth <n>", "Max Tiefe", "8").option("--max-turns <n>", "Max Agent-Turns", "50").option("--model <m>", "Agent-Model", "claude-sonnet-4-5-20250929").option("--org <name>", "Organisation (f\xFCr Backstage)").option("-o, --output <dir>", "Output-Dir", "./datasynx-output").option("--db <path>", "DB-Pfad").option("-v, --verbose", "Agent-Reasoning anzeigen", false).action(async (opts) => {
1598
1600
  checkPrerequisites();
1599
1601
  const config = defaultConfig({
1600
1602
  mode: "discover",
@@ -1652,7 +1654,7 @@ function main() {
1652
1654
  });
1653
1655
  const { running } = isDaemonRunning(config.pidFile);
1654
1656
  if (running) {
1655
- process.stderr.write("\u274C Shadow-Daemon l\xE4uft bereits. cartography shadow status\n");
1657
+ process.stderr.write("\u274C Shadow-Daemon l\xE4uft bereits. datasynx-cartography shadow status\n");
1656
1658
  process.exitCode = 1;
1657
1659
  return;
1658
1660
  }
@@ -1665,8 +1667,8 @@ function main() {
1665
1667
  `);
1666
1668
  process.stderr.write(` Intervall: ${intervalMs / 1e3}s | Modell: ${config.shadowModel}
1667
1669
  `);
1668
- process.stderr.write(" cartography shadow attach \u2014 ankoppeln\n");
1669
- process.stderr.write(" cartography shadow stop \u2014 stoppen\n\n");
1670
+ process.stderr.write(" datasynx-cartography shadow attach \u2014 ankoppeln\n");
1671
+ process.stderr.write(" datasynx-cartography shadow stop \u2014 stoppen\n\n");
1670
1672
  }
1671
1673
  });
1672
1674
  shadow.command("stop").description("Shadow-Daemon stoppen").action(() => {
@@ -1701,7 +1703,7 @@ function main() {
1701
1703
  const db = new CartographyDB(config.dbPath);
1702
1704
  const session = sessionId ? db.getSession(sessionId) : db.getLatestSession("shadow");
1703
1705
  if (!session) {
1704
- process.stderr.write("\u274C Keine Shadow-Session gefunden. cartography shadow start\n");
1706
+ process.stderr.write("\u274C Keine Shadow-Session gefunden. datasynx-cartography shadow start\n");
1705
1707
  db.close();
1706
1708
  process.exitCode = 1;
1707
1709
  return;
@@ -1713,7 +1715,7 @@ function main() {
1713
1715
  `);
1714
1716
  db.close();
1715
1717
  });
1716
- program.command("export [session-id]").description("Alle Outputs generieren").option("-o, --output <dir>", "Output-Dir", "./cartography-output").option("--format <fmt...>", "Formate: mermaid,json,yaml,html,sops").action((sessionId, opts) => {
1718
+ program.command("export [session-id]").description("Alle Outputs generieren").option("-o, --output <dir>", "Output-Dir", "./datasynx-output").option("--format <fmt...>", "Formate: mermaid,json,yaml,html,sops").action((sessionId, opts) => {
1717
1719
  const config = defaultConfig({ outputDir: opts.output });
1718
1720
  const db = new CartographyDB(config.dbPath);
1719
1721
  const session = sessionId ? db.getSession(sessionId) : db.getLatestSession();
@@ -1800,13 +1802,13 @@ Session: ${session.id}
1800
1802
  const yellow = (s) => `\x1B[33m${s}\x1B[0m`;
1801
1803
  const line = () => out(dim("\u2500".repeat(60)) + "\n");
1802
1804
  out("\n");
1803
- out(b(" CARTOGRAPHY") + " " + dim("v0.1.2") + "\n");
1805
+ out(b(" DATASYNX CARTOGRAPHY") + " " + dim("v" + VERSION) + "\n");
1804
1806
  out(dim(" AI-powered Infrastructure Cartography & SOP Generation\n"));
1805
1807
  out("\n");
1806
1808
  line();
1807
1809
  out(b(cyan(" DISCOVERY\n")));
1808
1810
  out("\n");
1809
- out(` ${green("cartography discover")}
1811
+ out(` ${green("datasynx-cartography discover")}
1810
1812
  `);
1811
1813
  out(` Scannt die lokale Infrastruktur (Claude Sonnet).
1812
1814
  `);
@@ -1821,11 +1823,11 @@ Session: ${session.id}
1821
1823
  out(dim(" --max-turns <n> Max Agent-Turns (default: 50)\n"));
1822
1824
  out(dim(" --model <m> Model (default: claude-sonnet-4-5-...)\n"));
1823
1825
  out(dim(" --org <name> Organisation f\xFCr Backstage YAML\n"));
1824
- out(dim(" -o, --output <dir> Output-Verzeichnis (default: ./cartography-output)\n"));
1826
+ out(dim(" -o, --output <dir> Output-Verzeichnis (default: ./datasynx-output)\n"));
1825
1827
  out(dim(" -v, --verbose Agent-Reasoning anzeigen\n"));
1826
1828
  out("\n");
1827
1829
  out(dim(" Output:\n"));
1828
- out(dim(" cartography-output/\n"));
1830
+ out(dim(" datasynx-output/\n"));
1829
1831
  out(dim(" catalog.json Maschinenlesbarer Komplett-Dump\n"));
1830
1832
  out(dim(" catalog-info.yaml Backstage Service-Katalog\n"));
1831
1833
  out(dim(" topology.mermaid Infrastruktur-Topologie (graph TB)\n"));
@@ -1837,7 +1839,7 @@ Session: ${session.id}
1837
1839
  line();
1838
1840
  out(b(cyan(" SHADOW DAEMON\n")));
1839
1841
  out("\n");
1840
- out(` ${green("cartography shadow start")}
1842
+ out(` ${green("datasynx-cartography shadow start")}
1841
1843
  `);
1842
1844
  out(` Startet einen Background-Daemon, der alle 30s einen System-Snapshot
1843
1845
  `);
@@ -1853,11 +1855,11 @@ Session: ${session.id}
1853
1855
  out(dim(" --no-notifications Desktop-Notifications deaktivieren\n"));
1854
1856
  out(dim(" --foreground Kein Daemon, im Terminal bleiben\n"));
1855
1857
  out("\n");
1856
- out(` ${green("cartography shadow stop")} ${dim("Daemon per SIGTERM beenden")}
1858
+ out(` ${green("datasynx-cartography shadow stop")} ${dim("Daemon per SIGTERM beenden")}
1857
1859
  `);
1858
- out(` ${green("cartography shadow status")} ${dim("PID + Socket-Pfad anzeigen")}
1860
+ out(` ${green("datasynx-cartography shadow status")} ${dim("PID + Socket-Pfad anzeigen")}
1859
1861
  `);
1860
- out(` ${green("cartography shadow attach")} ${dim("Live-Events im Terminal, Hotkeys: [T] [S] [D] [Q]")}
1862
+ out(` ${green("datasynx-cartography shadow attach")} ${dim("Live-Events im Terminal, Hotkeys: [T] [S] [D] [Q]")}
1861
1863
  `);
1862
1864
  out("\n");
1863
1865
  out(dim(" Hotkeys im Attach-Modus:\n"));
@@ -1869,21 +1871,21 @@ Session: ${session.id}
1869
1871
  line();
1870
1872
  out(b(cyan(" ANALYSE & EXPORT\n")));
1871
1873
  out("\n");
1872
- out(` ${green("cartography sops [session-id]")}
1874
+ out(` ${green("datasynx-cartography sops [session-id]")}
1873
1875
  `);
1874
1876
  out(` Clustert abgeschlossene Tasks und generiert SOPs via Claude Sonnet.
1875
1877
  `);
1876
1878
  out(` Nutzt die Anthropic Messages API (kein Agent-Loop, ein Request pro Cluster).
1877
1879
  `);
1878
1880
  out("\n");
1879
- out(` ${green("cartography export [session-id]")}
1881
+ out(` ${green("datasynx-cartography export [session-id]")}
1880
1882
  `);
1881
1883
  out(dim(" --format <fmt...> mermaid, json, yaml, html, sops (default: alle)\n"));
1882
1884
  out(dim(" -o, --output <dir> Output-Verzeichnis\n"));
1883
1885
  out("\n");
1884
- out(` ${green("cartography show [session-id]")} ${dim("Session-Details + Node-Liste")}
1886
+ out(` ${green("datasynx-cartography show [session-id]")} ${dim("Session-Details + Node-Liste")}
1885
1887
  `);
1886
- out(` ${green("cartography sessions")} ${dim("Alle Sessions tabellarisch auflisten")}
1888
+ out(` ${green("datasynx-cartography sessions")} ${dim("Alle Sessions tabellarisch auflisten")}
1887
1889
  `);
1888
1890
  out("\n");
1889
1891
  line();
@@ -1934,8 +1936,8 @@ Session: ${session.id}
1934
1936
  out(" export ANTHROPIC_API_KEY=sk-ant-...\n");
1935
1937
  out("\n");
1936
1938
  out(dim(" # 3. Los\n"));
1937
- out(" cartography discover\n");
1938
- out(" cartography shadow start\n");
1939
+ out(" datasynx-cartography discover\n");
1940
+ out(" datasynx-cartography shadow start\n");
1939
1941
  out("\n");
1940
1942
  out(dim(" Daten: ~/.cartography/cartography.db\n"));
1941
1943
  out(dim(" Socket: ~/.cartography/daemon.sock\n"));
@@ -1955,7 +1957,7 @@ Session: ${session.id}
1955
1957
  `);
1956
1958
  const dim = (s) => `\x1B[2m${s}\x1B[0m`;
1957
1959
  let allGood = true;
1958
- out("\n \x1B[1mCartography \u2014 Doctor\x1B[0m\n");
1960
+ out("\n \x1B[1mDatasynx Cartography \u2014 Doctor\x1B[0m\n");
1959
1961
  out(dim(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n"));
1960
1962
  const nodeVer = process.versions.node;
1961
1963
  const [major] = nodeVer.split(".").map(Number);
@@ -2010,12 +2012,77 @@ Session: ${session.id}
2010
2012
  }
2011
2013
  out(dim(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n"));
2012
2014
  if (allGood) {
2013
- out(" \x1B[32m\x1B[1mAlle Checks bestanden \u2014 cartography discover\x1B[0m\n\n");
2015
+ out(" \x1B[32m\x1B[1mAlle Checks bestanden \u2014 datasynx-cartography discover\x1B[0m\n\n");
2014
2016
  } else {
2015
2017
  out(" \x1B[31m\x1B[1mEinige Checks fehlgeschlagen. Bitte oben beheben.\x1B[0m\n\n");
2016
2018
  process.exitCode = 1;
2017
2019
  }
2018
2020
  });
2021
+ const o = (s) => process.stderr.write(s);
2022
+ const _b = (s) => `\x1B[1m${s}\x1B[0m`;
2023
+ const _d = (s) => `\x1B[2m${s}\x1B[0m`;
2024
+ const _c = (s) => `\x1B[36m${s}\x1B[0m`;
2025
+ const _g = (s) => `\x1B[32m${s}\x1B[0m`;
2026
+ const _m = (s) => `\x1B[35m${s}\x1B[0m`;
2027
+ o("\n");
2028
+ o(_c(" ____ _ ____ ") + "\n");
2029
+ o(_c(" | _ \\ __ _| |_ __ _/ ___| _ _ _ __ __ __") + "\n");
2030
+ o(_c(" | | | |/ _` | __/ _` \\___ \\| | | | '_ \\\\ \\/ /") + "\n");
2031
+ o(_c(" | |_| | (_| | || (_| |___) | |_| | | | |> < ") + "\n");
2032
+ o(_c(" |____/ \\__,_|\\__\\__,_|____/ \\__, |_| |_/_/\\_\\") + "\n");
2033
+ o(_c(" |___/ ") + "\n");
2034
+ o("\n");
2035
+ o(_b(" Cartography") + " " + _d("v" + VERSION) + "\n");
2036
+ o(_d(" AI-powered Infrastructure Discovery & SOP Generation\n"));
2037
+ o(_d(" Built on Claude Agent SDK\n"));
2038
+ o("\n");
2039
+ if (process.argv.length <= 2) {
2040
+ o(_d(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n"));
2041
+ o("\n");
2042
+ o(_b(" Commands:\n"));
2043
+ o("\n");
2044
+ o(` ${_g("discover")} ${_d("Infrastruktur scannen (Claude Sonnet)")}
2045
+ `);
2046
+ o(` ${_g("shadow start")} ${_d("Background-Daemon starten (Claude Haiku)")}
2047
+ `);
2048
+ o(` ${_g("shadow stop")} ${_d("Daemon stoppen")}
2049
+ `);
2050
+ o(` ${_g("shadow status")} ${_d("Daemon-Status anzeigen")}
2051
+ `);
2052
+ o(` ${_g("shadow attach")} ${_d("Live an Daemon ankoppeln")}
2053
+ `);
2054
+ o(` ${_g("sops")} ${_d("[session]")} ${_d("SOPs aus Workflows generieren")}
2055
+ `);
2056
+ o(` ${_g("export")} ${_d("[session]")} ${_d("Mermaid, JSON, YAML, HTML exportieren")}
2057
+ `);
2058
+ o(` ${_g("show")} ${_d("[session]")} ${_d("Session-Details anzeigen")}
2059
+ `);
2060
+ o(` ${_g("sessions")} ${_d("Alle Sessions auflisten")}
2061
+ `);
2062
+ o(` ${_g("doctor")} ${_d("Installations-Check")}
2063
+ `);
2064
+ o(` ${_g("docs")} ${_d("Vollst\xE4ndige Dokumentation")}
2065
+ `);
2066
+ o("\n");
2067
+ o(_d(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n"));
2068
+ o("\n");
2069
+ o(_b(" Quick Start:\n"));
2070
+ o("\n");
2071
+ o(` ${_m("$")} ${_b("datasynx-cartography doctor")} ${_d("Alles bereit?")}
2072
+ `);
2073
+ o(` ${_m("$")} ${_b("datasynx-cartography discover")} ${_d("Einmal-Scan")}
2074
+ `);
2075
+ o(` ${_m("$")} ${_b("datasynx-cartography shadow start")} ${_d("Dauerhaft beobachten")}
2076
+ `);
2077
+ o("\n");
2078
+ o(_d(" Doku: datasynx-cartography docs\n"));
2079
+ o(_d(" Hilfe: datasynx-cartography --help\n"));
2080
+ o(_d(" npm: @datasynx/agentic-ai-cartography\n"));
2081
+ o("\n");
2082
+ return;
2083
+ }
2084
+ o(_d(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n"));
2085
+ o("\n");
2019
2086
  program.exitOverride((err) => {
2020
2087
  if (err.code === "commander.helpDisplayed") {
2021
2088
  process.exitCode = 0;