attention-manifest-protocol 0.6.2 → 0.6.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/CHANGELOG.md +6 -0
- package/CHANGELOG.zh-CN.md +4 -0
- package/lib/scan/workspaceScanner.js +5 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this
|
|
6
6
|
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.6.3] - 2026-11-03
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Compute each immutable workspace input's SHA-256 once per scan instead of rehashing the entire file for every AST source location. Revision bytes and source locators remain unchanged; large compiler inputs no longer incur quadratic hashing work.
|
|
13
|
+
|
|
8
14
|
## [0.6.2] - 2026-11-03
|
|
9
15
|
|
|
10
16
|
### Added
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -27,13 +27,16 @@ export const scanWorkspace = (inputs, store) => {
|
|
|
27
27
|
files.set(path, file.content);
|
|
28
28
|
});
|
|
29
29
|
const paths = [...files.keys()].sort();
|
|
30
|
-
|
|
30
|
+
// Inputs are immutable during a scan. A source location is emitted for
|
|
31
|
+
// every AST node; hashing its entire file again makes large inputs quadratic.
|
|
32
|
+
const fingerprints = new Map(paths.map((path) => [path, hash(files.get(path))]));
|
|
33
|
+
const revision = hash(JSON.stringify(paths.map((path) => [path, fingerprints.get(path)])));
|
|
31
34
|
const entities = new Map();
|
|
32
35
|
const relations = [];
|
|
33
36
|
const diagnostics = [];
|
|
34
37
|
const source = (path, startLine, endLine) => ({
|
|
35
38
|
uri: path,
|
|
36
|
-
revision:
|
|
39
|
+
revision: fingerprints.get(path) ?? hash(""),
|
|
37
40
|
...(startLine === (void 0) ? {} : { startLine }),
|
|
38
41
|
...(endLine === (void 0) ? {} : { endLine }),
|
|
39
42
|
});
|