assetcore_commit
AssetCore es un sustrato de memoria estructurada determinista. Almacena todo el estado del mundo explícitamente en contenedores y modifica ese estado a través de transacciones atómicas y reproducibles. Confirma una o más operaciones como una única transacción atómica contra un espacio de nombres. Este es el punto de entrada principal para escribir y cambiar el estado de la memoria estructurada.
Detalles
AssetCore es un sustrato de memoria estructurada determinista. Almacena todo el estado del mundo explícitamente en contenedores y modifica ese estado a través de transacciones atómicas y reproducibles. Confirma una o más operaciones como una única transacción atómica contra un espacio de nombres. Este es el punto de entrada principal para escribir y cambiar el estado de la memoria estructurada.
Acepta el esquema de operaciones MCP generado (idempotency_key, array de operaciones ordenadas, metadatos opcionales). El array de operaciones debe contener al menos una entrada. Los reintentos deben reutilizar el mismo idempotency_key para la deduplicación. La respuesta incluye commit_id, resultado, world_seq_start/world_seq_end, event_count, start_time_ms/commit_time_ms, ids de correlación del servidor/cliente, y eco de idempotency_key/metadatos.
AssetCore es un sustrato de memoria determinista. Los contenedores son regiones de memoria persistente. Las operaciones son transformaciones de memoria atómicas. Las transacciones son compromisos de memoria reproducibles.
Las siguientes operaciones modifican regiones de memoria estructurada de una manera independiente del dominio.
Las operaciones están organizadas por dominio:
Contenedores (regiones de memoria):
- CreateContainer: Crea un contenedor (región de memoria estructurada) con el tipo solicitado.
- RemoveContainer: Elimina un contenedor después de drenar su contenido.
Balances (estado fungible):
- AddFungible: Añade una cantidad fungible a un saldo o a una celda de cuadrícula explícita.
- RemoveFungible: Elimina la cantidad fungible de un saldo o de una celda de cuadrícula explícita.
- MoveFungible: Mueve la cantidad fungible entre saldos o celdas de la cuadrícula.
- TransferFungible: Transfiere una cantidad fungible entre contenedores estructurados.
- TransferMany: Transfiere múltiples cantidades fungibles entre contenedores en un solo lote.
- Distribuir: Distribuye una cantidad fungible de una fuente a múltiples destinos.
- MergeStacks: Fusiona un conjunto fungible en otro dentro de un contenedor.
- ConsolidateStacks: Consolida todos los grupos fungibles coincidentes dentro de un contenedor.
- MoveMany: Mueve múltiples pilas entre contenedores de Grid en un solo lote.
Instancias (estado único):
- AddInstance: Crea una nueva instancia y la coloca en una ubicación objetivo.
- MoveInstance: Mueve una instancia existente a una nueva ubicación.
- RemoveInstance: Elimina una instancia del mundo.
- BurnInstance: Elimina una instancia única de forma permanente del sustrato.
- Adjuntar: Adjunta una instancia secundaria a un padre para un movimiento vinculado.
- Desvincular: Desvincula una instancia hija de su instancia padre.
Slots (posiciones direccionables):
- PlaceInSlot: Posiciona una instancia en un espacio direccionable dentro de un contenedor.
- RemoveFromSlot: Elimina una instancia de un slot de contenedor.
- SwapSlots: Intercambia el contenido de dos slots ocupados de manera atómica.
Esquemas (definiciones de clase):
- RegisterClass: Registra una definición de clase para que las operaciones futuras puedan hacer referencia a ella.
- RegisterClassShape: Registra una huella de forma de cuadrícula para una clase o variante de clase.
- RegisterClassContinuousShape2d: Registra un rectángulo continuo 2D para una clase o variante de clase.
- RegisterClassContinuousShape1d: Registra un intervalo continuo 1D para una clase o variante de clase.
Protocolos
- MCP
- OpenAI
- Géminis
Esquema de Entrada
{
"description": "Commit payload schema used for MCP generation.\n\nThis extends the HTTP commit contract with a required namespace identifier\nso tool callers always provide explicit namespace context.",
"properties": {
"actor_id": {
"description": "Optional actor identifier for audit and attribution (echoed in metadata).",
"type": [
"string",
"null"
]
},
"idempotency_key": {
"description": "Optional idempotency key to deduplicate retries (same key + payload replays).",
"type": [
"string",
"null"
]
},
"metadata": {
"description": "Optional metadata blob stored with the commit and echoed in responses."
},
"namespace_id": {
"description": "Required namespace identifier for MCP commit payloads.",
"format": "int64",
"minimum": 1,
"type": "integer"
},
"operations": {
"description": "Operations to perform in this transaction",
"items": {
"oneOf": [
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"external_id": {
"type": "string"
},
"kind": {
"description": "Container kind for creation",
"oneOf": [
{
"description": "Balance container storing fungible quantities only.",
"properties": {
"quantization_inv": {
"description": "Fixed-point scale for balances (integer units per 1.0; e.g., 1000 -> 0.001).",
"format": "int32",
"minimum": 0,
"type": "integer"
},
"type": {
"enum": [
"balance"
],
"type": "string"
}
},
"required": [
"quantization_inv",
"type"
],
"type": "object"
},
{
"description": "Grid container supporting two-dimensional placement.",
"properties": {
"capacity": {
"description": "Total number of addressable cells (positions 1..=capacity).",
"format": "int32",
"minimum": 1,
"type": "integer"
},
"grid_width": {
"description": "Optional width for 2D layout; omit for a linear 1D grid.",
"format": "int32",
"minimum": 1,
"type": [
"integer",
"null"
]
},
"type": {
"enum": [
"grid"
],
"type": "string"
}
},
"required": [
"capacity",
"type"
],
"type": "object"
},
{
"description": "Slot-based container holding discrete instance positions.",
"properties": {
"count": {
"description": "Number of slots (positions 1..=count).",
"format": "int32",
"minimum": 1,
"type": "integer"
},
"type": {
"enum": [
"slots"
],
"type": "string"
}
},
"required": [
"count",
"type"
],
"type": "object"
},
{
"description": "Continuous 1D container with fixed-point bounds and quantization.",
"properties": {
"bucket_cell_size": {
"description": "Optional bucket size for spatial indexing (fixed-point units; must align to bounds).",
"format": "int32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"max_x": {
"description": "Inclusive maximum X bound in fixed-point units (same scale as `quantization_inv`).",
"format": "int32",
"type": "integer"
},
"min_x": {
"description": "Inclusive minimum X bound in fixed-point units (same scale as `quantization_inv`).",
"format": "int32",
"type": "integer"
},
"quantization_inv": {
"description": "Fixed-point scale for coordinates (integer units per 1.0).",
"format": "int32",
"minimum": 0,
"type": "integer"
},
"type": {
"enum": [
"continuous_line_1d"
],
"type": "string"
}
},
"required": [
"min_x",
"max_x",
"quantization_inv",
"type"
],
"type": "object"
},
{
"description": "Continuous 2D container with fixed-point bounds and quantization.",
"properties": {
"bucket_cell_size": {
"description": "Optional bucket size for spatial indexing (fixed-point units; must align to bounds).",
"format": "int32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"max_x": {
"description": "Inclusive maximum X bound in fixed-point units (same scale as `quantization_inv`).",
"format": "int32",
"type": "integer"
},
"max_y": {
"description": "Inclusive maximum Y bound in fixed-point units (same scale as `quantization_inv`).",
"format": "int32",
"type": "integer"
},
"min_x": {
"description": "Inclusive minimum X bound in fixed-point units (same scale as `quantization_inv`).",
"format": "int32",
"type": "integer"
},
"min_y": {
"description": "Inclusive minimum Y bound in fixed-point units (same scale as `quantization_inv`).",
"format": "int32",
"type": "integer"
},
"quantization_inv": {
"description": "Fixed-point scale for coordinates (integer units per 1.0).",
"format": "int32",
"minimum": 0,
"type": "integer"
},
"type": {
"enum": [
"continuous_grid_2d"
],
"type": "string"
}
},
"required": [
"min_x",
"min_y",
"max_x",
"max_y",
"quantization_inv",
"type"
],
"type": "object"
}
]
},
"owner_external_id": {
"oneOf": [
{
"type": "null"
},
{
"type": "string"
}
]
},
"policies": {
"oneOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"description": "Immutable container policy configuration (optional per container).",
"properties": {
"allow_negative_balances": {
"description": "Whether negative balances are allowed within the container.",
"type": [
"boolean",
"null"
]
},
"instance_limit": {
"description": "Optional maximum number of instances (Grid/Slots containers).",
"format": "int32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"stack_limit": {
"description": "Optional maximum number of stacks (Grid containers only).",
"format": "int32",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"type": "object"
}
]
}
},
"required": [
"external_id",
"kind"
],
"type": "object"
},
"op": {
"enum": [
"CreateContainer"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"container_id": {
"type": "string"
}
},
"required": [
"container_id"
],
"type": "object"
},
"op": {
"enum": [
"RemoveContainer"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"class_id": {
"type": "string"
},
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"key": {
"description": "Stack key for variant identification (0 or null = no variant)",
"oneOf": [
{
"type": "null"
},
{
"format": "int32",
"minimum": 0,
"type": "integer"
}
]
},
"location": {
"description": "Location DTO for instance placement and movement.",
"oneOf": [
{
"description": "Place or move to a grid anchor.",
"properties": {
"container_id": {
"description": "Destination container identifier.",
"type": "string"
},
"kind": {
"enum": [
"grid_cell"
],
"type": "string"
},
"position": {
"format": "int32",
"minimum": 1,
"type": "integer"
},
"rotation": {
"description": "Optional rotation for placement/move.",
"type": [
"string",
"null"
]
}
},
"required": [
"container_id",
"position",
"kind"
],
"type": "object"
},
{
"description": "Place or move into a slot.",
"properties": {
"container_id": {
"description": "Destination container identifier.",
"type": "string"
},
"kind": {
"enum": [
"slot"
],
"type": "string"
},
"slot_index": {
"format": "int32",
"minimum": 1,
"type": "integer"
}
},
"required": [
"container_id",
"slot_index",
"kind"
],
"type": "object"
},
{
"description": "Place or move to a continuous coordinate.",
"properties": {
"container_id": {
"description": "Destination container identifier.",
"type": "string"
},
"coord": {
"additionalProperties": false,
"description": "Fixed-point coordinate payload for continuous placement.",
"properties": {
"x": {
"description": "Fixed-point X coordinate.",
"format": "int32",
"type": "integer"
},
"y": {
"description": "Fixed-point Y coordinate.",
"format": "int32",
"type": "integer"
}
},
"required": [
"x",
"y"
],
"type": "object"
},
"kind": {
"enum": [
"continuous_2d"
],
"type": "string"
},
"rotation_millideg": {
"description": "Rotation in millidegrees (0..=359999; 90 deg = 90000, defaults to 0).",
"format": "int32",
"type": "integer"
}
},
"required": [
"container_id",
"coord",
"kind"
],
"type": "object"
},
{
"description": "Place or move to a continuous 1D coordinate.",
"properties": {
"container_id": {
"description": "Destination container identifier.",
"type": "string"
},
"coord": {
"additionalProperties": false,
"description": "Fixed-point coordinate payload for continuous 1D placement.",
"properties": {
"x": {
"description": "Fixed-point X coordinate.",
"format": "int32",
"type": "integer"
}
},
"required": [
"x"
],
"type": "object"
},
"kind": {
"enum": [
"continuous_1d"
],
"type": "string"
}
},
"required": [
"container_id",
"coord",
"kind"
],
"type": "object"
}
]
}
},
"required": [
"class_id",
"key",
"location"
],
"type": "object"
},
"op": {
"enum": [
"AddInstance"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"instance": {
"type": "string"
},
"to": {
"description": "Location DTO for instance placement and movement.",
"oneOf": [
{
"description": "Place or move to a grid anchor.",
"properties": {
"container_id": {
"description": "Destination container identifier.",
"type": "string"
},
"kind": {
"enum": [
"grid_cell"
],
"type": "string"
},
"position": {
"format": "int32",
"minimum": 1,
"type": "integer"
},
"rotation": {
"description": "Optional rotation for placement/move.",
"type": [
"string",
"null"
]
}
},
"required": [
"container_id",
"position",
"kind"
],
"type": "object"
},
{
"description": "Place or move into a slot.",
"properties": {
"container_id": {
"description": "Destination container identifier.",
"type": "string"
},
"kind": {
"enum": [
"slot"
],
"type": "string"
},
"slot_index": {
"format": "int32",
"minimum": 1,
"type": "integer"
}
},
"required": [
"container_id",
"slot_index",
"kind"
],
"type": "object"
},
{
"description": "Place or move to a continuous coordinate.",
"properties": {
"container_id": {
"description": "Destination container identifier.",
"type": "string"
},
"coord": {
"additionalProperties": false,
"description": "Fixed-point coordinate payload for continuous placement.",
"properties": {
"x": {
"description": "Fixed-point X coordinate.",
"format": "int32",
"type": "integer"
},
"y": {
"description": "Fixed-point Y coordinate.",
"format": "int32",
"type": "integer"
}
},
"required": [
"x",
"y"
],
"type": "object"
},
"kind": {
"enum": [
"continuous_2d"
],
"type": "string"
},
"rotation_millideg": {
"description": "Rotation in millidegrees (0..=359999; 90 deg = 90000, defaults to 0).",
"format": "int32",
"type": "integer"
}
},
"required": [
"container_id",
"coord",
"kind"
],
"type": "object"
},
{
"description": "Place or move to a continuous 1D coordinate.",
"properties": {
"container_id": {
"description": "Destination container identifier.",
"type": "string"
},
"coord": {
"additionalProperties": false,
"description": "Fixed-point coordinate payload for continuous 1D placement.",
"properties": {
"x": {
"description": "Fixed-point X coordinate.",
"format": "int32",
"type": "integer"
}
},
"required": [
"x"
],
"type": "object"
},
"kind": {
"enum": [
"continuous_1d"
],
"type": "string"
}
},
"required": [
"container_id",
"coord",
"kind"
],
"type": "object"
}
]
}
},
"required": [
"instance",
"to"
],
"type": "object"
},
"op": {
"enum": [
"MoveInstance"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"instance": {
"type": "string"
}
},
"required": [
"instance"
],
"type": "object"
},
"op": {
"enum": [
"RemoveInstance"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"class_id": {
"type": "string"
},
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"key": {
"description": "Stack key for variant identification (0 or null = no variant)",
"oneOf": [
{
"type": "null"
},
{
"format": "int32",
"minimum": 0,
"type": "integer"
}
]
},
"location": {
"description": "Location DTO for fungible placement and movement.",
"oneOf": [
{
"description": "Operate against a balance container.",
"properties": {
"container_id": {
"description": "Balance container identifier.",
"type": "string"
},
"kind": {
"enum": [
"balance"
],
"type": "string"
}
},
"required": [
"container_id",
"kind"
],
"type": "object"
},
{
"description": "Operate against a specific grid anchor.",
"properties": {
"container_id": {
"description": "Destination or source container identifier.",
"type": "string"
},
"kind": {
"enum": [
"grid_cell"
],
"type": "string"
},
"position": {
"format": "int32",
"minimum": 1,
"type": "integer"
},
"rotation": {
"description": "Optional rotation applied to placements.",
"type": [
"string",
"null"
]
}
},
"required": [
"container_id",
"position",
"kind"
],
"type": "object"
}
]
},
"quantity": {
"description": "Canonical decimal quantity payload for fixed-point balances.",
"example": "1.25",
"type": "string"
}
},
"required": [
"class_id",
"key",
"quantity",
"location"
],
"type": "object"
},
"op": {
"enum": [
"AddFungible"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"class_id": {
"type": "string"
},
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"from": {
"description": "Location DTO for fungible placement and movement.",
"oneOf": [
{
"description": "Operate against a balance container.",
"properties": {
"container_id": {
"description": "Balance container identifier.",
"type": "string"
},
"kind": {
"enum": [
"balance"
],
"type": "string"
}
},
"required": [
"container_id",
"kind"
],
"type": "object"
},
{
"description": "Operate against a specific grid anchor.",
"properties": {
"container_id": {
"description": "Destination or source container identifier.",
"type": "string"
},
"kind": {
"enum": [
"grid_cell"
],
"type": "string"
},
"position": {
"format": "int32",
"minimum": 1,
"type": "integer"
},
"rotation": {
"description": "Optional rotation applied to placements.",
"type": [
"string",
"null"
]
}
},
"required": [
"container_id",
"position",
"kind"
],
"type": "object"
}
]
},
"key": {
"description": "Stack key for variant identification (0 or null = no variant)",
"oneOf": [
{
"type": "null"
},
{
"format": "int32",
"minimum": 0,
"type": "integer"
}
]
},
"quantity": {
"description": "Canonical decimal quantity payload for fixed-point balances.",
"example": "1.25",
"type": "string"
},
"to": {
"description": "Location DTO for fungible placement and movement.",
"oneOf": [
{
"description": "Operate against a balance container.",
"properties": {
"container_id": {
"description": "Balance container identifier.",
"type": "string"
},
"kind": {
"enum": [
"balance"
],
"type": "string"
}
},
"required": [
"container_id",
"kind"
],
"type": "object"
},
{
"description": "Operate against a specific grid anchor.",
"properties": {
"container_id": {
"description": "Destination or source container identifier.",
"type": "string"
},
"kind": {
"enum": [
"grid_cell"
],
"type": "string"
},
"position": {
"format": "int32",
"minimum": 1,
"type": "integer"
},
"rotation": {
"description": "Optional rotation applied to placements.",
"type": [
"string",
"null"
]
}
},
"required": [
"container_id",
"position",
"kind"
],
"type": "object"
}
]
}
},
"required": [
"class_id",
"key",
"quantity",
"from",
"to"
],
"type": "object"
},
"op": {
"enum": [
"MoveFungible"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"class_id": {
"type": "string"
},
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"from": {
"description": "Location DTO for fungible placement and movement.",
"oneOf": [
{
"description": "Operate against a balance container.",
"properties": {
"container_id": {
"description": "Balance container identifier.",
"type": "string"
},
"kind": {
"enum": [
"balance"
],
"type": "string"
}
},
"required": [
"container_id",
"kind"
],
"type": "object"
},
{
"description": "Operate against a specific grid anchor.",
"properties": {
"container_id": {
"description": "Destination or source container identifier.",
"type": "string"
},
"kind": {
"enum": [
"grid_cell"
],
"type": "string"
},
"position": {
"format": "int32",
"minimum": 1,
"type": "integer"
},
"rotation": {
"description": "Optional rotation applied to placements.",
"type": [
"string",
"null"
]
}
},
"required": [
"container_id",
"position",
"kind"
],
"type": "object"
}
]
},
"key": {
"description": "Stack key for variant identification (0 or null = no variant)",
"oneOf": [
{
"type": "null"
},
{
"format": "int32",
"minimum": 0,
"type": "integer"
}
]
},
"quantity": {
"description": "Canonical decimal quantity payload for fixed-point balances.",
"example": "1.25",
"type": "string"
}
},
"required": [
"class_id",
"key",
"quantity",
"from"
],
"type": "object"
},
"op": {
"enum": [
"RemoveFungible"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"class_id": {
"type": "string"
},
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"from_container": {
"type": "string"
},
"key": {
"description": "Stack key for variant identification (0 or null = no variant)",
"oneOf": [
{
"type": "null"
},
{
"format": "int32",
"minimum": 0,
"type": "integer"
}
]
},
"quantity": {
"description": "Canonical decimal quantity payload for fixed-point balances.",
"example": "1.25",
"type": "string"
},
"to_container": {
"type": "string"
}
},
"required": [
"from_container",
"to_container",
"class_id",
"key",
"quantity"
],
"type": "object"
},
"op": {
"enum": [
"TransferFungible"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"transfers": {
"items": {
"additionalProperties": false,
"description": "Entry for bulk fungible transfers.",
"properties": {
"class_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[A-Za-z0-9._~\\-]+$",
"type": "string"
},
"from_container": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[A-Za-z0-9._~\\-]+$",
"type": "string"
},
"key": {
"description": "Optional variant key (None for default).",
"format": "int64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"quantity": {
"description": "Canonical decimal quantity payload for fixed-point balances.",
"example": "1.25",
"type": "string"
},
"to_container": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[A-Za-z0-9._~\\-]+$",
"type": "string"
}
},
"required": [
"from_container",
"to_container",
"class_id",
"quantity"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"transfers"
],
"type": "object"
},
"op": {
"enum": [
"TransferMany"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"class_id": {
"type": "string"
},
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"distributions": {
"items": {
"additionalProperties": false,
"description": "Entry for bulk fungible distributions.",
"properties": {
"quantity": {
"description": "Canonical decimal quantity payload for fixed-point balances.",
"example": "1.25",
"type": "string"
},
"to_container": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[A-Za-z0-9._~\\-]+$",
"type": "string"
}
},
"required": [
"to_container",
"quantity"
],
"type": "object"
},
"type": "array"
},
"from_container": {
"type": "string"
},
"key": {
"description": "Stack key for variant identification (0 or null = no variant)",
"oneOf": [
{
"type": "null"
},
{
"format": "int32",
"minimum": 0,
"type": "integer"
}
]
}
},
"required": [
"from_container",
"class_id",
"key",
"distributions"
],
"type": "object"
},
"op": {
"enum": [
"Distribute"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"instance_id": {
"type": "string"
}
},
"required": [
"instance_id"
],
"type": "object"
},
"op": {
"enum": [
"BurnInstance"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"container_id": {
"type": "string"
},
"instance_id": {
"type": "string"
},
"slot_index": {
"format": "int32",
"minimum": 1,
"type": "integer"
}
},
"required": [
"container_id",
"slot_index",
"instance_id"
],
"type": "object"
},
"op": {
"enum": [
"PlaceInSlot"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"container_id": {
"type": "string"
},
"slot_index": {
"format": "int32",
"minimum": 1,
"type": "integer"
}
},
"required": [
"container_id",
"slot_index"
],
"type": "object"
},
"op": {
"enum": [
"RemoveFromSlot"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"container_a": {
"type": "string"
},
"container_b": {
"type": "string"
},
"slot_a": {
"format": "int32",
"minimum": 1,
"type": "integer"
},
"slot_b": {
"format": "int32",
"minimum": 1,
"type": "integer"
}
},
"required": [
"container_a",
"slot_a",
"container_b",
"slot_b"
],
"type": "object"
},
"op": {
"enum": [
"SwapSlots"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"child_instance": {
"type": "string"
},
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"parent_instance": {
"type": "string"
}
},
"required": [
"parent_instance",
"child_instance"
],
"type": "object"
},
"op": {
"enum": [
"Attach"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"child_instance": {
"type": "string"
},
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
}
},
"required": [
"child_instance"
],
"type": "object"
},
"op": {
"enum": [
"Detach"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"dst_stack": {
"type": "string"
},
"src_stack": {
"type": "string"
}
},
"required": [
"dst_stack",
"src_stack"
],
"type": "object"
},
"op": {
"enum": [
"MergeStacks"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"class_id": {
"type": "string"
},
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"container_id": {
"type": "string"
},
"key": {
"description": "Stack key for variant identification (0 or null = no variant)",
"oneOf": [
{
"type": "null"
},
{
"format": "int32",
"minimum": 0,
"type": "integer"
}
]
}
},
"required": [
"container_id",
"class_id",
"key"
],
"type": "object"
},
"op": {
"enum": [
"ConsolidateStacks"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"moves": {
"items": {
"additionalProperties": false,
"description": "Entry for bulk stack moves.",
"properties": {
"quantity": {
"description": "Canonical decimal quantity payload for fixed-point balances.",
"example": "1.25",
"type": "string"
},
"stack": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[A-Za-z0-9._~\\-]+$",
"type": "string"
},
"to_container": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[A-Za-z0-9._~\\-]+$",
"type": "string"
}
},
"required": [
"stack",
"to_container",
"quantity"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"moves"
],
"type": "object"
},
"op": {
"enum": [
"MoveMany"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"request": {
"description": "DTO used by the operation registry for `Transaction::register_class`.",
"properties": {
"behavior": {
"oneOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"description": "Immutable class behaviour configuration (optional per registration).",
"properties": {
"balance_scale": {
"description": "Fixed-point scale for Balance containers (units per 1.0).",
"format": "int32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"max_balance": {
"oneOf": [
{
"type": "null"
},
{
"description": "Canonical decimal quantity payload for fixed-point balances.",
"example": "1.25",
"type": "string"
}
]
},
"max_stack_size": {
"oneOf": [
{
"type": "null"
},
{
"description": "Canonical decimal quantity payload for fixed-point balances.",
"example": "1.25",
"type": "string"
}
]
},
"max_stacks_per_container": {
"description": "Optional maximum stack count per container.",
"format": "int32",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"min_balance": {
"oneOf": [
{
"type": "null"
},
{
"description": "Canonical decimal quantity payload for fixed-point balances.",
"example": "1.25",
"type": "string"
}
]
},
"negative_balance_capable": {
"description": "Whether the class may support negative balances.",
"type": [
"boolean",
"null"
]
}
},
"type": "object"
}
]
},
"class_id": {
"description": "External class identifier requested by the caller.",
"type": "string"
},
"flags": {
"description": "Bitmask representing [`ClassFlags`].",
"format": "int32",
"minimum": 0,
"type": "integer"
},
"name": {
"description": "Human-readable class name.",
"type": "string"
}
},
"required": [
"class_id",
"name",
"flags"
],
"type": "object"
}
},
"required": [
"request"
],
"type": "object"
},
"op": {
"enum": [
"RegisterClass"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"request": {
"description": "DTO used by the operation registry for `Transaction::register_class_shape`.",
"properties": {
"class_id": {
"description": "Class receiving the registration.",
"type": "string"
},
"shape": {
"oneOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"description": "Item shape for multi-cell items",
"properties": {
"height": {
"description": "Height of the grid footprint in cells (must be > 0).",
"format": "int32",
"minimum": 1,
"type": "integer"
},
"width": {
"description": "Width of the grid footprint in cells (must be > 0).",
"format": "int32",
"minimum": 1,
"type": "integer"
}
},
"required": [
"width",
"height"
],
"type": "object"
}
]
},
"stack_key": {
"description": "Optional variant discriminator.",
"format": "int64",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"class_id"
],
"type": "object"
}
},
"required": [
"request"
],
"type": "object"
},
"op": {
"enum": [
"RegisterClassShape"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"request": {
"description": "DTO used by the operation registry for `Transaction::register_class_continuous_shape_1d`.",
"properties": {
"class_id": {
"description": "Class receiving the registration.",
"type": "string"
},
"span": {
"additionalProperties": false,
"description": "Span footprint for continuous 1D placement (fixed-point units).",
"properties": {
"length": {
"description": "Length of the span in fixed-point units (must be > 0).",
"format": "int32",
"type": "integer"
}
},
"required": [
"length"
],
"type": "object"
},
"stack_key": {
"description": "Optional variant discriminator.",
"format": "int64",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"class_id",
"span"
],
"type": "object"
}
},
"required": [
"request"
],
"type": "object"
},
"op": {
"enum": [
"RegisterClassContinuousShape1d"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
},
{
"properties": {
"args": {
"additionalProperties": false,
"properties": {
"client_tag": {
"description": "Optional caller-supplied tag used to correlate per-op results.",
"type": [
"string",
"null"
]
},
"request": {
"description": "DTO used by the operation registry for `Transaction::register_class_continuous_shape` (2D).",
"properties": {
"class_id": {
"description": "Class receiving the registration.",
"type": "string"
},
"rect": {
"additionalProperties": false,
"description": "Rectangle footprint for continuous placement (fixed-point units).",
"properties": {
"height": {
"description": "Height of the continuous footprint in fixed-point units (must be > 0).",
"format": "int32",
"minimum": 1,
"type": "integer"
},
"width": {
"description": "Width of the continuous footprint in fixed-point units (must be > 0).",
"format": "int32",
"minimum": 1,
"type": "integer"
}
},
"required": [
"width",
"height"
],
"type": "object"
},
"stack_key": {
"description": "Optional variant discriminator.",
"format": "int64",
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"class_id",
"rect"
],
"type": "object"
}
},
"required": [
"request"
],
"type": "object"
},
"op": {
"enum": [
"RegisterClassContinuousShape2d"
],
"type": "string"
}
},
"required": [
"args",
"op"
],
"type": "object"
}
]
},
"minItems": 1,
"type": "array"
},
"origin": {
"oneOf": [
{
"type": "null"
},
{
"additionalProperties": false,
"description": "Caller-supplied origin metadata (agent/session/action/tool/labels).",
"properties": {
"action": {
"description": "Free-form action/intent string.",
"type": [
"string",
"null"
]
},
"agent_id": {
"description": "Identifier for the agent initiating the commit.",
"type": [
"string",
"null"
]
},
"client_session_id": {
"oneOf": [
{
"type": "null"
},
{
"description": "Canonical session identifier.\n\n# Invariants\n- Always [`SESSION_ID_HEX_LEN`] lowercase hex characters.\n- Encodes [`SESSION_ID_BYTE_LEN`] random bytes.\n\nUse [`SessionId::parse`] for strict validation and [`SessionId::generate`]\nfor server-side creation.",
"example": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"type": "string"
}
]
},
"labels": {
"oneOf": [
{
"type": "null"
},
{}
]
},
"tool": {
"description": "Tool name issuing the request (e.g., `assetcore_commit`).",
"type": [
"string",
"null"
]
}
},
"type": "object"
}
]
},
"policy_id": {
"description": "Policy identifier for authorization (future use)",
"type": [
"string",
"null"
]
}
},
"required": [
"operations",
"namespace_id"
],
"type": "object"
}
Ejemplos
Ejemplo de MCP
Solicitud
{
"id": 1,
"jsonrpc": "2.0",
"method": "assetcore_commit",
"params": {
"idempotency_key": "example-commit-001",
"namespace_id": 1,
"operations": [
{
"args": {
"external_id": "container-1",
"kind": {
"quantization_inv": 1,
"type": "balance"
}
},
"op": "CreateContainer"
}
]
}
}
Respuesta
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"commit_id": "00000000000000000000000000000001",
"commit_time_ms": 0,
"created_entities": {
"classes": [],
"containers": [
"container-1"
],
"instances": []
},
"echo": {
"idempotency_key": "example-commit-001"
},
"event_count": 1,
"namespace": 1,
"outcome": "Committed",
"server_correlation_id": "wr-0000000000000001-0000000000000001",
"start_time_ms": 0,
"world_seq_end": 1,
"world_seq_start": 1
}
}
Ejemplo de OpenAI
Solicitud
{
"function": {
"arguments": "{\"idempotency_key\":\"example-commit-001\",\"namespace_id\":1,\"operations\":[{\"args\":{\"external_id\":\"container-1\",\"kind\":{\"quantization_inv\":1,\"type\":\"balance\"}},\"op\":\"CreateContainer\"}]}",
"name": "assetcore_commit"
},
"type": "function"
}
Respuesta
{
"result": {
"commit_id": "00000000000000000000000000000001",
"commit_time_ms": 0,
"created_entities": {
"classes": [],
"containers": [
"container-1"
],
"instances": []
},
"echo": {
"idempotency_key": "example-commit-001"
},
"event_count": 1,
"namespace": 1,
"outcome": "Committed",
"server_correlation_id": "wr-0000000000000001-0000000000000001",
"start_time_ms": 0,
"world_seq_end": 1,
"world_seq_start": 1
}
}
Ejemplo de Gemini
Solicitud
{
"arguments": {
"idempotency_key": "example-commit-001",
"namespace_id": 1,
"operations": [
{
"args": {
"external_id": "container-1",
"kind": {
"quantization_inv": 1,
"type": "balance"
}
},
"op": "CreateContainer"
}
]
},
"name": "assetcore_commit"
}
Respuesta
{
"result": {
"commit_id": "00000000000000000000000000000001",
"commit_time_ms": 0,
"created_entities": {
"classes": [],
"containers": [
"container-1"
],
"instances": []
},
"echo": {
"idempotency_key": "example-commit-001"
},
"event_count": 1,
"namespace": 1,
"outcome": "Committed",
"server_correlation_id": "wr-0000000000000001-0000000000000001",
"start_time_ms": 0,
"world_seq_end": 1,
"world_seq_start": 1
}
}