carto-md 1.1.1 → 1.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/CONTRIBUTING.md CHANGED
@@ -10,23 +10,32 @@ Carto is free, open source, and community-maintained. The core team owns the mer
10
10
 
11
11
  New language support lives in `src/extractors/languages/`. Each language is an isolated module.
12
12
 
13
- Currently supported: JavaScript/TypeScript, Python, R.
13
+ Currently supported: JavaScript/TypeScript, Python, Go, R.
14
14
 
15
- Wanted: Go, Rust, Ruby, Java, PHP, C#.
15
+ Wanted: Rust, Ruby, Java, PHP, C#, Swift, Kotlin.
16
16
 
17
17
  ### Tier 2 — Framework extractors (safe to add, easy to review)
18
18
 
19
19
  Framework-specific route and model extraction lives in `src/extractors/`. Each framework is an isolated module.
20
20
 
21
- Currently supported: FastAPI, Express, Next.js App Router, Prisma, tRPC, HTML fetch(), Plumber, Shiny.
21
+ Currently supported:
22
+ - **JS/TS**: Express, Next.js (App + Pages Router), tRPC, Drizzle, Zod
23
+ - **Python**: FastAPI, Pydantic, SQLAlchemy, Django (models + URLs)
24
+ - **Go**: Gin, Echo, Chi, net/http
25
+ - **Schema**: Prisma
26
+ - **Frontend**: HTML fetch()
27
+ - **R**: Plumber, Shiny, R6, S7
22
28
 
23
- Wanted: Django, Rails, Laravel, NestJS, Hono, Gin, Spring.
29
+ Wanted: Rails, Laravel, NestJS, Hono, Spring, Flask, Fastify.
24
30
 
25
31
  ### Tier 3 — Core (review carefully before merging)
26
32
 
27
33
  - `src/agents/merger.js` — merger logic. One bad merge = developer loses manual notes = project dies.
28
34
  - `src/agents/domains.js` — graph-based domain clustering. Wrong clusters = wrong context files.
35
+ - `src/engine/carto.js` — programmatic module API. Breaking changes affect tools that import Carto.
29
36
  - `src/mcp/server.js` — MCP server tools. Breaking changes affect Kiro/Cursor/Claude integration.
37
+ - `src/engine/incremental.js` — incremental graph update engine. Bugs here cause stale graphs.
38
+ - `src/cache/` — file hash + graph cache. Bugs here cause wrong re-index behavior.
30
39
  - `src/detector/` — framework detection logic.
31
40
  - `src/cli/` — CLI commands.
32
41
 
@@ -36,23 +45,27 @@ Wanted: Django, Rails, Laravel, NestJS, Hono, Gin, Spring.
36
45
 
37
46
  1. Create `src/extractors/languages/yourlanguage.js`
38
47
  2. Export a plugin object:
48
+
39
49
  ```js
40
50
  module.exports = {
41
51
  name: 'yourlanguage',
42
52
  extensions: ['.ext'],
43
53
  extract(content, relPath) {
44
54
  return {
45
- routes: [{ method, path, functionName }],
46
- models: [{ className, fields: [{ name, type }] }],
47
- functions: [{ name, params, returnType }],
48
- envVars: ['VAR_NAME'],
49
- dbTables: [{ tableName, modelName }],
50
- fetches: [],
51
- storageKeys: []
55
+ routes: [{ method, path, functionName }],
56
+ models: [{ className, fields: [{ name, type }], kind: 'yourlanguage' }],
57
+ functions: [{ name, params, returnType }],
58
+ envVars: ['VAR_NAME'],
59
+ dbTables: [{ tableName, modelName }],
60
+ fetches: [],
61
+ storageKeys: [],
62
+ events: [{ type: 'listener'|'emitter', event: 'event.name' }],
63
+ jobs: [{ type: 'cron'|'queue'|'interval', expression?: '* * * * *', name?: 'job-name' }],
52
64
  };
53
65
  }
54
66
  };
55
67
  ```
68
+
56
69
  3. The loader auto-discovers it — no changes to `loader.js` needed
57
70
  4. Test on at least 3 real open-source projects
58
71
  5. Open a PR with before/after AGENTS.md examples
@@ -96,7 +109,7 @@ cd carto
96
109
  npm install
97
110
  node src/cli/index.js init # test in any project
98
111
  node src/cli/index.js serve # test MCP server
99
- npm test # run test suite
112
+ npm test # run test suite (30 tests)
100
113
  ```
101
114
 
102
115
  ---
@@ -105,6 +118,7 @@ npm test # run test suite
105
118
 
106
119
  - [ ] Tested on at least 2-3 real open-source projects
107
120
  - [ ] Before/after AGENTS.md included in PR description
121
+ - [ ] Plugin returns all fields including `events` and `jobs` (can be empty arrays)
108
122
  - [ ] No changes to merger logic (unless explicitly fixing a merger bug)
109
123
  - [ ] No network calls added
110
124
  - [ ] `carto --version` still works