@osfactory/har 0.32.1 → 0.32.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/dist/index.js +14 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6718,11 +6718,7 @@ function buildOtelHooksConfig(options) {
|
|
|
6718
6718
|
function writeOtelHooksConfig(config2, hooksHome = getOtelHooksHome()) {
|
|
6719
6719
|
fs42.mkdirSync(hooksHome, { recursive: true });
|
|
6720
6720
|
const configPath = getOtelHooksConfigPath(hooksHome);
|
|
6721
|
-
|
|
6722
|
-
_comment: "Managed by har telemetry \u2014 do not edit by hand; use: har telemetry on|off",
|
|
6723
|
-
...config2
|
|
6724
|
-
};
|
|
6725
|
-
fs42.writeFileSync(configPath, `${JSON.stringify(payload, null, 2)}
|
|
6721
|
+
fs42.writeFileSync(configPath, `${JSON.stringify(config2, null, 2)}
|
|
6726
6722
|
`);
|
|
6727
6723
|
return configPath;
|
|
6728
6724
|
}
|
|
@@ -75045,6 +75041,12 @@ function computeWorktreeSnapshot(checkoutDir) {
|
|
|
75045
75041
|
|
|
75046
75042
|
// src/core/validations.ts
|
|
75047
75043
|
var VALIDATIONS_DIR = "validations";
|
|
75044
|
+
function resolveValidationCheckoutDir(input) {
|
|
75045
|
+
const candidates = [input.worktreePath, input.workDir, input.harnessRoot].filter(
|
|
75046
|
+
(value) => Boolean(value)
|
|
75047
|
+
);
|
|
75048
|
+
return candidates.find(isCheckoutRoot) ?? candidates[0] ?? input.harnessRoot;
|
|
75049
|
+
}
|
|
75048
75050
|
function getValidationsDir(checkoutDir) {
|
|
75049
75051
|
return path36.join(checkoutDir, ".har", VALIDATIONS_DIR);
|
|
75050
75052
|
}
|
|
@@ -76901,7 +76903,12 @@ Usage from Cursor / Claude / Codex (@osfactory/otel-hook) will appear under Work
|
|
|
76901
76903
|
if (verification) {
|
|
76902
76904
|
try {
|
|
76903
76905
|
const harnessRoot = resolveHarnessRoot(options.repoPath);
|
|
76904
|
-
const
|
|
76906
|
+
const session = readSlotRegistry(harnessRoot, options.agentId);
|
|
76907
|
+
const checkoutDir = resolveValidationCheckoutDir({
|
|
76908
|
+
worktreePath: session?.worktreePath,
|
|
76909
|
+
workDir: resolveAgentWorkDir(harnessRoot, options.agentId),
|
|
76910
|
+
harnessRoot
|
|
76911
|
+
});
|
|
76905
76912
|
const runId = typeof result.data === "object" && result.data !== null && !Array.isArray(result.data) ? result.data.runId : void 0;
|
|
76906
76913
|
const validation2 = recordValidation({
|
|
76907
76914
|
checkoutDir,
|
|
@@ -76911,7 +76918,6 @@ Usage from Cursor / Claude / Codex (@osfactory/otel-hook) will appear under Work
|
|
|
76911
76918
|
runId,
|
|
76912
76919
|
agentId: options.agentId
|
|
76913
76920
|
});
|
|
76914
|
-
const session = readSlotRegistry(harnessRoot, options.agentId);
|
|
76915
76921
|
if (session?.workUnitId && session.attemptId) {
|
|
76916
76922
|
bindValidationToAttempt(harnessRoot, {
|
|
76917
76923
|
workUnitId: session.workUnitId,
|
|
@@ -89730,10 +89736,7 @@ async function handleWriteEnv(argv) {
|
|
|
89730
89736
|
};
|
|
89731
89737
|
appendTelemetryEnvToFile(envFile, attrs);
|
|
89732
89738
|
if (isTelemetryEnabled()) {
|
|
89733
|
-
ensureOtelHooks({
|
|
89734
|
-
setupAgents: false,
|
|
89735
|
-
resourceAttributes: buildOtelResourceAttributes(attrs)
|
|
89736
|
-
});
|
|
89739
|
+
ensureOtelHooks({ setupAgents: false });
|
|
89737
89740
|
}
|
|
89738
89741
|
success(`Wrote session attribution to ${envFile}`);
|
|
89739
89742
|
}
|