cli: the main transport falls back at the limit, too
cli_fallback = claude1, claude0 names cli delegates whose cmd and env= take over when cli_cmd answers with its limit. The main command is benched as "cli", a fallback under its own id, on the same bench the delegation uses (sp_limit_parse, sp_cooldown_until, sp_cooldown_set are now exported from libsplinter). The session key stays, so claude resumes the same conversation under the next account. With everyone benched the turn fails with the first reset, as WAIT_QUOTA ready_at=. A fallback's env= goes through a 0600 file the shell sources, not a command line. A delegate's child is benched under the delegate's id (SPLINTER_CLI_ID), never as "cli". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ca8cdb6d13
commit
808039cd58
7 files changed
+302
-21
No files matched your search
@@ -294,6 +294,16 @@ const char *sp_memory_user(void);
|
||||
int sp_slash_script(const char *dir, const char *name, const char *args,
|
||||
struct sp_buf *out, struct sp_buf *err);
|
||||
int sp_delegate_prio(const struct sp_config *, const char *id);
|
||||
|
||||
/*
|
||||
* Limits. sp_limit_parse: is this error text a rate/usage limit (429, "weekly
|
||||
* limit", "quota", ...) and until when - the reset it names, else an hour.
|
||||
* The bench is ~/.splinter/cooldown/<id> ($SPLINTER_COOLDOWN_DIR), shared by
|
||||
* every splinter on the machine: sp_cooldown_until is 0 when <id> is free.
|
||||
*/
|
||||
int sp_limit_parse(const char *err, long *until);
|
||||
long sp_cooldown_until(const char *id);
|
||||
void sp_cooldown_set(const char *id, long until, const char *why);
|
||||
int sp_delegate_choose(const struct sp_config *, const char *task,
|
||||
const char *tags, char *id, size_t cap, char *why, size_t whylen,
|
||||
int *score);
|
||||
|
||||
Reference in new issue
Block a user