humanish 0.65.0 → 0.67.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 +14 -3
- package/dist/actor-contract.d.ts +2 -1
- package/dist/actor-contract.js.map +1 -1
- package/dist/computer-use.d.ts +17 -0
- package/dist/computer-use.js +114 -5
- package/dist/computer-use.js.map +1 -1
- package/dist/cua-actor-lab.d.ts +23 -0
- package/dist/cua-actor-lab.js +90 -19
- package/dist/cua-actor-lab.js.map +1 -1
- package/dist/e2b-desktop-launch.d.ts +11 -0
- package/dist/e2b-desktop-launch.js.map +1 -1
- package/dist/e2b-terminal-lab.js +20 -1
- package/dist/e2b-terminal-lab.js.map +1 -1
- package/dist/lab-config.d.ts +17 -0
- package/dist/lab-config.js +14 -0
- package/dist/lab-config.js.map +1 -1
- package/dist/local-agent-claude-session.d.ts +45 -0
- package/dist/local-agent-claude-session.js +201 -0
- package/dist/local-agent-claude-session.js.map +1 -0
- package/dist/local-agent-cli.d.ts +2 -1
- package/dist/local-agent-cli.js +1 -1
- package/dist/local-agent-cli.js.map +1 -1
- package/dist/program.d.ts +3 -0
- package/dist/program.js +64 -6
- package/dist/program.js.map +1 -1
- package/dist/stats.d.ts +75 -0
- package/dist/stats.js +196 -0
- package/dist/stats.js.map +1 -0
- package/dist/telemetry.d.ts +14 -0
- package/dist/telemetry.js +109 -1
- package/dist/telemetry.js.map +1 -1
- package/docs/contracts/schemas.md +1 -1
- package/docs/goals/current.md +1 -1
- package/docs/ramp/README.md +1 -1
- package/package.json +1 -1
package/dist/stats.d.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export declare const STATS_SCHEMA = "humanish.stats.v1";
|
|
2
|
+
export interface StatsParticipants {
|
|
3
|
+
total: number;
|
|
4
|
+
reachedGoal: number;
|
|
5
|
+
reportedFriction: number;
|
|
6
|
+
}
|
|
7
|
+
export interface StatsLabRow {
|
|
8
|
+
lab: string;
|
|
9
|
+
runs: number;
|
|
10
|
+
live: number;
|
|
11
|
+
dryRun: number;
|
|
12
|
+
/** Runs whose bundle carries a verdict; the denominator for passRate. */
|
|
13
|
+
judged: number;
|
|
14
|
+
passed: number;
|
|
15
|
+
/** passed / judged, absent when judged is 0. */
|
|
16
|
+
passRate?: number;
|
|
17
|
+
/** Over live runs with both timestamps. */
|
|
18
|
+
medianDurationMs?: number;
|
|
19
|
+
durationSamples: number;
|
|
20
|
+
/** Over runs with a known estimate. */
|
|
21
|
+
medianCostUsd?: number;
|
|
22
|
+
costSamples: number;
|
|
23
|
+
/** Runs with no estimate: a subscription brain, an interrupted run, an old bundle. Never zero. */
|
|
24
|
+
unpricedRuns: number;
|
|
25
|
+
participants: StatsParticipants;
|
|
26
|
+
}
|
|
27
|
+
export interface StatsDayRow {
|
|
28
|
+
day: string;
|
|
29
|
+
runs: number;
|
|
30
|
+
live: number;
|
|
31
|
+
estimatedSpendUsd: number;
|
|
32
|
+
unpricedRuns: number;
|
|
33
|
+
}
|
|
34
|
+
export interface StatsResult {
|
|
35
|
+
schema: typeof STATS_SCHEMA;
|
|
36
|
+
ok: true;
|
|
37
|
+
cwd: string;
|
|
38
|
+
since?: string;
|
|
39
|
+
lab?: string;
|
|
40
|
+
totals: {
|
|
41
|
+
runs: number;
|
|
42
|
+
live: number;
|
|
43
|
+
dryRun: number;
|
|
44
|
+
running: number;
|
|
45
|
+
/** Sum over runs with a known estimate. */
|
|
46
|
+
estimatedSpendUsd: number;
|
|
47
|
+
unpricedRuns: number;
|
|
48
|
+
participants: StatsParticipants;
|
|
49
|
+
verdicts: Record<string, number>;
|
|
50
|
+
};
|
|
51
|
+
labs: StatsLabRow[];
|
|
52
|
+
days: StatsDayRow[];
|
|
53
|
+
/** Directories that could not be read, by name — surfaced, never silently dropped. */
|
|
54
|
+
unreadable: string[];
|
|
55
|
+
note: string;
|
|
56
|
+
}
|
|
57
|
+
export declare const STATS_NOTE: string;
|
|
58
|
+
export interface StatsOptions {
|
|
59
|
+
/** ISO date or datetime; runs that started before it are excluded. */
|
|
60
|
+
since?: string;
|
|
61
|
+
/** Lab id; runs from other labs are excluded. */
|
|
62
|
+
lab?: string;
|
|
63
|
+
nowMs?: number;
|
|
64
|
+
}
|
|
65
|
+
export interface StatsFailure {
|
|
66
|
+
schema: typeof STATS_SCHEMA;
|
|
67
|
+
ok: false;
|
|
68
|
+
cwd: string;
|
|
69
|
+
error: {
|
|
70
|
+
code: "HUMANISH_STATS_INVALID_SINCE";
|
|
71
|
+
message: string;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export declare function computeStats(cwdInput: string, options?: StatsOptions): Promise<StatsResult | StatsFailure>;
|
|
75
|
+
export declare function formatStatsHuman(result: StatsResult | StatsFailure): string;
|
package/dist/stats.js
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// `humanish stats`: what a directory of studies cost and how they came out (#472).
|
|
2
|
+
//
|
|
3
|
+
// Every number here already exists per bundle. What did not exist was the roll-up, so "what has
|
|
4
|
+
// this month of studies cost" meant reading run.json files by hand. The rules the per-run numbers
|
|
5
|
+
// live by carry over unchanged: an estimate is labelled an estimate, a run whose cost is unknown
|
|
6
|
+
// counts as unknown and never as zero, and every rate has a denominator next to it.
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
import { readRunIndex } from "./run-index.js";
|
|
9
|
+
export const STATS_SCHEMA = "humanish.stats.v1";
|
|
10
|
+
export const STATS_NOTE = "Every dollar figure is an estimate summed from per-run rate-table estimates, never a provider charge. "
|
|
11
|
+
+ "A run with no estimate (a subscription brain, an interrupted run, an older bundle) is counted in unpricedRuns and adds nothing to the sum.";
|
|
12
|
+
function median(values) {
|
|
13
|
+
if (values.length === 0)
|
|
14
|
+
return undefined;
|
|
15
|
+
const sorted = [...values].sort((a, b) => a - b);
|
|
16
|
+
const mid = Math.floor(sorted.length / 2);
|
|
17
|
+
return sorted.length % 2 === 1 ? sorted[mid] : (sorted[mid - 1] + sorted[mid]) / 2;
|
|
18
|
+
}
|
|
19
|
+
function emptyParticipants() {
|
|
20
|
+
return { total: 0, reachedGoal: 0, reportedFriction: 0 };
|
|
21
|
+
}
|
|
22
|
+
function addParticipants(into, entry) {
|
|
23
|
+
if (entry.participants === undefined)
|
|
24
|
+
return;
|
|
25
|
+
into.total += entry.participants.total;
|
|
26
|
+
into.reachedGoal += entry.participants.reachedGoal;
|
|
27
|
+
into.reportedFriction += entry.participants.reportedFriction ?? 0;
|
|
28
|
+
}
|
|
29
|
+
function entryTime(entry) {
|
|
30
|
+
return entry.startedAt ?? entry.completedAt ?? entry.updatedAt;
|
|
31
|
+
}
|
|
32
|
+
function round(value) {
|
|
33
|
+
return Math.round(value * 1_000_000) / 1_000_000;
|
|
34
|
+
}
|
|
35
|
+
export async function computeStats(cwdInput, options = {}) {
|
|
36
|
+
const cwd = path.resolve(cwdInput);
|
|
37
|
+
let sinceMs;
|
|
38
|
+
if (options.since !== undefined) {
|
|
39
|
+
sinceMs = Date.parse(options.since);
|
|
40
|
+
if (Number.isNaN(sinceMs)) {
|
|
41
|
+
return {
|
|
42
|
+
schema: STATS_SCHEMA,
|
|
43
|
+
ok: false,
|
|
44
|
+
cwd,
|
|
45
|
+
error: { code: "HUMANISH_STATS_INVALID_SINCE", message: `--since must be an ISO date or datetime, got "${options.since}".` }
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const index = await readRunIndex(cwd, options.nowMs === undefined ? {} : { nowMs: options.nowMs });
|
|
50
|
+
const selected = index.runs.filter((entry) => {
|
|
51
|
+
if (options.lab !== undefined && entry.lab?.id !== options.lab)
|
|
52
|
+
return false;
|
|
53
|
+
if (sinceMs !== undefined) {
|
|
54
|
+
const at = entryTime(entry);
|
|
55
|
+
if (at === undefined)
|
|
56
|
+
return false;
|
|
57
|
+
const atMs = Date.parse(at);
|
|
58
|
+
if (Number.isNaN(atMs) || atMs < sinceMs)
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
return true;
|
|
62
|
+
});
|
|
63
|
+
const totals = {
|
|
64
|
+
runs: 0,
|
|
65
|
+
live: 0,
|
|
66
|
+
dryRun: 0,
|
|
67
|
+
running: 0,
|
|
68
|
+
estimatedSpendUsd: 0,
|
|
69
|
+
unpricedRuns: 0,
|
|
70
|
+
participants: emptyParticipants(),
|
|
71
|
+
verdicts: {}
|
|
72
|
+
};
|
|
73
|
+
const labs = new Map();
|
|
74
|
+
const days = new Map();
|
|
75
|
+
for (const entry of selected) {
|
|
76
|
+
totals.runs += 1;
|
|
77
|
+
if (entry.mode === "live")
|
|
78
|
+
totals.live += 1;
|
|
79
|
+
if (entry.mode === "dry-run")
|
|
80
|
+
totals.dryRun += 1;
|
|
81
|
+
if (entry.liveness === "running")
|
|
82
|
+
totals.running += 1;
|
|
83
|
+
const priced = typeof entry.estimatedCostUsd === "number";
|
|
84
|
+
if (priced)
|
|
85
|
+
totals.estimatedSpendUsd += entry.estimatedCostUsd;
|
|
86
|
+
else
|
|
87
|
+
totals.unpricedRuns += 1;
|
|
88
|
+
addParticipants(totals.participants, entry);
|
|
89
|
+
if (entry.verdict !== undefined)
|
|
90
|
+
totals.verdicts[entry.verdict] = (totals.verdicts[entry.verdict] ?? 0) + 1;
|
|
91
|
+
const labId = entry.lab?.id ?? "(no lab)";
|
|
92
|
+
let row = labs.get(labId);
|
|
93
|
+
if (row === undefined) {
|
|
94
|
+
row = {
|
|
95
|
+
lab: labId, runs: 0, live: 0, dryRun: 0, judged: 0, passed: 0, durationSamples: 0, costSamples: 0,
|
|
96
|
+
unpricedRuns: 0, participants: emptyParticipants(), durations: [], costs: []
|
|
97
|
+
};
|
|
98
|
+
labs.set(labId, row);
|
|
99
|
+
}
|
|
100
|
+
row.runs += 1;
|
|
101
|
+
if (entry.mode === "live")
|
|
102
|
+
row.live += 1;
|
|
103
|
+
if (entry.mode === "dry-run")
|
|
104
|
+
row.dryRun += 1;
|
|
105
|
+
if (entry.verdict !== undefined) {
|
|
106
|
+
row.judged += 1;
|
|
107
|
+
if (entry.verdict === "pass")
|
|
108
|
+
row.passed += 1;
|
|
109
|
+
}
|
|
110
|
+
if (entry.mode === "live" && entry.durationMs !== undefined)
|
|
111
|
+
row.durations.push(entry.durationMs);
|
|
112
|
+
if (priced)
|
|
113
|
+
row.costs.push(entry.estimatedCostUsd);
|
|
114
|
+
else
|
|
115
|
+
row.unpricedRuns += 1;
|
|
116
|
+
addParticipants(row.participants, entry);
|
|
117
|
+
const at = entryTime(entry);
|
|
118
|
+
const day = at === undefined ? "(undated)" : at.slice(0, 10);
|
|
119
|
+
let dayRow = days.get(day);
|
|
120
|
+
if (dayRow === undefined) {
|
|
121
|
+
dayRow = { day, runs: 0, live: 0, estimatedSpendUsd: 0, unpricedRuns: 0 };
|
|
122
|
+
days.set(day, dayRow);
|
|
123
|
+
}
|
|
124
|
+
dayRow.runs += 1;
|
|
125
|
+
if (entry.mode === "live")
|
|
126
|
+
dayRow.live += 1;
|
|
127
|
+
if (priced)
|
|
128
|
+
dayRow.estimatedSpendUsd += entry.estimatedCostUsd;
|
|
129
|
+
else
|
|
130
|
+
dayRow.unpricedRuns += 1;
|
|
131
|
+
}
|
|
132
|
+
const labRows = [...labs.values()]
|
|
133
|
+
.map(({ durations, costs, ...row }) => ({
|
|
134
|
+
...row,
|
|
135
|
+
...(row.judged === 0 ? {} : { passRate: round(row.passed / row.judged) }),
|
|
136
|
+
...(durations.length === 0 ? {} : { medianDurationMs: Math.round(median(durations)) }),
|
|
137
|
+
durationSamples: durations.length,
|
|
138
|
+
...(costs.length === 0 ? {} : { medianCostUsd: round(median(costs)) }),
|
|
139
|
+
costSamples: costs.length
|
|
140
|
+
}))
|
|
141
|
+
.sort((a, b) => b.runs - a.runs || a.lab.localeCompare(b.lab));
|
|
142
|
+
return {
|
|
143
|
+
schema: STATS_SCHEMA,
|
|
144
|
+
ok: true,
|
|
145
|
+
cwd,
|
|
146
|
+
...(options.since === undefined ? {} : { since: options.since }),
|
|
147
|
+
...(options.lab === undefined ? {} : { lab: options.lab }),
|
|
148
|
+
totals: { ...totals, estimatedSpendUsd: round(totals.estimatedSpendUsd) },
|
|
149
|
+
labs: labRows,
|
|
150
|
+
days: [...days.values()].map((row) => ({ ...row, estimatedSpendUsd: round(row.estimatedSpendUsd) })).sort((a, b) => a.day.localeCompare(b.day)),
|
|
151
|
+
unreadable: index.unreadable,
|
|
152
|
+
note: STATS_NOTE
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function money(value) {
|
|
156
|
+
return `$${value.toFixed(2)}`;
|
|
157
|
+
}
|
|
158
|
+
function minutes(ms) {
|
|
159
|
+
return `${(ms / 60_000).toFixed(1)}m`;
|
|
160
|
+
}
|
|
161
|
+
export function formatStatsHuman(result) {
|
|
162
|
+
if (!result.ok)
|
|
163
|
+
return `${result.error.code}: ${result.error.message}\n`;
|
|
164
|
+
const t = result.totals;
|
|
165
|
+
const scope = [
|
|
166
|
+
result.lab === undefined ? undefined : `lab ${result.lab}`,
|
|
167
|
+
result.since === undefined ? undefined : `since ${result.since}`
|
|
168
|
+
].filter((part) => part !== undefined);
|
|
169
|
+
const lines = [
|
|
170
|
+
`humanish stats${scope.length === 0 ? "" : ` (${scope.join(", ")})`}`,
|
|
171
|
+
`runs: ${t.runs} (${t.live} live, ${t.dryRun} dry-run${t.running > 0 ? `, ${t.running} running` : ""})`,
|
|
172
|
+
`estimated spend: ${money(t.estimatedSpendUsd)} over ${t.runs - t.unpricedRuns} priced run(s); ${t.unpricedRuns} unpriced (counted, not $0)`,
|
|
173
|
+
`participants: ${t.participants.reachedGoal}/${t.participants.total} reached the goal, ${t.participants.reportedFriction} reported friction`,
|
|
174
|
+
`verdicts: ${Object.entries(t.verdicts).map(([verdict, count]) => `${verdict} ${count}`).join(", ") || "none recorded"}`
|
|
175
|
+
];
|
|
176
|
+
if (result.labs.length > 0) {
|
|
177
|
+
lines.push("", "per lab:");
|
|
178
|
+
for (const row of result.labs) {
|
|
179
|
+
const rate = row.passRate === undefined ? "no verdicts" : `${row.passed}/${row.judged} pass`;
|
|
180
|
+
const duration = row.medianDurationMs === undefined ? "no timed live runs" : `median ${minutes(row.medianDurationMs)} over ${row.durationSamples}`;
|
|
181
|
+
const cost = row.medianCostUsd === undefined ? "no priced runs" : `median ${money(row.medianCostUsd)} over ${row.costSamples}`;
|
|
182
|
+
lines.push(`- ${row.lab}: ${row.runs} run(s), ${row.live} live; ${rate}; ${duration}; ${cost}; ${row.unpricedRuns} unpriced`);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
if (result.days.length > 0) {
|
|
186
|
+
lines.push("", "by day:");
|
|
187
|
+
for (const row of result.days) {
|
|
188
|
+
lines.push(`- ${row.day}: ${row.runs} run(s), ${row.live} live, ${money(row.estimatedSpendUsd)} estimated${row.unpricedRuns > 0 ? `, ${row.unpricedRuns} unpriced` : ""}`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if (result.unreadable.length > 0)
|
|
192
|
+
lines.push("", `unreadable run directories: ${result.unreadable.join(", ")}`);
|
|
193
|
+
lines.push("", result.note);
|
|
194
|
+
return `${lines.join("\n")}\n`;
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=stats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../src/stats.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,EAAE;AACF,gGAAgG;AAChG,kGAAkG;AAClG,iGAAiG;AACjG,oFAAoF;AAEpF,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAC;AA6DhD,MAAM,CAAC,MAAM,UAAU,GACrB,wGAAwG;MACtG,4IAA4I,CAAC;AAiBjJ,SAAS,MAAM,CAAC,MAAgB;IAC9B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM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|
exitCode?: number;
|
|
15
|
+
/** One of humanish's OWN error codes (`HUMANISH_*`), never a message. Which failure ends a
|
|
16
|
+
* first run is the question the funnel exists to answer. */
|
|
17
|
+
errorCode?: string;
|
|
15
18
|
}
|
|
16
19
|
export interface TelemetryState {
|
|
17
20
|
enabled: boolean;
|
|
@@ -61,6 +64,17 @@ export declare function buildPayload(args: {
|
|
|
61
64
|
platform?: string;
|
|
62
65
|
nodeVersion?: string;
|
|
63
66
|
}): TelemetryPayload;
|
|
67
|
+
/**
|
|
68
|
+
* Read the study facts off a command's result document: mode, outcome, starter lab, brain route,
|
|
69
|
+
* and our own error code. Duck-typed over every result shape the CLI writes, because the point is
|
|
70
|
+
* ONE derivation at the one seam every command already passes through (writeResult), so that a
|
|
71
|
+
* backend added later cannot forget to report. Returns {} for results that carry no study.
|
|
72
|
+
*
|
|
73
|
+
* The first two days of 0.62.0 data had 1,359 `run`/`lab run` events and not one carried a mode
|
|
74
|
+
* or an outcome — the vocabulary existed, nothing populated it — so the one question telemetry
|
|
75
|
+
* was added to answer ("does anyone get to a working LIVE first run") had no answer in the data.
|
|
76
|
+
*/
|
|
77
|
+
export declare function deriveStudyFacts(result: unknown): TelemetryProperties;
|
|
64
78
|
/** The notice, shown once, before anything is sent. */
|
|
65
79
|
export declare const TELEMETRY_NOTICE: string;
|
|
66
80
|
export interface SendDeps {
|
package/dist/telemetry.js
CHANGED
|
@@ -126,10 +126,29 @@ export function safeLabId(lab) {
|
|
|
126
126
|
export function buildPayload(args) {
|
|
127
127
|
const env = args.env ?? process.env;
|
|
128
128
|
const properties = {
|
|
129
|
+
// Ask the receiver not to derive a location from the request. "Anonymous" and "tied to
|
|
130
|
+
// nothing" are only true if the collector honours them too: PostHog enriches every event
|
|
131
|
+
// with GeoIP city/coordinates from the source address unless told not to, and the project
|
|
132
|
+
// is additionally set to discard the client IP at ingestion (`anonymize_ips`). Both, so that
|
|
133
|
+
// neither a default nor a console setting decides what the doc promised.
|
|
134
|
+
$geoip_disable: true,
|
|
135
|
+
// No person profile. PostHog builds one per distinct_id by default and attaches $set /
|
|
136
|
+
// $set_once properties to it (before 2026-09-01 those carried a city and coordinates). An
|
|
137
|
+
// anonymous machine id has nothing to profile, and PostHog's own docs name this flag as the
|
|
138
|
+
// way to say so.
|
|
139
|
+
$process_person_profile: false,
|
|
129
140
|
version: args.version,
|
|
130
141
|
os: args.platform ?? process.platform,
|
|
131
142
|
node: (args.nodeVersion ?? process.version).split(".")[0].replace("v", ""),
|
|
132
|
-
ci: env.CI !== undefined && env.CI !== "" && env.CI !== "0"
|
|
143
|
+
ci: env.CI !== undefined && env.CI !== "" && env.CI !== "0",
|
|
144
|
+
// A humanish study participant is a real cold install on a machine we do not own, so it emits
|
|
145
|
+
// like any other new adopter and is indistinguishable from one. It is also the exact
|
|
146
|
+
// population we are trying to count, so a busy self-study day reads as an adoption spike.
|
|
147
|
+
// Stamped rather than suppressed, the same shape as `ci`: participant runs stay visible and
|
|
148
|
+
// stay separable, and we keep a genuine measurement of what a cold install does (#546).
|
|
149
|
+
studyParticipant: env.HUMANISH_STUDY_PARTICIPANT !== undefined
|
|
150
|
+
&& env.HUMANISH_STUDY_PARTICIPANT !== ""
|
|
151
|
+
&& env.HUMANISH_STUDY_PARTICIPANT !== "0"
|
|
133
152
|
};
|
|
134
153
|
const given = args.properties ?? {};
|
|
135
154
|
if (given.command !== undefined)
|
|
@@ -148,8 +167,97 @@ export function buildPayload(args) {
|
|
|
148
167
|
properties.ok = given.ok;
|
|
149
168
|
if (given.exitCode !== undefined)
|
|
150
169
|
properties.exit_code = given.exitCode;
|
|
170
|
+
if (given.errorCode !== undefined && OWN_ERROR_CODE.test(given.errorCode))
|
|
171
|
+
properties.error_code = given.errorCode;
|
|
151
172
|
return { event: args.event, distinct_id: args.anonymousId, properties };
|
|
152
173
|
}
|
|
174
|
+
/** Our own codes only. A provider's or the OS's message is free text and never travels. */
|
|
175
|
+
const OWN_ERROR_CODE = /^HUMANISH_[A-Z0-9_]{1,80}$/;
|
|
176
|
+
/**
|
|
177
|
+
* The closed vocabulary an outcome may take. Actor statuses (src/actor-contract.ts), the two
|
|
178
|
+
* shared-world extras, a fan-out roll-up, and the two shapes a non-study command has. Anything
|
|
179
|
+
* else — a provider's reason string, a scorer's verdict text — is dropped, never forwarded.
|
|
180
|
+
*/
|
|
181
|
+
const OUTCOMES = new Set([
|
|
182
|
+
"passed", "abandoned", "incomplete", "blocked", "timed_out", "failed",
|
|
183
|
+
"contract_proof_only",
|
|
184
|
+
"all_passed", "some_passed", "none_passed",
|
|
185
|
+
"ok", "error"
|
|
186
|
+
]);
|
|
187
|
+
const BRAINS_BY_ACTOR = {
|
|
188
|
+
"local-agent": "local-agent",
|
|
189
|
+
"openai-computer-use": "provider-key",
|
|
190
|
+
"codex-exec": "provider-key",
|
|
191
|
+
"codex-tui": "provider-key",
|
|
192
|
+
"codex-app-server": "provider-key",
|
|
193
|
+
"scripted-browser": "none"
|
|
194
|
+
};
|
|
195
|
+
function asRecord(value) {
|
|
196
|
+
return typeof value === "object" && value !== null ? value : undefined;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Read the study facts off a command's result document: mode, outcome, starter lab, brain route,
|
|
200
|
+
* and our own error code. Duck-typed over every result shape the CLI writes, because the point is
|
|
201
|
+
* ONE derivation at the one seam every command already passes through (writeResult), so that a
|
|
202
|
+
* backend added later cannot forget to report. Returns {} for results that carry no study.
|
|
203
|
+
*
|
|
204
|
+
* The first two days of 0.62.0 data had 1,359 `run`/`lab run` events and not one carried a mode
|
|
205
|
+
* or an outcome — the vocabulary existed, nothing populated it — so the one question telemetry
|
|
206
|
+
* was added to answer ("does anyone get to a working LIVE first run") had no answer in the data.
|
|
207
|
+
*/
|
|
208
|
+
export function deriveStudyFacts(result) {
|
|
209
|
+
const r = asRecord(result);
|
|
210
|
+
if (!r)
|
|
211
|
+
return {};
|
|
212
|
+
const facts = {};
|
|
213
|
+
if (r.dryRun === true)
|
|
214
|
+
facts.mode = "dry-run";
|
|
215
|
+
else if (r.dryRun === false)
|
|
216
|
+
facts.mode = "live";
|
|
217
|
+
else if (r.mode === "dry-run" || r.mode === "live")
|
|
218
|
+
facts.mode = r.mode;
|
|
219
|
+
const labRecord = asRecord(r.lab);
|
|
220
|
+
const labId = typeof r.labId === "string" ? r.labId
|
|
221
|
+
: typeof labRecord?.id === "string" ? labRecord.id
|
|
222
|
+
: typeof r.lab === "string" ? r.lab
|
|
223
|
+
: undefined;
|
|
224
|
+
const lab = safeLabId(labId);
|
|
225
|
+
if (lab !== undefined)
|
|
226
|
+
facts.lab = lab;
|
|
227
|
+
const error = asRecord(r.error);
|
|
228
|
+
if (typeof error?.code === "string" && OWN_ERROR_CODE.test(error.code))
|
|
229
|
+
facts.errorCode = error.code;
|
|
230
|
+
const session = asRecord(r.session);
|
|
231
|
+
const laneSummary = asRecord(r.laneSummary);
|
|
232
|
+
let outcome;
|
|
233
|
+
if (laneSummary && typeof laneSummary.total === "number" && typeof laneSummary.passed === "number" && laneSummary.total > 1) {
|
|
234
|
+
outcome = laneSummary.passed === laneSummary.total ? "all_passed"
|
|
235
|
+
: laneSummary.passed === 0 ? "none_passed"
|
|
236
|
+
: "some_passed";
|
|
237
|
+
}
|
|
238
|
+
else if (typeof session?.status === "string") {
|
|
239
|
+
outcome = session.status;
|
|
240
|
+
}
|
|
241
|
+
else if (typeof r.status === "string") {
|
|
242
|
+
outcome = r.status;
|
|
243
|
+
}
|
|
244
|
+
else if (r.error !== undefined && r.error !== null) {
|
|
245
|
+
outcome = "error";
|
|
246
|
+
}
|
|
247
|
+
else if (r.ok === true && facts.mode !== undefined) {
|
|
248
|
+
outcome = "ok";
|
|
249
|
+
}
|
|
250
|
+
if (outcome !== undefined && OUTCOMES.has(outcome))
|
|
251
|
+
facts.outcome = outcome;
|
|
252
|
+
else if (outcome !== undefined && facts.errorCode !== undefined)
|
|
253
|
+
facts.outcome = "error";
|
|
254
|
+
if (typeof r.actor === "string") {
|
|
255
|
+
const brain = facts.mode === "dry-run" ? "none" : BRAINS_BY_ACTOR[r.actor];
|
|
256
|
+
if (brain !== undefined)
|
|
257
|
+
facts.brain = brain;
|
|
258
|
+
}
|
|
259
|
+
return facts;
|
|
260
|
+
}
|
|
153
261
|
/** The notice, shown once, before anything is sent. */
|
|
154
262
|
export const TELEMETRY_NOTICE = [
|
|
155
263
|
"humanish collects anonymous usage data (which command ran, whether it worked, how long it took).",
|
package/dist/telemetry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,yFAAyF;AACzF,EAAE;AACF,iGAAiG;AACjG,oGAAoG;AACpG,iGAAiG;AACjG,EAAE;AACF,iGAAiG;AACjG,oGAAoG;AACpG,8FAA8F;AAC9F,iGAAiG;AACjG,mGAAmG;AAEnG,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,8FAA8F;AAC9F,MAAM,UAAU,GAAG,kDAAkD,CAAC;AACtE,MAAM,WAAW,GAAG,0BAA0B,CAAC;AAE/C,gGAAgG;AAChG,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,yFAAyF;AACzF,EAAE;AACF,iGAAiG;AACjG,oGAAoG;AACpG,iGAAiG;AACjG,EAAE;AACF,iGAAiG;AACjG,oGAAoG;AACpG,8FAA8F;AAC9F,iGAAiG;AACjG,mGAAmG;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AI,OAAO,OAAO,KAAK,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IACrE,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1D,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,GAAG,WAAW,UAAU,EAAE;YACtC,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,OAAO,EAAE,UAAU;gBACnB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,UAAU,EAAE,OAAO,CAAC,UAAU;aAC/B,CAAC;YACF,MAAM,EAAE,UAAU,CAAC,MAAM;SAC1B,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,+DAA+D;IACjE,CAAC;YAAS,CAAC;QACT,YAAY,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;AACH,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Date: 2026-06-02 (current-state note updated 2026-07-14)
|
|
4
4
|
|
|
5
5
|
Status: reference map for the major contracts shipped through source version
|
|
6
|
-
`0.
|
|
6
|
+
`0.67.0`; it is not an exhaustive inventory of command/result envelopes. Exported types,
|
|
7
7
|
schema constants, parsers, and validators in `src/` are authoritative. Rows
|
|
8
8
|
marked "reserved" name layering intent only — no code emits or validates them
|
|
9
9
|
yet. Do not emit a reserved schema.
|
package/docs/goals/current.md
CHANGED
|
@@ -29,7 +29,7 @@ study completed, reproduced, and produced a real accessibility finding via a
|
|
|
29
29
|
keyboard-first participant
|
|
30
30
|
([docs/goals/email-gated-signup/receipts/](email-gated-signup/receipts/)).
|
|
31
31
|
|
|
32
|
-
## Current Program Truth (source `0.
|
|
32
|
+
## Current Program Truth (source `0.67.0`)
|
|
33
33
|
|
|
34
34
|
The package source and repository implementation in this tree agree on these
|
|
35
35
|
points:
|
package/docs/ramp/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Status: public-safe contributor and agent ramp.
|
|
4
4
|
|
|
5
|
-
Package/source version in this tree: `0.
|
|
5
|
+
Package/source version in this tree: `0.67.0` (2026-09-01). The Observer is phone-usable as a stated requirement (observer/AGENTS.md); interactive primitives start from Base UI. The Observer renderer is the observer/ workspace artifact only; the legacy string-concat renderer was deleted at cutover (#426), and rollback is a version pin to 0.42.0. The containment boundary introduced in
|
|
6
6
|
`0.15.1` remains in force: managed run and output paths bind to validated
|
|
7
7
|
physical filesystem identities, and stored provider IDs are evidence, not
|
|
8
8
|
cleanup authority. The bundled OSS meta-lab is dry-run only until
|
package/package.json
CHANGED