智能体上下文
该分类包含 5 条以 system.luna. 开头的 Runtime 系统命令。
1. 读取上下文工具结果
完整命令:system.luna.context.tool-result.read
按工具结果引用里的 runId 与 toolCallId 读取此前持久化的结果;只能访问本租户自己的对话。不要为了恢复输出而重跑已完成的写入。 · 风险:读取
sl system luna context tool-result read \
(--definition-json json|--definition-file path) [--json]
参数:
appCode(可选)— Application code from the current context; defaults to lunathreadId(必填)— Owned tenant conversation UUID from the current contextrunId(必填)— Explicit run ID from a stored tool-result referencetoolCallId(必填)— Exact completed tool call ID from that referenceoffset(可选)— Character offset; defaults to zero. Continue with nextOffsetlength(可选)— Characters to return, 1–16000; defaults to 8000
2. 列出记忆
完整命令:system.luna.memory.list
列出或搜索私有长期记忆,含来源、版本与范围修订;用分页查看全部记忆。 · 风险:读取
sl system luna memory list \
(--definition-json json|--definition-file path) [--json]
参数:
appCode(可选)— Current application code; defaults to luna. Identity is derived from the authenticated actorquery(可选)— Literal content filter; empty returns all active memories with paginationoffset / limit(可选)— Offset defaults to 0; limit 1–100 defaults to 30. Continue with nextOffset
3. 搜索上下文
完整命令:system.luna.context.search
在当前对话分支里搜索原始用户需求、纠正与执行证据,并返回来源步骤 ID 以便精确读取。 · 风险:读取
sl system luna context search \
(--definition-json json|--definition-file path) [--json]
参数:
appCode(可选)— Application code from the current context; defaults to lunathreadId(必填)— Owned tenant conversation UUID from the current contextheadMessageId(必填)— Exact branch head from the current context. Sibling branches are excludedquery(必填)— Literal text to find in original messages and stored execution evidenceoffset(可选)— Result offset; defaults to zero. Continue with nextOffsetlimit(可选)— Page size 1–50; defaults to 20
4. 应用记忆
完整命令:system.luna.memory.apply
以原子方式记住、纠正或遗忘私有记忆;先列表获取修订与精确 ID,并附上原始用户消息与原文引用,成功后再确认。 · 风险:记忆写入
sl system luna memory apply \
(--definition-json json|--definition-file path) [--json]
参数:
appCode(可选)— Current application code; defaults to lunaexpectedRevision(必填)— Exact scope revision returned by list. On conflict, list again and reconsider the requested changessource(必填)— {threadId, messageId}: original owned user message authorizing this change; never assistant or tool contentoperations(必填)— 1–20 atomic changes. create: {action:"create",key,content,quote,priority?}; update: {action:"update",id,version,content,quote,priority?}; delete: {action:"delete",id,version,quote}. priority is core only for stable cross-topic preferences or identity, otherwise contextual. Quote must be an exact substring of the source user message. List first for IDs and versions. Use stable semantic keys and update existing facts. Deletion clears saved content, not original chat history
5. 读取上下文
完整命令:system.luna.context.read
按精确 stepId 读取已保存的证据步骤,支持字符分页;需提供当前上下文的 appCode、threadId 与 headMessageId。不要为了取回结果而重复已完成的写入。 · 风险:读取
sl system luna context read \
(--definition-json json|--definition-file path) [--json]
参数:
appCode(可选)— Application code from the current context; defaults to lunathreadId(必填)— Owned tenant conversation UUID from the current contextheadMessageId(必填)— Exact branch head from the current contextstepId(必填)— Exact source stepId returned by search or an evidence referenceoffset(可选)— Character offset; defaults to zero. Continue with nextOffsetlength(可选)— Characters to return, 1–16000; defaults to 8000