@agimon-ai/doompi-hashline 0.0.1-alpha.3 → 0.0.1-alpha.35

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.
@@ -1,12 +1,11 @@
1
1
  //#region src/adapters/node/files.d.ts
2
- declare function computeFileTag(bytes: Uint8Array): string;
3
- declare function decodeUtf8(bytes: Uint8Array, path: string): string;
2
+ export declare function computeFileTag(bytes: Uint8Array): string;
3
+ export declare function decodeUtf8(bytes: Uint8Array, path: string): string;
4
4
  /** Return whether the current process can edit an existing file. */
5
- declare function isWritableFile(path: string): Promise<boolean>;
6
- declare function resolveInputPath(input: string, cwd: string): string;
5
+ export declare function isWritableFile(path: string): Promise<boolean>;
6
+ export declare function resolveInputPath(input: string, cwd: string): string;
7
7
  /** Resolve the same existing-file variants as Pi's native read tool. */
8
- declare function resolveReadInputPath(input: string, cwd: string): Promise<string>;
9
- declare function displayPath(absolutePath: string, cwd: string): string;
8
+ export declare function resolveReadInputPath(input: string, cwd: string): Promise<string>;
9
+ export declare function displayPath(absolutePath: string, cwd: string): string;
10
10
  //#endregion
11
- export { computeFileTag, decodeUtf8, displayPath, isWritableFile, resolveInputPath, resolveReadInputPath };
12
11
  //# sourceMappingURL=files.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.cts","names":[],"sources":["../../../src/adapters/node/files.ts"],"mappings":";iBAUgB,eAAe,OAAO;iBAItB,WAAW,OAAO,YAAY;;iBASxB,eAAe,eAAe;iBAOpC,iBAAiB,eAAe;;iBAW1B,qBAAqB,eAAe,cAAc;iBAgBxD,YAAY,sBAAsB"}
1
+ {"version":3,"file":"files.d.cts","names":[],"sources":["../../../src/adapters/node/files.ts"],"mappings":";wBAUgB,eAAe,OAAO;wBAItB,WAAW,OAAO,YAAY;;wBASxB,eAAe,eAAe;wBAOpC,iBAAiB,eAAe;;wBAW1B,qBAAqB,eAAe,cAAc;wBAgBxD,YAAY,sBAAsB"}
@@ -1,12 +1,11 @@
1
1
  //#region src/adapters/node/files.d.ts
2
- declare function computeFileTag(bytes: Uint8Array): string;
3
- declare function decodeUtf8(bytes: Uint8Array, path: string): string;
2
+ export declare function computeFileTag(bytes: Uint8Array): string;
3
+ export declare function decodeUtf8(bytes: Uint8Array, path: string): string;
4
4
  /** Return whether the current process can edit an existing file. */
5
- declare function isWritableFile(path: string): Promise<boolean>;
6
- declare function resolveInputPath(input: string, cwd: string): string;
5
+ export declare function isWritableFile(path: string): Promise<boolean>;
6
+ export declare function resolveInputPath(input: string, cwd: string): string;
7
7
  /** Resolve the same existing-file variants as Pi's native read tool. */
8
- declare function resolveReadInputPath(input: string, cwd: string): Promise<string>;
9
- declare function displayPath(absolutePath: string, cwd: string): string;
8
+ export declare function resolveReadInputPath(input: string, cwd: string): Promise<string>;
9
+ export declare function displayPath(absolutePath: string, cwd: string): string;
10
10
  //#endregion
11
- export { computeFileTag, decodeUtf8, displayPath, isWritableFile, resolveInputPath, resolveReadInputPath };
12
11
  //# sourceMappingURL=files.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.mts","names":[],"sources":["../../../src/adapters/node/files.ts"],"mappings":";iBAUgB,eAAe,OAAO;iBAItB,WAAW,OAAO,YAAY;;iBASxB,eAAe,eAAe;iBAOpC,iBAAiB,eAAe;;iBAW1B,qBAAqB,eAAe,cAAc;iBAgBxD,YAAY,sBAAsB"}
