runpack_export
Exportar artefactos de runpack deterministas para verificación offline.
Notas clave
- Escribe el manifiesto y los registros en output_dir; generated_at se registra en el manifiesto.
- include_verification agrega un artefacto de informe de verificación.
- El informe de tiempo de exportación .checked_files excluye verifier_report.json; la verificación offline de runpack_verify incluye este archivo (+1 para el mismo runpack).
- Utilice después de que las ejecuciones se completen o para instantáneas de auditoría.
Entradas
- generated_at (requerido): Marca de tiempo registrada en el manifiesto.
- include_verification (requerido): Generar un artefacto de informe de verificación.
manifest_name(opcional): Sobrescritura opcional para el nombre del archivo de manifiesto.- namespace_id (requerido): Identificador de espacio de nombres.
output_dir(opcional): Directorio de salida opcional (requerido para la exportación del sistema de archivos).- run_id (requerido): Identificador de ejecución.
- scenario_id (requerido): Identificador del escenario.
- tenant_id (required): Identificador del inquilino.
Esquema de Entrada
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"generated_at": {
"description": "Timestamp recorded in the manifest.",
"oneOf": [
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "unix_millis"
},
"value": {
"type": "integer"
}
},
"required": [
"kind",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "logical"
},
"value": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"kind",
"value"
],
"type": "object"
}
]
},
"include_verification": {
"description": "Generate a verification report artifact.",
"type": "boolean"
},
"manifest_name": {
"description": "Optional override for the manifest file name.",
"oneOf": [
{
"type": "null"
},
{
"description": "Manifest file name.",
"type": "string"
}
]
},
"namespace_id": {
"description": "Namespace identifier.",
"minimum": 1,
"type": "integer"
},
"output_dir": {
"description": "Optional output directory (required for filesystem export).",
"oneOf": [
{
"type": "null"
},
{
"description": "Output directory path.",
"type": "string"
}
]
},
"run_id": {
"description": "Run identifier.",
"type": "string"
},
"scenario_id": {
"description": "Scenario identifier.",
"type": "string"
},
"tenant_id": {
"description": "Tenant identifier.",
"minimum": 1,
"type": "integer"
}
},
"required": [
"scenario_id",
"tenant_id",
"namespace_id",
"run_id",
"generated_at",
"include_verification"
],
"type": "object"
}
Salidas
- manifest (requerido): Tipo: object.
informe(requerido): Una de las 2 variantes de esquema.storage_uri(opcional): URI de almacenamiento opcional para backends de almacenamiento de runpack gestionados.
Esquema de Salida
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"manifest": {
"additionalProperties": false,
"properties": {
"artifacts": {
"items": {
"additionalProperties": false,
"properties": {
"artifact_id": {
"description": "Artifact identifier.",
"type": "string"
},
"content_type": {
"oneOf": [
{
"type": "null"
},
{
"description": "Artifact content type.",
"type": "string"
}
]
},
"hash": {
"additionalProperties": false,
"properties": {
"algorithm": {
"enum": [
"sha256"
],
"type": "string"
},
"value": {
"description": "Lowercase hex digest.",
"type": "string"
}
},
"required": [
"algorithm",
"value"
],
"type": "object"
},
"kind": {
"enum": [
"scenario_spec",
"trigger_log",
"gate_eval_log",
"decision_log",
"packet_log",
"dispatch_log",
"evidence_log",
"submission_log",
"tool_transcript",
"verifier_report",
"custom"
],
"type": "string"
},
"path": {
"description": "Runpack-relative artifact path.",
"type": "string"
},
"required": {
"type": "boolean"
}
},
"required": [
"artifact_id",
"kind",
"path",
"content_type",
"hash",
"required"
],
"type": "object"
},
"type": "array"
},
"generated_at": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "unix_millis"
},
"value": {
"type": "integer"
}
},
"required": [
"kind",
"value"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"kind": {
"const": "logical"
},
"value": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"kind",
"value"
],
"type": "object"
}
]
},
"hash_algorithm": {
"enum": [
"sha256"
],
"type": "string"
},
"integrity": {
"additionalProperties": false,
"properties": {
"file_hashes": {
"items": {
"additionalProperties": false,
"properties": {
"hash": {
"additionalProperties": false,
"properties": {
"algorithm": {
"enum": [
"sha256"
],
"type": "string"
},
"value": {
"description": "Lowercase hex digest.",
"type": "string"
}
},
"required": [
"algorithm",
"value"
],
"type": "object"
},
"path": {
"description": "Runpack-relative artifact path.",
"type": "string"
}
},
"required": [
"path",
"hash"
],
"type": "object"
},
"type": "array"
},
"root_hash": {
"additionalProperties": false,
"properties": {
"algorithm": {
"enum": [
"sha256"
],
"type": "string"
},
"value": {
"description": "Lowercase hex digest.",
"type": "string"
}
},
"required": [
"algorithm",
"value"
],
"type": "object"
}
},
"required": [
"file_hashes",
"root_hash"
],
"type": "object"
},
"manifest_version": {
"description": "Runpack manifest version.",
"type": "string"
},
"namespace_id": {
"description": "Namespace identifier.",
"minimum": 1,
"type": "integer"
},
"run_id": {
"description": "Run identifier.",
"type": "string"
},
"scenario_id": {
"description": "Scenario identifier.",
"type": "string"
},
"security": {
"additionalProperties": false,
"properties": {
"dev_permissive": {
"type": "boolean"
},
"namespace_authority": {
"description": "Namespace authority mode label.",
"type": "string"
}
},
"required": [
"dev_permissive",
"namespace_authority"
],
"type": "object"
},
"spec_hash": {
"additionalProperties": false,
"properties": {
"algorithm": {
"enum": [
"sha256"
],
"type": "string"
},
"value": {
"description": "Lowercase hex digest.",
"type": "string"
}
},
"required": [
"algorithm",
"value"
],
"type": "object"
},
"tenant_id": {
"description": "Tenant identifier.",
"minimum": 1,
"type": "integer"
},
"verifier_mode": {
"enum": [
"offline_strict",
"offline_with_fetch"
],
"type": "string"
}
},
"required": [
"manifest_version",
"generated_at",
"tenant_id",
"namespace_id",
"scenario_id",
"run_id",
"spec_hash",
"hash_algorithm",
"verifier_mode",
"integrity",
"artifacts"
],
"type": "object"
},
"report": {
"oneOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"properties": {
"checked_files": {
"minimum": 0,
"type": "integer"
},
"errors": {
"description": "Verification error messages.",
"items": {
"type": "string"
},
"type": "array"
},
"status": {
"description": "Runpack verification status.",
"enum": [
"pass",
"fail"
],
"type": "string"
}
},
"required": [
"status",
"checked_files",
"errors"
],
"type": "object"
}
]
},
"storage_uri": {
"description": "Optional storage URI for managed runpack storage backends.",
"oneOf": [
{
"type": "null"
},
{
"type": "string"
}
]
}
},
"required": [
"manifest",
"report"
],
"type": "object"
}
Ejemplos
Exportar un runpack con metadatos de manifiesto.
Entrada:
{
"generated_at": {
"kind": "unix_millis",
"value": 1710000000000
},
"include_verification": false,
"manifest_name": "manifest.json",
"namespace_id": 1,
"output_dir": "/var/lib/decision-gate/runpacks/run-0001",
"run_id": "run-0001",
"scenario_id": "example-scenario",
"tenant_id": 1
}
Output:
{
"manifest": {
"artifacts": [
{
"artifact_id": "decision_log",
"content_type": "application/json",
"hash": {
"algorithm": "sha256",
"value": "5c3a5b6bce0f4a2c9e22c4fa6a1e6d8d90b0f2dfed1b7f1e9b3d3b3d1f0c9b21"
},
"kind": "decision_log",
"path": "decision_log.json",
"required": true
}
],
"generated_at": {
"kind": "unix_millis",
"value": 1710000000000
},
"hash_algorithm": "sha256",
"integrity": {
"file_hashes": [
{
"hash": {
"algorithm": "sha256",
"value": "5c3a5b6bce0f4a2c9e22c4fa6a1e6d8d90b0f2dfed1b7f1e9b3d3b3d1f0c9b21"
},
"path": "decision_log.json"
}
],
"root_hash": {
"algorithm": "sha256",
"value": "5c3a5b6bce0f4a2c9e22c4fa6a1e6d8d90b0f2dfed1b7f1e9b3d3b3d1f0c9b21"
}
},
"manifest_version": "v1",
"namespace_id": 1,
"run_id": "run-0001",
"scenario_id": "example-scenario",
"spec_hash": {
"algorithm": "sha256",
"value": "5c3a5b6bce0f4a2c9e22c4fa6a1e6d8d90b0f2dfed1b7f1e9b3d3b3d1f0c9b21"
},
"tenant_id": 1,
"verifier_mode": "offline_strict"
},
"report": null,
"storage_uri": null
}