assetcore_commit
AssetCore és un substrat de memòria estructurada determinista. Emmagatzema tot l’estat del món explícitament en contenidors i modifica aquest estat a través de transaccions atòmiques i reproduïbles. Compromet un o més operacions com una sola transacció atòmica contra un espai de noms. Aquest és el punt d’entrada principal per escriure i canviar l’estat de la memòria estructurada.
Detalls
AssetCore és un substrat de memòria estructurada determinista. Emmagatzema tot l’estat del món explícitament en contenidors i modifica aquest estat a través de transaccions atòmiques i reproduïbles. Compromet un o més operacions com una sola transacció atòmica contra un espai de noms. Aquest és el punt d’entrada principal per escriure i canviar l’estat de la memòria estructurada.
Accepta l’esquema d’operacions MCP generat (idempotency_key, array d’operacions ordenades, metadades opcionals). L’array d’operacions ha de contenir almenys una entrada. Les reintents han de reutilitzar el mateix idempotency_key per a la deduplicació. La resposta inclou commit_id, resultat, world_seq_start/world_seq_end, event_count, start_time_ms/commit_time_ms, ids de correlació del servidor/client, i repeteix idempotency_key/metadades.
AssetCore és un substrat de memòria determinista. Els contenidors són regions de memòria persistent. Les operacions són transformacions de memòria atòmiques. Les transaccions són compromisos de memòria reproduïbles.
Les següents operacions modifiquen regions de memòria estructurada d’una manera independent del domini.
Les operacions s’organitzen per domini:
Contenidors (regions de memòria):
- CreateContainer: Crea un contenidor (regió de memòria estructurada) amb el tipus sol·licitat.
- RemoveContainer: Elimina un contenidor després de drenar el seu contingut.
Balances (estat fungible):
- AddFungible: Afegeix una quantitat fungible a un saldo o a una cel·la de gra explícita.
- RemoveFungible: Elimina la quantitat fungible d’un saldo o d’una cel·la de graella explícita.
- MoveFungible: Mou la quantitat fungible entre balances o cel·les de la graella.
- TransferFungible: Transfereix una quantitat fungible entre contenidors estructurats.
- TransferMany: Transfereix múltiples quantitats fungibles entre contenidors en un sol lot.
- Distribuir: Distribueix una quantitat fungible d’una font a múltiples destinacions.
- MergeStacks: Fusiona una pila fungible dins d’una altra dins d’un contenidor.
- ConsolidateStacks: Consolida totes les piles fungibles coincidents dins d’un contenidor.
- MoveMany: Mou múltiples piles entre contenidors de la graella en un sol lot.
Instàncies (estat únic):
- AddInstance: Crea una nova instància i la col·loca en una ubicació objectiu.
- MoveInstance: Mou una instància existent a una nova ubicació.
- RemoveInstance: Crema una instància del món.
- BurnInstance: Elimina una instància única de manera permanent del substrat.
- Attach: Adjunta una instància fill a un pare per a un moviment vinculat.
- Desconnectar: Desconnecta una instància fill de la seva instància pare.
Slots (posicions adreçables):
- PlaceInSlot: Col·loca una instància en un slot adreçable dins d’un contenidor.
- RemoveFromSlot: Elimina una instància d’un slot de contenidor.
- SwapSlots: Intercanvia el contingut de dos slots ocupats de manera atòmica.
Schemas (definicions de classe):
- RegisterClass: Registra una definició de classe perquè les operacions futures la puguin referenciar.
- RegisterClassShape: Registra una empremta de forma de graella per a una classe o variant de classe.
- RegisterClassContinuousShape2d: Registra un rectangle continu 2D per a una classe o variant de classe.
- RegisterClassContinuousShape1d: Registra un interval continu 1D per a una classe o variant de classe.
Protocols
- MCP
- OpenAI
- Geminis
Input Schema
{
"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"
}
Exemples
Exemple MCP
Sol·licitud
{
"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"
}
]
}
}
Resposta
{
"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
}
}
Exemple d’OpenAI
Sol·licitud
{
"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"
}
Resposta
{
"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
}
}
Exemple de Gemini
Sol·licitud
{
"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"
}
Resposta
{
"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
}
}