1
+ {"version":3,"file":"files.d.mts","names":[],"sources":["../../../src/adapters/node/files.ts"],"mappings":";wBAUgB,eAAe,OAAO;wBAItB,WAAW,OAAO,YAAY;;wBASxB,eAAe,eAAe;wBAOpC,iBAAiB,eAAe;;wBAW1B,qBAAqB,eAAe,cAAc;wBAgBxD,YAAY,sBAAsB"}
@@ -4,18 +4,17 @@ import { AppliedHashlineEdits, FileHeader, HashlineRangeInput, LineAnchor, Parse
4
4
  * Return Phi's three-letter whitespace-insensitive FNV-1a64 line anchor.
5
5
  * Adapted from pulseaiclub/phi writetool under the MIT license.
6
6
  */
7
- declare function hashLine(line: string): string;
8
- declare function normalizeToLf(text: string): string;
9
- declare function stripBom(text: string): string;
10
- declare function splitLines(text: string): string[];
11
- declare function normalizeFileTag(value: string): string;
12
- declare function formatFileHeader(path: string, tag: string): string;
13
- declare function parseFileHeader(value: string): FileHeader | undefined;
14
- declare function formatTaggedLine(line: string, lineNumber: number, prefix?: TaggedLinePrefix, anchorSource?: string): string;
15
- declare function formatTaggedLines(lines: readonly string[], firstLine?: number): string;
16
- declare function parseTaggedLine(value: string): ParsedTaggedLine | undefined;
17
- declare function parseLineAnchor(value: string): LineAnchor;
18
- declare function applyHashlineEdits(originalContent: string, requestedEdits: readonly HashlineRangeInput[]): AppliedHashlineEdits;
7
+ export declare function hashLine(line: string): string;
8
+ export declare function normalizeToLf(text: string): string;
9
+ export declare function stripBom(text: string): string;
10
+ export declare function splitLines(text: string): string[];
11
+ export declare function normalizeFileTag(value: string): string;
12
+ export declare function formatFileHeader(path: string, tag: string): string;
13
+ export declare function parseFileHeader(value: string): FileHeader | undefined;
14
+ export declare function formatTaggedLine(line: string, lineNumber: number, prefix?: TaggedLinePrefix, anchorSource?: string): string;
15
+ export declare function formatTaggedLines(lines: readonly string[], firstLine?: number): string;
16
+ export declare function parseTaggedLine(value: string): ParsedTaggedLine | undefined;
17
+ export declare function parseLineAnchor(value: string): LineAnchor;
18
+ export declare function applyHashlineEdits(originalContent: string, requestedEdits: readonly HashlineRangeInput[]): AppliedHashlineEdits;
19
19
  //#endregion
20
- export { applyHashlineEdits, formatFileHeader, formatTaggedLine, formatTaggedLines, hashLine, normalizeFileTag, normalizeToLf, parseFileHeader, parseLineAnchor, parseTaggedLine, splitLines, stripBom };
21
20
  //# sourceMappingURL=hashline.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hashline.d.cts","names":[],"sources":["../../src/services/hashline.ts"],"mappings":";;;;;;iBAyBgB,SAAS;iBAiBT,cAAc;iBAId,SAAS;iBAIT,WAAW;iBAIX,iBAAiB;iBAUjB,iBAAiB,cAAc;iBAO/B,gBAAgB,gBAAgB;iBAOhC,iBACd,cACA,oBACA,SAAQ,kBACR;iBAMc,kBAAkB,0BAA0B;iBAI5C,gBAAgB,gBAAgB;iBAahC,gBAAgB,gBAAgB;iBAoBhC,mBACd,yBACA,yBAAyB,uBACxB"}
1
+ {"version":3,"file":"hashline.d.cts","names":[],"sources":["../../src/services/hashline.ts"],"mappings":";;;;;;wBAyBgB,SAAS;wBAiBT,cAAc;wBAId,SAAS;wBAIT,WAAW;wBAIX,iBAAiB;wBAUjB,iBAAiB,cAAc;wBAO/B,gBAAgB,gBAAgB;wBAOhC,iBACd,cACA,oBACA,SAAQ,kBACR;wBAMc,kBAAkB,0BAA0B;wBAI5C,gBAAgB,gBAAgB;wBAahC,gBAAgB,gBAAgB;wBAoBhC,mBACd,yBACA,yBAAyB,uBACxB"}
@@ -4,18 +4,17 @@ import { AppliedHashlineEdits, FileHeader, HashlineRangeInput, LineAnchor, Parse
4
4
  * Return Phi's three-letter whitespace-insensitive FNV-1a64 line anchor.
5
5
  * Adapted from pulseaiclub/phi writetool under the MIT license.
6
6
  */
7
- declare function hashLine(line: string): string;
8
- declare function normalizeToLf(text: string): string;
9
- declare function stripBom(text: string): string;
10
- declare function splitLines(text: string): string[];
11
- declare function normalizeFileTag(value: string): string;
12
- declare function formatFileHeader(path: string, tag: string): string;
13
- declare function parseFileHeader(value: string): FileHeader | undefined;
14
- declare function formatTaggedLine(line: string, lineNumber: number, prefix?: TaggedLinePrefix, anchorSource?: string): string;
15
- declare function formatTaggedLines(lines: readonly string[], firstLine?: number): string;
16
- declare function parseTaggedLine(value: string): ParsedTaggedLine | undefined;
17
- declare function parseLineAnchor(value: string): LineAnchor;
18
- declare function applyHashlineEdits(originalContent: string, requestedEdits: readonly HashlineRangeInput[]): AppliedHashlineEdits;
7
+ export declare function hashLine(line: string): string;
8
+ export declare function normalizeToLf(text: string): string;
9
+ export declare function stripBom(text: string): string;
10
+ export declare function splitLines(text: string): string[];
11
+ export declare function normalizeFileTag(value: string): string;
12
+ export declare function formatFileHeader(path: string, tag: string): string;
13
+ export declare function parseFileHeader(value: string): FileHeader | undefined;
14
+ export declare function formatTaggedLine(line: string, lineNumber: number, prefix?: TaggedLinePrefix, anchorSource?: string): string;
15
+ export declare function formatTaggedLines(lines: readonly string[], firstLine?: number): string;
16
+ export declare function parseTaggedLine(value: string): ParsedTaggedLine | undefined;
17
+ export declare function parseLineAnchor(value: string): LineAnchor;
18
+ export declare function applyHashlineEdits(originalContent: string, requestedEdits: readonly HashlineRangeInput[]): AppliedHashlineEdits;
19
19
  //#endregion
20
- export { applyHashlineEdits, formatFileHeader, formatTaggedLine, formatTaggedLines, hashLine, normalizeFileTag, normalizeToLf, parseFileHeader, parseLineAnchor, parseTaggedLine, splitLines, stripBom };
21
20
  //# sourceMappingURL=hashline.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hashline.d.mts","names":[],"sources":["../../src/services/hashline.ts"],"mappings":";;;;;;iBAyBgB,SAAS;iBAiBT,cAAc;iBAId,SAAS;iBAIT,WAAW;iBAIX,iBAAiB;iBAUjB,iBAAiB,cAAc;iBAO/B,gBAAgB,gBAAgB;iBAOhC,iBACd,cACA,oBACA,SAAQ,kBACR;iBAMc,kBAAkB,0BAA0B;iBAI5C,gBAAgB,gBAAgB;iBAahC,gBAAgB,gBAAgB;iBAoBhC,mBACd,yBACA,yBAAyB,uBACxB"}
1
+ {"version":3,"file":"hashline.d.mts","names":[],"sources":["../../src/services/hashline.ts"],"mappings":";;;;;;wBAyBgB,SAAS;wBAiBT,cAAc;wBAId,SAAS;wBAIT,WAAW;wBAIX,iBAAiB;wBAUjB,iBAAiB,cAAc;wBAO/B,gBAAgB,gBAAgB;wBAOhC,iBACd,cACA,oBACA,SAAQ,kBACR;wBAMc,kBAAkB,0BAA0B;wBAI5C,gBAAgB,gBAAgB;wBAahC,gBAAgB,gBAAgB;wBAoBhC,mBACd,yBACA,yBAAyB,uBACxB"}
@@ -1,34 +1,33 @@
1
1
  //#region src/types/hashline.d.ts
2
- interface HashlineRangeInput {
2
+ export interface HashlineRangeInput {
3
3
  readonly from: string;
4
4
  readonly to: string;
5
5
  readonly content?: string | null;
6
6
  }
7
- interface LineAnchor {
7
+ export interface LineAnchor {
8
8
  readonly line: number;
9
9
  readonly hash: string;
10
10
  }
11
- interface PreparedHashlineEdit {
11
+ export interface PreparedHashlineEdit {
12
12
  readonly from: LineAnchor;
13
13
  readonly to: LineAnchor;
14
14
  readonly content: string | null;
15
15
  readonly source: HashlineRangeInput;
16
16
  }
17
- interface AppliedHashlineEdits {
17
+ export interface AppliedHashlineEdits {
18
18
  readonly content: string;
19
19
  readonly edits: readonly PreparedHashlineEdit[];
20
20
  }
21
- interface FileHeader {
21
+ export interface FileHeader {
22
22
  readonly path: string;
23
23
  readonly tag: string;
24
24
  }
25
- type TaggedLineMarker = 'match' | 'context';
26
- interface ParsedTaggedLine {
25
+ export type TaggedLineMarker = 'match' | 'context';
26
+ export interface ParsedTaggedLine {
27
27
  readonly content: string;
28
28
  readonly line: number;
29
29
  readonly marker?: TaggedLineMarker;
30
30
  }
31
- type TaggedLinePrefix = '' | '>> ' | ' ';
31
+ export type TaggedLinePrefix = '' | '>> ' | ' ';
32
32
  //#endregion
33
- export { AppliedHashlineEdits, FileHeader, HashlineRangeInput, LineAnchor, ParsedTaggedLine, PreparedHashlineEdit, TaggedLineMarker, TaggedLinePrefix };
34
33
  //# sourceMappingURL=hashline.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hashline.d.cts","names":[],"sources":["../../src/types/hashline.ts"],"mappings":";UAAiB;WACN;WACA;WACA;;UAGM;WACN;WACA;;UAGM;WACN,MAAM;WACN,IAAI;WACJ;WACA,QAAQ;;UAGF;WACN;WACA,gBAAgB;;UAGV;WACN;WACA;;KAGC;UAEK;WACN;WACA;WACA,SAAS;;KAGR"}
1
+ {"version":3,"file":"hashline.d.cts","names":[],"sources":["../../src/types/hashline.ts"],"mappings":";iBAAiB;WACN;WACA;WACA;;iBAGM;WACN;WACA;;iBAGM;WACN,MAAM;WACN,IAAI;WACJ;WACA,QAAQ;;iBAGF;WACN;WACA,gBAAgB;;iBAGV;WACN;WACA;;YAGC;iBAEK;WACN;WACA;WACA,SAAS;;YAGR"}
@@ -1,34 +1,33 @@
1
1
  //#region src/types/hashline.d.ts
2
- interface HashlineRangeInput {
2
+ export interface HashlineRangeInput {
3
3
  readonly from: string;
4
4
  readonly to: string;
5
5
  readonly content?: string | null;
6
6
  }
7
- interface LineAnchor {
7
+ export interface LineAnchor {
8
8
  readonly line: number;
9
9
  readonly hash: string;
10
10
  }
11
- interface PreparedHashlineEdit {
11
+ export interface PreparedHashlineEdit {
12
12
  readonly from: LineAnchor;
13
13
  readonly to: LineAnchor;
14
14
  readonly content: string | null;
15
15
  readonly source: HashlineRangeInput;
16
16
  }
17
- interface AppliedHashlineEdits {
17
+ export interface AppliedHashlineEdits {
18
18
  readonly content: string;
19
19
  readonly edits: readonly PreparedHashlineEdit[];
20
20
  }
21
- interface FileHeader {
21
+ export interface FileHeader {
22
22
  readonly path: string;
23
23
  readonly tag: string;
24
24
  }
25
- type TaggedLineMarker = 'match' | 'context';
26
- interface ParsedTaggedLine {
25
+ export type TaggedLineMarker = 'match' | 'context';
26
+ export interface ParsedTaggedLine {
27
27
  readonly content: string;
28
28
  readonly line: number;
29
29
  readonly marker?: TaggedLineMarker;
30
30
  }
31
- type TaggedLinePrefix = '' | '>> ' | ' ';
31
+ export type TaggedLinePrefix = '' | '>> ' | ' ';
32
32
  //#endregion
33
- export { AppliedHashlineEdits, FileHeader, HashlineRangeInput, LineAnchor, ParsedTaggedLine, PreparedHashlineEdit, TaggedLineMarker, TaggedLinePrefix };
34
33
  //# sourceMappingURL=hashline.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hashline.d.mts","names":[],"sources":["../../src/types/hashline.ts"],"mappings":";UAAiB;WACN;WACA;WACA;;UAGM;WACN;WACA;;UAGM;WACN,MAAM;WACN,IAAI;WACJ;WACA,QAAQ;;UAGF;WACN;WACA,gBAAgB;;UAGV;WACN;WACA;;KAGC;UAEK;WACN;WACA;WACA,SAAS;;KAGR"}
1
+ {"version":3,"file":"hashline.d.mts","names":[],"sources":["../../src/types/hashline.ts"],"mappings":";iBAAiB;WACN;WACA;WACA;;iBAGM;WACN;WACA;;iBAGM;WACN,MAAM;WACN,IAAI;WACJ;WACA,QAAQ;;iBAGF;WACN;WACA,gBAAgB;;iBAGV;WACN;WACA;;YAGC;iBAEK;WACN;WACA;WACA,SAAS;;YAGR"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/doompi-hashline",
3
- "version": "0.0.1-alpha.3",
3
+ "version": "0.0.1-alpha.35",
4
4
  "description": "Shared snapshot-bound file tags and line anchors for DoomPi tools.",
5
5
  "keywords": [
6
6
  "ai",
@@ -13,8 +13,16 @@
13
13
  "typescript"
14
14
  ],
15
15
  "homepage": "https://agimon.ai",
16
+ "bugs": {
17
+ "url": "https://github.com/AgiFlow/doompi/issues"
18
+ },
16
19
  "license": "MIT",
17
20
  "author": "Vuong Ngo",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/AgiFlow/doompi.git",
24
+ "directory": "packages/core/doompi-hashline"
25
+ },
18
26
  "files": [
19
27
  "dist"
20
28
  ],
@@ -39,11 +47,11 @@
39
47
  "access": "public"
40
48
  },
41
49
  "devDependencies": {
42
- "@types/node": "26.2.0",
43
- "@vitest/coverage-v8": "4.1.11",
44
- "tsdown": "0.22.14",
50
+ "@types/node": "26.4.1",
51
+ "@vitest/coverage-v8": "5.0.0",
52
+ "tsdown": "0.23.0",
45
53
  "typescript": "7.0.2",
46
- "vitest": "4.1.11"
54
+ "vitest": "5.0.0"
47
55
  },
48
56
  "engines": {
49
57
  "node": ">=22.19.0"