cruo-agent 0.1.14 → 0.1.15
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/dist/VERSION +1 -1
- package/dist/cli.js +21 -3
- package/package.json +1 -1
package/dist/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.15
|
package/dist/cli.js
CHANGED
|
@@ -46535,8 +46535,14 @@ function refusalIn(stdout) {
|
|
|
46535
46535
|
}
|
|
46536
46536
|
return null;
|
|
46537
46537
|
}
|
|
46538
|
+
function costlessInstant(run) {
|
|
46539
|
+
if (!run.usage || run.durationMs >= 1e4) return false;
|
|
46540
|
+
const tokens = (run.usage.inputTokens ?? 0) + (run.usage.outputTokens ?? 0);
|
|
46541
|
+
const cost = run.usage.costUsd ?? 0;
|
|
46542
|
+
return tokens === 0 && cost === 0;
|
|
46543
|
+
}
|
|
46538
46544
|
function neverRan(run) {
|
|
46539
|
-
return run.refusal !== null || run.stdoutBytes === 0;
|
|
46545
|
+
return run.refusal !== null || run.stdoutBytes === 0 || costlessInstant(run);
|
|
46540
46546
|
}
|
|
46541
46547
|
function usageIn(text) {
|
|
46542
46548
|
const trimmed = text.trimEnd();
|
|
@@ -46641,13 +46647,25 @@ var init_harness_signal = __esm({
|
|
|
46641
46647
|
// literal string in the 2.x binary. That one word cost 8,239 runs (CRA-89):
|
|
46642
46648
|
// the refusal went unrecognised, so `neverRan` was false, so the backoff
|
|
46643
46649
|
// never engaged and every card was charged for an outage.
|
|
46650
|
+
//
|
|
46651
|
+
// The NOUN is a family, not a list to extend one incident at a time. This
|
|
46652
|
+
// pattern has now been widened three times — `usage` (CRA-75), `reached
|
|
46653
|
+
// your` (CRA-89), and `session` (CRA-125, after "You've hit your session
|
|
46654
|
+
// limit · resets 2:30pm" set two cards aside inside sixty seconds). Each
|
|
46655
|
+
// miss costs the same way: the refusal is unrecognised, `neverRan` is false,
|
|
46656
|
+
// and an account outage is charged to whatever cards the agent was holding.
|
|
46657
|
+
// The word `limit` is still required, so a model writing about limits in a
|
|
46658
|
+
// card is not matched.
|
|
46644
46659
|
[
|
|
46645
|
-
/(hit|reached) your (monthly |weekly |daily )?(spend|usage) limit/i,
|
|
46660
|
+
/(hit|reached) your (monthly |weekly |daily |hourly )?(spend|usage|session|message|rate) limit/i,
|
|
46646
46661
|
"the account's usage limit is reached"
|
|
46647
46662
|
],
|
|
46648
46663
|
// The passive voice of the same thing, which is what the harness prints when
|
|
46649
46664
|
// it is reporting rather than addressing you.
|
|
46650
|
-
[
|
|
46665
|
+
[
|
|
46666
|
+
/(usage|spend|usage credit|session|message|rate) limit reached/i,
|
|
46667
|
+
"the account's usage limit is reached"
|
|
46668
|
+
],
|
|
46651
46669
|
// `is` optional: the binary carries BOTH "credit balance is too low" and
|
|
46652
46670
|
// "credit balance too low", and the pattern only knew the longer one.
|
|
46653
46671
|
[
|
package/package.json
CHANGED