runpack_export
Exporta artefactes de runpack deterministes per a la verificació fora de línia.
Notes clau
- Escriu el manifest i els registres a output_dir; generated_at es registra al manifest.
- include_verification afegeix un artefacte de informe de verificació.
- L’informe d’exportació checked_files exclou verifier_report.json; l’execució offline runpack_verify checked_files l’inclou (+1 per la mateixa runpack).
- Utilitzeu després que les execucions es completin o per a instantànies d’auditoria.
Inputs
- generated_at (requerit): Timestamp enregistrat al manifest.
- include_verification (requerit): Generar un artefacte de informe de verificació.
manifest_name(opcional): Substitució opcional per al nom del fitxer de manifest.- namespace_id (requerit): Identificador de l’espai de noms.
output_dir(opcional): Directori de sortida opcional (requerit per a l’exportació del sistema de fitxers).- run_id (requerit): Identificador de la execució.
- scenario_id (required): Identificador de l’escenari.
- tenant_id (required): Identificador del llogater.
Input Schema
{
"$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"
}
Sortides
- manifest (requerit): Tipus: object.
report(requerit): Una de les 2 variants d’esquema.storage_uri(opcional): URI d’emmagatzematge opcional per a backend d’emmagatzematge de runpack gestionat.
Esquema de sortida
{
"$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"
}
Exemples
Exporta un runpack amb metadades del manifest.
Input:
{
"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
}