humanish 0.111.4 → 0.112.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/CHANGELOG.md +18 -0
- package/dist/actors/computer-use/openai-conversation.d.ts +91 -0
- package/dist/actors/computer-use/openai-conversation.js +209 -0
- package/dist/actors/computer-use/openai-provider.js +25 -41
- package/dist/actors/contract.d.ts +2 -0
- package/dist/analysis/diagnostics.js +7 -12
- package/dist/analysis/execute.d.ts +1 -1
- package/dist/analysis/execute.js +35 -5
- package/dist/analysis/service.js +7 -1
- package/dist/analysis/types.d.ts +23 -0
- package/dist/analysis/validation.d.ts +80 -35
- package/dist/analysis/validation.js +58 -11
- package/dist/cli/commands/runs.js +4 -10
- package/dist/cli/findings.d.ts +34 -3
- package/dist/cli/findings.js +136 -18
- package/dist/cli/io.d.ts +2 -1
- package/dist/cli/io.js +3 -2
- package/dist/feedback/draft.js +14 -4
- package/dist/observer/run-routes.js +8 -4
- package/dist/observer-app.html +4 -4
- package/dist/routes/computer-use/bundle.d.ts +1 -1
- package/dist/routes/computer-use/bundle.js +6 -16
- package/dist/routes/computer-use/fanout-bundle.js +40 -37
- package/dist/routes/computer-use/fanout-records.d.ts +2 -0
- package/dist/routes/computer-use/fanout-records.js +18 -26
- package/dist/routes/computer-use/participant-execution.js +4 -11
- package/dist/routes/computer-use/participant-facts.d.ts +2 -2
- package/dist/routes/computer-use/participant-facts.js +10 -1
- package/dist/routes/computer-use/result.js +7 -15
- package/dist/routes/computer-use/single-bundle.d.ts +2 -0
- package/dist/routes/computer-use/single-bundle.js +81 -37
- package/dist/routes/scripted/bundle.d.ts +1 -1
- package/dist/routes/scripted/bundle.js +9 -19
- package/dist/routes/scripted/surface-records.d.ts +0 -1
- package/dist/routes/scripted/surface-records.js +27 -13
- package/dist/routes/shared-world/bundle-records.d.ts +2 -2
- package/dist/routes/shared-world/bundle-records.js +21 -28
- package/dist/routes/shared-world/bundle.d.ts +1 -1
- package/dist/routes/shared-world/bundle.js +70 -78
- package/dist/routes/shared-world/participant-specs.d.ts +1 -2
- package/dist/routes/shared-world/participant-specs.js +0 -8
- package/dist/routes/shared-world/result.js +8 -12
- package/dist/routes/terminal/bundle.d.ts +1 -1
- package/dist/routes/terminal/bundle.js +10 -19
- package/dist/routes/terminal/dry-run.js +1 -0
- package/dist/routes/terminal/live-sandbox.js +9 -2
- package/dist/routes/terminal/plan.js +1 -0
- package/dist/routes/terminal/runtime.d.ts +1 -0
- package/dist/routes/terminal/runtime.js +1 -0
- package/dist/routes/terminal/session.js +1 -0
- package/dist/run/costs.js +9 -20
- package/dist/run/detail.d.ts +1 -1
- package/dist/run/detail.js +10 -1
- package/dist/run/display.d.ts +2 -2
- package/dist/run/display.js +15 -18
- package/dist/run/dry-run.js +10 -25
- package/dist/run/judge.d.ts +24 -0
- package/dist/run/judge.js +54 -0
- package/dist/run/liveness.d.ts +18 -0
- package/dist/run/liveness.js +24 -0
- package/dist/run/outcomes.d.ts +8 -1
- package/dist/run/outcomes.js +58 -12
- package/dist/run/participant-caption.d.ts +30 -0
- package/dist/run/participant-caption.js +50 -0
- package/dist/run/participant-records.d.ts +1 -1
- package/dist/run/review-markdown.d.ts +11 -0
- package/dist/run/review-markdown.js +22 -0
- package/dist/run/run-cost.d.ts +7 -0
- package/dist/run/run-cost.js +25 -5
- package/dist/run/run-index.d.ts +4 -50
- package/dist/run/run-index.js +57 -87
- package/dist/run/run.d.ts +2 -2
- package/dist/run/run.js +5 -3
- package/dist/run/stats.js +2 -12
- package/dist/run/transient-comms-secrets.d.ts +8 -3
- package/dist/run/transient-comms-secrets.js +21 -1
- package/dist/study/keys.d.ts +1 -0
- package/dist/study/keys.js +1 -1
- package/dist/study/parse/execution.js +7 -1
- package/dist/study/plan-types.d.ts +1 -0
- package/dist/study/types.d.ts +4 -1
- package/dist/study/warnings.d.ts +2 -1
- package/dist/study/warnings.js +3 -2
- package/dist/tui-app.js +73 -73
- package/dist/verify/liveness.d.ts +2 -2
- package/dist/verify/liveness.js +7 -4
- package/docs/architecture/terminal-product-route.md +14 -0
- package/docs/contracts/run-bundle.md +10 -0
- package/docs/contracts/schemas.md +9 -1
- package/docs/contracts/study-analysis.md +71 -22
- package/package.json +2 -1
- package/dist/actors/computer-use/openai-requests.d.ts +0 -62
- package/dist/actors/computer-use/openai-requests.js +0 -144
package/dist/cli/io.js
CHANGED
|
@@ -15,12 +15,13 @@ export const JSON_OPTION_DESCRIPTION = "Print a machine-readable JSON response."
|
|
|
15
15
|
export const CWD_OPTION_DESCRIPTION = "Project directory.";
|
|
16
16
|
export const RUN_OPTION_DESCRIPTION = "Run id, or latest.";
|
|
17
17
|
export const DOTENV_OPTION_DESCRIPTION = "Load unset variables from this dotenv file. Values are never printed or saved.";
|
|
18
|
-
const ENV_FILE_RENAMED = "`--env-file` is now `--dotenv`; `--env-file` is removed in
|
|
18
|
+
const ENV_FILE_RENAMED = "`--env-file` is now `--dotenv`; `--env-file` is removed in the first minor release on or after 2026-11-03.";
|
|
19
19
|
/**
|
|
20
20
|
* The hidden `--env-file <path>` that `--dotenv` replaced. Node scans the whole argv for
|
|
21
21
|
* `--env-file` before a script runs, and stops only at `--` (src/node_dotenv.cc), so a missing file
|
|
22
22
|
* exits 9 through Node and never reaches humanish. `--dotenv` does not collide.
|
|
23
|
-
* Removed in
|
|
23
|
+
* Removed in the first minor release on or after 2026-11-03: deprecated in 0.110.0 on 2026-10-03, it stays at least 30 days and one
|
|
24
|
+
* minor release.
|
|
24
25
|
*/
|
|
25
26
|
export function envFileAliasOption() {
|
|
26
27
|
return new Option("--env-file <path>").hideHelp().conflicts("dotenv");
|
package/dist/feedback/draft.js
CHANGED
|
@@ -120,7 +120,8 @@ export async function buildAnalysisDraft(context, options) {
|
|
|
120
120
|
const root = path.dirname(context.loaded.bundlePath);
|
|
121
121
|
const evidenceIds = new Set(finding.observations.flatMap((item) => item.evidenceIds));
|
|
122
122
|
const evidence = analysis.evidence.filter((item) => evidenceIds.has(item.id));
|
|
123
|
-
const
|
|
123
|
+
const amended = correction?.status === "amended";
|
|
124
|
+
const claim = amended ? correction.replacementClaim : (finding.headline ?? finding.title);
|
|
124
125
|
const firstLine = claim.trim().split(/\r?\n/)[0] || `Reviewed finding ${finding.id}`;
|
|
125
126
|
const summary = Array.from(firstLine).length > 160
|
|
126
127
|
? Array.from(firstLine).slice(0, 159).join("") + "…"
|
|
@@ -144,10 +145,19 @@ export async function buildAnalysisDraft(context, options) {
|
|
|
144
145
|
summary,
|
|
145
146
|
expected: "Review the cited behavior against the participant assignment and confirm the expected product behavior.",
|
|
146
147
|
actual: [
|
|
148
|
+
// The plain account leads; an amendment makes it stale, so the draft says so in its place.
|
|
149
|
+
...(finding.headline === undefined
|
|
150
|
+
? []
|
|
151
|
+
: amended
|
|
152
|
+
? [
|
|
153
|
+
"This finding was corrected in human review. The reviewer's claim above replaces its original headline and account.",
|
|
154
|
+
"",
|
|
155
|
+
]
|
|
156
|
+
: finding.experience === undefined
|
|
157
|
+
? []
|
|
158
|
+
: [finding.experience, ""]),
|
|
147
159
|
"Independent study analysis; does not replace participant feedback or recorded completion outcomes.",
|
|
148
|
-
|
|
149
|
-
? `Amended claim: ${claim}. Original analysis: ${finding.summary}`
|
|
150
|
-
: finding.summary,
|
|
160
|
+
amended ? `Amended claim: ${claim}. Original analysis: ${finding.summary}` : finding.summary,
|
|
151
161
|
`Impact: ${finding.impact}. ${finding.affectedStreamIds.length} affected / ${finding.exposedStreamIds.length} observed exposed participants. ${finding.exposureReason}`,
|
|
152
162
|
`Recovery: ${finding.recovery}. Confidence: ${finding.confidence}.`,
|
|
153
163
|
...finding.observations.map((item) => `${item.basis}: ${item.claim}${item.limitation ? ` Limitation: ${item.limitation}` : ""}`),
|
|
@@ -8,6 +8,7 @@ import { isLocalOnlyRunFile, isLocalOnlyRunFileIdentity } from "../run/local-onl
|
|
|
8
8
|
import { listRuns } from "../run/stored-runs.js";
|
|
9
9
|
import { readAnalysisAccounting } from "../run/costs.js";
|
|
10
10
|
import { bindExistingRunArtifactPaths, isPathInside, isSafeRunIdSegment, } from "../run/paths.js";
|
|
11
|
+
import { isRunOutcome } from "../run/bundle-shape.js";
|
|
11
12
|
import { analysisCostOf, runCost, runCostLabel } from "../run/run-cost.js";
|
|
12
13
|
import { RUN_STATUS_FILE, RUN_STATUS_STALE_MS, isRunStatusRecord, } from "../run/status.js";
|
|
13
14
|
import { renderObserverHtml } from "./artifact.js";
|
|
@@ -138,7 +139,7 @@ async function readObserverData(runRoot, runtimeStreamUrls = []) {
|
|
|
138
139
|
if (!bundleBytes)
|
|
139
140
|
throw new Error("run.json unavailable");
|
|
140
141
|
const bundle = JSON.parse(bundleBytes.toString("utf8"));
|
|
141
|
-
return withRuntimeStreamUrls(withLocalRunStatus(record, buildObserverData(bundle, undefined, record)), runtimeStreamUrls);
|
|
142
|
+
return withRuntimeStreamUrls(withLocalRunStatus(record, buildObserverData(bundle, undefined, record), bundle.outcome), runtimeStreamUrls);
|
|
142
143
|
}
|
|
143
144
|
catch { }
|
|
144
145
|
try {
|
|
@@ -166,12 +167,12 @@ async function readLocalRunStatus(runRoot) {
|
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
169
|
/**
|
|
169
|
-
*
|
|
170
|
+
* A recorded bundle outcome wins; otherwise runtime status reads the contained local heartbeat.
|
|
170
171
|
* A stale heartbeat means unknown: neither an old timestamp nor a persisted PID proves that a
|
|
171
172
|
* process died (the evidence may have been copied from another machine). A record its stopped
|
|
172
173
|
* process wrote is interrupted. No PID is served/probed.
|
|
173
174
|
*/
|
|
174
|
-
function withLocalRunStatus(record, input) {
|
|
175
|
+
function withLocalRunStatus(record, input, outcome) {
|
|
175
176
|
// A served observation must never be inherited from a persisted projection or export.
|
|
176
177
|
const { runtime: _persistedRuntime, ...data } = input;
|
|
177
178
|
if (record === undefined || record.runId !== data.run.runId || record.mode !== data.run.mode)
|
|
@@ -181,7 +182,10 @@ function withLocalRunStatus(record, input) {
|
|
|
181
182
|
const updated = Date.parse(record.updatedAt);
|
|
182
183
|
const timestampsValid = Number.isFinite(started) && Number.isFinite(updated) && started <= updated && updated <= now;
|
|
183
184
|
let state = "unknown";
|
|
184
|
-
if (
|
|
185
|
+
if (isRunOutcome(outcome)) {
|
|
186
|
+
state = outcome.state;
|
|
187
|
+
}
|
|
188
|
+
else if (timestampsValid) {
|
|
185
189
|
if (record.state === "finished") {
|
|
186
190
|
state = "finished";
|
|
187
191
|
}
|