@ai-dossier/core 1.14.6-next.616.1 → 1.15.0-next.618.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.
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/local-path.d.ts +75 -0
- package/dist/local-path.d.ts.map +1 -0
- package/dist/local-path.js +260 -0
- package/dist/local-path.js.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export type { FormatOptions, FormatResult } from './formatter';
|
|
|
23
23
|
export { formatDossierContent, formatDossierFile } from './formatter';
|
|
24
24
|
export type { LintConfig, LintDiagnostic, LintResult, LintRule, LintRuleContext, LintSeverity, RuleSeverityOverride, } from './linter';
|
|
25
25
|
export { defaultRules, LintRuleRegistry, lintDossier, lintDossierFile, loadLintConfig, } from './linter';
|
|
26
|
+
export type { LocalPathOptions } from './local-path';
|
|
27
|
+
export { anchorFromCommonDir, containsHomePath, isPortablePath, LOCAL_PATH_TOKEN, parseWorktreePorcelain, REPO_PATH_TOKEN, redactHomePaths, resolvePortablePath, toPortablePath, } from './local-path';
|
|
26
28
|
export { parseDossierContent, parseDossierFile, RECOMMENDED_FIELDS, REQUIRED_FIELDS, VALID_RISK_LEVELS, VALID_STATUSES, validateFrontmatter, } from './parser';
|
|
27
29
|
export type { ChecksumStatus, ContentRiskResult, SignatureStatus, VerificationRiskLevel, VerificationRiskResult, } from './risk-assessment';
|
|
28
30
|
export { assessContentRisk, assessVerificationRisk } from './risk-assessment';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC5F,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B,WAAW,EACX,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAE3F,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -26,8 +26,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
30
|
-
exports.createDefaultVerificationResult = exports.scanBodyForUrls = exports.isUrlCoveredByDeclared = exports.isPlaceholderUrl = exports.findUndeclaredUrls = exports.findStaleReferences = exports.collectDeclaredUrls = exports.readFileIfExists = exports.getErrorStack = exports.getErrorMessage = exports.sha256Hex = exports.sha256Hash = exports.TRUSTED_AUTHOR_ASSOCIATIONS = exports.isTrustedAuthorAssociation = exports.VALID_TRACE_STATUSES = exports.createTraceRecorder = exports.resolveTraceConfig = exports.toSpkiPem = exports.signatureCoverage = exports.publicKeysMatch = exports.normalizePublicKey = exports.isSupportedPublicKey = exports.canonicalizeFrontmatter = exports.buildSignedPayload = exports.VerifierRegistry = exports.KmsVerifier = exports.KmsSigner = exports.getVerifierRegistry = exports.Ed25519Verifier = exports.Ed25519Signer = exports.verifyWithKms = exports.verifyWithEd25519 = exports.verifySignature = exports.trustedKeysFromContent = exports.reportTrustedKeyProblems = void 0;
|
|
29
|
+
exports.buildReport = exports.runsLogPath = exports.assessVerificationRisk = exports.assessContentRisk = exports.validateFrontmatter = exports.VALID_STATUSES = exports.VALID_RISK_LEVELS = exports.REQUIRED_FIELDS = exports.RECOMMENDED_FIELDS = exports.parseDossierFile = exports.parseDossierContent = exports.toPortablePath = exports.resolvePortablePath = exports.redactHomePaths = exports.REPO_PATH_TOKEN = exports.parseWorktreePorcelain = exports.LOCAL_PATH_TOKEN = exports.isPortablePath = exports.containsHomePath = exports.anchorFromCommonDir = exports.loadLintConfig = exports.lintDossierFile = exports.lintDossier = exports.LintRuleRegistry = exports.defaultRules = exports.formatDossierFile = exports.formatDossierContent = exports.validateEvidence = exports.parseEvidence = exports.evidenceMatchesDossier = exports.EVIDENCE_SCHEMA_VERSION = exports.EVIDENCE_MAX_RATIONALE_CHARS = exports.EVIDENCE_MAX_BYTES = exports.createEvidenceRecord = exports.levelForScore = exports.DRY_RUN_SCHEMA_VERSION = exports.DRY_RUN_DISCLAIMER = exports.analyzeDryRun = exports.validateStepCoherence = exports.validateCoherence = exports.verifyIntegrity = exports.calculateChecksum = exports.usageParserFor = exports.SCHED_DISPATCH_EVENT = exports.parseOpenCodeUsage = exports.parseLastToolUse = exports.parseDispatchApiError = exports.parseAnnouncedWait = exports.parseAgentUsage = exports.isOpenCodeUsageStream = void 0;
|
|
30
|
+
exports.createDefaultVerificationResult = exports.scanBodyForUrls = exports.isUrlCoveredByDeclared = exports.isPlaceholderUrl = exports.findUndeclaredUrls = exports.findStaleReferences = exports.collectDeclaredUrls = exports.readFileIfExists = exports.getErrorStack = exports.getErrorMessage = exports.sha256Hex = exports.sha256Hash = exports.TRUSTED_AUTHOR_ASSOCIATIONS = exports.isTrustedAuthorAssociation = exports.VALID_TRACE_STATUSES = exports.createTraceRecorder = exports.resolveTraceConfig = exports.toSpkiPem = exports.signatureCoverage = exports.publicKeysMatch = exports.normalizePublicKey = exports.isSupportedPublicKey = exports.canonicalizeFrontmatter = exports.buildSignedPayload = exports.VerifierRegistry = exports.KmsVerifier = exports.KmsSigner = exports.getVerifierRegistry = exports.Ed25519Verifier = exports.Ed25519Signer = exports.verifyWithKms = exports.verifyWithEd25519 = exports.verifySignature = exports.trustedKeysFromContent = exports.reportTrustedKeyProblems = exports.parseTrustedKeys = exports.loadTrustedKeys = exports.isKmsKeyIdentifier = exports.findTrustedIdentifier = exports.scanMarkdown = exports.scanDossierFile = exports.scanDossier = exports.SecurityRuleRegistry = exports.defaultSecurityRules = void 0;
|
|
31
31
|
var agent_usage_1 = require("./agent-usage");
|
|
32
32
|
Object.defineProperty(exports, "isOpenCodeUsageStream", { enumerable: true, get: function () { return agent_usage_1.isOpenCodeUsageStream; } });
|
|
33
33
|
Object.defineProperty(exports, "parseAgentUsage", { enumerable: true, get: function () { return agent_usage_1.parseAgentUsage; } });
|
|
@@ -68,6 +68,16 @@ Object.defineProperty(exports, "LintRuleRegistry", { enumerable: true, get: func
|
|
|
68
68
|
Object.defineProperty(exports, "lintDossier", { enumerable: true, get: function () { return linter_1.lintDossier; } });
|
|
69
69
|
Object.defineProperty(exports, "lintDossierFile", { enumerable: true, get: function () { return linter_1.lintDossierFile; } });
|
|
70
70
|
Object.defineProperty(exports, "loadLintConfig", { enumerable: true, get: function () { return linter_1.loadLintConfig; } });
|
|
71
|
+
var local_path_1 = require("./local-path");
|
|
72
|
+
Object.defineProperty(exports, "anchorFromCommonDir", { enumerable: true, get: function () { return local_path_1.anchorFromCommonDir; } });
|
|
73
|
+
Object.defineProperty(exports, "containsHomePath", { enumerable: true, get: function () { return local_path_1.containsHomePath; } });
|
|
74
|
+
Object.defineProperty(exports, "isPortablePath", { enumerable: true, get: function () { return local_path_1.isPortablePath; } });
|
|
75
|
+
Object.defineProperty(exports, "LOCAL_PATH_TOKEN", { enumerable: true, get: function () { return local_path_1.LOCAL_PATH_TOKEN; } });
|
|
76
|
+
Object.defineProperty(exports, "parseWorktreePorcelain", { enumerable: true, get: function () { return local_path_1.parseWorktreePorcelain; } });
|
|
77
|
+
Object.defineProperty(exports, "REPO_PATH_TOKEN", { enumerable: true, get: function () { return local_path_1.REPO_PATH_TOKEN; } });
|
|
78
|
+
Object.defineProperty(exports, "redactHomePaths", { enumerable: true, get: function () { return local_path_1.redactHomePaths; } });
|
|
79
|
+
Object.defineProperty(exports, "resolvePortablePath", { enumerable: true, get: function () { return local_path_1.resolvePortablePath; } });
|
|
80
|
+
Object.defineProperty(exports, "toPortablePath", { enumerable: true, get: function () { return local_path_1.toPortablePath; } });
|
|
71
81
|
// Parser exports
|
|
72
82
|
var parser_1 = require("./parser");
|
|
73
83
|
Object.defineProperty(exports, "parseDossierContent", { enumerable: true, get: function () { return parser_1.parseDossierContent; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;;;AAIH,6CASuB;AARrB,oHAAA,qBAAqB,OAAA;AACrB,8GAAA,eAAe,OAAA;AACf,iHAAA,kBAAkB,OAAA;AAClB,oHAAA,qBAAqB,OAAA;AACrB,+GAAA,gBAAgB,OAAA;AAChB,iHAAA,kBAAkB,OAAA;AAClB,mHAAA,oBAAoB,OAAA;AACpB,6GAAA,cAAc,OAAA;AAEhB,mBAAmB;AACnB,uCAAgE;AAAvD,6GAAA,iBAAiB,OAAA;AAAE,2GAAA,eAAe,OAAA;AAU3C,yCAAuE;AAA9D,8GAAA,iBAAiB,OAAA;AAAE,kHAAA,qBAAqB,OAAA;AAYjD,qCAKmB;AAJjB,wGAAA,aAAa,OAAA;AACb,6GAAA,kBAAkB,OAAA;AAClB,iHAAA,sBAAsB,OAAA;AACtB,wGAAA,aAAa,OAAA;AA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4HAAA,0BAA0B,OAAA;AAAE,6HAAA,2BAA2B,OAAA;AAChE,eAAe;AACf,0CAAwB;AACxB,mBAAmB;AACnB,yCAAuD;AAA9C,oGAAA,UAAU,OAAA;AAAE,mGAAA,SAAS,OAAA;AAC9B,kBAAkB;AAClB,yCAAgE;AAAvD,yGAAA,eAAe,OAAA;AAAE,uGAAA,aAAa,OAAA;AACvC,wBAAwB;AACxB,iCAA8C;AAArC,sGAAA,gBAAgB,OAAA;AACzB,yBAAyB;AACzB,mDAO6B;AAN3B,kHAAA,mBAAmB,OAAA;AACnB,kHAAA,mBAAmB,OAAA;AACnB,iHAAA,kBAAkB,OAAA;AAClB,+GAAA,gBAAgB,OAAA;AAChB,qHAAA,sBAAsB,OAAA;AACtB,8GAAA,eAAe,OAAA;AAEjB,yBAAyB;AACzB,qDAAuE;AAA9D,+HAAA,+BAA+B,OAAA"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep local filesystem paths out of public GitHub comments (#1085).
|
|
3
|
+
*
|
|
4
|
+
* Runstate milestones, plan artifacts and sched alerts are issue comments, and in a public
|
|
5
|
+
* repository every byte of them is published. An absolute path such as a worktree under the
|
|
6
|
+
* operator's home directory leaks the user name and directory layout. So every writer
|
|
7
|
+
* rewrites a local path into a PORTABLE form before posting, and every reader resolves that
|
|
8
|
+
* form back against the machine it runs on — never against the posted string:
|
|
9
|
+
*
|
|
10
|
+
* - `<repo>/<relative>` — inside the repository's main checkout, or in the `worktrees/`
|
|
11
|
+
* directory beside it (the `<project>/main` + `<project>/worktrees/<x>` layout gives
|
|
12
|
+
* `<repo>/../worktrees/<x>`);
|
|
13
|
+
* - `<local>/<basename>` — anywhere else; resolvable only by matching a local worktree.
|
|
14
|
+
*
|
|
15
|
+
* {@link redactHomePaths} is the generic backstop: whatever a caller forgot to rewrite, a
|
|
16
|
+
* home-directory path never reaches a posted body.
|
|
17
|
+
*
|
|
18
|
+
* Pure apart from `os.homedir()` as a default: callers run the git commands that find the
|
|
19
|
+
* anchor (the main checkout root) and the worktree list, so this stays unit-testable.
|
|
20
|
+
*/
|
|
21
|
+
/** Prefix of a path recorded relative to the repository's main checkout. */
|
|
22
|
+
export declare const REPO_PATH_TOKEN = "<repo>";
|
|
23
|
+
/** Prefix of a path outside the repository; only its basename is kept. */
|
|
24
|
+
export declare const LOCAL_PATH_TOKEN = "<local>";
|
|
25
|
+
export interface LocalPathOptions {
|
|
26
|
+
/**
|
|
27
|
+
* The repository's main checkout root — `dirname(git rev-parse --git-common-dir)`, the
|
|
28
|
+
* one directory every worktree of the repo agrees on. `null` when not in a repository.
|
|
29
|
+
*/
|
|
30
|
+
anchor?: string | null;
|
|
31
|
+
/** Extra home directories to treat as private (default: the current user's home). */
|
|
32
|
+
homes?: readonly string[];
|
|
33
|
+
}
|
|
34
|
+
/** True when `text` contains a home-directory path. */
|
|
35
|
+
export declare function containsHomePath(text: string, opts?: LocalPathOptions): boolean;
|
|
36
|
+
/** True for a value already in portable form. */
|
|
37
|
+
export declare function isPortablePath(value: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Rewrite a local path into its portable, publishable form.
|
|
40
|
+
*
|
|
41
|
+
* A relative `value` is resolved against `cwd` first (when given; otherwise it is returned
|
|
42
|
+
* unchanged — it carries no absolute prefix to leak). An already-portable value is returned
|
|
43
|
+
* as is. The result never contains a home-directory path.
|
|
44
|
+
*/
|
|
45
|
+
export declare function toPortablePath(value: string, opts?: LocalPathOptions & {
|
|
46
|
+
cwd?: string;
|
|
47
|
+
}): string;
|
|
48
|
+
/**
|
|
49
|
+
* Resolve a recorded path (portable or legacy absolute) against THIS machine.
|
|
50
|
+
*
|
|
51
|
+
* `<repo>/…` resolves against `anchor`; `<local>/<name>` matches the one local worktree
|
|
52
|
+
* whose basename is `<name>` (none or several → `null`); a legacy absolute path is returned
|
|
53
|
+
* normalized; any other relative value resolves against `anchor`. A `<repo>/…` value that
|
|
54
|
+
* lands outside the checkout and its sibling `worktrees/` directory is refused (`null`) —
|
|
55
|
+
* the recorded string comes from an issue comment and must not steer a caller anywhere.
|
|
56
|
+
*/
|
|
57
|
+
export declare function resolvePortablePath(value: string, opts?: {
|
|
58
|
+
anchor?: string | null;
|
|
59
|
+
worktrees?: readonly string[];
|
|
60
|
+
}): string | null;
|
|
61
|
+
/**
|
|
62
|
+
* Replace every home-directory path in `text` with its portable form: `<repo>/…` when it is
|
|
63
|
+
* inside the repository (`opts.anchor`), otherwise `<local>/<basename>`. Trailing sentence
|
|
64
|
+
* punctuation stays outside the replacement. Idempotent.
|
|
65
|
+
*/
|
|
66
|
+
export declare function redactHomePaths(text: string, opts?: LocalPathOptions): string;
|
|
67
|
+
/**
|
|
68
|
+
* The `<repo>` anchor from `git rev-parse --path-format=absolute --git-common-dir` output:
|
|
69
|
+
* the common dir's parent for an ordinary repository, the common dir itself for a bare one.
|
|
70
|
+
* `null` for a failed or non-absolute answer.
|
|
71
|
+
*/
|
|
72
|
+
export declare function anchorFromCommonDir(stdout: string | null | undefined): string | null;
|
|
73
|
+
/** Worktree paths listed by `git worktree list --porcelain` output (`[]` for none/failure). */
|
|
74
|
+
export declare function parseWorktreePorcelain(stdout: string | null | undefined): string[];
|
|
75
|
+
//# sourceMappingURL=local-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-path.d.ts","sourceRoot":"","sources":["../src/local-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,4EAA4E;AAC5E,eAAO,MAAM,eAAe,WAAW,CAAC;AACxC,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,YAAY,CAAC;AA0D1C,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,qFAAqF;IACrF,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;AAED,uDAAuD;AACvD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAEnF;AAsBD,iDAAiD;AACjD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAOrD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,gBAAgB,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAC7C,MAAM,CA+BR;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAO,GACnE,MAAM,GAAG,IAAI,CAoBf;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,gBAAqB,GAAG,MAAM,CAcjF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAIpF;AAED,+FAA+F;AAC/F,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,EAAE,CAKlF"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Keep local filesystem paths out of public GitHub comments (#1085).
|
|
4
|
+
*
|
|
5
|
+
* Runstate milestones, plan artifacts and sched alerts are issue comments, and in a public
|
|
6
|
+
* repository every byte of them is published. An absolute path such as a worktree under the
|
|
7
|
+
* operator's home directory leaks the user name and directory layout. So every writer
|
|
8
|
+
* rewrites a local path into a PORTABLE form before posting, and every reader resolves that
|
|
9
|
+
* form back against the machine it runs on — never against the posted string:
|
|
10
|
+
*
|
|
11
|
+
* - `<repo>/<relative>` — inside the repository's main checkout, or in the `worktrees/`
|
|
12
|
+
* directory beside it (the `<project>/main` + `<project>/worktrees/<x>` layout gives
|
|
13
|
+
* `<repo>/../worktrees/<x>`);
|
|
14
|
+
* - `<local>/<basename>` — anywhere else; resolvable only by matching a local worktree.
|
|
15
|
+
*
|
|
16
|
+
* {@link redactHomePaths} is the generic backstop: whatever a caller forgot to rewrite, a
|
|
17
|
+
* home-directory path never reaches a posted body.
|
|
18
|
+
*
|
|
19
|
+
* Pure apart from `os.homedir()` as a default: callers run the git commands that find the
|
|
20
|
+
* anchor (the main checkout root) and the worktree list, so this stays unit-testable.
|
|
21
|
+
*/
|
|
22
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
25
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
26
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
27
|
+
}
|
|
28
|
+
Object.defineProperty(o, k2, desc);
|
|
29
|
+
}) : (function(o, m, k, k2) {
|
|
30
|
+
if (k2 === undefined) k2 = k;
|
|
31
|
+
o[k2] = m[k];
|
|
32
|
+
}));
|
|
33
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
34
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
35
|
+
}) : function(o, v) {
|
|
36
|
+
o["default"] = v;
|
|
37
|
+
});
|
|
38
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
39
|
+
var ownKeys = function(o) {
|
|
40
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
41
|
+
var ar = [];
|
|
42
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
43
|
+
return ar;
|
|
44
|
+
};
|
|
45
|
+
return ownKeys(o);
|
|
46
|
+
};
|
|
47
|
+
return function (mod) {
|
|
48
|
+
if (mod && mod.__esModule) return mod;
|
|
49
|
+
var result = {};
|
|
50
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
51
|
+
__setModuleDefault(result, mod);
|
|
52
|
+
return result;
|
|
53
|
+
};
|
|
54
|
+
})();
|
|
55
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
|
+
exports.LOCAL_PATH_TOKEN = exports.REPO_PATH_TOKEN = void 0;
|
|
57
|
+
exports.containsHomePath = containsHomePath;
|
|
58
|
+
exports.isPortablePath = isPortablePath;
|
|
59
|
+
exports.toPortablePath = toPortablePath;
|
|
60
|
+
exports.resolvePortablePath = resolvePortablePath;
|
|
61
|
+
exports.redactHomePaths = redactHomePaths;
|
|
62
|
+
exports.anchorFromCommonDir = anchorFromCommonDir;
|
|
63
|
+
exports.parseWorktreePorcelain = parseWorktreePorcelain;
|
|
64
|
+
const os = __importStar(require("node:os"));
|
|
65
|
+
const path = __importStar(require("node:path"));
|
|
66
|
+
/** Prefix of a path recorded relative to the repository's main checkout. */
|
|
67
|
+
exports.REPO_PATH_TOKEN = '<repo>';
|
|
68
|
+
/** Prefix of a path outside the repository; only its basename is kept. */
|
|
69
|
+
exports.LOCAL_PATH_TOKEN = '<local>';
|
|
70
|
+
/** Characters that may appear in a path embedded in free text (stops at quotes, brackets, `,`, `;`). */
|
|
71
|
+
const PATH_CHAR = String.raw `[^\s'"\x60<>()\[\]{}|,;]`;
|
|
72
|
+
/** A path segment (no separator). */
|
|
73
|
+
const SEGMENT = String.raw `[^\s'"\x60<>()\[\]{}|,;/\\]`;
|
|
74
|
+
/**
|
|
75
|
+
* Home-directory paths matched on any machine. Each pattern captures (group 1, when it has
|
|
76
|
+
* one) the rest of the path after the user name:
|
|
77
|
+
* - `/home/<user>`, `/Users/<user>`, plus the WSL / git-bash / ostree spellings
|
|
78
|
+
* `/mnt/c/Users/<user>`, `/c/Users/<user>`, `/var/home/<user>`;
|
|
79
|
+
* - `C:\Users\<user>` (either slash);
|
|
80
|
+
* - a UNC path whose share contains `home\<user>` or `Users\<user>` (`\\wsl.localhost\…`);
|
|
81
|
+
* - a dash-encoded directory name carrying the path, `-home-<user>-…` (agent tools name
|
|
82
|
+
* per-project directories that way). It has no group: the whole name becomes `<local>`,
|
|
83
|
+
* since where the user name ends inside it is unknowable.
|
|
84
|
+
*
|
|
85
|
+
* The lookbehinds keep a URL (`example.com/home/x`) and an already-portable value
|
|
86
|
+
* (`<repo>/home/x`) from matching, which is what makes redaction idempotent.
|
|
87
|
+
*/
|
|
88
|
+
const HOME_PATTERNS = [
|
|
89
|
+
String.raw `(?<![\w.~>-])(?:/mnt/[A-Za-z]|/[A-Za-z]|/var)?/(?:home|Users)/${SEGMENT}+((?:/${PATH_CHAR}*)?)`,
|
|
90
|
+
String.raw `(?<![\w])[A-Za-z]:[\\/]+[Uu]sers[\\/]+${SEGMENT}+((?:[\\/]${PATH_CHAR}*)?)`,
|
|
91
|
+
String.raw `(?<![\w])\\\\[^\\\s'"]+\\(?:[^\\\s'"]+\\)*?(?:home|[Uu]sers)\\${SEGMENT}+((?:\\${PATH_CHAR}*)?)`,
|
|
92
|
+
String.raw `(?<![\w.])-(?:home|Users)-${SEGMENT}+`,
|
|
93
|
+
];
|
|
94
|
+
/** The directory beside the main checkout that holds its worktrees (`<project>/worktrees`). */
|
|
95
|
+
const SIBLING_WORKTREES_DIR = 'worktrees';
|
|
96
|
+
/** Directories whose children are user names. */
|
|
97
|
+
const HOME_ROOTS = new Set(['/home', '/Users']);
|
|
98
|
+
function escapeRegExp(text) {
|
|
99
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
100
|
+
}
|
|
101
|
+
/** The current user's home, when it is a real directory path worth matching. */
|
|
102
|
+
function defaultHomes() {
|
|
103
|
+
try {
|
|
104
|
+
const home = os.homedir();
|
|
105
|
+
return home && home !== '/' && home.length > 1 ? [home] : [];
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
return [];
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function homeRegex(homes) {
|
|
112
|
+
const extra = homes
|
|
113
|
+
.filter((h) => h.length > 1 && h !== '/')
|
|
114
|
+
.map((h) => String.raw `(?<![\w./-])${escapeRegExp(h.replace(/[\\/]+$/, ''))}((?:[\\/]${PATH_CHAR}*)?)(?=$|[^\w.-])`);
|
|
115
|
+
return new RegExp([...HOME_PATTERNS, ...extra].join('|'), 'g');
|
|
116
|
+
}
|
|
117
|
+
/** True when `text` contains a home-directory path. */
|
|
118
|
+
function containsHomePath(text, opts = {}) {
|
|
119
|
+
return homeRegex(opts.homes ?? defaultHomes()).test(text);
|
|
120
|
+
}
|
|
121
|
+
function lastSegment(rest) {
|
|
122
|
+
const parts = rest.split(/[\\/]+/).filter((p) => p.length > 0);
|
|
123
|
+
return parts.length > 0 ? parts[parts.length - 1] : '';
|
|
124
|
+
}
|
|
125
|
+
function localToken(rest) {
|
|
126
|
+
const name = lastSegment(rest);
|
|
127
|
+
return name ? `${exports.LOCAL_PATH_TOKEN}/${name}` : exports.LOCAL_PATH_TOKEN;
|
|
128
|
+
}
|
|
129
|
+
/** Whether `p` is `dir` or below it. */
|
|
130
|
+
function isWithin(dir, p) {
|
|
131
|
+
const rel = path.relative(dir, p);
|
|
132
|
+
return rel === '' || (!rel.startsWith('..') && !path.isAbsolute(rel));
|
|
133
|
+
}
|
|
134
|
+
function toPosix(rel) {
|
|
135
|
+
return rel.split(path.sep).join('/');
|
|
136
|
+
}
|
|
137
|
+
/** True for a value already in portable form. */
|
|
138
|
+
function isPortablePath(value) {
|
|
139
|
+
return (value === exports.REPO_PATH_TOKEN ||
|
|
140
|
+
value.startsWith(`${exports.REPO_PATH_TOKEN}/`) ||
|
|
141
|
+
value === exports.LOCAL_PATH_TOKEN ||
|
|
142
|
+
value.startsWith(`${exports.LOCAL_PATH_TOKEN}/`));
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Rewrite a local path into its portable, publishable form.
|
|
146
|
+
*
|
|
147
|
+
* A relative `value` is resolved against `cwd` first (when given; otherwise it is returned
|
|
148
|
+
* unchanged — it carries no absolute prefix to leak). An already-portable value is returned
|
|
149
|
+
* as is. The result never contains a home-directory path.
|
|
150
|
+
*/
|
|
151
|
+
function toPortablePath(value, opts = {}) {
|
|
152
|
+
if (isPortablePath(value))
|
|
153
|
+
return value;
|
|
154
|
+
if (!path.isAbsolute(value)) {
|
|
155
|
+
if (opts.cwd === undefined)
|
|
156
|
+
return value;
|
|
157
|
+
value = path.resolve(opts.cwd, value);
|
|
158
|
+
}
|
|
159
|
+
const abs = path.resolve(value);
|
|
160
|
+
const homes = opts.homes ?? defaultHomes();
|
|
161
|
+
const anchor = opts.anchor ? path.resolve(opts.anchor) : null;
|
|
162
|
+
if (anchor !== null) {
|
|
163
|
+
let candidate = null;
|
|
164
|
+
if (isWithin(anchor, abs)) {
|
|
165
|
+
const rel = path.relative(anchor, abs);
|
|
166
|
+
candidate = rel === '' ? exports.REPO_PATH_TOKEN : `${exports.REPO_PATH_TOKEN}/${toPosix(rel)}`;
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
// Only the sibling `worktrees/` directory (the layout `isSafeWorktree` in sched also
|
|
170
|
+
// accepts): any other neighbour of the checkout would publish that folder's name.
|
|
171
|
+
const siblings = path.join(path.dirname(anchor), SIBLING_WORKTREES_DIR);
|
|
172
|
+
if (isWithin(siblings, abs)) {
|
|
173
|
+
candidate = `${exports.REPO_PATH_TOKEN}/../${toPosix(path.relative(path.dirname(anchor), abs))}`;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (candidate !== null && !containsHomePath(candidate, { homes }))
|
|
177
|
+
return candidate;
|
|
178
|
+
}
|
|
179
|
+
// Outside the repository: keep only the basename — and never a user name, which is
|
|
180
|
+
// what the basename of a home directory itself would be.
|
|
181
|
+
for (const home of homes) {
|
|
182
|
+
if (abs === path.resolve(home))
|
|
183
|
+
return exports.LOCAL_PATH_TOKEN;
|
|
184
|
+
}
|
|
185
|
+
if (HOME_ROOTS.has(path.dirname(abs)))
|
|
186
|
+
return exports.LOCAL_PATH_TOKEN;
|
|
187
|
+
return localToken(abs);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Resolve a recorded path (portable or legacy absolute) against THIS machine.
|
|
191
|
+
*
|
|
192
|
+
* `<repo>/…` resolves against `anchor`; `<local>/<name>` matches the one local worktree
|
|
193
|
+
* whose basename is `<name>` (none or several → `null`); a legacy absolute path is returned
|
|
194
|
+
* normalized; any other relative value resolves against `anchor`. A `<repo>/…` value that
|
|
195
|
+
* lands outside the checkout and its sibling `worktrees/` directory is refused (`null`) —
|
|
196
|
+
* the recorded string comes from an issue comment and must not steer a caller anywhere.
|
|
197
|
+
*/
|
|
198
|
+
function resolvePortablePath(value, opts = {}) {
|
|
199
|
+
if (value.length === 0 || value.includes('\0'))
|
|
200
|
+
return null;
|
|
201
|
+
const anchor = opts.anchor ? path.resolve(opts.anchor) : null;
|
|
202
|
+
if (value === exports.LOCAL_PATH_TOKEN || value.startsWith(`${exports.LOCAL_PATH_TOKEN}/`)) {
|
|
203
|
+
const name = value.slice(exports.LOCAL_PATH_TOKEN.length + 1);
|
|
204
|
+
if (!name || /[\\/]/.test(name) || name === '.' || name === '..')
|
|
205
|
+
return null;
|
|
206
|
+
const matches = (opts.worktrees ?? []).filter((w) => path.basename(w) === name);
|
|
207
|
+
return matches.length === 1 ? path.resolve(matches[0]) : null;
|
|
208
|
+
}
|
|
209
|
+
if (path.isAbsolute(value))
|
|
210
|
+
return path.resolve(value);
|
|
211
|
+
if (anchor === null)
|
|
212
|
+
return null;
|
|
213
|
+
const rel = value === exports.REPO_PATH_TOKEN
|
|
214
|
+
? ''
|
|
215
|
+
: value.startsWith(`${exports.REPO_PATH_TOKEN}/`)
|
|
216
|
+
? value.slice(exports.REPO_PATH_TOKEN.length + 1)
|
|
217
|
+
: value;
|
|
218
|
+
const resolved = path.resolve(anchor, rel);
|
|
219
|
+
const siblings = path.join(path.dirname(anchor), SIBLING_WORKTREES_DIR);
|
|
220
|
+
return isWithin(anchor, resolved) || isWithin(siblings, resolved) ? resolved : null;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Replace every home-directory path in `text` with its portable form: `<repo>/…` when it is
|
|
224
|
+
* inside the repository (`opts.anchor`), otherwise `<local>/<basename>`. Trailing sentence
|
|
225
|
+
* punctuation stays outside the replacement. Idempotent.
|
|
226
|
+
*/
|
|
227
|
+
function redactHomePaths(text, opts = {}) {
|
|
228
|
+
const homes = opts.homes ?? defaultHomes();
|
|
229
|
+
return text.replace(homeRegex(homes), (match, ...groups) => {
|
|
230
|
+
const trail = /[.:!?]+$/.exec(match)?.[0] ?? '';
|
|
231
|
+
const core = trail ? match.slice(0, -trail.length) : match;
|
|
232
|
+
// `groups` is the capture groups, then the offset and the whole input (no named groups
|
|
233
|
+
// are used). At most one alternative matched, so the first string group is its rest.
|
|
234
|
+
const rest = groups.slice(0, -2).find((g) => typeof g === 'string') ?? '';
|
|
235
|
+
const restCore = trail && rest.endsWith(trail) ? rest.slice(0, -trail.length) : rest;
|
|
236
|
+
if (core.startsWith('/') && opts.anchor) {
|
|
237
|
+
return toPortablePath(core, { anchor: opts.anchor, homes }) + trail;
|
|
238
|
+
}
|
|
239
|
+
return localToken(restCore) + trail;
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* The `<repo>` anchor from `git rev-parse --path-format=absolute --git-common-dir` output:
|
|
244
|
+
* the common dir's parent for an ordinary repository, the common dir itself for a bare one.
|
|
245
|
+
* `null` for a failed or non-absolute answer.
|
|
246
|
+
*/
|
|
247
|
+
function anchorFromCommonDir(stdout) {
|
|
248
|
+
const common = stdout?.trim() ?? '';
|
|
249
|
+
if (!path.isAbsolute(common))
|
|
250
|
+
return null;
|
|
251
|
+
return path.basename(common) === '.git' ? path.dirname(common) : common;
|
|
252
|
+
}
|
|
253
|
+
/** Worktree paths listed by `git worktree list --porcelain` output (`[]` for none/failure). */
|
|
254
|
+
function parseWorktreePorcelain(stdout) {
|
|
255
|
+
return (stdout ?? '')
|
|
256
|
+
.split('\n')
|
|
257
|
+
.filter((line) => line.startsWith('worktree '))
|
|
258
|
+
.map((line) => line.slice('worktree '.length));
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=local-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-path.js","sourceRoot":"","sources":["../src/local-path.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EH,4CAEC;AAuBD,wCAOC;AASD,wCAkCC;AAWD,kDAuBC;AAOD,0CAcC;AAOD,kDAIC;AAGD,wDAKC;AAhOD,4CAA8B;AAC9B,gDAAkC;AAElC,4EAA4E;AAC/D,QAAA,eAAe,GAAG,QAAQ,CAAC;AACxC,0EAA0E;AAC7D,QAAA,gBAAgB,GAAG,SAAS,CAAC;AAE1C,wGAAwG;AACxG,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA,0BAA0B,CAAC;AACvD,qCAAqC;AACrC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA,6BAA6B,CAAC;AAExD;;;;;;;;;;;;;GAaG;AACH,MAAM,aAAa,GAAsB;IACvC,MAAM,CAAC,GAAG,CAAA,iEAAiE,OAAO,SAAS,SAAS,MAAM;IAC1G,MAAM,CAAC,GAAG,CAAA,yCAAyC,OAAO,aAAa,SAAS,MAAM;IACtF,MAAM,CAAC,GAAG,CAAA,iEAAiE,OAAO,UAAU,SAAS,MAAM;IAC3G,MAAM,CAAC,GAAG,CAAA,6BAA6B,OAAO,GAAG;CAClD,CAAC;AAEF,+FAA+F;AAC/F,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAE1C,iDAAiD;AACjD,MAAM,UAAU,GAAwB,IAAI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,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AAC1E,CAAC;AAED,+FAA+F;AAC/F,SAAgB,sBAAsB,CAAC,MAAiC;IACtE,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC;SAClB,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;SAC9C,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AACnD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-dossier/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0-next.618.1",
|
|
4
4
|
"description": "TypeScript library for parsing, signing, and verifying signed, versioned agent skills used in model-driven orchestration.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|