{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/antfly/json-schema/antfly-memory-inspection-schema.json",
  "title": "MemoryInspection",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/antfly-openapi.yaml#/components/schemas/MemoryInspection",
  "type": "object",
  "properties": {
    "state": {
      "type": "object",
      "properties": {
        "table_id": {
          "type": "integer",
          "minimum": 0,
          "maximum": 18446744073709551615,
          "format": "uint64",
          "default": 0,
          "x-go-type-skip-optional-pointer": false,
          "x-go-type": "uint64"
        },
        "database": {
          "type": "string"
        },
        "namespace": {
          "type": "string"
        },
        "space": {
          "type": "string"
        },
        "config": {
          "type": "object",
          "properties": {
            "version": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295,
              "format": "uint32",
              "default": 1,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint32"
            },
            "generation": {
              "type": "integer",
              "minimum": 0,
              "maximum": 18446744073709551615,
              "format": "uint64",
              "default": 1,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint64"
            },
            "embedding_generation": {
              "type": "integer",
              "minimum": 0,
              "maximum": 18446744073709551615,
              "format": "uint64",
              "default": 1,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint64"
            },
            "processing": {
              "type": "string",
              "enum": [
                "external",
                "managed",
                "hybrid"
              ],
              "default": "external",
              "x-go-type-skip-optional-pointer": false
            },
            "ontology_version": {
              "type": "string"
            },
            "policy_version": {
              "type": "string"
            },
            "features": {
              "type": "object",
              "properties": {
                "lineage": {
                  "type": "boolean",
                  "default": false,
                  "x-go-type-skip-optional-pointer": false
                },
                "semantic_recall": {
                  "type": "boolean",
                  "default": false,
                  "x-go-type-skip-optional-pointer": false
                },
                "entity_extraction": {
                  "type": "boolean",
                  "default": false,
                  "x-go-type-skip-optional-pointer": false
                },
                "assertion_distillation": {
                  "type": "boolean",
                  "default": false,
                  "x-go-type-skip-optional-pointer": false
                },
                "summaries": {
                  "type": "boolean",
                  "default": false,
                  "x-go-type-skip-optional-pointer": false
                },
                "reconciliation": {
                  "type": "string",
                  "enum": [
                    "explicit",
                    "deterministic",
                    "model"
                  ],
                  "default": "explicit",
                  "x-go-type-skip-optional-pointer": false
                }
              },
              "additionalProperties": false
            },
            "intake_screening": {
              "type": "object",
              "properties": {
                "version": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 65535,
                  "format": "uint32",
                  "default": 1,
                  "x-go-type-skip-optional-pointer": false,
                  "x-go-type": "uint32"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "reject",
                    "redact"
                  ],
                  "default": "reject",
                  "x-go-type-skip-optional-pointer": false
                },
                "custom_rules": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "prefix": {
                        "type": "string"
                      },
                      "min_length": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 65535,
                        "format": "uint32",
                        "x-go-type": "uint32"
                      },
                      "max_length": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 65535,
                        "format": "uint32",
                        "default": 4096,
                        "x-go-type-skip-optional-pointer": false,
                        "x-go-type": "uint32"
                      },
                      "alphabet": {
                        "type": "string",
                        "enum": [
                          "alphanumeric",
                          "base64url",
                          "hex",
                          "non_separator"
                        ],
                        "default": "base64url",
                        "x-go-type-skip-optional-pointer": false
                      }
                    },
                    "required": [
                      "id",
                      "prefix",
                      "min_length"
                    ],
                    "additionalProperties": false
                  }
                },
                "allow_fingerprints": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            },
            "models": {
              "type": "object",
              "properties": {
                "embedder": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "string"
                    },
                    "dimensions": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "maximum": 4294967295,
                      "format": "uint32",
                      "x-go-type": "uint32",
                      "default": null,
                      "x-go-type-skip-optional-pointer": false
                    }
                  },
                  "required": [
                    "provider",
                    "model",
                    "revision"
                  ],
                  "additionalProperties": false,
                  "default": null
                },
                "extractor": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "string"
                    },
                    "dimensions": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "maximum": 4294967295,
                      "format": "uint32",
                      "x-go-type": "uint32",
                      "default": null,
                      "x-go-type-skip-optional-pointer": false
                    }
                  },
                  "required": [
                    "provider",
                    "model",
                    "revision"
                  ],
                  "additionalProperties": false,
                  "default": null
                },
                "generator": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "string"
                    },
                    "dimensions": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "maximum": 4294967295,
                      "format": "uint32",
                      "x-go-type": "uint32",
                      "default": null,
                      "x-go-type-skip-optional-pointer": false
                    }
                  },
                  "required": [
                    "provider",
                    "model",
                    "revision"
                  ],
                  "additionalProperties": false,
                  "default": null
                },
                "decider": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "string"
                    },
                    "dimensions": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "maximum": 4294967295,
                      "format": "uint32",
                      "x-go-type": "uint32",
                      "default": null,
                      "x-go-type-skip-optional-pointer": false
                    }
                  },
                  "required": [
                    "provider",
                    "model",
                    "revision"
                  ],
                  "additionalProperties": false,
                  "default": null
                }
              },
              "additionalProperties": false
            },
            "semantic_discovery": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "default": false,
                  "x-go-type-skip-optional-pointer": false
                },
                "name_threshold": {
                  "type": "number",
                  "format": "double",
                  "default": 0.8,
                  "x-go-type-skip-optional-pointer": false
                },
                "view_threshold": {
                  "type": "number",
                  "format": "double",
                  "default": 0.85,
                  "x-go-type-skip-optional-pointer": false
                },
                "neighbors": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 65535,
                  "format": "uint32",
                  "default": 32,
                  "x-go-type-skip-optional-pointer": false,
                  "x-go-type": "uint32"
                }
              },
              "additionalProperties": false
            },
            "ontology_pack": {
              "type": "string",
              "enum": [
                "none",
                "software_team_v1"
              ],
              "default": "none",
              "x-go-type-skip-optional-pointer": false
            },
            "predicates": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "cardinality": {
                    "type": "string",
                    "enum": [
                      "one",
                      "many"
                    ],
                    "default": "many",
                    "x-go-type-skip-optional-pointer": false
                  },
                  "subject_type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null,
                    "x-go-type-skip-optional-pointer": false
                  },
                  "object_type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null,
                    "x-go-type-skip-optional-pointer": false
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            },
            "source_rules": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "source_id": {
                    "type": "string"
                  },
                  "principal": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null,
                    "x-go-type-skip-optional-pointer": false
                  },
                  "producer": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null,
                    "x-go-type-skip-optional-pointer": false
                  },
                  "authority": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535,
                    "format": "uint32",
                    "default": 0,
                    "x-go-type-skip-optional-pointer": false,
                    "x-go-type": "uint32"
                  }
                },
                "required": [
                  "source_id"
                ],
                "additionalProperties": false
              }
            },
            "max_input_bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295,
              "format": "uint32",
              "default": 262144,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint32"
            },
            "max_output_items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 65535,
              "format": "uint32",
              "default": 128,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint32"
            },
            "max_attempts": {
              "type": "integer",
              "minimum": 0,
              "maximum": 255,
              "format": "uint32",
              "default": 3,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint32"
            },
            "max_recall_tokens": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295,
              "format": "uint32",
              "default": 8192,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint32"
            },
            "retention_ms": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 18446744073709551615,
              "format": "uint64",
              "x-go-type": "uint64",
              "default": null,
              "x-go-type-skip-optional-pointer": false
            },
            "change_retention_ms": {
              "type": "integer",
              "minimum": 0,
              "maximum": 18446744073709551615,
              "format": "uint64",
              "default": 604800000,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint64"
            }
          },
          "additionalProperties": false
        },
        "pending_config": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "version": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295,
              "format": "uint32",
              "default": 1,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint32"
            },
            "generation": {
              "type": "integer",
              "minimum": 0,
              "maximum": 18446744073709551615,
              "format": "uint64",
              "default": 1,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint64"
            },
            "embedding_generation": {
              "type": "integer",
              "minimum": 0,
              "maximum": 18446744073709551615,
              "format": "uint64",
              "default": 1,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint64"
            },
            "processing": {
              "type": "string",
              "enum": [
                "external",
                "managed",
                "hybrid"
              ],
              "default": "external",
              "x-go-type-skip-optional-pointer": false
            },
            "ontology_version": {
              "type": "string"
            },
            "policy_version": {
              "type": "string"
            },
            "features": {
              "type": "object",
              "properties": {
                "lineage": {
                  "type": "boolean",
                  "default": false,
                  "x-go-type-skip-optional-pointer": false
                },
                "semantic_recall": {
                  "type": "boolean",
                  "default": false,
                  "x-go-type-skip-optional-pointer": false
                },
                "entity_extraction": {
                  "type": "boolean",
                  "default": false,
                  "x-go-type-skip-optional-pointer": false
                },
                "assertion_distillation": {
                  "type": "boolean",
                  "default": false,
                  "x-go-type-skip-optional-pointer": false
                },
                "summaries": {
                  "type": "boolean",
                  "default": false,
                  "x-go-type-skip-optional-pointer": false
                },
                "reconciliation": {
                  "type": "string",
                  "enum": [
                    "explicit",
                    "deterministic",
                    "model"
                  ],
                  "default": "explicit",
                  "x-go-type-skip-optional-pointer": false
                }
              },
              "additionalProperties": false
            },
            "intake_screening": {
              "type": "object",
              "properties": {
                "version": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 65535,
                  "format": "uint32",
                  "default": 1,
                  "x-go-type-skip-optional-pointer": false,
                  "x-go-type": "uint32"
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "reject",
                    "redact"
                  ],
                  "default": "reject",
                  "x-go-type-skip-optional-pointer": false
                },
                "custom_rules": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "prefix": {
                        "type": "string"
                      },
                      "min_length": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 65535,
                        "format": "uint32",
                        "x-go-type": "uint32"
                      },
                      "max_length": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 65535,
                        "format": "uint32",
                        "default": 4096,
                        "x-go-type-skip-optional-pointer": false,
                        "x-go-type": "uint32"
                      },
                      "alphabet": {
                        "type": "string",
                        "enum": [
                          "alphanumeric",
                          "base64url",
                          "hex",
                          "non_separator"
                        ],
                        "default": "base64url",
                        "x-go-type-skip-optional-pointer": false
                      }
                    },
                    "required": [
                      "id",
                      "prefix",
                      "min_length"
                    ],
                    "additionalProperties": false
                  }
                },
                "allow_fingerprints": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            },
            "models": {
              "type": "object",
              "properties": {
                "embedder": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "string"
                    },
                    "dimensions": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "maximum": 4294967295,
                      "format": "uint32",
                      "x-go-type": "uint32",
                      "default": null,
                      "x-go-type-skip-optional-pointer": false
                    }
                  },
                  "required": [
                    "provider",
                    "model",
                    "revision"
                  ],
                  "additionalProperties": false,
                  "default": null
                },
                "extractor": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "string"
                    },
                    "dimensions": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "maximum": 4294967295,
                      "format": "uint32",
                      "x-go-type": "uint32",
                      "default": null,
                      "x-go-type-skip-optional-pointer": false
                    }
                  },
                  "required": [
                    "provider",
                    "model",
                    "revision"
                  ],
                  "additionalProperties": false,
                  "default": null
                },
                "generator": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "string"
                    },
                    "dimensions": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "maximum": 4294967295,
                      "format": "uint32",
                      "x-go-type": "uint32",
                      "default": null,
                      "x-go-type-skip-optional-pointer": false
                    }
                  },
                  "required": [
                    "provider",
                    "model",
                    "revision"
                  ],
                  "additionalProperties": false,
                  "default": null
                },
                "decider": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "revision": {
                      "type": "string"
                    },
                    "dimensions": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "maximum": 4294967295,
                      "format": "uint32",
                      "x-go-type": "uint32",
                      "default": null,
                      "x-go-type-skip-optional-pointer": false
                    }
                  },
                  "required": [
                    "provider",
                    "model",
                    "revision"
                  ],
                  "additionalProperties": false,
                  "default": null
                }
              },
              "additionalProperties": false
            },
            "semantic_discovery": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "default": false,
                  "x-go-type-skip-optional-pointer": false
                },
                "name_threshold": {
                  "type": "number",
                  "format": "double",
                  "default": 0.8,
                  "x-go-type-skip-optional-pointer": false
                },
                "view_threshold": {
                  "type": "number",
                  "format": "double",
                  "default": 0.85,
                  "x-go-type-skip-optional-pointer": false
                },
                "neighbors": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 65535,
                  "format": "uint32",
                  "default": 32,
                  "x-go-type-skip-optional-pointer": false,
                  "x-go-type": "uint32"
                }
              },
              "additionalProperties": false
            },
            "ontology_pack": {
              "type": "string",
              "enum": [
                "none",
                "software_team_v1"
              ],
              "default": "none",
              "x-go-type-skip-optional-pointer": false
            },
            "predicates": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "cardinality": {
                    "type": "string",
                    "enum": [
                      "one",
                      "many"
                    ],
                    "default": "many",
                    "x-go-type-skip-optional-pointer": false
                  },
                  "subject_type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null,
                    "x-go-type-skip-optional-pointer": false
                  },
                  "object_type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null,
                    "x-go-type-skip-optional-pointer": false
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            },
            "source_rules": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "source_id": {
                    "type": "string"
                  },
                  "principal": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null,
                    "x-go-type-skip-optional-pointer": false
                  },
                  "producer": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null,
                    "x-go-type-skip-optional-pointer": false
                  },
                  "authority": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535,
                    "format": "uint32",
                    "default": 0,
                    "x-go-type-skip-optional-pointer": false,
                    "x-go-type": "uint32"
                  }
                },
                "required": [
                  "source_id"
                ],
                "additionalProperties": false
              }
            },
            "max_input_bytes": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295,
              "format": "uint32",
              "default": 262144,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint32"
            },
            "max_output_items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 65535,
              "format": "uint32",
              "default": 128,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint32"
            },
            "max_attempts": {
              "type": "integer",
              "minimum": 0,
              "maximum": 255,
              "format": "uint32",
              "default": 3,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint32"
            },
            "max_recall_tokens": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295,
              "format": "uint32",
              "default": 8192,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint32"
            },
            "retention_ms": {
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0,
              "maximum": 18446744073709551615,
              "format": "uint64",
              "x-go-type": "uint64",
              "default": null,
              "x-go-type-skip-optional-pointer": false
            },
            "change_retention_ms": {
              "type": "integer",
              "minimum": 0,
              "maximum": 18446744073709551615,
              "format": "uint64",
              "default": 604800000,
              "x-go-type-skip-optional-pointer": false,
              "x-go-type": "uint64"
            }
          },
          "additionalProperties": false
        },
        "revision": {
          "type": "integer",
          "minimum": 0,
          "maximum": 18446744073709551615,
          "format": "uint64",
          "x-go-type": "uint64"
        },
        "owner": {
          "type": "string"
        },
        "created_at": {
          "type": "integer",
          "minimum": -9223372036854775808,
          "maximum": 9223372036854775807,
          "format": "int64",
          "x-go-type": "int64"
        }
      },
      "required": [
        "database",
        "namespace",
        "space",
        "config",
        "pending_config",
        "revision",
        "owner",
        "created_at"
      ],
      "additionalProperties": false
    },
    "capabilities": {
      "type": "object",
      "properties": {
        "native": {
          "type": "boolean"
        },
        "model_free": {
          "type": "boolean"
        },
        "generator_available": {
          "type": "boolean"
        },
        "embedder_available": {
          "type": "boolean"
        }
      },
      "required": [
        "native",
        "model_free",
        "generator_available",
        "embedder_available"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "state",
    "capabilities"
  ],
  "additionalProperties": false
}