harn-hostlib 0.10.13

Opt-in code-intelligence and deterministic-tool host builtins for the Harn VM
Documentation
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://harnlang.com/schemas/hostlib/tools/wait_command.response.json",
  "title": "tools.wait_command response",
  "type": "object",
  "properties": {
    "command_id": { "type": "string" },
    "status": {
      "type": "string",
      "enum": ["completed", "running", "timed_out", "killed", "blocked", "spawn_failed"]
    },
    "handle_id": { "type": "string" },
    "completed": { "type": "boolean" },
    "feedback_kind": { "type": "string" },
    "started_at": { "type": "string", "format": "date-time" },
    "ended_at": { "type": ["string", "null"], "format": "date-time" },
    "duration_ms": { "type": "integer", "minimum": 0 },
    "exit_code": { "type": ["integer", "null"] },
    "signal": { "type": ["string", "null"] },
    "timed_out": { "type": "boolean" },
    "stdout": { "type": "string" },
    "stderr": { "type": "string" },
    "output_path": { "type": "string" },
    "stdout_path": { "type": "string" },
    "stderr_path": { "type": "string" },
    "line_count": { "type": "integer", "minimum": 0 },
    "byte_count": { "type": "integer", "minimum": 0 },
    "output_sha256": { "type": "string" },
    "process_group_id": { "type": ["integer", "null"] },
    "snapshot_binding": {
      "type": "object",
      "description": "Opaque verification snapshot binding carried from the background run_command request.",
      "additionalProperties": true
    },
    "process_cleanup": { "$ref": "#/$defs/process_cleanup" },
    "command_or_op_descriptor": { "type": "string" }
  },
  "required": ["handle_id", "status", "timed_out"],
  "additionalProperties": false,
  "$defs": {
    "process_cleanup": {
      "type": "object",
      "properties": {
        "root_pid": { "type": ["integer", "null"] },
        "attempted_signals": {
          "type": "array",
          "items": { "type": "string" }
        },
        "observed_child_count": { "type": "integer", "minimum": 0 },
        "reaped_child_count": { "type": "integer", "minimum": 0 },
        "survivor_count": { "type": "integer", "minimum": 0 },
        "observed_children": {
          "type": "array",
          "items": { "$ref": "#/$defs/process_cleanup_child" }
        },
        "reaped_children": {
          "type": "array",
          "items": { "$ref": "#/$defs/process_cleanup_child" }
        },
        "surviving_children": {
          "type": "array",
          "items": { "$ref": "#/$defs/process_cleanup_child" }
        }
      },
      "required": [
        "root_pid",
        "attempted_signals",
        "observed_child_count",
        "reaped_child_count",
        "survivor_count",
        "observed_children",
        "reaped_children",
        "surviving_children"
      ],
      "additionalProperties": false
    },
    "process_cleanup_child": {
      "type": "object",
      "properties": {
        "pid": { "type": "integer" },
        "parent_pid": { "type": ["integer", "null"] },
        "depth": { "type": "integer", "minimum": 1 },
        "command_name": { "type": ["string", "null"] },
        "signals": {
          "type": "array",
          "items": { "type": "string" }
        },
        "alive_after_cleanup": { "type": ["boolean", "null"] }
      },
      "required": ["pid", "parent_pid", "depth", "command_name", "signals", "alive_after_cleanup"],
      "additionalProperties": false
    }
  }
}