pairit 0.3.4 → 0.3.5

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 CHANGED
@@ -118,7 +118,8 @@ pairit --env staging admin activity # staging
118
118
  survey-a r@example.com 1 (0/1) 0 9 40 html
119
119
  ```
120
120
 
121
- - **Active**: sessions that have not finished and changed in the last 15 minutes. **Group** sessions have been matched into a group; **solo** ones have not.
121
+ - **Active**: sessions that have not finished, changed in the last 15 minutes, and started in the last 12 hours. **Group** sessions have been matched into a group; **solo** ones have not.
122
+ - Older sessions that still change are listed under "Not counted". This is usually a browser tab left open on a page whose `html` component saves on a timer.
122
123
  - **Waiting**: active sessions on a page with a `matchmaking` component that have not been matched yet.
123
124
  - **Today**: sessions started in the last 24 hours. **Total**: all sessions of the config.
124
125
  - **Flags**: `group` (the config has a matchmaking pool or component), then the features it uses: `chat`, `live-workspace`, `html`, `agents`.
package/dist/index.js CHANGED
@@ -9567,7 +9567,12 @@ function formatActivity(report, options = {}) {
9567
9567
  lines.push(row.live ? paint("1;31", `● ${text}`) : ` ${text}`);
9568
9568
  }
9569
9569
  lines.push("");
9570
- lines.push(`Since ${report.since}. Active: not finished and changed in the last ${report.activeWindowMinutes} min. Today: started in the last 24 h.`);
9570
+ const stale = report.configs.filter((entry) => (entry.staleOpen ?? 0) > 0);
9571
+ if (stale.length > 0 && report.staleAfterHours) {
9572
+ lines.push(`Not counted: sessions that started over ${report.staleAfterHours} h ago but still change, usually a tab left open: ${stale.map((entry) => `${entry.configId} (${entry.staleOpen})`).join(", ")}.`);
9573
+ }
9574
+ const started = report.staleAfterHours ? `, changed in the last ${report.activeWindowMinutes} min, and started in the last ${report.staleAfterHours} h` : ` and changed in the last ${report.activeWindowMinutes} min`;
9575
+ lines.push(`Since ${report.since}. Active: not finished${started}. Today: started in the last 24 h.`);
9571
9576
  return lines.join(`
9572
9577
  `);
9573
9578
  }
@@ -10022,7 +10027,7 @@ function singleGroupSize(config) {
10022
10027
 
10023
10028
  // src/index.ts
10024
10029
  var program2 = new Command;
10025
- program2.name("pairit").description("CLI for Pairit experiment configs").version("0.3.4").option("--env <name>", "Target environment: staging or production", (value) => {
10030
+ program2.name("pairit").description("CLI for Pairit experiment configs").version("0.3.5").option("--env <name>", "Target environment: staging or production", (value) => {
10026
10031
  try {
10027
10032
  return parseEnvName(value);
10028
10033
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pairit",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "CLI for the Pairit behavioral science experiment platform",
5
5
  "type": "module",
6
6
  "bin": {