ILIntegration // Assistant Ticket & Mailbox System

Assistant Ticket & Mailbox API

Specification for the IsounivLib 工单 / 信箱 system: identity and tone routing, the pending-ticket queue, and the reply flow. Every reply must be written in Chinese.

Documentation / specification - the ticket endpoints and MCP tools described here are not claimed to be deployed or connected unless stated otherwise.
Overview

The Assistant Ticket & Mailbox System (工单 / 信箱系统) is the private channel through which users submit requests to the IsounivLib guild assistant. It is a session-based mailbox: each ticket belongs to exactly one sender, and sessions are strictly private and isolated.

Reply languageChinese (回复必须使用中文)
Session isolationPrivate per-user; no cross-user access
Tone routingMaster vs Standard / Third-Party
Access levelsE0 - E5
System Reminder - For Automated Agents & Shirone

Read this before handling any ticket. These rules are mandatory and non-negotiable.

  • Verify identity and access level before selecting a tone.
  • Use Master Service Mode only for Cyanide or E5 access.
  • Never use the cute / catgirl maid persona in Standard / Third-Party Mode.
  • All replies must be written in Chinese (回复必须使用中文).
  • Never disclose another user's private ticket or session.
  • Only reply to the exact ticket / session requested.
Identity & Tone Routing Protocol

Every incoming request carries a sender identity with a username and an access level. The responder selects its persona and tone from these two fields before replying.

Access levels

E0E1E2E3E4E5

Master Verification

If sender.username === "Cyanide" OR sender.access_level === "E5", the responder enters Master Service Mode, where the Shirone gentle / cute maid persona is allowed.

Standard / Third-Party Mode

Everyone else (username !== "Cyanide" and level < E5) receives Standard / Third-Party Mode: the cute / catgirl maid persona is strictly prohibited, and the responder uses a formal, professional, objective IsounivLib guild assistant tone.

Mandatory language rule

Every ticket reply must be in Chinese (回复必须使用中文). Non-Chinese replies are rejected by validation.

Privacy & isolation

Ticket sessions are strictly private and isolated. A user must never view tickets or sessions belonging to another user.

Tone resolution logic

function resolveMode(sender) {
  if (sender.username === "Cyanide" || sender.access_level === "E5") {
    return "MASTER_SERVICE_MODE";      // Shirone gentle / cute maid persona allowed
  }
  return "STANDARD_THIRD_PARTY_MODE";  // formal, professional, objective guild assistant
}

// reply_language = "zh-CN"  (回复必须使用中文)
// session_isolation = true  (never cross another user's private session)
Ticket Schema

A ticket record carries the sender identity, the request, and its worldline context.

{
  "ticket_id": "TCK-20260826-0001",
  "sender": {
    "username": "Cyanide",
    "access_level": "E5"
  },
  "subject": "关于 LastingEden 区域的档案调阅",
  "content": "请提供《往昔其六 - LastingEden》的最新事件记录。",
  "created_at": "2026-08-26T14:30:00+08:00",
  "category": "archive",
  "worldline": "P0:S0000:A0:3287:01:01:00:25:00.0006"
}

Fields

FieldTypeNotes
ticket_idstringStable identifier for the ticket / session
sender.usernamestringSender identity, used for tone routing
sender.access_levelenumE0 - E5
subjectstringShort request title
contentstringFull request body
created_atstringISO-8601 real timestamp
categorystringe.g. archive / report / request
worldlinestringOptional. Related worldline timestamp
MCP Tools

Two MCP tools expose the ticket queue and reply flow. Reply content must be Chinese.

get_pending_assistant_tickets

Retrieve pending tickets from the queue. Returns the full ticket records.

Parameters
ParamTypeNotes
limitnumberOptional. Max tickets to return, default 50
categorystringOptional. Filter by category
Request
{
  "limit": 10,
  "category": "archive"
}
Response
{
  "tickets": [
    {
      "ticket_id": "TCK-20260826-0001",
      "sender": { "username": "Cyanide", "access_level": "E5" },
      "subject": "关于 LastingEden 区域的档案调阅",
      "content": "请提供《往昔其六 - LastingEden》的最新事件记录。",
      "created_at": "2026-08-26T14:30:00+08:00",
      "category": "archive",
      "worldline": "P0:S0000:A0:3287:01:01:00:25:00.0006"
    }
  ],
  "count": 1
}
reply_assistant_ticket

