@graphpilot-oss/graphpilot 0.0.1 → 1.0.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 (123) hide show
  1. package/CHANGELOG.md +72 -126
  2. package/README.md +290 -102
  3. package/dist/cli.js +41 -1
  4. package/dist/cli.js.map +1 -1
  5. package/dist/edges.js +22 -11
  6. package/dist/edges.js.map +1 -1
  7. package/dist/indexer.js +3 -3
  8. package/dist/indexer.js.map +1 -1
  9. package/dist/init.d.ts +28 -0
  10. package/dist/init.js +112 -0
  11. package/dist/init.js.map +1 -0
  12. package/dist/interactions.d.ts +5 -4
  13. package/dist/interactions.js +0 -0
  14. package/dist/interactions.js.map +1 -1
  15. package/dist/mcp.js +119 -90
  16. package/dist/mcp.js.map +1 -1
  17. package/dist/repo-resolve.d.ts +47 -0
  18. package/dist/repo-resolve.js +195 -0
  19. package/dist/repo-resolve.js.map +1 -0
  20. package/dist/storage.js +10 -1
  21. package/dist/storage.js.map +1 -1
  22. package/dist/symbols.js +26 -2
  23. package/dist/symbols.js.map +1 -1
  24. package/dist/validation.js +30 -4
  25. package/dist/validation.js.map +1 -1
  26. package/dist/validators.d.ts +1 -5
  27. package/dist/validators.js +0 -11
  28. package/dist/validators.js.map +1 -1
  29. package/dist/watcher.d.ts +10 -0
  30. package/dist/watcher.js +70 -7
  31. package/dist/watcher.js.map +1 -1
  32. package/examples/README.md +105 -0
  33. package/examples/claude-code/README.md +125 -0
  34. package/examples/claude-code/claude-routing.md +102 -0
  35. package/examples/claude-code/claude_config.json +8 -0
  36. package/examples/cline/.clinerules +39 -0
  37. package/examples/cline/README.md +104 -0
  38. package/examples/cline/cline_mcp_settings.json +10 -0
  39. package/examples/continue/.continuerules +39 -0
  40. package/examples/continue/README.md +98 -0
  41. package/examples/continue/config.json +13 -0
  42. package/examples/cursor/.cursorrules +39 -0
  43. package/examples/cursor/README.md +98 -0
  44. package/examples/cursor/mcp.json +11 -0
  45. package/examples/windsurf/.windsurfrules +39 -0
  46. package/examples/windsurf/README.md +85 -0
  47. package/examples/windsurf/mcp_config.json +8 -0
  48. package/package.json +14 -4
  49. package/.editorconfig +0 -15
  50. package/.github/CODEOWNERS +0 -22
  51. package/.github/FUNDING.yml +0 -1
  52. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -33
  53. package/.github/ISSUE_TEMPLATE/config.yml +0 -5
  54. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -23
  55. package/.github/PULL_REQUEST_TEMPLATE.md +0 -19
  56. package/.github/dependabot.yml +0 -15
  57. package/.github/workflows/ci.yml +0 -62
  58. package/.github/workflows/release.yml +0 -50
  59. package/.prettierignore +0 -19
  60. package/.prettierrc.json +0 -20
  61. package/CODE_OF_CONDUCT.md +0 -83
  62. package/CONTRIBUTING.md +0 -111
  63. package/bench/README.md +0 -544
  64. package/bench/results/agent-tier-2026-05-22.md +0 -28
  65. package/bench/results/agent-tier-summary.md +0 -44
  66. package/bench/results/baseline-tier-2026-05-22.md +0 -23
  67. package/bench/results/baseline.json +0 -810
  68. package/bench/results/baseline.md +0 -28
  69. package/bench/run-agent-tier-automated.ts +0 -234
  70. package/bench/run-agent-tier.md +0 -125
  71. package/bench/run-baseline-tier.ts +0 -200
  72. package/bench/run.ts +0 -210
  73. package/bench/runner-baseline.ts +0 -177
  74. package/bench/runner-graphpilot.ts +0 -131
  75. package/bench/score-agent-tier.ts +0 -191
  76. package/bench/score.ts +0 -59
  77. package/bench/tasks.ts +0 -236
  78. package/dist/provenance.d.ts +0 -74
  79. package/dist/provenance.js +0 -95
  80. package/dist/provenance.js.map +0 -1
  81. package/docs/architecture.md +0 -311
  82. package/docs/limitations.md +0 -156
  83. package/docs/mcp-setup.md +0 -231
  84. package/docs/quickstart.md +0 -202
  85. package/eslint.config.js +0 -148
  86. package/lefthook.yml +0 -81
  87. package/pnpm-workspace.yaml +0 -6
  88. package/scripts/smoke-stdio.mjs +0 -97
  89. package/src/cli.ts +0 -171
  90. package/src/edges.ts +0 -202
  91. package/src/git.ts +0 -255
  92. package/src/graph-schema.ts +0 -229
  93. package/src/impact.ts +0 -218
  94. package/src/indexer.ts +0 -152
  95. package/src/interactions.ts +0 -0
  96. package/src/mcp.ts +0 -652
  97. package/src/parser.ts +0 -138
  98. package/src/provenance.ts +0 -115
  99. package/src/query.ts +0 -148
  100. package/src/redact.ts +0 -122
  101. package/src/storage.ts +0 -115
  102. package/src/symbols.ts +0 -173
  103. package/src/validation.ts +0 -69
  104. package/src/validators.ts +0 -253
  105. package/src/watcher.ts +0 -383
  106. package/tests/edges.test.ts +0 -175
  107. package/tests/fixtures/sample.ts +0 -32
  108. package/tests/git.test.ts +0 -303
  109. package/tests/graph-schema.test.ts +0 -321
  110. package/tests/impact.test.ts +0 -454
  111. package/tests/interactions.test.ts +0 -180
  112. package/tests/lint-policy.test.ts +0 -106
  113. package/tests/mcp-stdio.test.ts +0 -171
  114. package/tests/mcp.test.ts +0 -335
  115. package/tests/parser.test.ts +0 -31
  116. package/tests/provenance.test.ts +0 -132
  117. package/tests/query.test.ts +0 -160
  118. package/tests/redact.test.ts +0 -167
  119. package/tests/security.test.ts +0 -144
  120. package/tests/symbols.test.ts +0 -78
  121. package/tests/validators.test.ts +0 -193
  122. package/tests/watcher.test.ts +0 -250
  123. package/tsconfig.json +0 -18
