@osfactory/har 0.31.1 → 0.32.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.js CHANGED
@@ -44337,6 +44337,7 @@ var HarnessVerificationResultSchema = external_exports.object({
44337
44337
  status: external_exports.enum(["pass", "fail"]),
44338
44338
  agent_id: external_exports.number().int().min(HAR_AGENT_SLOT_MIN),
44339
44339
  total_ms: external_exports.number().optional(),
44340
+ coverage: external_exports.number().min(0).max(100).optional(),
44340
44341
  stages: external_exports.array(HarnessVerificationStepSchema)
44341
44342
  });
44342
44343
  var HarnessStageRunStatusSchema = external_exports.enum([
@@ -44661,6 +44662,7 @@ var AgentSessionUsageSchema = external_exports.object({
44661
44662
  sessionKey: external_exports.string().min(1),
44662
44663
  agentId: external_exports.number().int().min(HAR_AGENT_SLOT_MIN),
44663
44664
  agentTool: AgentToolSchema,
44665
+ userEmail: external_exports.string().email().optional(),
44664
44666
  workDir: external_exports.string().optional(),
44665
44667
  branch: external_exports.string().optional(),
44666
44668
  suffix: external_exports.string().optional(),
@@ -76281,6 +76283,7 @@ async function syncRepoRunsAndSlots(apiUrl, repoId, repoPath, dryRun) {
76281
76283
  }
76282
76284
  if (isTelemetryEnabled() && process.env.NODE_ENV !== "test") {
76283
76285
  try {
76286
+ const userEmail = resolvePortalUserEmail();
76284
76287
  const usage2 = status.slots.flatMap(
76285
76288
  (slot) => harvestUsageForSlot({
76286
76289
  agentId: slot.agentId,
@@ -76299,7 +76302,8 @@ async function syncRepoRunsAndSlots(apiUrl, repoId, repoPath, dryRun) {
76299
76302
  agentId: slot.agentId,
76300
76303
  suffix: slot.suffix,
76301
76304
  createdAt: slot.sessionCreatedAt
76302
- })
76305
+ }),
76306
+ ...userEmail ? { userEmail } : {}
76303
76307
  }))
76304
76308
  );
76305
76309
  if (usage2.length > 0) {
@@ -57,7 +57,9 @@ then implement the TODO block in `.har/stages/db-integrity.sh`.
57
57
 
58
58
  Every script under `.har/stages/` must:
59
59
 
60
- 1. Source `harness.env` and `agent-slot.sh` from `.har/`.
60
+ 1. Source `harness.env` and `agent-slot.sh` from `.har/`. Before sourcing,
61
+ set `SCRIPT_DIR` to the `.har/` directory (not `stages/`) — `agent-slot.sh`
62
+ resolves the slot registry via `$SCRIPT_DIR/slots/...`.
61
63
  2. Take the agent slot id as `$1` (validate with `validate_agent_id`); extra
62
64
  args may follow.
63
65
  3. Load the slot env via `resolve_agent_env_file` and run checks from the
@@ -57,7 +57,9 @@ then implement the TODO block in `.har/stages/db-integrity.sh`.
57
57
 
58
58
  Every script under `.har/stages/` must:
59
59
 
60
- 1. Source `harness.env` and `agent-slot.sh` from `.har/`.
60
+ 1. Source `harness.env` and `agent-slot.sh` from `.har/`. Before sourcing,
61
+ set `SCRIPT_DIR` to the `.har/` directory (not `stages/`) — `agent-slot.sh`
62
+ resolves the slot registry via `$SCRIPT_DIR/slots/...`.
61
63
  2. Take the agent slot id as `$1` (validate with `validate_agent_id`); extra
62
64
  args may follow.
63
65
  3. Load the slot env via `resolve_agent_env_file` and run checks from the
@@ -57,7 +57,9 @@ then implement the TODO block in `.har/stages/db-integrity.sh`.
57
57
 
58
58
  Every script under `.har/stages/` must:
59
59
 
60
- 1. Source `harness.env` and `agent-slot.sh` from `.har/`.
60
+ 1. Source `harness.env` and `agent-slot.sh` from `.har/`. Before sourcing,
61
+ set `SCRIPT_DIR` to the `.har/` directory (not `stages/`) — `agent-slot.sh`
62
+ resolves the slot registry via `$SCRIPT_DIR/slots/...`.
61
63
  2. Take the agent slot id as `$1` (validate with `validate_agent_id`); extra
62
64
  args may follow.
63
65
  3. Load the slot env via `resolve_agent_env_file` and run checks from the
@@ -15,6 +15,8 @@ set -euo pipefail
15
15
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
16
16
  HARNESS_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
17
17
  REPO_ROOT="$(cd "$HARNESS_DIR/.." && pwd)"
18
+ # agent-slot.sh expects SCRIPT_DIR to be .har/ (slot registry lives there)
19
+ SCRIPT_DIR="$HARNESS_DIR"
18
20
 
19
21
  # shellcheck source=/dev/null
20
22
  source "$HARNESS_DIR/harness.env"
@@ -9,6 +9,8 @@ set -euo pipefail
9
9
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10
10
  HARNESS_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
11
11
  REPO_ROOT="$(cd "$HARNESS_DIR/.." && pwd)"
12
+ # agent-slot.sh expects SCRIPT_DIR to be .har/ (slot registry lives there)
13
+ SCRIPT_DIR="$HARNESS_DIR"
12
14
 
13
15
  # shellcheck source=/dev/null
14
16
  source "$HARNESS_DIR/harness.env"
@@ -13,6 +13,8 @@ set -euo pipefail
13
13
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14
14
  HARNESS_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
15
15
  REPO_ROOT="$(cd "$HARNESS_DIR/.." && pwd)"
16
+ # agent-slot.sh expects SCRIPT_DIR to be .har/ (slot registry lives there)
17
+ SCRIPT_DIR="$HARNESS_DIR"
16
18
 
17
19
  # shellcheck source=/dev/null
18
20
  source "$HARNESS_DIR/harness.env"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osfactory/har",
3
- "version": "0.31.1",
3
+ "version": "0.32.1",
4
4
  "description": "LLM-powered CLI for reproducible agent development environments",
5
5
  "keywords": [
6
6
  "har",