@datasynx/agentic-ai-cartography 0.2.2 β 0.2.4
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/README.md +154 -66
- package/dist/cli.js +3 -3
- package/dist/cli.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,38 +1,76 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# πΊοΈ Datasynx Cartography
|
|
2
4
|
|
|
3
5
|
**AI-powered Infrastructure Cartography & SOP Generation**
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/@datasynx/agentic-ai-cartography)
|
|
8
|
+
[](https://www.npmjs.com/package/@datasynx/agentic-ai-cartography)
|
|
9
|
+
[](https://opensource.org/licenses/MIT)
|
|
10
|
+
[](https://nodejs.org)
|
|
11
|
+
[](https://github.com/anthropics/claude-code)
|
|
12
|
+
[](https://www.linkedin.com/company/datasynx-ai/)
|
|
6
13
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
βββ nginx:80 β upstream:3000 (express)
|
|
13
|
-
β βββ GET /api/users, POST /api/auth, ...
|
|
14
|
-
βββ rabbitmq:5672 (3 queues)
|
|
15
|
-
βββ grafana:3000 β prometheus:9090
|
|
16
|
-
β 8 nodes, 11 edges discovered
|
|
17
|
-
β Exported: catalog.json, topology.mermaid, catalog-info.yaml
|
|
14
|
+
<br/>
|
|
15
|
+
|
|
16
|
+
*Claude IS the agent β it decides which read-only commands to run, analyses the output, and stores results via custom MCP tools into SQLite. No hand-written parsers, diff logic, or decision trees.*
|
|
17
|
+
|
|
18
|
+
<br/>
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
**[π¦ npm](https://www.npmjs.com/package/@datasynx/agentic-ai-cartography) Β· [πΌ LinkedIn](https://www.linkedin.com/company/datasynx-ai/) Β· [π Issues](https://github.com/datasynx/agentic-ai-cartography/issues)**
|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
---
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
## What it does
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
$ datasynx-cartography discover
|
|
30
|
+
|
|
31
|
+
CARTOGRAPHY localhost
|
|
32
|
+
βββββββββββββββββββββββββββββββββββββββββββββ
|
|
33
|
+
π Browser bookmarks scannedβ¦
|
|
34
|
+
π₯ All installed apps scannedβ¦
|
|
35
|
+
+ Node saas_tool:vscode [saas_tool] 90%
|
|
36
|
+
+ Node saas_tool:cursor [saas_tool] 90%
|
|
37
|
+
+ Node saas_tool:docker-desktop [saas_tool] 90%
|
|
38
|
+
+ Node saas_tool:github.com [saas_tool] 70% π
|
|
39
|
+
+ Node web_service:localhost:5432 [database] 90%
|
|
40
|
+
+ Node web_service:localhost:6379 [cache] 90%
|
|
41
|
+
~ Edge web_service:app β web_service:localhost:5432 uses
|
|
42
|
+
βββββββββββββββββββββββββββββββββββββββββββββ
|
|
43
|
+
DONE 9 nodes, 3 edges in 38.4s
|
|
44
|
+
|
|
45
|
+
WEITERSUCHEN β Discovery interaktiv verfeinern
|
|
46
|
+
β Suche nach (Enter = Beenden): hubspot windsurf
|
|
47
|
+
β³ Suche nach: hubspot windsurf
|
|
48
|
+
+ Node saas_tool:hubspot.com [saas_tool] 70% π
|
|
49
|
+
+ Node saas_tool:windsurf [saas_tool] 90%
|
|
26
50
|
```
|
|
27
51
|
|
|
28
|
-
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Features
|
|
55
|
+
|
|
56
|
+
| Feature | Details |
|
|
57
|
+
|---------|---------|
|
|
58
|
+
| **Installed App Scan** | Scans `/Applications`, Homebrew, dpkg/snap/flatpak, Spotlight + 60 known tools via `which` |
|
|
59
|
+
| **Browser Bookmarks** | Chrome, Firefox, Safari, Brave, Edge β extracts business/SaaS domains automatically |
|
|
60
|
+
| **Cloud Scanning** | AWS (EC2/RDS/EKS/S3), GCP (Compute/GKE/Cloud Run), Azure (AKS/WebApps), Kubernetes |
|
|
61
|
+
| **Human-in-the-Loop** | Chat with the agent mid-discovery: type `"hubspot windsurf"` to search for specific tools |
|
|
62
|
+
| **Shadow Daemon** | Background observer every 30s β detects new services, ports, processes |
|
|
63
|
+
| **SOP Generation** | Automatically generates Standard Operating Procedures from observed workflows |
|
|
64
|
+
| **SOP Dashboard** | HTML dashboard with all SOPs, step details, frequency stats |
|
|
65
|
+
| **Export Formats** | Mermaid topology, D3.js interactive graph, Backstage YAML, JSON, SOP Markdown |
|
|
66
|
+
| **Safety First** | `PreToolUse` hook blocks all destructive Bash commands β 100% read-only |
|
|
29
67
|
|
|
30
68
|
---
|
|
31
69
|
|
|
32
70
|
## Requirements
|
|
33
71
|
|
|
34
72
|
- **Node.js β₯ 18**
|
|
35
|
-
- **Claude CLI**
|
|
73
|
+
- **Claude CLI** β the Agent SDK starts it as a subprocess
|
|
36
74
|
|
|
37
75
|
```bash
|
|
38
76
|
npm install -g @anthropic-ai/claude-code
|
|
@@ -44,55 +82,81 @@ claude login
|
|
|
44
82
|
## Install
|
|
45
83
|
|
|
46
84
|
```bash
|
|
47
|
-
npm install -g @datasynx
|
|
85
|
+
npm install -g @datasynx/agentic-ai-cartography
|
|
48
86
|
```
|
|
49
87
|
|
|
88
|
+
[](https://www.npmjs.com/package/@datasynx/agentic-ai-cartography)
|
|
89
|
+
|
|
50
90
|
---
|
|
51
91
|
|
|
52
92
|
## Quick Start
|
|
53
93
|
|
|
54
94
|
```bash
|
|
55
|
-
#
|
|
56
|
-
cartography
|
|
95
|
+
# Check all requirements
|
|
96
|
+
datasynx-cartography doctor
|
|
97
|
+
|
|
98
|
+
# Discover your full infrastructure (one-shot, Claude Sonnet)
|
|
99
|
+
# β scans bookmarks, installed apps, local services, cloud, config files
|
|
100
|
+
# β then interactive follow-up: type tool names to search further
|
|
101
|
+
datasynx-cartography discover
|
|
102
|
+
|
|
103
|
+
# Seed infrastructure manually (JSON file or interactive)
|
|
104
|
+
datasynx-cartography seed --file infra.json
|
|
105
|
+
datasynx-cartography seed
|
|
106
|
+
|
|
107
|
+
# View all browser bookmarks
|
|
108
|
+
datasynx-cartography bookmarks
|
|
57
109
|
|
|
58
110
|
# Start background observer (Claude Haiku, every 30s)
|
|
59
|
-
cartography shadow start
|
|
111
|
+
datasynx-cartography shadow start
|
|
112
|
+
|
|
113
|
+
# Attach to live event feed
|
|
114
|
+
datasynx-cartography shadow attach # [P] pause [T] new task [D] detach [Q] stop
|
|
60
115
|
|
|
61
|
-
#
|
|
62
|
-
cartography shadow
|
|
116
|
+
# Pause / resume the daemon
|
|
117
|
+
datasynx-cartography shadow pause
|
|
118
|
+
datasynx-cartography shadow resume
|
|
63
119
|
|
|
64
|
-
#
|
|
65
|
-
cartography
|
|
120
|
+
# Stop daemon + generate SOPs + open HTML dashboard
|
|
121
|
+
datasynx-cartography shadow stop
|
|
66
122
|
|
|
67
|
-
#
|
|
68
|
-
cartography
|
|
123
|
+
# Generate SOPs manually from a session
|
|
124
|
+
datasynx-cartography sops [session-id]
|
|
69
125
|
|
|
70
|
-
# Full feature
|
|
71
|
-
cartography docs
|
|
126
|
+
# Full feature reference
|
|
127
|
+
datasynx-cartography docs
|
|
72
128
|
```
|
|
73
129
|
|
|
74
130
|
---
|
|
75
131
|
|
|
76
132
|
## Commands
|
|
77
133
|
|
|
78
|
-
### Discovery
|
|
134
|
+
### Cartography (Discovery)
|
|
79
135
|
|
|
80
136
|
```
|
|
81
|
-
cartography discover [options]
|
|
137
|
+
datasynx-cartography discover [options]
|
|
82
138
|
|
|
83
139
|
--entry <hosts...> Start hosts (default: localhost)
|
|
84
140
|
--depth <n> Max crawl depth (default: 8)
|
|
85
141
|
--max-turns <n> Max agent turns (default: 50)
|
|
86
142
|
--model <m> Claude model (default: claude-sonnet-4-5-...)
|
|
87
143
|
--org <name> Org name for Backstage YAML
|
|
88
|
-
-o, --output <dir> Output directory (default: ./
|
|
144
|
+
-o, --output <dir> Output directory (default: ./datasynx-output)
|
|
89
145
|
-v, --verbose Show agent reasoning
|
|
90
146
|
```
|
|
91
147
|
|
|
148
|
+
Discovery pipeline (automatic, in order):
|
|
149
|
+
1. **Browser bookmarks** β every domain classified as saas_tool or web_service
|
|
150
|
+
2. **Installed apps** β all IDEs, business tools, dev tools, browsers
|
|
151
|
+
3. **Local services** β `ss`, `ps`, port-to-service mapping
|
|
152
|
+
4. **Cloud & Kubernetes** β AWS/GCP/Azure/k8s (skipped gracefully if not configured)
|
|
153
|
+
5. **Config files** β `.env`, `docker-compose.yml`, etc.
|
|
154
|
+
6. **Human-in-the-loop** β interactive follow-up after initial scan
|
|
155
|
+
|
|
92
156
|
### Shadow Daemon
|
|
93
157
|
|
|
94
158
|
```
|
|
95
|
-
cartography shadow start [options]
|
|
159
|
+
datasynx-cartography shadow start [options]
|
|
96
160
|
|
|
97
161
|
--interval <ms> Poll interval (default: 30000, min: 15000)
|
|
98
162
|
--inactivity <ms> Task boundary gap (default: 300000)
|
|
@@ -101,21 +165,26 @@ cartography shadow start [options]
|
|
|
101
165
|
--auto-save Save nodes without prompting
|
|
102
166
|
--foreground Run in foreground (no fork)
|
|
103
167
|
|
|
104
|
-
cartography shadow stop
|
|
105
|
-
cartography shadow
|
|
106
|
-
cartography shadow
|
|
168
|
+
datasynx-cartography shadow stop # stops + generates SOPs + opens dashboard
|
|
169
|
+
datasynx-cartography shadow pause # SIGUSR1
|
|
170
|
+
datasynx-cartography shadow resume # SIGUSR2
|
|
171
|
+
datasynx-cartography shadow status
|
|
172
|
+
datasynx-cartography shadow attach
|
|
107
173
|
```
|
|
108
174
|
|
|
109
175
|
### Analysis & Export
|
|
110
176
|
|
|
111
177
|
```
|
|
112
|
-
cartography sops [session-id]
|
|
113
|
-
cartography export [session-id] [options]
|
|
178
|
+
datasynx-cartography sops [session-id] Generate SOPs from observed workflows
|
|
179
|
+
datasynx-cartography export [session-id] [options]
|
|
114
180
|
--format <fmt...> mermaid, json, yaml, html, sops (default: all)
|
|
115
181
|
-o, --output <dir> Output directory
|
|
116
|
-
cartography show [session-id]
|
|
117
|
-
cartography sessions
|
|
118
|
-
cartography
|
|
182
|
+
datasynx-cartography show [session-id] Session details + node list
|
|
183
|
+
datasynx-cartography sessions List all sessions
|
|
184
|
+
datasynx-cartography bookmarks View all browser bookmarks
|
|
185
|
+
datasynx-cartography seed [--file <path>] Manually add infrastructure nodes
|
|
186
|
+
datasynx-cartography doctor Check all requirements + cloud CLIs
|
|
187
|
+
datasynx-cartography docs Full feature reference
|
|
119
188
|
```
|
|
120
189
|
|
|
121
190
|
---
|
|
@@ -123,12 +192,13 @@ cartography docs Full feature reference
|
|
|
123
192
|
## Output Files
|
|
124
193
|
|
|
125
194
|
```
|
|
126
|
-
|
|
195
|
+
datasynx-output/
|
|
127
196
|
βββ catalog.json Full machine-readable dump
|
|
128
197
|
βββ catalog-info.yaml Backstage service catalog
|
|
129
198
|
βββ topology.mermaid Infrastructure topology (graph TB)
|
|
130
199
|
βββ dependencies.mermaid Service dependencies (graph LR)
|
|
131
200
|
βββ topology.html Interactive D3.js force graph
|
|
201
|
+
βββ sop-dashboard.html HTML dashboard with all SOPs + frequency stats
|
|
132
202
|
βββ sops/
|
|
133
203
|
β βββ deploy-check.md
|
|
134
204
|
β βββ db-migration.md
|
|
@@ -138,11 +208,11 @@ cartography-output/
|
|
|
138
208
|
|
|
139
209
|
---
|
|
140
210
|
|
|
141
|
-
##
|
|
211
|
+
## Cost Estimate
|
|
142
212
|
|
|
143
213
|
| Mode | Model | Interval | per Hour | per 8h Day |
|
|
144
214
|
|------|-------|----------|----------|------------|
|
|
145
|
-
|
|
|
215
|
+
| Discover | Sonnet | one-shot | $0.15β0.50 | one-shot |
|
|
146
216
|
| Shadow | Haiku | 30s | $0.12β0.36 | $0.96β2.88 |
|
|
147
217
|
| Shadow | Haiku | 60s | $0.06β0.18 | $0.48β1.44 |
|
|
148
218
|
| Shadow (quiet)* | Haiku | 30s | ~$0.02 | ~$0.16 |
|
|
@@ -155,28 +225,32 @@ cartography-output/
|
|
|
155
225
|
## Architecture
|
|
156
226
|
|
|
157
227
|
```
|
|
158
|
-
CLI (Commander)
|
|
159
|
-
βββ Preflight: Claude CLI
|
|
160
|
-
βββ Agent Orchestrator
|
|
228
|
+
CLI (Commander.js)
|
|
229
|
+
βββ Preflight: Claude CLI + API key + interval validation
|
|
230
|
+
βββ Agent Orchestrator (src/agent.ts)
|
|
161
231
|
βββ runDiscovery() Claude Sonnet + Bash + MCP Tools
|
|
162
|
-
βββ
|
|
232
|
+
β βββ scan_bookmarks() browser bookmark extraction
|
|
233
|
+
β βββ scan_installed_apps() /Applications, brew, dpkg, which
|
|
234
|
+
β βββ scan_k8s_resources() kubectl (readonly)
|
|
235
|
+
β βββ scan_aws/gcp/azure() cloud CLI scans (readonly)
|
|
236
|
+
β βββ ask_user() human-in-the-loop questions
|
|
237
|
+
βββ runShadowCycle() Claude Haiku + MCP Tools only (no Bash)
|
|
163
238
|
βββ generateSOPs() Anthropic Messages API (no agent loop)
|
|
164
|
-
βββ Custom MCP Tools
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
βββ
|
|
170
|
-
βββ
|
|
171
|
-
|
|
172
|
-
βββ Notifications β desktop alerts when no client attached
|
|
239
|
+
βββ Custom MCP Tools β CartographyDB (SQLite WAL)
|
|
240
|
+
|
|
241
|
+
Shadow Daemon (src/daemon.ts)
|
|
242
|
+
βββ takeSnapshot() β ss + ps (no Claude!)
|
|
243
|
+
βββ Diff-check β calls Claude only when something changed
|
|
244
|
+
βββ SIGUSR1/2 β pause / resume
|
|
245
|
+
βββ IPC Server β Unix socket ~/.cartography/daemon.sock
|
|
246
|
+
βββ Notifications β desktop alerts when no client attached
|
|
173
247
|
```
|
|
174
248
|
|
|
175
249
|
### Safety
|
|
176
250
|
|
|
177
|
-
Every Bash call is guarded by a `PreToolUse` hook that blocks
|
|
178
|
-
`rm`, `mv`, `dd`, `chmod`, `kill`, `docker rm/run/exec`, `kubectl delete/apply/exec`, redirects (`>`), and more.
|
|
179
|
-
Claude only reads β never writes, never deletes
|
|
251
|
+
Every Bash call is guarded by a `PreToolUse` hook that blocks destructive commands:
|
|
252
|
+
`rm`, `mv`, `dd`, `chmod`, `kill`, `docker rm/run/exec`, `kubectl delete/apply/exec`, redirects (`>`), pipes to shell, and more.
|
|
253
|
+
**Claude only reads β never writes, never deletes.**
|
|
180
254
|
|
|
181
255
|
---
|
|
182
256
|
|
|
@@ -189,13 +263,27 @@ import {
|
|
|
189
263
|
runShadowCycle,
|
|
190
264
|
generateSOPs,
|
|
191
265
|
exportAll,
|
|
266
|
+
exportSOPDashboard,
|
|
192
267
|
safetyHook,
|
|
193
268
|
defaultConfig,
|
|
194
|
-
} from '@datasynx
|
|
269
|
+
} from '@datasynx/agentic-ai-cartography';
|
|
270
|
+
|
|
271
|
+
// Run a discovery pass with optional user hint
|
|
272
|
+
await runDiscovery(config, db, sessionId, onEvent, onAskUser, 'hubspot windsurf');
|
|
195
273
|
```
|
|
196
274
|
|
|
197
275
|
---
|
|
198
276
|
|
|
277
|
+
## Built by
|
|
278
|
+
|
|
279
|
+
<div align="center">
|
|
280
|
+
|
|
281
|
+
[](https://www.linkedin.com/company/datasynx-ai/)
|
|
282
|
+
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
199
287
|
## License
|
|
200
288
|
|
|
201
|
-
MIT β Β© Datasynx AI
|
|
289
|
+
MIT β Β© [Datasynx AI](https://www.linkedin.com/company/datasynx-ai/)
|
package/dist/cli.js
CHANGED
|
@@ -1801,7 +1801,7 @@ if (process.env.CARTOGRAPHYY_DAEMON === "1") {
|
|
|
1801
1801
|
function main() {
|
|
1802
1802
|
const program = new Command();
|
|
1803
1803
|
const CMD = "datasynx-cartography";
|
|
1804
|
-
const VERSION = "0.2.
|
|
1804
|
+
const VERSION = "0.2.3";
|
|
1805
1805
|
program.name(CMD).description("AI-powered Infrastructure Cartography & SOP Generation").version(VERSION);
|
|
1806
1806
|
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) => {
|
|
1807
1807
|
checkPrerequisites();
|
|
@@ -1844,7 +1844,7 @@ function main() {
|
|
|
1844
1844
|
let nodeCount = 0;
|
|
1845
1845
|
let edgeCount = 0;
|
|
1846
1846
|
w("\n");
|
|
1847
|
-
w(` ${bold("
|
|
1847
|
+
w(` ${bold("CARTOGRAPHY")} ${dim(config.entryPoints.join(", "))}
|
|
1848
1848
|
`);
|
|
1849
1849
|
w(` ${dim("Model: " + config.agentModel + " | MaxTurns: " + config.maxTurns)}
|
|
1850
1850
|
`);
|
|
@@ -2460,7 +2460,7 @@ ${infraSummary.substring(0, 12e3)}`;
|
|
|
2460
2460
|
out(dim(" AI-powered Infrastructure Cartography & SOP Generation\n"));
|
|
2461
2461
|
out("\n");
|
|
2462
2462
|
line();
|
|
2463
|
-
out(b(cyan("
|
|
2463
|
+
out(b(cyan(" CARTOGRAPHY\n")));
|
|
2464
2464
|
out("\n");
|
|
2465
2465
|
out(` ${green("datasynx-cartography discover")}
|
|
2466
2466
|
`);
|