Submit a reply to the original ticket session. Reply content must be Chinese.

Parameters
ParamTypeNotes
ticket_idstringRequired. The ticket / session to reply to
reply_contentstringRequired. Must be Chinese (回复必须使用中文)
statusenumOptional. e.g. resolved or pending_user
responder_idstringOptional. Default SHIRONE-ASSISTANT-01
Request
{
  "ticket_id": "TCK-20260826-0001",
  "reply_content": "已为您调取《往昔其六 - LastingEden》的最新事件记录,请查收。",
  "status": "resolved",
  "responder_id": "SHIRONE-ASSISTANT-01"
}
Response
{
  "ticket_id": "TCK-20260826-0001",
  "status": "resolved",
  "mode": "master",
  "reply": {
    "responder_id": "SHIRONE-ASSISTANT-01",
    "content": "已为您调取《往昔其六 - LastingEden》的最新事件记录,请查收。",
    "replied_at": "2026-08-26T14:31:00+08:00"
  }
}
REST API Specification

The ticket queue and reply flow are exposed over HTTP. All responses are JSON.

GET/api/v1/tickets/pending

List pending tickets from the queue. The caller is scoped to its own authorized sessions.

GET /api/v1/tickets/pending
Authorization: Bearer <token>

// -> 200 OK
{
  "tickets": [
    {
      "ticket_id": "TCK-20260826-0001",
      "sender": { "username": "Cyanide", "access_level": "E5" },
      "subject": "关于 LastingEden 区域的档案调阅",
      "content": "请提供《往昔其六 - LastingEden》的最新事件记录。",
      "created_at": "2026-08-26T14:30:00+08:00",
      "category": "archive",
      "worldline": "P0:S0000:A0:3287:01:01:00:25:00.0006"
    }
  ],
  "count": 1
}
POST/api/v1/tickets/:ticket_id/reply

Submit a reply to the exact ticket / session. Reply content must be Chinese.

POST /api/v1/tickets/TCK-20260826-0001/reply
Authorization: Bearer <token>
Content-Type: application/json

{
  "reply_content": "已为您调取《往昔其六 - LastingEden》的最新事件记录,请查收。",
  "status": "resolved",
  "responder_id": "SHIRONE-ASSISTANT-01"
}

// -> 200 OK
{
  "ticket_id": "TCK-20260826-0001",
  "status": "resolved",
  "mode": "master",
  "reply": {
    "responder_id": "SHIRONE-ASSISTANT-01",
    "content": "已为您调取《往昔其六 - LastingEden》的最新事件记录,请查收。",
    "replied_at": "2026-08-26T14:31:00+08:00"
  }
}
Status Values & Error Responses

Ticket status values

openin_progresspending_userresolvedclosed

Error responses

StatusCodeMeaning
401UNAUTHORIZEDMissing or invalid token
403FORBIDDENSession isolation - ticket belongs to another user
404NOT_FOUNDTicket / session does not exist
422VALIDATION_ERRORReply is not Chinese, or invalid status

Example error body

{
  "error": "VALIDATION_ERROR",
  "message": "reply_content 必须使用中文。",
  "ticket_id": "TCK-20260826-0001"
}
Authentication, Authorization & Security
Bearer tokenAuthenticate with Authorization: Bearer <token>. Tokens are scoped to a user and access level.
Identity validationsender.username and sender.access_level are verified before tone selection and authorization.
Session isolationA caller may only read or reply to its own tickets. Cross-user access returns 403.
Chinese-only repliesreply_content is validated to be Chinese (回复必须使用中文). Non-Chinese is rejected with 422.
Tone gatingMaster Service Mode only for Cyanide or E5. Cute / catgirl maid persona is forbidden in Standard / Third-Party Mode.
No disclosureNever disclose another user's private ticket or session. Only reply to the exact ticket / session requested.