@datasynx/agentic-ai-cartography 1.1.1 → 2.2.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.
- package/AGENTS.md +32 -0
- package/README.md +307 -34
- package/dist/bookmarks-WXHE7GN7.js +28 -0
- package/dist/chunk-2SZ5QHGH.js +847 -0
- package/dist/chunk-2SZ5QHGH.js.map +1 -0
- package/dist/chunk-BNDCY2RI.js +5672 -0
- package/dist/chunk-BNDCY2RI.js.map +1 -0
- package/dist/chunk-WCR47QA2.js +277 -0
- package/dist/chunk-WCR47QA2.js.map +1 -0
- package/dist/cli.js +2384 -1236
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +10432 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3432 -0
- package/dist/index.d.ts +3102 -48
- package/dist/index.js +7645 -954
- package/dist/index.js.map +1 -1
- package/dist/mcp-bin.js +23 -0
- package/dist/mcp-bin.js.map +1 -0
- package/dist/types-TJWXAQ2L.js +66 -0
- package/llms-full.txt +758 -0
- package/llms.txt +24 -0
- package/package.json +71 -21
- package/scripts/build-llms.mjs +89 -0
- package/scripts/build-mcpb.mjs +31 -0
- package/scripts/gen-docs.ts +123 -0
- package/scripts/validate-server-json.mjs +54 -0
- package/server.json +28 -0
- package/dist/bookmarks-BWNVQGPG.js +0 -14
- package/dist/chunk-QKNYI3SU.js +0 -459
- package/dist/chunk-QKNYI3SU.js.map +0 -1
- package/dist/chunk-WJR63RWY.js +0 -133
- package/dist/chunk-WJR63RWY.js.map +0 -1
- package/dist/types-54623ALF.js +0 -26
- package/scripts/postinstall.mjs +0 -7
- /package/dist/{bookmarks-BWNVQGPG.js.map → bookmarks-WXHE7GN7.js.map} +0 -0
- /package/dist/{types-54623ALF.js.map → types-TJWXAQ2L.js.map} +0 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Working with Cartography
|
|
2
|
+
|
|
3
|
+
This project can use **Cartography** — an MCP server that maps the system landscape
|
|
4
|
+
(services, datastores, SaaS tools, dependencies) read-only.
|
|
5
|
+
|
|
6
|
+
## Enable it
|
|
7
|
+
|
|
8
|
+
```json
|
|
9
|
+
{
|
|
10
|
+
"mcpServers": {
|
|
11
|
+
"cartography": {
|
|
12
|
+
"command": "npx",
|
|
13
|
+
"args": [
|
|
14
|
+
"-y",
|
|
15
|
+
"--package",
|
|
16
|
+
"@datasynx/agentic-ai-cartography",
|
|
17
|
+
"cartography-mcp"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Or run `datasynx-cartography install --client <id>` (see `list-clients`).
|
|
25
|
+
|
|
26
|
+
## Use it
|
|
27
|
+
|
|
28
|
+
- Read `cartography://graph/summary` first — a low-token overview.
|
|
29
|
+
- Then drill in with `query_infrastructure`, `get_dependencies`, `get_node`.
|
|
30
|
+
- All tools are read-only; run `run_discovery` to (re)scan the local system.
|
|
31
|
+
|
|
32
|
+
<!-- Generated by `npm run docs:tables`; edit scripts/gen-docs.ts, not this file. -->
|
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<a href="https://github.com/datasynx/agentic-ai-cartography">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/datasynx/agentic-ai-cartography/main/docs/assets/datasynx-logo.png" alt="Datasynx" width="340" />
|
|
5
|
+
</a>
|
|
6
|
+
|
|
7
|
+
# Datasynx Cartography
|
|
4
8
|
|
|
5
9
|
**AI-powered Infrastructure Discovery & Agentic AI Cartography**
|
|
6
10
|
|
|
@@ -9,22 +13,194 @@
|
|
|
9
13
|
[](https://opensource.org/licenses/MIT)
|
|
10
14
|
[](https://nodejs.org)
|
|
11
15
|
[](https://github.com/datasynx/agentic-ai-cartography/actions/workflows/ci.yml)
|
|
12
|
-
[](https://github.com/datasynx/agentic-ai-cartography/actions/workflows/release.yml)
|
|
17
|
+
[](https://github.com/semantic-release/semantic-release)
|
|
18
|
+
[](https://modelcontextprotocol.io)
|
|
19
|
+
[](https://datasynx.github.io/agentic-ai-cartography/)
|
|
20
|
+
[](https://docs.npmjs.com/generating-provenance-statements)
|
|
21
|
+
[](https://github.com/datasynx/agentic-ai-cartography)
|
|
13
22
|
[](https://www.linkedin.com/company/datasynx-ai/)
|
|
14
23
|
[](https://github.com/datasynx/agentic-ai-cartography)
|
|
15
24
|
|
|
16
25
|
<br/>
|
|
17
26
|
|
|
18
|
-
*
|
|
27
|
+
*A **Model Context Protocol server** that gives any AI agent read-only awareness of your complete system landscape — local services, databases, SaaS tools, installed apps and their dependencies — with progressive disclosure, recursive dependency traversal and semantic search. Discovery runs deterministically (no LLM required) or via an optional Claude-driven loop. Provider-agnostic: works with Claude, OpenAI, Ollama, or any MCP-compatible host.*
|
|
19
28
|
|
|
20
29
|
<br/>
|
|
21
30
|
|
|
22
|
-
**[📦 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)**
|
|
31
|
+
**[📖 Documentation](https://datasynx.github.io/agentic-ai-cartography/) · [📦 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)**
|
|
23
32
|
|
|
24
33
|
</div>
|
|
25
34
|
|
|
26
35
|
---
|
|
27
36
|
|
|
37
|
+
## Contents
|
|
38
|
+
|
|
39
|
+
[MCP-first quick start](#-mcp-first--install-once-every-agent-knows-your-landscape) ·
|
|
40
|
+
[Connect your client](#connect-your-client-copy-paste) ·
|
|
41
|
+
[Embed in your app](#embed-in-your-own-app) ·
|
|
42
|
+
[What it does](#what-it-does) ·
|
|
43
|
+
[Cross-platform](#cross-platform-support) ·
|
|
44
|
+
[Features](#features) ·
|
|
45
|
+
[CLI commands](#commands) ·
|
|
46
|
+
[Architecture](#architecture) ·
|
|
47
|
+
[Safety](#safety) ·
|
|
48
|
+
[Public API](#public-api) ·
|
|
49
|
+
[Releasing](#releasing) ·
|
|
50
|
+
[Star History](#star-history)
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 🤖 MCP-first — install once, every agent knows your landscape
|
|
55
|
+
|
|
56
|
+
> **v2.0** inverts the architecture: the package's primary interface is now a
|
|
57
|
+
> production **Model Context Protocol (MCP) server**. Any MCP host — Claude Code,
|
|
58
|
+
> Cursor, Cline, Windsurf, VS Code Copilot, the Vercel AI SDK, LangGraph — connects
|
|
59
|
+
> to it and gains read-only awareness of your complete system landscape. The bundled
|
|
60
|
+
> Claude-driven discovery loop is now one optional turnkey adapter; the server needs
|
|
61
|
+
> **no LLM dependency of its own**.
|
|
62
|
+
|
|
63
|
+
The topology is exposed with **progressive disclosure** so agents never blow their
|
|
64
|
+
context window:
|
|
65
|
+
|
|
66
|
+
- **Resources** (read-only context): `cartography://graph/summary` (low-token index — read first), `cartography://nodes/{id}`, `cartography://services`, `cartography://databases`, `cartography://dependencies/{id}`.
|
|
67
|
+
- **Tools** (parameterized queries): `query_infrastructure`, `search_topology` (semantic), `get_dependencies` (recursive graph traversal), `list_services`, `get_node`, `get_summary`, `run_discovery`.
|
|
68
|
+
- **Prompts**: `audit-attack-surface`, `map-service-dependencies`, `onboard-to-system`.
|
|
69
|
+
|
|
70
|
+
### Quick start
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# 1. Discover your system (read-only, deterministic — no LLM required)
|
|
74
|
+
npx -p @datasynx/agentic-ai-cartography cartography-mcp --help
|
|
75
|
+
datasynx-cartography discover # or the richer Claude-driven loop
|
|
76
|
+
|
|
77
|
+
# 2. Run the MCP server (stdio by default)
|
|
78
|
+
npx -p @datasynx/agentic-ai-cartography cartography-mcp
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Auto-install into your client
|
|
82
|
+
|
|
83
|
+
Let the harness write the correct config for your host — it parses the existing
|
|
84
|
+
file and merges in the server entry **without clobbering** your other servers:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
datasynx-cartography list-clients # supported hosts
|
|
88
|
+
# claude-code · cursor · vscode · codex · windsurf · cline · roo
|
|
89
|
+
# zed · junie · gemini · goose · openhands · claude-desktop
|
|
90
|
+
datasynx-cartography install --client claude-code # global/user config
|
|
91
|
+
datasynx-cartography install --client claude-code --project # project-local (.mcp.json)
|
|
92
|
+
datasynx-cartography install --client claude-code --dry-run # preview the merge diff
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Flags: `--global` (default) / `--project` scope, `--dry-run` (no write), `--name <server>`,
|
|
96
|
+
`--http`/`--url <url>` (register the HTTP endpoint), `--db <path>`, `--session <id>`,
|
|
97
|
+
`--deeplink` (print a one-click Cursor/VS Code install link instead of writing).
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
datasynx-cartography install --client cursor --deeplink # cursor://… one-click link
|
|
101
|
+
datasynx-cartography install --client vscode --deeplink # vscode://… + `code --add-mcp`
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
> Thirteen hosts are supported today (see `list-clients`). The server is also
|
|
105
|
+
> deployable on [Smithery](https://smithery.ai) (TypeScript runtime, `smithery.yaml`)
|
|
106
|
+
> and published to the official MCP Registry (`server.json`).
|
|
107
|
+
>
|
|
108
|
+
> **Smithery scope:** the hosted runtime needs no secrets (`smithery.yaml` declares
|
|
109
|
+
> `env: {}`) because it serves a read-only catalog from an in-memory or supplied
|
|
110
|
+
> SQLite database. The cloud scanners (`scan_aws_resources`, `scan_gcp_resources`,
|
|
111
|
+
> `scan_azure_resources`, `scan_k8s_resources`) require the respective CLI and its
|
|
112
|
+
> credentials on the host, so they are intended for local/self-hosted runs, not the
|
|
113
|
+
> managed Smithery instance.
|
|
114
|
+
|
|
115
|
+
**Claude Desktop one-click** — build the portable bundle and double-click it
|
|
116
|
+
(Settings → Extensions → Install), or drag it onto the window:
|
|
117
|
+
```bash
|
|
118
|
+
npm run build:mcpb # → dist/cartography.mcpb (validated against the mcpb v0.3 schema)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Connect your client (copy-paste)
|
|
122
|
+
|
|
123
|
+
**Claude Code** — install as a plugin from the Datasynx marketplace (recommended):
|
|
124
|
+
```text
|
|
125
|
+
/plugin marketplace add datasynx/claude-plugins
|
|
126
|
+
/plugin install cartography@datasynx
|
|
127
|
+
```
|
|
128
|
+
This wires up the MCP server in one step (verify with `/mcp`) — the same flow as
|
|
129
|
+
[`shadowing`](https://github.com/datasynx/agentic-ai-shadowing). The plugin lives
|
|
130
|
+
in [`plugin/`](plugin/). Prefer to wire it by hand instead?
|
|
131
|
+
```bash
|
|
132
|
+
claude mcp add cartography -- npx -p @datasynx/agentic-ai-cartography cartography-mcp
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Cursor / Windsurf / Cline** — `mcp.json` (or `~/.codeium/windsurf/mcp_config.json`):
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"mcpServers": {
|
|
139
|
+
"cartography": {
|
|
140
|
+
"command": "npx",
|
|
141
|
+
"args": ["-p", "@datasynx/agentic-ai-cartography", "cartography-mcp"]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**VS Code (Copilot)** — `.vscode/mcp.json` (note: `servers`, not `mcpServers`):
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"servers": {
|
|
151
|
+
"cartography": { "command": "npx", "args": ["-p", "@datasynx/agentic-ai-cartography", "cartography-mcp"] }
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Remote / team use** — Streamable HTTP (localhost-bound, DNS-rebind protected):
|
|
157
|
+
```bash
|
|
158
|
+
cartography-mcp --http --port 3737 # → http://127.0.0.1:3737/mcp (loopback, no auth)
|
|
159
|
+
|
|
160
|
+
# Exposing beyond loopback requires BOTH an explicit Host allowlist (CVE-2025-66414)
|
|
161
|
+
# AND a bearer token — clients must send `Authorization: Bearer <token>`:
|
|
162
|
+
export CARTOGRAPHY_HTTP_TOKEN=$(openssl rand -hex 32)
|
|
163
|
+
cartography-mcp --http --host 0.0.0.0 --port 3737 \
|
|
164
|
+
--allowed-hosts cartography.internal:3737 --token "$CARTOGRAPHY_HTTP_TOKEN"
|
|
165
|
+
```
|
|
166
|
+
> Binding a non-loopback `--host` **without** `--allowed-hosts` (DNS-rebinding) **or without
|
|
167
|
+
> `--token`** (`CARTOGRAPHY_HTTP_TOKEN`) is refused on purpose — it would leave the scanning
|
|
168
|
+
> tools open to anyone who can reach the host. Put it behind TLS / a reverse proxy for real
|
|
169
|
+
> deployments. The same flags work on `datasynx-cartography mcp` and the Smithery deployment.
|
|
170
|
+
|
|
171
|
+
**Vercel AI SDK** (provider-agnostic):
|
|
172
|
+
```ts
|
|
173
|
+
import { experimental_createMCPClient } from 'ai';
|
|
174
|
+
const mcp = await experimental_createMCPClient({
|
|
175
|
+
transport: { type: 'sse', url: 'http://127.0.0.1:3737/mcp' },
|
|
176
|
+
});
|
|
177
|
+
const tools = await mcp.tools(); // MCP tools → AI SDK tools, any model
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Frameworks without a config file** (CrewAI, AutoGen/MAF, LangGraph, Pydantic AI,
|
|
181
|
+
OpenAI Agents SDK, Smolagents, Vercel AI SDK) load MCP tools via their own adapters —
|
|
182
|
+
copy-paste snippets in **[docs/adapters.md](docs/adapters.md)**.
|
|
183
|
+
|
|
184
|
+
> Full documentation lives at **[datasynx.github.io/agentic-ai-cartography](https://datasynx.github.io/agentic-ai-cartography/)**
|
|
185
|
+
> — quickstart, the client matrix, MCP tools and CLI reference. Drop **[AGENTS.md](AGENTS.md)**
|
|
186
|
+
> into a repo to give coding agents the standard config block.
|
|
187
|
+
|
|
188
|
+
### Embed in your own app
|
|
189
|
+
|
|
190
|
+
```ts
|
|
191
|
+
import { createMcpServer, runStdio, createSemanticSearch, localDiscoveryFn, CartographyDB } from '@datasynx/agentic-ai-cartography';
|
|
192
|
+
|
|
193
|
+
const db = new CartographyDB('/path/to/cartography.db');
|
|
194
|
+
const server = createMcpServer({
|
|
195
|
+
db,
|
|
196
|
+
search: await createSemanticSearch(db), // semantic (sqlite-vec) + lexical fallback
|
|
197
|
+
discovery: localDiscoveryFn(), // deterministic, LLM-free scanners
|
|
198
|
+
});
|
|
199
|
+
await runStdio(server);
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
28
204
|
## What it does
|
|
29
205
|
|
|
30
206
|
```
|
|
@@ -68,7 +244,7 @@ Cartography runs natively on **Linux**, **macOS**, and **Windows** — no WSL re
|
|
|
68
244
|
| **DB service detection** | CLI probes (psql, mysql, etc.) | CLI probes | `Get-Service` + CLI probes |
|
|
69
245
|
| **Browser bookmarks** | `~/.config/google-chrome` + Snap/Flatpak | `~/Library/Application Support/...` | `%LOCALAPPDATA%\Google\Chrome\User Data` |
|
|
70
246
|
| **Firefox profiles** | `~/.mozilla/firefox` + Snap/Flatpak | `~/Library/.../Firefox/Profiles` | `%APPDATA%\Mozilla\Firefox\Profiles` |
|
|
71
|
-
| **Safety
|
|
247
|
+
| **Safety policy** | Read-only **allowlist** (POSIX parser) | Read-only **allowlist** (POSIX parser) | Read-only allowlist (PowerShell mutating-cmdlet denylist) |
|
|
72
248
|
|
|
73
249
|
---
|
|
74
250
|
|
|
@@ -82,19 +258,21 @@ Cartography runs natively on **Linux**, **macOS**, and **Windows** — no WSL re
|
|
|
82
258
|
| **Cloud Scanning** | AWS (EC2/RDS/EKS/S3), GCP (Compute/GKE/Cloud Run), Azure (AKS/WebApps), Kubernetes |
|
|
83
259
|
| **Human-in-the-Loop** | Chat with the agent mid-discovery: type `"hubspot windsurf"` to search for specific tools |
|
|
84
260
|
| **Export Formats** | Mermaid topology, D3.js interactive graph, Backstage YAML, JSON |
|
|
85
|
-
| **Safety First** |
|
|
261
|
+
| **Safety First** | Strict read-only **allowlist** (not a denylist): only known-safe commands run — shell-aware for POSIX *and* PowerShell, enforced at the command runner as defense-in-depth. 100% read-only |
|
|
86
262
|
|
|
87
263
|
---
|
|
88
264
|
|
|
89
265
|
## Requirements
|
|
90
266
|
|
|
91
|
-
- **Node.js >= 20** (Linux, macOS, or Windows)
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
267
|
+
- **Node.js >= 20** (Linux, macOS, or Windows) — that's it for the MCP server and the
|
|
268
|
+
deterministic, read-only discovery. **No LLM and no API key required.**
|
|
269
|
+
- **Optional — Claude CLI**, only for the richer Claude-driven discovery loop
|
|
270
|
+
(`datasynx-cartography discover`): `npm install -g @anthropic-ai/claude-code && claude login`.
|
|
271
|
+
- **Optional — semantic search** auto-upgrades when `sqlite-vec` and a local embedder
|
|
272
|
+
(`@huggingface/transformers`) are present; otherwise it falls back to lexical search.
|
|
273
|
+
These ship as `optionalDependencies` and are lazy-loaded, so installs that skip them
|
|
274
|
+
pay no cost. On startup the server logs `semantic search: ready` when the upgrade is
|
|
275
|
+
active, or names the missing dependency and that it is using lexical search when it isn't.
|
|
98
276
|
|
|
99
277
|
---
|
|
100
278
|
|
|
@@ -114,7 +292,7 @@ npm install -g @datasynx/agentic-ai-cartography
|
|
|
114
292
|
# Check all requirements (platform-aware)
|
|
115
293
|
datasynx-cartography doctor
|
|
116
294
|
|
|
117
|
-
# Discover your full infrastructure (
|
|
295
|
+
# Discover your full infrastructure (autonomous agent scan)
|
|
118
296
|
# → scans bookmarks, installed apps, local services, cloud, config files
|
|
119
297
|
# → then interactive follow-up: type tool names to search further
|
|
120
298
|
datasynx-cartography discover
|
|
@@ -142,7 +320,7 @@ datasynx-cartography discover [options]
|
|
|
142
320
|
--entry <hosts...> Start hosts (default: localhost)
|
|
143
321
|
--depth <n> Max crawl depth (default: 8)
|
|
144
322
|
--max-turns <n> Max agent turns (default: 50)
|
|
145
|
-
--model <m>
|
|
323
|
+
--model <m> LLM model (default: claude-sonnet-4-5-...)
|
|
146
324
|
--org <name> Org name for Backstage YAML
|
|
147
325
|
-o, --output <dir> Output directory (default: ./datasynx-output)
|
|
148
326
|
-v, --verbose Show agent reasoning
|
|
@@ -165,6 +343,10 @@ datasynx-cartography export [session-id] [options]
|
|
|
165
343
|
-o, --output <dir> Output directory
|
|
166
344
|
datasynx-cartography show [session-id] Session details + node list
|
|
167
345
|
datasynx-cartography sessions List all sessions
|
|
346
|
+
datasynx-cartography diff [base] [current] Topology drift between two sessions (default: two most recent)
|
|
347
|
+
datasynx-cartography drift [base] [current] Severity-classified drift alert → sink (default: stdout)
|
|
348
|
+
--min-severity <s> info | warning | critical (drop items below this)
|
|
349
|
+
--webhook <url> Outbound webhook sink (opt-in; token via CARTOGRAPHY_DRIFT_TOKEN)
|
|
168
350
|
datasynx-cartography bookmarks View all browser bookmarks
|
|
169
351
|
datasynx-cartography seed [--file <path>] Manually add infrastructure nodes
|
|
170
352
|
datasynx-cartography doctor Check all requirements + cloud CLIs
|
|
@@ -196,33 +378,60 @@ datasynx-output/
|
|
|
196
378
|
|
|
197
379
|
## Architecture
|
|
198
380
|
|
|
381
|
+
The **MCP server is the headline interface** — LLM-agnostic and the same SQLite graph
|
|
382
|
+
underneath every entry point. Discovery (deterministic scanners or the optional Claude
|
|
383
|
+
loop) writes the graph; any MCP host reads it.
|
|
384
|
+
|
|
199
385
|
```
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
386
|
+
┌──────────────────────────────────────────┐
|
|
387
|
+
MCP hosts ───────────►│ MCP server (src/mcp) — primary interface │
|
|
388
|
+
(Claude Code, │ Resources · Tools · Prompts │
|
|
389
|
+
Cursor, Cline, │ stdio + Streamable HTTP transports │
|
|
390
|
+
Windsurf, VS Code, └───────────────────┬──────────────────────┘
|
|
391
|
+
Vercel AI SDK, …) │
|
|
392
|
+
▼
|
|
393
|
+
CartographyDB (SQLite WAL, src/db)
|
|
394
|
+
recursive-CTE traversal · search · summary
|
|
395
|
+
▲
|
|
396
|
+
┌────────────────────────────┴────────────────────────────┐
|
|
397
|
+
│ │
|
|
398
|
+
Deterministic discovery (src/discovery, src/scanners) Optional Claude loop (src/agent)
|
|
399
|
+
bookmarks · installed-apps · local ports · DBs runDiscovery() — human-in-the-loop
|
|
400
|
+
LLM-free, registry-driven LLM + Bash + custom MCP tools
|
|
401
|
+
│ │
|
|
402
|
+
└──────────────────────────┬───────────────────────────────┘
|
|
403
|
+
▼
|
|
404
|
+
Platform layer (src/platform) + read-only allowlist (src/allowlist)
|
|
405
|
+
Shell/commands resolved per-OS · every command vetted before it runs
|
|
215
406
|
```
|
|
216
407
|
|
|
217
408
|
### Safety
|
|
218
409
|
|
|
219
|
-
|
|
410
|
+
v2.0 replaces the old "block bad commands" denylist with a **strict read-only allowlist**
|
|
411
|
+
(`src/allowlist.ts`): a command runs only if it is explicitly known to be safe. The check
|
|
412
|
+
is shell-aware and enforced in two places — the command runner itself (defense-in-depth)
|
|
413
|
+
and the Claude loop's `PreToolUse` hook.
|
|
220
414
|
|
|
221
|
-
**
|
|
415
|
+
- **POSIX:** parses the command line, resolves `sudo`/`env`/command-runners and brace
|
|
416
|
+
groups, and allows only read-only tools (`ss`, `lsof`, `ps`, `which`, `find`, DB
|
|
417
|
+
probes, cloud `describe/list/get`, `kubectl get/describe`, …). Redirections, pipes to
|
|
418
|
+
writers, and anything unrecognized are rejected.
|
|
419
|
+
- **Windows/PowerShell:** allows read-only cmdlets and rejects mutating ones
|
|
420
|
+
(`Remove-Item`, `Move-Item`, `Stop-Process`, `Stop-Service`, `Restart-Computer`,
|
|
421
|
+
`Format-Volume`, `Out-File`, `Set-Content`, …).
|
|
222
422
|
|
|
223
|
-
**
|
|
423
|
+
**Cartography only reads — never writes, never deletes.**
|
|
224
424
|
|
|
225
|
-
|
|
425
|
+
### Extending: scanner plugins
|
|
426
|
+
|
|
427
|
+
Add new discovery sources with **zero core changes** via the Scanner SPI. An out-of-tree
|
|
428
|
+
`@datasynx/scanner-*` package default-exports `definePlugin({ name, register })` and is
|
|
429
|
+
loaded **opt-in** (`config.plugins`, `--plugins`, or `CARTOGRAPHY_PLUGINS`) — a plugin that
|
|
430
|
+
is not named is never loaded. The host validates, namespaces (`plugin:<pkg>:<id>`), and
|
|
431
|
+
**enforces each scanner's declared `allowedCommands`** against the read-only allowlist; a
|
|
432
|
+
broken plugin is logged and skipped, never aborting discovery. See the authoring guide in
|
|
433
|
+
**[docs/plugins.md](docs/plugins.md)** and the template in
|
|
434
|
+
[`examples/scanner-template/`](examples/scanner-template/).
|
|
226
435
|
|
|
227
436
|
---
|
|
228
437
|
|
|
@@ -243,10 +452,68 @@ await runDiscovery(config, db, sessionId, onEvent, onAskUser, 'hubspot windsurf'
|
|
|
243
452
|
|
|
244
453
|
---
|
|
245
454
|
|
|
455
|
+
## Releasing
|
|
456
|
+
|
|
457
|
+
[`release.yml`](.github/workflows/release.yml) publishes to npm automatically on every push
|
|
458
|
+
to `main`, in one of **two modes** — auto-selected by which secrets are present:
|
|
459
|
+
|
|
460
|
+
- **`RELEASE_TOKEN` present → full [semantic-release](https://github.com/semantic-release/semantic-release).**
|
|
461
|
+
Version, `CHANGELOG.md`, git tag `v<version>`, GitHub Release and the provenance-signed npm
|
|
462
|
+
publish are all derived from [Conventional Commits](https://www.conventionalcommits.org/)
|
|
463
|
+
since the last tag (`fix:` → patch, `feat:` → minor, `feat!:`/`BREAKING CHANGE:` → major;
|
|
464
|
+
`docs/chore/refactor/test/ci` → no release). No manual version bumps. PR titles are linted
|
|
465
|
+
by [`pr-title.yml`](.github/workflows/pr-title.yml) so the squash-merge commit stays analyzable.
|
|
466
|
+
- **`RELEASE_TOKEN` absent → idempotent npm publish.** The `package.json` version is published
|
|
467
|
+
(provenance-signed) only when it isn't already on npm — so doc/refactor merges are no-ops.
|
|
468
|
+
Bump the version + merge to release.
|
|
469
|
+
|
|
470
|
+
> **Why two modes:** every commit here carries `.github/workflows/` files, and the Actions
|
|
471
|
+
> `GITHUB_TOKEN` may not push a git ref that touches workflow files (it can't hold the
|
|
472
|
+
> `workflow` scope). semantic-release pushes a tag, so it needs a workflow-scoped
|
|
473
|
+
> `RELEASE_TOKEN`. Until one exists, the idempotent publish keeps releases flowing with only
|
|
474
|
+
> `NPM_TOKEN`; adding `RELEASE_TOKEN` later upgrades to the full flow with no other changes.
|
|
475
|
+
|
|
476
|
+
Quality is gated independently by [`ci.yml`](.github/workflows/ci.yml) on every PR and push:
|
|
477
|
+
**lint/typecheck → test matrix (Node 20/22) + coverage → audit + license check → build &
|
|
478
|
+
validate (publint, [are-the-types-wrong](https://github.com/arethetypeswrong/arethetypeswrong.github.io),
|
|
479
|
+
ESM/CJS consumer smoke tests)**.
|
|
480
|
+
|
|
481
|
+
**Repository secrets** (*Settings → Secrets and variables → Actions*):
|
|
482
|
+
|
|
483
|
+
| Secret | Required | Purpose |
|
|
484
|
+
|---|---|---|
|
|
485
|
+
| `NPM_TOKEN` | **yes** | npm *Automation*/granular token with publish rights for the `@datasynx` scope. Provenance signing itself needs no secret (OIDC). |
|
|
486
|
+
| `RELEASE_TOKEN` | optional | PAT (classic: `repo` + `workflow`) or deploy key. Unlocks full semantic-release (auto-versioning, changelog, tags, GitHub Releases). Without it, the idempotent npm publish is used. |
|
|
487
|
+
| `CODECOV_TOKEN` | optional | Upload coverage to Codecov (non-blocking if absent). |
|
|
488
|
+
|
|
489
|
+
---
|
|
490
|
+
|
|
491
|
+
## Star History
|
|
492
|
+
|
|
493
|
+
<div align="center">
|
|
494
|
+
|
|
495
|
+
<a href="https://star-history.com/#datasynx/agentic-ai-cartography&Date">
|
|
496
|
+
<picture>
|
|
497
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=datasynx/agentic-ai-cartography&type=Date&theme=dark" />
|
|
498
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=datasynx/agentic-ai-cartography&type=Date" />
|
|
499
|
+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=datasynx/agentic-ai-cartography&type=Date" width="640" />
|
|
500
|
+
</picture>
|
|
501
|
+
</a>
|
|
502
|
+
|
|
503
|
+
</div>
|
|
504
|
+
|
|
505
|
+
---
|
|
506
|
+
|
|
246
507
|
## Built by
|
|
247
508
|
|
|
248
509
|
<div align="center">
|
|
249
510
|
|
|
511
|
+
<a href="https://www.linkedin.com/company/datasynx-ai/">
|
|
512
|
+
<img src="https://raw.githubusercontent.com/datasynx/agentic-ai-cartography/main/docs/assets/datasynx-mark.png" alt="Datasynx" width="72" />
|
|
513
|
+
</a>
|
|
514
|
+
|
|
515
|
+
<br/>
|
|
516
|
+
|
|
250
517
|
[](https://www.linkedin.com/company/datasynx-ai/)
|
|
251
518
|
|
|
252
519
|
</div>
|
|
@@ -256,3 +523,9 @@ await runDiscovery(config, db, sessionId, onEvent, onAskUser, 'hubspot windsurf'
|
|
|
256
523
|
## License
|
|
257
524
|
|
|
258
525
|
MIT — © [Datasynx AI](https://www.linkedin.com/company/datasynx-ai/)
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
## Related Projects
|
|
530
|
+
|
|
531
|
+
- [**agentic-ai-shadowing**](https://github.com/datasynx/agentic-ai-shadowing) — AI-powered agent session shadowing & replay
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
chromeLikeHistoryPaths,
|
|
4
|
+
chromeLikePaths,
|
|
5
|
+
cleanupTempFiles,
|
|
6
|
+
extractHost,
|
|
7
|
+
readChromeLike,
|
|
8
|
+
readChromiumHistory,
|
|
9
|
+
readFirefoxBookmarks,
|
|
10
|
+
readFirefoxHistory,
|
|
11
|
+
scanAllBookmarks,
|
|
12
|
+
scanAllHistory,
|
|
13
|
+
walkChrome
|
|
14
|
+
} from "./chunk-2SZ5QHGH.js";
|
|
15
|
+
export {
|
|
16
|
+
chromeLikeHistoryPaths,
|
|
17
|
+
chromeLikePaths,
|
|
18
|
+
cleanupTempFiles,
|
|
19
|
+
extractHost,
|
|
20
|
+
readChromeLike,
|
|
21
|
+
readChromiumHistory,
|
|
22
|
+
readFirefoxBookmarks,
|
|
23
|
+
readFirefoxHistory,
|
|
24
|
+
scanAllBookmarks,
|
|
25
|
+
scanAllHistory,
|
|
26
|
+
walkChrome
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=bookmarks-WXHE7GN7.js.map
|