docbridge 0.11.0 → 0.13.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/CHANGELOG.md +81 -1
- package/README.md +16 -9
- package/dist/bin/darwin-arm64/SHA256SUMS +3 -3
- package/dist/bin/darwin-arm64/docbridge-go-scanner +0 -0
- package/dist/bin/darwin-arm64/docbridge-swift-scanner +0 -0
- package/dist/bin/darwin-arm64/docbridge_dart_scanner +0 -0
- package/dist/bin/linux-x64/SHA256SUMS +2 -2
- package/dist/bin/linux-x64/docbridge-go-scanner +0 -0
- package/dist/bin/linux-x64/docbridge-swift-scanner +1 -1
- package/dist/index.js +1771 -678
- package/dist/workers/java/docbridge-java-scanner.jar +0 -0
- package/dist/workers/python/docbridge_python_scanner/__init__.py +6 -0
- package/dist/workers/python/docbridge_python_scanner/comments.py +177 -0
- package/dist/workers/python/docbridge_python_scanner/declarations.py +318 -0
- package/dist/workers/python/docbridge_python_scanner/links.py +62 -0
- package/dist/workers/python/docbridge_python_scanner/positions.py +75 -0
- package/dist/workers/python/docbridge_python_scanner/protocol.py +105 -0
- package/dist/workers/python/docbridge_python_scanner/scanner.py +214 -0
- package/dist/workers/python/docbridge_python_scanner.py +16 -0
- package/dist/workers/ruby/bin/docbridge-ruby-scanner +10 -0
- package/dist/workers/ruby/lib/docbridge_ruby_scanner/cli.rb +30 -0
- package/dist/workers/ruby/lib/docbridge_ruby_scanner/comments.rb +55 -0
- package/dist/workers/ruby/lib/docbridge_ruby_scanner/compat.rb +39 -0
- package/dist/workers/ruby/lib/docbridge_ruby_scanner/declarations.rb +230 -0
- package/dist/workers/ruby/lib/docbridge_ruby_scanner/links.rb +38 -0
- package/dist/workers/ruby/lib/docbridge_ruby_scanner/positions.rb +50 -0
- package/dist/workers/ruby/lib/docbridge_ruby_scanner/probe.rb +28 -0
- package/dist/workers/ruby/lib/docbridge_ruby_scanner/protocol.rb +161 -0
- package/dist/workers/ruby/lib/docbridge_ruby_scanner.rb +21 -0
- package/docs/README.md +10 -3
- package/docs/user/automation.md +8 -4
- package/docs/user/commands.md +11 -3
- package/docs/user/configuration.md +111 -17
- package/docs/user/getting-started.md +1 -1
- package/docs/user/linking.md +106 -10
- package/docs/user/troubleshooting.md +26 -9
- package/package.json +1 -1
- package/schemas/common-output.schema.json +11 -1
- package/schemas/context-output.schema.json +11 -1
- package/schemas/docbridge.schema.json +118 -2
- package/schemas/graph-output.schema.json +11 -1
- package/schemas/scanner-worker.schema.json +1 -1
- package/templates/skills/docbridge/SKILL.md +12 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,84 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.13.0] - 2026-10-01
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Java is a first-party code language. Configure `include.code.java` with
|
|
15
|
+
`.java` patterns and put `@doc` in the Javadoc comment of a class,
|
|
16
|
+
interface, enum, record, annotation type, method, constructor, field, or
|
|
17
|
+
enum constant. The bundled worker runs on the JDK 17 or later installed on
|
|
18
|
+
the machine, on any platform, and parses with the JDK's own `jdk.compiler`
|
|
19
|
+
module; it never compiles, loads, or runs project code. Canonical IDs are
|
|
20
|
+
dot-qualified without the package, and methods and constructors add their
|
|
21
|
+
parameter types (`AuthService.login(String,char[])`,
|
|
22
|
+
`AuthService.AuthService(Authenticator)`), so each overload is its own
|
|
23
|
+
endpoint. Visibility accepts `public`, `protected`, `package`, and
|
|
24
|
+
`private` and defaults to `public`; interface members without a modifier
|
|
25
|
+
are `public`. Projects that run `javadoc` with `-Xdoclint` register the tag
|
|
26
|
+
with `-tag doc:a:"DocBridge:"`.
|
|
27
|
+
- `scanners.java.command` or `DOCBRIDGE_JAVA_RUNTIME` names the JDK's `java`;
|
|
28
|
+
otherwise DocBridge uses `java` on `PATH`. A missing or too-old JDK, or a
|
|
29
|
+
Java runtime without `jdk.compiler` such as a JRE, is
|
|
30
|
+
`code_scanner_unavailable` naming what was found.
|
|
31
|
+
- The VS Code extension activates for Java files, and `docbridge init`
|
|
32
|
+
proposes `src/main/java` when it holds Java files, else `src`.
|
|
33
|
+
|
|
34
|
+
## [0.12.0] - 2026-10-01
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- JavaScript is a first-party code language. Configure
|
|
39
|
+
`include.code.javascript` with `.js`, `.jsx`, `.mjs`, or `.cjs` patterns and
|
|
40
|
+
put `@doc` in the JSDoc comment of an exported declaration or a member of an
|
|
41
|
+
exported class. The built-in TypeScript scanner reads these files, so the
|
|
42
|
+
declarations, canonical IDs, and `visibility` values match TypeScript, and
|
|
43
|
+
JSX parses in every JavaScript file. CommonJS assignments such as
|
|
44
|
+
`module.exports = ...` are not endpoints; an `@doc` on one is
|
|
45
|
+
`unsupported_declaration`.
|
|
46
|
+
- `include.code.typescript` accepts `.tsx`, `.mts`, and `.cts` patterns, and
|
|
47
|
+
`.d.mts` and `.d.cts` declaration files are skipped like `.d.ts`. JSX parses
|
|
48
|
+
in `.tsx` files, and hover and `context` fence their declarations as `tsx`.
|
|
49
|
+
- Python is a first-party code language. Configure `include.code.python` and
|
|
50
|
+
put `@doc` in the docstring of a `def`, `async def`, or `class`, or in the
|
|
51
|
+
`#` comment block above it. The bundled worker runs on the CPython 3.10 or
|
|
52
|
+
later installed on the machine, on any platform, and parses with the
|
|
53
|
+
standard library alone; it never imports project code. Canonical IDs are
|
|
54
|
+
dot-qualified (`AuthService.login`), and a property's accessors and an
|
|
55
|
+
`@overload` group each share one endpoint. Visibility defaults to `public`;
|
|
56
|
+
`private` adds names that start with `_`.
|
|
57
|
+
- Ruby is a first-party code language. Configure `include.code.ruby` and put
|
|
58
|
+
`@doc` in the `#` comment block above a `class`, `module`, constant, or
|
|
59
|
+
method. The bundled worker runs on the CRuby 3.3 or later installed on the
|
|
60
|
+
machine with its bundled Prism parser. Canonical IDs use `::` between
|
|
61
|
+
constants and `.` before a method (`Auth::Service.login`, and
|
|
62
|
+
`Auth::Service.self.build` for a singleton method). Visibility follows
|
|
63
|
+
`private`, `protected`, and `public` calls and defaults to `public`.
|
|
64
|
+
- An optional top-level `scanners` key names the interpreter that runs the
|
|
65
|
+
Python or Ruby worker, for example
|
|
66
|
+
`"scanners": { "python": { "command": ["/opt/py/bin/python3"] } }`. Without
|
|
67
|
+
it, `DOCBRIDGE_PYTHON_RUNTIME` or `DOCBRIDGE_RUBY_RUNTIME` can name one, and
|
|
68
|
+
otherwise DocBridge tries `python3` and then `python` (`py -3` and then
|
|
69
|
+
`python` on Windows), and `ruby`, on `PATH`. A missing or too-old interpreter
|
|
70
|
+
is `code_scanner_unavailable` naming what was found, and a configured
|
|
71
|
+
interpreter is never replaced by another.
|
|
72
|
+
- The VS Code extension activates for JavaScript, JavaScript React, Python,
|
|
73
|
+
and Ruby files. `docbridge init` proposes JavaScript and TypeScript source
|
|
74
|
+
roots for every suffix, `src/` and each top-level Python package, and Ruby's
|
|
75
|
+
`lib/` and `app/`.
|
|
76
|
+
|
|
77
|
+
### Changed
|
|
78
|
+
|
|
79
|
+
- A scan sends every file of a worker-backed language to its scanner in one
|
|
80
|
+
request instead of starting a process per file, which speeds up checking
|
|
81
|
+
large Swift, Dart, Rust, and Go projects. A failed request reports its
|
|
82
|
+
diagnostic on every file it carried, and each request may run for 30
|
|
83
|
+
seconds plus 1 second per file.
|
|
84
|
+
- The editor language server rescans in the background: it keeps answering
|
|
85
|
+
hover, definition, and references from the last completed scan, rescans only
|
|
86
|
+
files that changed, and drops a scan that a newer edit made stale.
|
|
87
|
+
|
|
10
88
|
## [0.11.0] - 2026-09-30
|
|
11
89
|
|
|
12
90
|
### Added
|
|
@@ -469,7 +547,9 @@ Initial release of the SpecLink CLI.
|
|
|
469
547
|
- `speclink check` command with `--root`, `--json`, and `--audit` options.
|
|
470
548
|
- `speclink --version` (alias `-v`) and `speclink --help` (alias `-h`).
|
|
471
549
|
|
|
472
|
-
[Unreleased]: https://github.com/salan70/docbridge/compare/v0.
|
|
550
|
+
[Unreleased]: https://github.com/salan70/docbridge/compare/v0.13.0...HEAD
|
|
551
|
+
[0.13.0]: https://github.com/salan70/docbridge/releases/tag/v0.13.0
|
|
552
|
+
[0.12.0]: https://github.com/salan70/docbridge/releases/tag/v0.12.0
|
|
473
553
|
[0.11.0]: https://github.com/salan70/docbridge/releases/tag/v0.11.0
|
|
474
554
|
[0.10.1]: https://github.com/salan70/docbridge/releases/tag/v0.10.1
|
|
475
555
|
[0.10.0]: https://github.com/salan70/docbridge/releases/tag/v0.10.0
|
package/README.md
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
DocBridge keeps Markdown documentation and the code that implements it linked
|
|
8
8
|
in both directions. It validates `@doc` annotations on supported TypeScript,
|
|
9
|
-
Swift, Dart, Rust,
|
|
10
|
-
headings, so humans and coding agents can find the right counterpart before a
|
|
9
|
+
JavaScript, Swift, Dart, Rust, Go, Python, Ruby, and Java declarations against
|
|
10
|
+
`@code` annotations on Markdown headings, so humans and coding agents can find the right counterpart before a
|
|
11
11
|
change drifts.
|
|
12
12
|
|
|
13
13
|
## Requirements
|
|
@@ -15,9 +15,11 @@ change drifts.
|
|
|
15
15
|
- Node.js 22 or later, or Bun 1.1.31 or later
|
|
16
16
|
- A project containing Markdown and supported source files
|
|
17
17
|
|
|
18
|
-
Prebuilt Swift, Dart, Rust, and Go scanners are included for
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
Prebuilt Swift, Dart, Rust, and Go scanners are included for `darwin-arm64` and
|
|
19
|
+
`linux-x64`. Python, Ruby, and Java projects need CPython 3.10 or later,
|
|
20
|
+
CRuby 3.3 or later, or a JDK 17 or later on the machine, on any platform. See
|
|
21
|
+
[Languages](docs/user/configuration.md#languages) for each language's file
|
|
22
|
+
extensions, visibility defaults, and scanner.
|
|
21
23
|
|
|
22
24
|
## Install
|
|
23
25
|
|
|
@@ -41,7 +43,8 @@ Create a starting configuration interactively:
|
|
|
41
43
|
npx docbridge init
|
|
42
44
|
```
|
|
43
45
|
|
|
44
|
-
Or write the minimal TypeScript configuration yourself
|
|
46
|
+
Or write the minimal TypeScript configuration yourself as
|
|
47
|
+
`docbridge.config.json` in the project root:
|
|
45
48
|
|
|
46
49
|
```json
|
|
47
50
|
{
|
|
@@ -57,14 +60,15 @@ Or write the minimal TypeScript configuration yourself:
|
|
|
57
60
|
}
|
|
58
61
|
```
|
|
59
62
|
|
|
60
|
-
Add a documentation target to a supported declaration
|
|
63
|
+
Add a documentation target to a supported declaration in `src/auth.ts`:
|
|
61
64
|
|
|
62
65
|
```ts
|
|
63
66
|
/** @doc docs/auth.md#login-flow */
|
|
64
67
|
export function login(): void {}
|
|
65
68
|
```
|
|
66
69
|
|
|
67
|
-
Add the reciprocal code target immediately before the
|
|
70
|
+
Add the reciprocal code target immediately before the heading in
|
|
71
|
+
`docs/auth.md`:
|
|
68
72
|
|
|
69
73
|
```md
|
|
70
74
|
<!-- @code src/auth.ts#login -->
|
|
@@ -79,7 +83,8 @@ npx docbridge check
|
|
|
79
83
|
```
|
|
80
84
|
|
|
81
85
|
A valid graph exits `0`. Invalid configuration, unresolved targets, and missing
|
|
82
|
-
backlinks produce diagnostics and exit `1`.
|
|
86
|
+
backlinks produce diagnostics and exit `1`. Paths in annotations are relative
|
|
87
|
+
to the project root, and each file must match a configured pattern.
|
|
83
88
|
|
|
84
89
|
## Choose the next guide
|
|
85
90
|
|
|
@@ -96,6 +101,8 @@ backlinks produce diagnostics and exit `1`.
|
|
|
96
101
|
- [Automation](docs/user/automation.md) — coding agents, Git hooks, and CI
|
|
97
102
|
- [Troubleshooting](docs/user/troubleshooting.md) — diagnose configuration,
|
|
98
103
|
scanning, and link failures
|
|
104
|
+
- [Examples](examples/) — one small project per supported language
|
|
105
|
+
- [Changelog](CHANGELOG.md) — release history
|
|
99
106
|
- [日本語ドキュメント](docs/ja/README.md)
|
|
100
107
|
|
|
101
108
|
The CLI ships the English task guides with its own version. Run
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
bb2e127396b445a443c6d9958430b9af7e992ecca54cac49ce8feb88c199f460 docbridge-swift-scanner
|
|
2
|
+
32032f9e2c703f4ab4976361f15f723a58c675545edce90fdc673d3094fe154e docbridge_dart_scanner
|
|
3
3
|
7fc3e6842b3e1bf425b8fd63e241eee7e64875f16be7ba8d1ae4a25baa7f2338 docbridge-rust-scanner
|
|
4
|
-
|
|
4
|
+
1a7160cf70cb6ff1517d72685b6ecbfe1878ed1fed013fef706e5f2405ddbce0 docbridge-go-scanner
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
6e78c1c79c16572ed0759bfcf24ddd4cc77c7d1d699d19dc0279a9abca38d248 docbridge-swift-scanner
|
|
2
2
|
b75b14006ca792ed3ca8faf7ceee9e4d33c895f27dd416b640818cf8a4bdd9c8 docbridge_dart_scanner
|
|
3
3
|
e0da7b8cc6ee23704f5fe8514cc309f0bb60380c77b55e3bc5ed113abd1f3478 docbridge-rust-scanner
|
|
4
|
-
|
|
4
|
+
af845c263f65cc5db5beb01b4f4f7251ce449391986b4e288c03abfa04f7e708 docbridge-go-scanner
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/bin/linux-x64/docbridge-swift-scanner
|
|
3
3
|
size: 40932352 bytes
|
|
4
|
-
sha256:
|
|
4
|
+
sha256: 6e78c1c79c16572ed0759bfcf24ddd4cc77c7d1d699d19dc0279a9abca38d248
|