humanish 0.48.0 → 0.49.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/dist/run.js CHANGED
@@ -21,6 +21,7 @@ import { parseResolvedPersona, personaToDirectives, renderPersonaPromptSection }
21
21
  import { round6 } from "./pricing.js";
22
22
  import { containsSensitive, digestText, redactText, redactToSecretLabel, tailText } from "./redaction.js";
23
23
  import { bindExistingRunArtifactPaths, RUNS_RELATIVE_ROOT, isSafeRunIdSegment, prepareRunArtifactPaths, resolveExistingRunDirectory, resolveLatestRunDirectory, resolveRunsRoot, validatePreparedRunArtifactPaths } from "./run-paths.js";
24
+ import { probeKeySources } from "./key-resolution.js";
24
25
  import { assertPreparedSelectedOutputDirectory, assertSafeOutputPathSegment, bindExistingManagedHumanishOutputDirectory, prepareContainedOutputDirectory, prepareContainedOutputDirectoryRoot, prepareContainedOutputFile, prepareSelectedOutputDirectory, readContainedRegularFile, writeContainedOutputFile, writePreparedRunLatestPointer } from "./selected-output-paths.js";
25
26
  export const RUN_BUNDLE_SCHEMA = "humanish.run-bundle.v1";
26
27
  export const SHARED_WORLD_SCHEMA = "humanish.shared-world.v1";
@@ -2979,6 +2980,29 @@ export async function doctor(cwdInput) {
2979
2980
  ? "optional peer @e2b/desktop is installed; live desktop lanes can launch"
2980
2981
  : "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`."
2981
2982
  };
2983
+ })(),
2984
+ // Provider-key discovery (#436): which source supplies each live-run key, through the same
2985
+ // chain a live command resolves (env/--env-file, project overlay, vendor stores, the
2986
+ // humanish user store). Values never appear; sources and fill commands do.
2987
+ ...await (async () => {
2988
+ const probes = await probeKeySources(["OPENAI_API_KEY", "E2B_API_KEY", "GH_TOKEN"], {
2989
+ cwd,
2990
+ env: process.env
2991
+ });
2992
+ return probes.map((probe) => {
2993
+ const present = probe.source !== null;
2994
+ // GH_TOKEN is needed only for private clone subjects, so its absence is informational.
2995
+ const required = probe.name !== "GH_TOKEN";
2996
+ return {
2997
+ name: `key ${probe.name}`,
2998
+ ok: present || !required,
2999
+ message: present
3000
+ ? `supplied by ${probe.source}`
3001
+ : required
3002
+ ? `missing from every source — ${probe.hint}`
3003
+ : `missing (needed only for private clone subjects) — ${probe.hint}`
3004
+ };
3005
+ });
2982
3006
  })()
2983
3007
  ];
2984
3008
  return {