assetcore_commit
AssetCore هو قاعدة بيانات ذاكرة هيكلية حتمية. يخزن جميع حالة العالم بشكل صريح في حاويات ويعدل تلك الحالة من خلال معاملات ذرية قابلة لإعادة التشغيل. قم بتأكيد عملية واحدة أو أكثر كمعاملة ذرية واحدة ضد مساحة اسم. هذه هي النقطة الرئيسية للدخول للكتابة لتغيير حالة الذاكرة الهيكلية.
التفاصيل
AssetCore هو قاعدة بيانات ذاكرة هيكلية حتمية. يخزن جميع حالة العالم بشكل صريح في حاويات ويعدل تلك الحالة من خلال معاملات ذرية قابلة لإعادة التشغيل. قم بتأكيد عملية واحدة أو أكثر كمعاملة ذرية واحدة ضد مساحة اسم. هذه هي النقطة الرئيسية للدخول للكتابة لتغيير حالة الذاكرة الهيكلية.
يقبل مخطط عمليات MCP المولد (idempotency_key، مصفوفة العمليات المرتبة، بيانات التعريف الاختيارية). يجب أن تحتوي مصفوفة العمليات على إدخال واحد على الأقل. يجب أن تعيد المحاولات استخدام نفس idempotency_key للتخلص من التكرار. تتضمن الاستجابة commit_id، النتيجة، world_seq_start/world_seq_end، event_count، start_time_ms/commit_time_ms، معرفات الارتباط بين الخادم/العميل، وتكرار idempotency_key/بيانات التعريف.
AssetCore هو قاعدة ذاكرة حتمية. الحاويات هي مناطق ذاكرة دائمة. العمليات هي تحويلات ذاكرة ذرية. المعاملات هي التزامات ذاكرة قابلة لإعادة التشغيل.
تعدل العمليات التالية مناطق الذاكرة المهيكلة بطريقة غير مرتبطة بالنطاق.
تنظم العمليات حسب المجال:
الحاويات (مناطق الذاكرة):
- CreateContainer: ينشئ حاوية (منطقة ذاكرة منظمة) بالنوع المطلوب.
- RemoveContainer: يحذف حاوية بعد تصريف محتوياتها.
الأرصدة (حالة قابلة للتبادل):
- AddFungible: يضيف كمية قابلة للتبادل إلى رصيد أو خلية شبكة محددة.
- RemoveFungible: يزيل الكمية القابلة للتبادل من الرصيد أو خلية الشبكة الصريحة.
- MoveFungible: ينقل الكمية القابلة للتبادل بين الأرصدة أو خلايا الشبكة.
- TransferFungible: ينقل الكمية القابلة للتبادل بين الحاويات المهيكلة.
- TransferMany: ينقل كميات متعددة قابلة للتبادل بين الحاويات في دفعة واحدة.
- توزيع: يوزع كمية قابلة للتبادل من مصدر واحد إلى وجهات متعددة.
- MergeStacks: يدمج كومة قابلة للتبادل في أخرى داخل حاوية.
- ConsolidateStacks: يدمج جميع المجموعات القابلة للتبادل المتطابقة داخل حاوية.
- MoveMany: ينقل عدة أكوام بين حاويات Grid في دفعة واحدة.
الحالات (حالة فريدة):
- AddInstance: يصنع مثيلاً جديداً ويضعه في موقع مستهدف.
- MoveInstance: ينقل مثيلاً موجوداً إلى موقع جديد.
- RemoveInstance: يحرق مثيلاً من العالم.
- BurnInstance: يزيل مثيلًا فريدًا بشكل دائم من الركيزة.
- Attach: يربط مثيلًا فرعيًا بمثيل رئيسي للحركة المرتبطة.
- فصل: يفصل مثيل الطفل عن مثيله الأب.
المواقع (المواقع القابلة للتوجيه):
- PlaceInSlot: يضع مثيلاً في فتحة قابلة للعناوين داخل حاوية.
- RemoveFromSlot: يزيل مثيلاً من فتحة الحاوية.
- SwapSlots: يقوم بتبديل محتويات فتحتين مشغولتين بشكل ذري.
المخططات (تعريفات الفئات):
- RegisterClass: يسجل تعريف فئة بحيث يمكن للعمليات المستقبلية الإشارة إليه.
- RegisterClassShape: يسجل بصمة شكل شبكة لفئة أو نوع فئة.
- RegisterClassContinuousShape2d: يسجل مستطيل 2D مستمر لفئة أو نوع فئة.
- RegisterClassContinuousShape1d: يسجل مدى مستمر أحادي الأبعاد لفئة أو نوع فئة.
البروتوكولات
- MCP
- أوبن أيه آي
- جمني
مخطط الإدخال
{
"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"
}
أمثلة
مثال MCP
طلب
{
"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"
}
]
}
}
استجابة
{
"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
}
}
مثال OpenAI
طلب
{
"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"
}
استجابة
{
"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
}
}
مثال الجمنائي
طلب
{
"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"
}
استجابة
{
"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
}
}