@antodevs/groundtruth 0.1.0 → 0.1.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Anto
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -4,9 +4,36 @@
4
4
 
5
5
  > Zero-configuration context injection layer for LLM-based coding agents.
6
6
 
7
- ![npm](https://img.shields.io/npm/v/groundtruth)
8
- ![license](https://img.shields.io/npm/l/groundtruth)
9
- ![node](https://img.shields.io/node/v/groundtruth)
7
+ ![npm](https://img.shields.io/npm/v/@antodevs/groundtruth)
8
+ ![github license](https://img.shields.io/github/license/anto0102/GroundTruth)
9
+ ![node version](https://img.shields.io/badge/node-%3E%3D18.0.0-blue)
10
+
11
+ ---
12
+
13
+ ## Quick Start (No Install)
14
+
15
+ Run GroundTruth instantly via `npx`:
16
+
17
+ ### 1. Antigravity Mode (AI Watcher)
18
+ Recommended for automated context injection and skills-based workflows.
19
+
20
+ ```bash
21
+ npx @antodevs/groundtruth --antigravity
22
+ ```
23
+
24
+ ### 2. Proxy Mode (Claude Code)
25
+ Intercepts outbound API calls and injects fresh documentation directly into the message payload.
26
+
27
+ ```bash
28
+ npx @antodevs/groundtruth --port 8080
29
+ ```
30
+
31
+ ## Installation
32
+
33
+ To install globally:
34
+ ```bash
35
+ npm install -g @antodevs/groundtruth
36
+ ```
10
37
 
11
38
  ---
12
39
 
@@ -66,7 +93,7 @@ flowchart TD
66
93
  - **Intelligent Chunking**: Groups the filtered dependencies in configurable size batches (default 3) and uniquely hashes them to avoid redundant context-fetching loops unless changes are detected.
67
94
  - **Automated Polling**: Periodically fetches updated documentation for the detected stack chunks in parallel.
68
95
  - **State Persistence**: Hashes are serialized persistently avoiding redundant DuckDuckGo scraping operations across application crashes.
69
- - **Block-Based Synchronization**: Writes the parsed context discretely into hash-oriented blocks inside `~/.gemini/GEMINI.md`. Native POSIX bindings are leveraged ensuring `Atomic Writes`. Stale contexts are efficiently garbage-collected via regex matching over tracked batch hashes.
96
+ - **Block-Based Synchronization**: Writes the parsed context discretely into hash-oriented blocks inside `~/.gemini/GEMINI.md`. Native POSIX bindings and intra-device temporary files are leveraged ensuring `Atomic Writes` without EXDEV link errors. Stale contexts are efficiently garbage-collected via regex matching over tracked batch hashes.
70
97
 
71
98
  ---
72
99
 
@@ -80,7 +107,7 @@ npx groundtruth --claude-code
80
107
  # Execute your agent in a separate TTY
81
108
  claude
82
109
  ```
83
- > **Note:** The daemon automatically mutates your shell environment (`~/.zshrc`, `~/.bashrc`, `config.fish`) to route traffic through the localhost proxy.
110
+ > **Note:** The daemon automatically mutates your shell environment (`~/.zshrc`, `~/.bashrc`, `~/.bash_profile`, `~/.config/fish/config.fish`) to route traffic through the localhost proxy.
84
111
 
85
112
  ### Usage with Antigravity / Gemini
86
113
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antodevs/groundtruth",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Lightweight Node.js proxy to intercept API requests from coding agents and inject fresh web context",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -45,4 +45,4 @@
45
45
  "linkedom": "^0.18.12",
46
46
  "node-fetch": "^3.3.2"
47
47
  }
48
- }
48
+ }
@@ -48,8 +48,8 @@ core_modules:
48
48
  - name: cli.js
49
49
  responsibilities:
50
50
  - "Process `process.argv` argument parsing."
51
- - "Validation and defaulting of arguments (`--port`, `--interval`, `--batch-size`)."
52
- - "Help/Docs Screen rendering and early exit conditions."
51
+ - "Validation and defaulting of arguments (`--port`, `--interval`, `--batch-size`, `--claude-code`, `--antigravity`)."
52
+ - "Help/Docs Screen rendering and early exit conditions with aesthetic formatting inspired by Claude Code."
53
53
 
54
54
  - name: search.js
55
55
  responsibilities:
@@ -65,8 +65,8 @@ core_modules:
65
65
  responsibilities:
66
66
  - "Read local Node modules context (`package.json`)."
67
67
  - "Clean semantic versions (e.g., `^1.2.3` -> `1.2`)."
68
- - "Filter out non-informative tooling (`vite`, `prettier`, `eslint`)."
69
- - "Group dependencies into manageable batches (`groupIntoBatches`)."
68
+ - "Filter out non-informative tooling (`vite`, `prettier`, `eslint`, `plugin`, `adapter`, `check`)."
69
+ - "Group dependencies into manageable batches (default: 3) prioritizing core dependencies over devDependencies."
70
70
  - "Generate deterministic MD5 identifiers per batch for block management (`batchHash`)."
71
71
  - "Construct search queries based on dependency batches plus temporal identifiers (`latest 2026`)."
72
72
 
@@ -109,7 +109,7 @@ core_modules:
109
109
 
110
110
  - name: utils/atomic-write.js
111
111
  responsibilities:
112
- - "Creates temporary file blocks performing `fs.rename` (POSIX) or falls back to standard `fs.copyFile` safe-copies (Windows)."
112
+ - "Creates temporary file blocks inside the target's directory (to prevent EXDEV cross-device link errors) performing `fs.rename` (POSIX) or safe-copies (Windows)."
113
113
 
114
114
  dependencies:
115
115
  runtime: "Node.js >= 18.0.0 (uses ES Modules)"
@@ -17,7 +17,7 @@ import path from 'path';
17
17
  */
18
18
  export async function atomicWrite(filePath, content, options = {}) {
19
19
  const { backup = true, mode = 0o644 } = options;
20
- const tempFile = path.join(tmpdir(), `.gt-${Date.now()}-${Math.random().toString(36).slice(2)}.tmp`);
20
+ const tempFile = path.join(path.dirname(filePath), `.gt-${Date.now()}-${Math.random().toString(36).slice(2)}.tmp`);
21
21
  const backupPath = `${filePath}.bak`;
22
22
 
23
23
  try {