humanish 0.56.0 → 0.58.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.d.ts CHANGED
@@ -1045,6 +1045,15 @@ export interface DoctorResult {
1045
1045
  name: string;
1046
1046
  ok: boolean;
1047
1047
  message: string;
1048
+ /**
1049
+ * ADDITIVE + OPTIONAL. `false` means the check never ran — the directory could not be read, so
1050
+ * there is nothing to report about it either way. Absent means it ran and `ok` is its verdict.
1051
+ *
1052
+ * It exists because a failed check and an unrun one used to render identically, and the unrun
1053
+ * rows carried the SUCCESS text: a participant read `missing package.json: package.json is
1054
+ * present and safe to read` off a real screen (labs/tui-self-study.yaml).
1055
+ */
1056
+ checked?: boolean;
1048
1057
  }>;
1049
1058
  }
1050
1059
  /**
package/dist/run.js CHANGED
@@ -25,6 +25,7 @@ import { bindExistingRunArtifactPaths, RUNS_RELATIVE_ROOT, isSafeRunIdSegment, p
25
25
  import { probeKeySources } from "./key-resolution.js";
26
26
  import { beginRunStatus, withRunStatusScope } from "./run-status.js";
27
27
  import { nodeSupportsTui, terminalSurfaceMessage, tuiBundleUrl } from "./tui-contract.js";
28
+ import { detectLocalAgents, localAgentDoctorMessage } from "./local-agent-cli.js";
28
29
  import { assertPreparedSelectedOutputDirectory, assertSafeOutputPathSegment, bindExistingManagedHumanishOutputDirectory, prepareContainedOutputDirectory, prepareContainedOutputDirectoryRoot, prepareContainedOutputFile, prepareSelectedOutputDirectory, readContainedRegularFile, writeContainedOutputFile, writePreparedRunLatestPointer } from "./selected-output-paths.js";
29
30
  export const RUN_BUNDLE_SCHEMA = "humanish.run-bundle.v1";
30
31
  export const SHARED_WORLD_SCHEMA = "humanish.shared-world.v1";
@@ -2960,10 +2961,10 @@ export async function doctor(cwdInput) {
2960
2961
  const cwdOk = await validateCwd(cwd).then((error) => error === null).catch(() => false);
2961
2962
  if (!cwdOk) {
2962
2963
  const checks = [
2963
- { name: "target cwd", ok: false, message: "target directory exists" },
2964
- { name: "package.json", ok: false, message: "package.json is present and safe to read" },
2965
- { name: "humanish source", ok: false, message: "committed humanish/ source directory is present and safe to read" },
2966
- { name: "runtime ignore", ok: false, message: ".gitignore safely contains .humanish/" }
2964
+ { name: "target cwd", ok: false, message: "this directory does not exist, or humanish cannot read it" },
2965
+ { name: "package.json", ok: false, checked: false, message: "not checked the target directory could not be read" },
2966
+ { name: "humanish source", ok: false, checked: false, message: "not checked the target directory could not be read" },
2967
+ { name: "runtime ignore", ok: false, checked: false, message: "not checked the target directory could not be read" }
2967
2968
  ];
2968
2969
  return { schema: DOCTOR_SCHEMA, ok: false, cwd, checks };
2969
2970
  }
@@ -2974,9 +2975,9 @@ export async function doctor(cwdInput) {
2974
2975
  catch {
2975
2976
  const checks = [
2976
2977
  { name: "target cwd", ok: false, message: "target directory failed containment validation" },
2977
- { name: "package.json", ok: false, message: "package.json is present and safe to read" },
2978
- { name: "humanish source", ok: false, message: "committed humanish/ source directory is present and safe to read" },
2979
- { name: "runtime ignore", ok: false, message: ".gitignore safely contains .humanish/" }
2978
+ { name: "package.json", ok: false, checked: false, message: "not checked containment validation failed first" },
2979
+ { name: "humanish source", ok: false, checked: false, message: "not checked containment validation failed first" },
2980
+ { name: "runtime ignore", ok: false, checked: false, message: "not checked containment validation failed first" }
2980
2981
  ];
2981
2982
  return { schema: DOCTOR_SCHEMA, ok: false, cwd, checks };
2982
2983
  }
@@ -3056,6 +3057,14 @@ export async function doctor(cwdInput) {
3056
3057
  })
3057
3058
  };
3058
3059
  })(),
3060
+ // The operator's own signed-in coding agent, reported as a CAPABILITY and never a gate: a
3061
+ // machine with none is not broken, it just needs a provider key. This row exists because
3062
+ // "go make an API key" is where most people trying humanish stop, and a developer very often
3063
+ // already has one of these signed in.
3064
+ ...await (async () => {
3065
+ const found = await detectLocalAgents();
3066
+ return [{ name: "local agents", ok: true, message: localAgentDoctorMessage(found) }];
3067
+ })(),
3059
3068
  // Provider-key discovery (#436): which source supplies each live-run key, through the same
3060
3069
  // chain a live command resolves (env/--env-file, project overlay, vendor stores, the
3061
3070
  // humanish user store). Values never appear; sources and fill commands do.