@@ -1,5 +0,0 @@
1
- blank_issues_enabled: false
2
- contact_links:
3
- - name: Discussion / Question
4
- url: https://github.com/graphpilot-oss/graphpilot/discussions
5
- about: Ask questions or share ideas in Discussions instead of opening an issue.
@@ -1,23 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest a new feature or improvement
4
- title: 'feat: '
5
- labels: enhancement
6
- ---
7
-
8
- ## What problem does this solve?
9
-
10
- Describe the real-world task or pain point that motivates this feature.
11
- "My coding agent struggles with X" is more useful than "GraphPilot should support X."
12
-
13
- ## Proposed solution
14
-
15
- What you'd like to see. Rough sketch is fine.
16
-
17
- ## Alternatives considered
18
-
19
- What workarounds have you tried? Any other tools that solve this well?
20
-
21
- ## Additional context
22
-
23
- Links, screenshots, examples.
@@ -1,19 +0,0 @@
1
- ## What
2
-
3
- Brief description of the change.
4
-
5
- ## Why
6
-
7
- What problem does this solve? Link to issue: closes #...
8
-
9
- ## How
10
-
11
- Brief explanation of the approach. Anything reviewers should look at carefully?
12
-
13
- ## Checklist
14
-
15
- - [ ] Tests added/updated
16
- - [ ] Documentation updated if user-facing behavior changed
17
- - [ ] `CHANGELOG.md` updated under `[Unreleased]`
18
- - [ ] CI passes (`pnpm build && pnpm test`)
19
- - [ ] Commit message follows [Conventional Commits](https://www.conventionalcommits.org)
@@ -1,15 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: npm
4
- directory: '/'
5
- schedule:
6
- interval: weekly
7
- open-pull-requests-limit: 5
8
- groups:
9
- dev-dependencies:
10
- dependency-type: development
11
-
12
- - package-ecosystem: github-actions
13
- directory: '/'
14
- schedule:
15
- interval: monthly
@@ -1,62 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- pull_request:
5
- push:
6
- branches: [main]
7
-
8
- jobs:
9
- lint:
10
- name: lint (ESLint — enforces no-network in src/, T12)
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v6
14
- - uses: pnpm/action-setup@v6
15
- - uses: actions/setup-node@v6
16
- with:
17
- node-version: 22
18
- cache: pnpm
19
- - run: pnpm install --frozen-lockfile
20
- - run: pnpm typecheck
21
- - run: pnpm lint
22
-
23
- test:
24
- name: test (${{ matrix.os }}, node ${{ matrix.node }})
25
- needs: lint
26
- strategy:
27
- fail-fast: false
28
- matrix:
29
- os: [ubuntu-latest, macos-latest, windows-latest]
30
- node: [20, 22]
31
- runs-on: ${{ matrix.os }}
32
- steps:
33
- - uses: actions/checkout@v6
34
-
35
- - uses: pnpm/action-setup@v6
36
-
37
- - uses: actions/setup-node@v6
38
- with:
39
- node-version: ${{ matrix.node }}
40
- cache: pnpm
41
-
42
- - name: Install dependencies
43
- run: pnpm install --frozen-lockfile
44
-
45
- - name: Build
46
- run: pnpm build
47
-
48
- - name: Test
49
- run: pnpm test
50
-
51
- audit:
52
- name: audit
53
- runs-on: ubuntu-latest
54
- steps:
55
- - uses: actions/checkout@v6
56
- - uses: pnpm/action-setup@v6
57
- - uses: actions/setup-node@v6
58
- with:
59
- node-version: 22
60
- cache: pnpm
61
- - run: pnpm install --frozen-lockfile
62
- - run: pnpm audit --audit-level=high
@@ -1,50 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*'
7
-
8
- permissions:
9
- contents: write
10
- id-token: write
11
-
12
- jobs:
13
- publish:
14
- runs-on: ubuntu-latest
15
- steps:
16
- - uses: actions/checkout@v6
17
-
18
- - uses: pnpm/action-setup@v6
19
-
20
- - uses: actions/setup-node@v6
21
- with:
22
- node-version: 22
23
- cache: pnpm
24
- registry-url: 'https://registry.npmjs.org'
25
-
26
- - run: pnpm install --frozen-lockfile
27
-
28
- - run: pnpm run check
29
-
30
- - run: pnpm build
31
-
32
- # Test tags (e.g. v0.0.1-test) publish under --tag test, not latest
33
- - name: Publish (test tag)
34
- if: contains(github.ref_name, '-test')
35
- run: pnpm publish --no-git-checks --tag test
36
- env:
37
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
38
-
39
- # Real releases publish normally with provenance
40
- - name: Publish (release)
41
- if: "!contains(github.ref_name, '-test')"
42
- run: pnpm publish --no-git-checks --provenance
43
- env:
44
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
45
-
46
- # Only create a GitHub Release for real tags, not test ones
47
- - uses: softprops/action-gh-release@v3
48
- if: "!contains(github.ref_name, '-test')"
49
- with:
50
- generate_release_notes: true
package/.prettierignore DELETED
@@ -1,19 +0,0 @@
1
- # Don't reformat:
2
- node_modules/
3
- dist/
4
- coverage/
5
-
6
- # Lockfiles + generated data are not human-edited.
7
- pnpm-lock.yaml
8
- package-lock.json
9
- yarn.lock
10
-
11
- # Benchmark output is generated by `pnpm bench` — prettier would
12
- # pointlessly reformat the JSON every run.
13
- bench/results/
14
-
15
- # Private notes are not part of the project, don't touch.
16
- .notes/
17
-
18
- # CLAUDE.md is per-developer + gitignored, leave alone.
19
- CLAUDE.md
package/.prettierrc.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "semi": true,
3
- "singleQuote": true,
4
- "trailingComma": "all",
5
- "printWidth": 100,
6
- "tabWidth": 2,
7
- "useTabs": false,
8
- "arrowParens": "always",
9
- "endOfLine": "lf",
10
- "bracketSpacing": true,
11
- "overrides": [
12
- {
13
- "files": "*.md",
14
- "options": {
15
- "proseWrap": "preserve",
16
- "printWidth": 80
17
- }
18
- }
19
- ]
20
- }
@@ -1,83 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- - Demonstrating empathy and kindness toward other people
14
- - Being respectful of differing opinions, viewpoints, and experiences
15
- - Giving and gracefully accepting constructive feedback
16
- - Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- - Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- - The use of sexualized language or imagery, and sexual attention or advances of any kind
22
- - Trolling, insulting or derogatory comments, and personal or political attacks
23
- - Public or private harassment
24
- - Publishing others' private information, such as a physical or email address, without their explicit permission
25
- - Other conduct which could reasonably be considered inappropriate in a professional setting
26
-
27
- ## Enforcement Responsibilities
28
-
29
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30
-
31
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32
-
33
- ## Scope
34
-
35
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36
-
37
- ## Enforcement
38
-
39
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at codewithakki@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
40
-
41
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42
-
43
- ## Enforcement Guidelines
44
-
45
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46
-
47
- ### 1. Correction
48
-
49
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50
-
51
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52
-
53
- ### 2. Warning
54
-
55
- **Community Impact**: A violation through a single incident or series of actions.
56
-
57
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58
-
59
- ### 3. Temporary Ban
60
-
61
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62
-
63
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64
-
65
- ### 4. Permanent Ban
66
-
67
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68
-
69
- **Consequence**: A permanent ban from any sort of public interaction within the community.
70
-
71
- ## Attribution
72
-
73
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
74
-
75
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
76
-
77
- For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
78
-
79
- [homepage]: https://www.contributor-covenant.org
80
- [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
81
- [Mozilla CoC]: https://github.com/mozilla/diversity
82
- [FAQ]: https://www.contributor-covenant.org/faq
83
- [translations]: https://www.contributor-covenant.org/translations
package/CONTRIBUTING.md DELETED
@@ -1,111 +0,0 @@
1
- # Contributing to GraphPilot
2
-
3
- Thanks for your interest! GraphPilot is young — every contribution helps shape it.
4
-
5
- ## Before you start
6
-
7
- - For non-trivial changes, **open an issue first** so we can discuss the approach before
8
- you spend time writing code.
9
- - Look for the [`good first issue`](../../labels/good%20first%20issue) label.
10
- - Read the [README](README.md) to understand the project shape.
11
-
12
- ## Development setup
13
-
14
- ```bash
15
- git clone https://github.com/graphpilot-oss/graphpilot.git
16
- cd graphpilot
17
- pnpm install
18
- pnpm build
19
- pnpm test
20
- ```
21
-
22
- You need Node.js 20+ and pnpm 9+.
23
-
24
- ## Running locally against Claude Code
25
-
26
- Once the MCP server is in (it's not yet, as of this writing), point Claude Code at
27
- your local build by adding to `~/.claude.json`:
28
-
29
- ```jsonc
30
- {
31
- "mcpServers": {
32
- "graphpilot-dev": {
33
- "command": "node",
34
- "args": ["/absolute/path/to/graphpilot/dist/cli.js", "mcp"],
35
- },
36
- },
37
- }
38
- ```
39
-
40
- Restart Claude Code.
41
-
42
- ## Commit style
43
-
44
- We use [Conventional Commits](https://www.conventionalcommits.org):
45
-
46
- - `feat: add gp_callers tool`
47
- - `fix: handle empty TS files gracefully`
48
- - `docs: clarify mcp setup for Cursor`
49
- - `test: add fixture for re-exports`
50
- - `chore: bump deps`
51
- - `refactor: simplify symbol id format`
52
-
53
- One topic per commit. Commit messages explain the _why_, not just the _what_.
54
-
55
- ## Pull requests
56
-
57
- 1. Fork the repo.
58
- 2. Create a branch: `git checkout -b feat/your-feature`.
59
- 3. Make your changes; add tests for any new behavior.
60
- 4. Run `pnpm test` and `pnpm build` — both must pass.
61
- 5. Update [CHANGELOG.md](CHANGELOG.md) under the `[Unreleased]` section.
62
- 6. Open a PR with a clear description (what + why; link the issue).
63
- 7. CI must pass. At least one maintainer review is required before merge.
64
-
65
- ## Code style
66
-
67
- - TypeScript strict mode, no `any` unless commented why.
68
- - 2-space indent, single quotes, trailing commas where valid (matches `.editorconfig`).
69
- - One thing per file. If a file passes ~300 lines, consider splitting it.
70
- - Tests next to code in `tests/`. Fixtures in `tests/fixtures/`.
71
-
72
- ## Security
73
-
74
- GraphPilot reads code from people's repos and exposes a memory layer to AI agents.
75
- That means it's an attractive target for both supply-chain attacks and prompt-injection
76
- via crafted code. Before you contribute:
77
-
78
- - **Read [SECURITY.md](SECURITY.md)** for how to report vulnerabilities privately.
79
- - **No network code in `src/`.** Local-first is a user promise. If a feature seems to
80
- need the network, open a Discussion first.
81
- - **No `child_process` / `exec` / `spawn`.** We don't shell out, ever.
82
- - **Validate every input that crosses a trust boundary.** Files on disk, CLI args, and
83
- (when the MCP server lands) tool arguments are all untrusted by default.
84
- - **No telemetry, analytics, or "anonymous usage stats."** Not by default, not behind
85
- a flag, not at all in v1.
86
-
87
- PRs that introduce network calls, child processes, eval, dynamic require, or unvalidated
88
- file-path arguments will be rejected unless there's a written threat-model justification
89
- in the PR description.
90
-
91
- ## What we are NOT doing in v1
92
-
93
- Please don't open PRs that add:
94
-
95
- - Cross-repo indexing
96
- - A query DSL
97
- - A web visualization
98
- - Watch mode (manual re-index is fine for v1)
99
- - Stack Graphs / production-grade name resolution
100
- - Languages other than TS/JS
101
-
102
- These are explicitly deferred. Keeping v1 small is the only way it ships.
103
-
104
- ## Code of Conduct
105
-
106
- By participating you agree to [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
107
-
108
- ## Questions
109
-
110
- Open a [Discussion](../../discussions) for general questions; open an
111
- [Issue](../../issues) for bugs.