CellSpec 调度配置

wesgine CellSpec 中调度相关字段的声明式配置。


Quotas

计算、存储、外设和执行的多维配额:

spec := wesgine.CellSpec{
    Quotas: wesgine.CellQuotas{
        MaxConcurrentRuns:   5,
        TokensPerMinute:     100000,
        TokensPerDay:        5000000,
        MaxIMChannels:       10,
        MaxMCPServers:       5,
        MaxCronJobs:         20,
        MaxEmailAccounts:    3,
        MaxSkillsInstalled:  50,
        MaxPlugins:          10,
    },
}

CycleDetect

循环检测配置:

spec := wesgine.CellSpec{
    CycleDetect: wesgine.CycleDetectConfig{
        ExplorationTermThreshold:      100,
        ActionTermThreshold:           50,
        IdenticalCallTermThreshold:    7,
    },
}

支持运行时热更新:PUT /cells/{id}/config/cycle-detect。


FaultPolicyOverride

故障策略覆盖:


SkillPolicy

技能策略:


InboxCap

Inbox 容量限制:


Roles

角色定义:


Per-Run CycleDetect 覆盖

单次 Run 可覆盖 CellSpec 级阈值:

events, err := cell.Runtime().Run(ctx, AppRunRequest{
    CycleDetectOverride: &CycleDetectConfig{
        ActionTermThreshold:          40,
        IdenticalCallTermThreshold:   5,
    },
})

用于委派子 Run 使用更严格的阈值。


运行时更新

配额

PATCH /cells/{id}/quotas

循环检测

PUT /cells/{id}/config/cycle-detect

Feature Flags

PUT /cells/{id}/config/features

三者互不影响,各自独立生效。