humanish 0.93.0 → 0.94.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 +18 -3
- package/dist/automatic-analysis-completion.d.ts +1 -1
- package/dist/automatic-analysis-completion.js +2 -2
- package/dist/automatic-analysis-completion.js.map +1 -1
- package/dist/automatic-analysis-config.d.ts +3 -0
- package/dist/automatic-analysis-config.js +6 -3
- package/dist/automatic-analysis-config.js.map +1 -1
- package/dist/automatic-study-analysis.d.ts +2 -0
- package/dist/automatic-study-analysis.js +8 -2
- package/dist/automatic-study-analysis.js.map +1 -1
- package/dist/comms-catch-host.js +33 -4
- package/dist/comms-catch-host.js.map +1 -1
- package/dist/comms-email-catch.d.ts +2 -1
- package/dist/comms-email-catch.js +5 -2
- package/dist/comms-email-catch.js.map +1 -1
- package/dist/comms-fake-inbox.d.ts +1 -1
- package/dist/comms-fake-inbox.js +15 -12
- package/dist/comms-fake-inbox.js.map +1 -1
- package/dist/comms-images.d.ts +7 -0
- package/dist/comms-images.js +39 -0
- package/dist/comms-images.js.map +1 -0
- package/dist/comms-inbox.d.ts +7 -1
- package/dist/comms-inbox.js +120 -21
- package/dist/comms-inbox.js.map +1 -1
- package/dist/comms-sandbox-catch.d.ts +1 -1
- package/dist/comms-sandbox-catch.js +60 -11
- package/dist/comms-sandbox-catch.js.map +1 -1
- package/dist/comms-types.d.ts +9 -0
- package/dist/concurrent-shared-world-lab.js +6 -3
- package/dist/concurrent-shared-world-lab.js.map +1 -1
- package/dist/cua-actor-lab.js +25 -12
- package/dist/cua-actor-lab.js.map +1 -1
- package/dist/doctor-lab.d.ts +16 -0
- package/dist/doctor-lab.js +62 -0
- package/dist/doctor-lab.js.map +1 -0
- package/dist/e2b-terminal-lab.js +5 -2
- package/dist/e2b-terminal-lab.js.map +1 -1
- package/dist/export.js +35 -18
- package/dist/export.js.map +1 -1
- package/dist/first-run-path.js +5 -4
- package/dist/first-run-path.js.map +1 -1
- package/dist/init.js +5 -7
- package/dist/init.js.map +1 -1
- package/dist/lab-config.d.ts +8 -3
- package/dist/lab-config.js +27 -8
- package/dist/lab-config.js.map +1 -1
- package/dist/lab-preflight.js +1 -1
- package/dist/lab-preflight.js.map +1 -1
- package/dist/local-agent-cli.d.ts +7 -3
- package/dist/local-agent-cli.js +75 -16
- package/dist/local-agent-cli.js.map +1 -1
- package/dist/observer-app.html +9 -9
- package/dist/observer.d.ts +6 -0
- package/dist/observer.js +11 -2
- package/dist/observer.js.map +1 -1
- package/dist/program.js +12 -7
- package/dist/program.js.map +1 -1
- package/dist/run.d.ts +6 -1
- package/dist/run.js +33 -19
- package/dist/run.js.map +1 -1
- package/dist/scripted-browser-lab.js +5 -2
- package/dist/scripted-browser-lab.js.map +1 -1
- package/dist/shared-world-lab.js +5 -2
- package/dist/shared-world-lab.js.map +1 -1
- package/dist/study-analysis-engine.d.ts +5 -0
- package/dist/study-analysis-engine.js +11 -2
- package/dist/study-analysis-engine.js.map +1 -1
- package/dist/study-analysis-provider.d.ts +1 -1
- package/dist/study-analysis-provider.js +33 -3
- package/dist/study-analysis-provider.js.map +1 -1
- package/dist/study-analysis-service.d.ts +2 -0
- package/dist/study-analysis-service.js +4 -2
- package/dist/study-analysis-service.js.map +1 -1
- package/docs/architecture/comms-inbox.md +78 -0
- package/docs/contracts/schemas.md +1 -1
- package/docs/contracts/study-analysis.md +11 -1
- package/docs/goals/current.md +5 -5
- package/docs/product/automatic-analysis.md +13 -4
- package/docs/ramp/README.md +10 -1
- package/docs/release/0.93.1-observer-review-controls.md +24 -0
- package/docs/release/0.94.0-reliability.md +48 -0
- package/package.json +6 -2
package/dist/run.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { type CapturedGitState } from "./core/git-state.js";
|
|
|
6
6
|
import type { E2BDesktopModule } from "./e2b-desktop-launch.js";
|
|
7
7
|
import { type PreparedRunArtifactPaths } from "./run-paths.js";
|
|
8
8
|
import { type RunLabProvenance } from "./run-status.js";
|
|
9
|
+
import { type DetectLocalAgentsOptions } from "./local-agent-cli.js";
|
|
9
10
|
export declare const RUN_BUNDLE_SCHEMA = "humanish.run-bundle.v1";
|
|
10
11
|
export declare const SHARED_WORLD_SCHEMA = "humanish.shared-world.v1";
|
|
11
12
|
export declare const REVIEW_SCHEMA = "humanish.review.v1";
|
|
@@ -1226,7 +1227,11 @@ export declare function readReview(cwdInput: string, runInput: string): Promise<
|
|
|
1226
1227
|
export declare const DESKTOP_SDK_FLOOR = "2.3.1";
|
|
1227
1228
|
/** The advisory `doctor` attaches to an installed desktop SDK older than the floor, else undefined. */
|
|
1228
1229
|
export declare function desktopSdkAdvisory(version: string | undefined): string | undefined;
|
|
1229
|
-
export declare function doctor(cwdInput: string
|
|
1230
|
+
export declare function doctor(cwdInput: string, options?: {
|
|
1231
|
+
lab?: string;
|
|
1232
|
+
env?: NodeJS.ProcessEnv;
|
|
1233
|
+
localAgents?: DetectLocalAgentsOptions;
|
|
1234
|
+
}): Promise<DoctorResult>;
|
|
1230
1235
|
/** Resolve "latest" or an explicit run id to its prepared artifact paths. Exported for the
|
|
1231
1236
|
* reclaim command (#358), which must locate a run WITHOUT trusting anything but the managed dir. */
|
|
1232
1237
|
export declare function resolveRunPath(cwd: string, runInput: string): Promise<PreparedRunArtifactPaths | null>;
|
package/dist/run.js
CHANGED
|
@@ -30,6 +30,7 @@ import { probeKeySources } from "./key-resolution.js";
|
|
|
30
30
|
import { beginRunStatus, withRunStatusScope } from "./run-status.js";
|
|
31
31
|
import { nodeSupportsTui, terminalSurfaceMessage, tuiBundleUrl } from "./tui-contract.js";
|
|
32
32
|
import { detectLocalAgents, localAgentDoctorMessage } from "./local-agent-cli.js";
|
|
33
|
+
import { labSetupChecks } from "./doctor-lab.js";
|
|
33
34
|
import { assertPreparedSelectedOutputDirectory, assertSafeOutputPathSegment, bindExistingManagedHumanishOutputDirectory, prepareContainedOutputDirectory, prepareContainedOutputDirectoryRoot, prepareContainedOutputFile, prepareSelectedOutputDirectory, readContainedRegularFile, writeContainedOutputFile, writePreparedRunLatestPointer } from "./selected-output-paths.js";
|
|
34
35
|
export const RUN_BUNDLE_SCHEMA = "humanish.run-bundle.v1";
|
|
35
36
|
export const SHARED_WORLD_SCHEMA = "humanish.shared-world.v1";
|
|
@@ -3122,7 +3123,7 @@ async function installedDesktopSdkVersion() {
|
|
|
3122
3123
|
return undefined;
|
|
3123
3124
|
}
|
|
3124
3125
|
}
|
|
3125
|
-
export async function doctor(cwdInput) {
|
|
3126
|
+
export async function doctor(cwdInput, options = {}) {
|
|
3126
3127
|
const cwd = path.resolve(cwdInput);
|
|
3127
3128
|
const cwdOk = await validateCwd(cwd).then((error) => error === null).catch(() => false);
|
|
3128
3129
|
if (!cwdOk) {
|
|
@@ -3155,17 +3156,32 @@ export async function doctor(cwdInput) {
|
|
|
3155
3156
|
return false;
|
|
3156
3157
|
}
|
|
3157
3158
|
};
|
|
3159
|
+
const env = options.env ?? process.env;
|
|
3160
|
+
const agents = await detectLocalAgents({ ...options.localAgents, env });
|
|
3161
|
+
const probes = await probeKeySources(["OPENAI_API_KEY", "E2B_API_KEY", "GH_TOKEN", "CODEX_API_KEY"], { cwd, env });
|
|
3162
|
+
const setup = options.lab ? await labSetupChecks({ cwd, lab: options.lab, env, agents,
|
|
3163
|
+
keyPresent: name => probes.some(probe => probe.name === name && probe.source !== null) }) : undefined;
|
|
3158
3164
|
const checks = [
|
|
3159
3165
|
{
|
|
3160
3166
|
name: "target cwd",
|
|
3161
3167
|
ok: true,
|
|
3162
3168
|
message: "target directory exists"
|
|
3163
3169
|
},
|
|
3164
|
-
{
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3170
|
+
await (async () => {
|
|
3171
|
+
try {
|
|
3172
|
+
const contents = await readImplicitProjectFile(projectRoot, "package.json");
|
|
3173
|
+
return {
|
|
3174
|
+
name: "package.json",
|
|
3175
|
+
ok: true,
|
|
3176
|
+
message: contents === null
|
|
3177
|
+
? "package.json is absent; it is optional for Humanish, so npm-script integration is skipped"
|
|
3178
|
+
: "package.json is present and safe to read"
|
|
3179
|
+
};
|
|
3180
|
+
}
|
|
3181
|
+
catch {
|
|
3182
|
+
return { name: "package.json", ok: false, message: "package.json could not be safely read" };
|
|
3183
|
+
}
|
|
3184
|
+
})(),
|
|
3169
3185
|
{
|
|
3170
3186
|
name: "humanish source",
|
|
3171
3187
|
ok: await safeCheck(() => implicitProjectDirectoryExists(projectRoot, "humanish")),
|
|
@@ -3194,10 +3210,11 @@ export async function doctor(cwdInput) {
|
|
|
3194
3210
|
const advisory = desktopSdkAdvisory(version);
|
|
3195
3211
|
return {
|
|
3196
3212
|
name: "e2b desktop sdk",
|
|
3197
|
-
ok: present,
|
|
3213
|
+
ok: present || setup?.desktop === false,
|
|
3198
3214
|
message: present
|
|
3199
|
-
? `optional peer @e2b/desktop ${version ?? "(version unread)"} is installed;
|
|
3200
|
-
: "optional peer @e2b/desktop is
|
|
3215
|
+
? `optional peer @e2b/desktop ${version ?? "(version unread)"} is installed; provider access is not tested${advisory === undefined ? "" : `. ${advisory}`}`
|
|
3216
|
+
: setup?.desktop === false ? "optional peer @e2b/desktop is absent; not required by the selected route"
|
|
3217
|
+
: "optional peer @e2b/desktop is NOT installed — dry runs work, but any live desktop lane will fail closed. Install it with `npm i -D @e2b/desktop`."
|
|
3201
3218
|
};
|
|
3202
3219
|
})(),
|
|
3203
3220
|
// The stakeholder surface (#455). Reported as capability, never as a gate: the TUI is optional,
|
|
@@ -3230,32 +3247,29 @@ export async function doctor(cwdInput) {
|
|
|
3230
3247
|
// "go make an API key" is where most people trying humanish stop, and a developer very often
|
|
3231
3248
|
// already has one of these signed in.
|
|
3232
3249
|
...await (async () => {
|
|
3233
|
-
|
|
3234
|
-
return [{ name: "local agents", ok: true, message: localAgentDoctorMessage(found) }];
|
|
3250
|
+
return [{ name: "local agents", ok: true, message: localAgentDoctorMessage(agents) }];
|
|
3235
3251
|
})(),
|
|
3236
3252
|
// Provider-key discovery (#436): which source supplies each live-run key, through the same
|
|
3237
3253
|
// chain a live command resolves (env/--env-file, project overlay, vendor stores, the
|
|
3238
3254
|
// humanish user store). Values never appear; sources and fill commands do.
|
|
3239
3255
|
...await (async () => {
|
|
3240
|
-
const probes = await probeKeySources(["OPENAI_API_KEY", "E2B_API_KEY", "GH_TOKEN"], {
|
|
3241
|
-
cwd,
|
|
3242
|
-
env: process.env
|
|
3243
|
-
});
|
|
3244
3256
|
return probes.map((probe) => {
|
|
3245
3257
|
const present = probe.source !== null;
|
|
3246
3258
|
// GH_TOKEN is needed only for private clone subjects, so its absence is informational.
|
|
3247
|
-
const required = probe.name
|
|
3259
|
+
const required = setup ? setup.keys.includes(probe.name) : probe.name === "E2B_API_KEY"
|
|
3260
|
+
|| probe.name === "OPENAI_API_KEY" && !agents.some(agent => agent.authStatus === "authenticated");
|
|
3248
3261
|
return {
|
|
3249
3262
|
name: `key ${probe.name}`,
|
|
3250
3263
|
ok: present || !required,
|
|
3251
3264
|
message: present
|
|
3252
|
-
? `supplied by ${probe.source}`
|
|
3265
|
+
? `supplied by ${probe.source}; presence only, validity not tested`
|
|
3253
3266
|
: required
|
|
3254
3267
|
? `missing from every source — ${probe.hint}`
|
|
3255
|
-
: `
|
|
3268
|
+
: `not required for ${setup ? "the selected participant route" : "every route"}; ${probe.hint}`
|
|
3256
3269
|
};
|
|
3257
3270
|
});
|
|
3258
|
-
})()
|
|
3271
|
+
})(),
|
|
3272
|
+
...(setup?.checks ?? [{ name: "setup route", ok: true, message: "General capabilities only. Use humanish doctor --lab <lab> for the selected participant's requirements and separate analysis readiness." }])
|
|
3259
3273
|
];
|
|
3260
3274
|
return {
|
|
3261
3275
|
schema: DOCTOR_SCHEMA,
|