agentic-diff 0.0.0-stage → 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.
Files changed (69) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +61 -2
  3. package/bin/agentic-diff.js +51 -0
  4. package/dist/THIRD-PARTY-LICENSES.txt +1622 -0
  5. package/dist/cli.js +20019 -0
  6. package/dist/web/assets/FileEditor-B0Fp6d7u.js +12 -0
  7. package/dist/web/assets/c-Cz4nF6n_.js +1 -0
  8. package/dist/web/assets/c-SSSlmE39.js +1 -0
  9. package/dist/web/assets/cpp-DK5F0KO4.js +1 -0
  10. package/dist/web/assets/cpp-pF_afpy8.js +1 -0
  11. package/dist/web/assets/csharp-dmMxLVLW.js +1 -0
  12. package/dist/web/assets/css-BGIxQoYs.js +1 -0
  13. package/dist/web/assets/css-DgaLhXQH.js +1 -0
  14. package/dist/web/assets/diff-woXpYk--.js +1 -0
  15. package/dist/web/assets/docker-IyjqRm3v.js +1 -0
  16. package/dist/web/assets/go-rLFTqkRN.js +1 -0
  17. package/dist/web/assets/graphql-B6MI3425.js +1 -0
  18. package/dist/web/assets/graphql-CZGc4LE7.js +1 -0
  19. package/dist/web/assets/highlight.worker-DsmjLvrc.js +152 -0
  20. package/dist/web/assets/html-Bv1KyTF7.js +1 -0
  21. package/dist/web/assets/html-DZNlqGBh.js +1 -0
  22. package/dist/web/assets/index-D0ZmF7ZG.js +62 -0
  23. package/dist/web/assets/index-DPhBN0Cd.css +1 -0
  24. package/dist/web/assets/ini-B5eOa1yu.js +1 -0
  25. package/dist/web/assets/java-BtIQNnN0.js +1 -0
  26. package/dist/web/assets/java-_ATy9zCa.js +1 -0
  27. package/dist/web/assets/javascript-BzbQS41l.js +1 -0
  28. package/dist/web/assets/javascript-CpIGwZ_Y.js +1 -0
  29. package/dist/web/assets/json-B88Oqtu5.js +1 -0
  30. package/dist/web/assets/json-C3WlssX3.js +1 -0
  31. package/dist/web/assets/jsonc-CYpm1nAK.js +1 -0
  32. package/dist/web/assets/jsx-C4yDKi0A.js +1 -0
  33. package/dist/web/assets/jsx-D3KKoC5L.js +1 -0
  34. package/dist/web/assets/kotlin-DhhofPvG.js +1 -0
  35. package/dist/web/assets/less-DVTAwKKz.js +1 -0
  36. package/dist/web/assets/lua-B0e3uOiv.js +1 -0
  37. package/dist/web/assets/lua-pjIdZuk8.js +1 -0
  38. package/dist/web/assets/make-Dixweg8N.js +1 -0
  39. package/dist/web/assets/markdown-BYOwaDjH.js +1 -0
  40. package/dist/web/assets/mona-sans-latin-ext-wght-normal-BqSk0Z3x.woff2 +0 -0
  41. package/dist/web/assets/mona-sans-latin-wght-normal-Pz49MTQZ.woff2 +0 -0
  42. package/dist/web/assets/mona-sans-vietnamese-wght-normal-DsUdksa4.woff2 +0 -0
  43. package/dist/web/assets/monaspace-neon-latin-400-normal-BZtV1wRa.woff2 +0 -0
  44. package/dist/web/assets/monaspace-neon-latin-400-normal-DVFelWsN.woff +0 -0
  45. package/dist/web/assets/monaspace-neon-latin-600-normal-BVZIHbcX.woff2 +0 -0
  46. package/dist/web/assets/monaspace-neon-latin-600-normal-De8kyBBo.woff +0 -0
  47. package/dist/web/assets/php-DF09G6va.js +1 -0
  48. package/dist/web/assets/python-gzcpVVnB.js +1 -0
  49. package/dist/web/assets/ruby-DTsUOT9k.js +1 -0
  50. package/dist/web/assets/rust-DpiIf5JO.js +1 -0
  51. package/dist/web/assets/scss-CJjWJ-Oh.js +1 -0
  52. package/dist/web/assets/shellscript-CVTB3cr6.js +1 -0
  53. package/dist/web/assets/shellscript-CqHdAlCp.js +1 -0
  54. package/dist/web/assets/sql-CNu3Or2W.js +1 -0
  55. package/dist/web/assets/sql-CfM2IJm3.js +1 -0
  56. package/dist/web/assets/svelte-WzWoEqq1.js +1 -0
  57. package/dist/web/assets/swift-CyEgAFGc.js +1 -0
  58. package/dist/web/assets/toml-CcmNWLt0.js +1 -0
  59. package/dist/web/assets/tsx-BOvsFOI6.js +1 -0
  60. package/dist/web/assets/tsx-CGosfAUg.js +1 -0
  61. package/dist/web/assets/typescript-Bb1J8qyy.js +1 -0
  62. package/dist/web/assets/typescript-j_1H8WHN.js +1 -0
  63. package/dist/web/assets/vue-B13xn98T.js +1 -0
  64. package/dist/web/assets/xml-Bvlx11yh.js +1 -0
  65. package/dist/web/assets/xml-Byfru430.js +1 -0
  66. package/dist/web/assets/yaml-DDA_XMNu.js +1 -0
  67. package/dist/web/assets/yaml-DijMHRDA.js +1 -0
  68. package/dist/web/index.html +14 -0
  69. package/package.json +31 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ivlad003
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
@@ -1,3 +1,62 @@
1
- # Temporary Holding Version
1
+ # agentic-diff
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A local, GitHub-like compare page for your own repository: branches, commits, the index and the working tree, with line comments, an AI agent you can ask about the changes, and edits you apply with a click.
4
+
5
+ It runs on your machine, opens in your browser, and listens on `127.0.0.1` only.
6
+
7
+ ## Requirements
8
+
9
+ - Node.js 26 or newer
10
+ - git 2.38 or newer
11
+
12
+ ## Use
13
+
14
+ In any git repository:
15
+
16
+ ```bash
17
+ npx agentic-diff
18
+ ```
19
+
20
+ | Command | What it shows |
21
+ |---|---|
22
+ | `agentic-diff` | HEAD against the working tree |
23
+ | `agentic-diff main...feature` | what `feature` changed since it branched off `main` |
24
+ | `agentic-diff main..feature` | the direct diff of two revisions |
25
+ | `agentic-diff HEAD..:staged` | what is staged |
26
+ | `agentic-diff :staged` | what is not staged yet |
27
+ | `agentic-diff pr:185` | pull request 185 of the repository's remote, without checking it out |
28
+ | `agentic-diff -C <path> …` | another repository |
29
+ | `agentic-diff open '<link>'` | a shared link, or a GitHub URL (`…/compare/a...b`, `…/pull/N`) |
30
+ | `agentic-diff --no-open …` | print the address instead of opening the browser |
31
+ | `agentic-diff doctor` | check the environment; with `--agents`, also start each configured agent |
32
+ | `agentic-diff stop` | stop the background server |
33
+
34
+ One background server per user serves every repository you open. It stops with `agentic-diff stop`, or by itself after 30 minutes without an open page. Its state lives in `~/.agentic-diff/` (`AGENTIC_DIFF_HOME` names another directory).
35
+
36
+ ## What is in it
37
+
38
+ - Unified and split diffs with syntax colours, changed words, expandable context, a file tree, "viewed" marks and links to lines.
39
+ - Comments on lines, ranges and files, with replies, resolving and suggestions. They are stored in `.git/agentic-diff/` of the repository: never committed, gone with the clone.
40
+ - **Apply suggestion** and an in-page editor write to the working tree; every write is listed and can be undone.
41
+ - Staging and committing from the page, with your hooks, identity and signing as in a terminal.
42
+ - Pull requests from GitHub: review conversations are imported, your comments stay local until you publish them as one review. This uses your GitHub CLI sign-in (`gh auth login`); the token is asked for when needed and never stored.
43
+
44
+ ## The agent
45
+
46
+ Any command-line agent that speaks the [Agent Client Protocol](https://github.com/agentclientprotocol/typescript-sdk) can be asked about a comparison, from a comment (`@agent`) or from the side chat. Without configuration, Claude Code is used through `npx -y @agentclientprotocol/claude-agent-acp`. Others are named in `~/.agentic-diff/config.json`:
47
+
48
+ ```json
49
+ { "agents": ["claude", "gemini", "codex", "opencode"] }
50
+ ```
51
+
52
+ The agent itself has to be installed and signed in; agentic-diff only starts it.
53
+
54
+ The agent proposes, you decide: its edits become suggestions, and nothing is written to your files without your click. If an agent changes files directly all the same, the page lists them and offers to put them back. Before an agent runs in code that is on none of your branches (a pull request, someone's remote branch), the page asks first.
55
+
56
+ ## Privacy
57
+
58
+ agentic-diff has no telemetry and no account. It talks to the network only when you ask it to: `git fetch` or `git clone` for a pull request or a shared link, GitHub's API for a pull request page, and whatever the agent you start sends to its own provider.
59
+
60
+ ## Licence
61
+
62
+ MIT. The package bundles third-party libraries; their licences are in `dist/THIRD-PARTY-LICENSES.txt`.
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env node
2
+ // The command npm links as `agentic-diff`. It checks the Node.js version, then loads the program: dist/cli.js.
3
+ //
4
+ // The check cannot live in the program itself. That file imports node:sqlite and is built for current Node.js,
5
+ // so an older one fails while loading it, before a line of it has run, and the user gets an internal error
6
+ // instead of the reason. npm does not stop them either: "engines" in package.json only makes it print a warning.
7
+ //
8
+ // For the same reason this file has to load on old versions too. Keep it to what Node.js 12.20 knows: no `?.`,
9
+ // no `??`, no top-level await, no "node:" in module names, no newer library functions. A test holds its syntax to that.
10
+ import { readFileSync } from 'fs';
11
+
12
+ /** "26.13.0" becomes [26, 13, 0]; a part that is missing or not a number counts as 0. */
13
+ function numbers(version) {
14
+ const parts = String(version).split('.');
15
+ return [0, 1, 2].map((index) => parseInt(parts[index], 10) || 0);
16
+ }
17
+
18
+ /**
19
+ * The lowest Node.js version the package declares in "engines.node", written as ">=26" or ">=26.1.0".
20
+ * Undefined when the manifest cannot be read or states it another way: then nothing is checked here.
21
+ */
22
+ function minimumNode() {
23
+ try {
24
+ const manifest = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
25
+ const match = /^>=\s*(\d+(?:\.\d+){0,2})$/.exec(String(manifest.engines.node).trim());
26
+ return match ? match[1] : undefined;
27
+ } catch (error) {
28
+ return undefined;
29
+ }
30
+ }
31
+
32
+ function isOlder(current, minimum) {
33
+ const have = numbers(current);
34
+ const need = numbers(minimum);
35
+ for (let index = 0; index < 3; index += 1) {
36
+ if (have[index] !== need[index]) return have[index] < need[index];
37
+ }
38
+ return false;
39
+ }
40
+
41
+ const minimum = minimumNode();
42
+ if (minimum !== undefined && isOlder(process.versions.node, minimum)) {
43
+ console.error(
44
+ `agentic-diff needs Node.js ${minimum} or newer; this is Node.js ${process.versions.node}.\n` +
45
+ 'Install a current Node.js (https://nodejs.org) and run the command again.',
46
+ );
47
+ // Not process.exit(): it can end the process before the message has left through a pipe.
48
+ process.exitCode = 1;
49
+ } else {
50
+ import('../dist/cli.js');
51
+ }