leros

command
v0.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Overview

@title Leros API @version 1.0 @description Leros 数字助手平台 API,提供数字助手管理、技能调用、事件处理等功能 @host localhost:8080 @BasePath /v1 @schemes http https

worker 命令启动 Leros 后台 worker 服务。

worker 通过 NATS JetStream 订阅四个命令 lane:

  • cmd.run:处理 agent run 任务。使用 SubscribeManualDurable + 本地 SQLite inbox 实现 at-least-once 语义。消息先持久化再 Ack,崩溃重启后通过 RecoverNonTerminal 恢复。
  • cmd.control:处理 cancel 等控制命令,自动确认。
  • cmd.interaction:处理审批/问答等交互命令,自动确认。
  • cmd.skill:处理 skill 管理命令,自动确认。

关闭顺序(5 步):

  1. 取消 NATS 订阅 context → 2. 停止新任务准入 → 3. 等待 dispatcher 退出 → 4. Drain 积压的后台任务(超时 30s)→ 5. 关闭资源

drain 超时时保留非终态 inbox 记录,重启后恢复执行。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL