@intentic/workspace-ignore 1.176.2 → 1.209.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/README.md +29 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +7 -3
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -5
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# @intentic/workspace-ignore
|
|
2
|
+
|
|
3
|
+
The workspace attention filter: what the tree grays and lazy-loads, and what ordinary workspace search skips.
|
|
4
|
+
|
|
5
|
+
It combines a conservative junk denylist (`node_modules`, `.git`, build output), dedicated predicates for
|
|
6
|
+
Chromium login profiles, agent worktrees and the reference shelf, and the accumulated `.gitignore` rules the
|
|
7
|
+
repos themselves declare. Durable browser artifacts live separately at `.intentic/artifacts/browser/`, so they
|
|
8
|
+
remain ordinary visible files rather than being mistaken for profile churn.
|
|
9
|
+
|
|
10
|
+
## Responsibilities
|
|
11
|
+
|
|
12
|
+
- Answer whether a path is ignored for the file tree and ordinary workspace content search.
|
|
13
|
+
- Keep machine-generated subtrees out of eager recursive walks without turning the filter into an access rule.
|
|
14
|
+
|
|
15
|
+
## Key files
|
|
16
|
+
|
|
17
|
+
- [src/index.ts](src/index.ts) — the scope, and the layered decision.
|
|
18
|
+
- [src/constants.ts](src/constants.ts) — the floor and the denylist, spelled out.
|
|
19
|
+
- [src/index.test.ts](src/index.test.ts) — the layer-precedence cases, which are the whole correctness story.
|
|
20
|
+
|
|
21
|
+
## How it fits
|
|
22
|
+
|
|
23
|
+
Depended on by the daemon and by `iq`. It is not a security boundary: protected file routes and IQ's own
|
|
24
|
+
credential/session/artifact exclusion floor enforce those concerns independently.
|
|
25
|
+
|
|
26
|
+
## Conventions & gotchas
|
|
27
|
+
|
|
28
|
+
- Browser profiles and agent worktrees stay ignored even when a nested `.gitignore` would otherwise include
|
|
29
|
+
them. The files remain readable on demand; ignored means out of focus, not inaccessible.
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const IGNORED_DIRS: Set<string>;
|
|
2
2
|
export declare const REFERENCE_DIR = "refs";
|
|
3
|
+
export declare const PUBLIC_DIR = "public";
|
|
3
4
|
export declare const isReferencePath: (relPath: string) => boolean;
|
|
5
|
+
export declare const isPublicPath: (relPath: string) => boolean;
|
|
4
6
|
export declare const isBrowserProfilePath: (path: string) => boolean;
|
|
5
7
|
export declare const isAgentWorktreePath: (path: string) => boolean;
|
|
6
8
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY,aAkBvB,CAAC;AAQH,eAAO,MAAM,aAAa,SAAS,CAAC;AAgBpC,eAAO,MAAM,UAAU,WAAW,CAAC;AAMnC,eAAO,MAAM,eAAe,YAAa,MAAM,KAAG,OAAkD,CAAC;AACrG,eAAO,MAAM,YAAY,YAAa,MAAM,KAAG,OAA+C,CAAC;AAM/F,eAAO,MAAM,oBAAoB,SAAU,MAAM,KAAG,OAInD,CAAC;AAMF,eAAO,MAAM,mBAAmB,SAAU,MAAM,KAAG,OAGlD,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { STATE_DIR } from "@intentic/constants";
|
|
1
2
|
export const IGNORED_DIRS = new Set([
|
|
2
3
|
"node_modules",
|
|
3
4
|
".git",
|
|
@@ -18,11 +19,14 @@ export const IGNORED_DIRS = new Set([
|
|
|
18
19
|
".gradle",
|
|
19
20
|
]);
|
|
20
21
|
export const REFERENCE_DIR = "refs";
|
|
21
|
-
export const
|
|
22
|
+
export const PUBLIC_DIR = "public";
|
|
23
|
+
const firstSegment = (relPath) => relPath.split(/[\\/]/).find((segment) => segment.length > 0);
|
|
24
|
+
export const isReferencePath = (relPath) => firstSegment(relPath) === REFERENCE_DIR;
|
|
25
|
+
export const isPublicPath = (relPath) => firstSegment(relPath) === PUBLIC_DIR;
|
|
22
26
|
export const isBrowserProfilePath = (path) => {
|
|
23
27
|
const segments = path.split(/[\\/]/).filter((segment) => segment.length > 0);
|
|
24
|
-
const i = segments.indexOf(
|
|
25
|
-
return i !== -1 && segments[i + 1] === "browser"
|
|
28
|
+
const i = segments.indexOf(STATE_DIR);
|
|
29
|
+
return i !== -1 && segments[i + 1] === "browser";
|
|
26
30
|
};
|
|
27
31
|
export const isAgentWorktreePath = (path) => {
|
|
28
32
|
const segments = path.split(/[\\/]/).filter((segment) => segment.length > 0);
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAUhD,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAChC,cAAc;IACd,MAAM;IACN,MAAM;IACN,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,UAAU;IACV,aAAa;IACb,OAAO;IACP,OAAO;IACP,MAAM;IACN,aAAa;IACb,eAAe;IACf,aAAa;IACb,aAAa;IACb,SAAS;CACZ,CAAC,CAAC;AAQH,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC;AAgBpC,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC;AAKnC,MAAM,YAAY,GAAG,CAAC,OAAe,EAAs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RS, isAgentWorktreePath, isBrowserProfilePath, isReferencePath, REFERENCE_DIR } from "./constants.js";
|
|
1
|
+
export { IGNORED_DIRS, isAgentWorktreePath, isBrowserProfilePath, isPublicPath, isReferencePath, PUBLIC_DIR, REFERENCE_DIR } from "./constants.js";
|
|
2
2
|
export type IgnoreScope = {
|
|
3
3
|
isIgnored(name: string, relPath: string, isDir: boolean): boolean;
|
|
4
4
|
descend(absDir: string, relDir: string): Promise<IgnoreScope>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AASnJ,MAAM,MAAM,WAAW,GAAG;IACtB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;IAClE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CACjE,CAAC;AAyCF,eAAO,MAAM,iBAAiB,QAAO,WAA4B,CAAC;AAGlE,eAAO,MAAM,SAAS,SAAU,MAAM,OAAO,MAAM,KAAG,MAAkD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { readFile } from "node:fs/promises";
|
|
|
2
2
|
import { join, posix, relative, sep } from "node:path";
|
|
3
3
|
import ignore from "ignore";
|
|
4
4
|
import { IGNORED_DIRS, isAgentWorktreePath, isBrowserProfilePath, isReferencePath } from "./constants.js";
|
|
5
|
-
export { IGNORED_DIRS, isAgentWorktreePath, isBrowserProfilePath, isReferencePath, REFERENCE_DIR } from "./constants.js";
|
|
5
|
+
export { IGNORED_DIRS, isAgentWorktreePath, isBrowserProfilePath, isPublicPath, isReferencePath, PUBLIC_DIR, REFERENCE_DIR } from "./constants.js";
|
|
6
6
|
const makeScope = (layers) => ({
|
|
7
7
|
isIgnored(name, relPath, isDir) {
|
|
8
8
|
if (isDir && IGNORED_DIRS.has(name)) {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,MAAuB,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAgB1G,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,MAAuB,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAgB1G,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,YAA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C,OAAO,CAAC,MAAM,EAAE,MAAM;QACxB,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAC1F,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,SAAS,CAAC,CAAC,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;IACpG,CAAC;CACJ,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAgB,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;AAGlE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,GAAW,EAAU,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/workspace-ignore",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Layered workspace
|
|
3
|
+
"version": "1.209.0",
|
|
4
|
+
"description": "Layered workspace attention filter — machine subtrees, junk denylist, and accumulated .gitignore",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://
|
|
10
|
-
"directory": "
|
|
9
|
+
"url": "git+https://github.com/intentic/intentic.git",
|
|
10
|
+
"directory": "_sandbox/workspace-ignore"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"dist"
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"ignore": "7.0.6",
|
|
45
|
-
"tslib": "2.8.1"
|
|
45
|
+
"tslib": "2.8.1",
|
|
46
|
+
"@intentic/constants": "1.209.0"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@types/node": "24.13.2",
|