colana 1.0.0-beta.71 → 1.0.0-beta.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -48,15 +48,20 @@ export function createAgentControlRoutes(app, { agentLimiter, ptyManager, ptyAva
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
// License: check agent limit before starting.
|
|
51
|
-
// Personal agents (OpenClaw)
|
|
51
|
+
// Personal agents (OpenClaw) bypass the session cap entirely — they're
|
|
52
|
+
// a different category from coding agents and shouldn't block or be blocked.
|
|
53
|
+
const requestedProvider = req.body.provider || 'gemini';
|
|
54
|
+
const requestedProviderDef = config.providers[requestedProvider];
|
|
52
55
|
const activeSessions = getActiveSessions();
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
if (!requestedProviderDef?.isPersonal) {
|
|
57
|
+
const activeSessCount = activeSessions.filter(s => {
|
|
58
|
+
const providerDef = config.providers[s.provider];
|
|
59
|
+
return !providerDef?.isPersonal;
|
|
60
|
+
}).length;
|
|
61
|
+
const agentCheck = canStartAgent(activeSessCount);
|
|
62
|
+
if (!agentCheck.allowed) {
|
|
63
|
+
return res.status(403).json({ error: agentCheck.reason, code: 'AGENT_LIMIT', tier: agentCheck.tier });
|
|
64
|
+
}
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
const {
|