@integrity-labs/agt-cli 0.28.896 → 0.28.898
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/bin/agt.js +5 -5
- package/dist/{chunk-HKG6EMAM.js → chunk-DDNFLITA.js} +4 -4
- package/dist/{chunk-5464FJVN.js → chunk-HQKGVPIV.js} +56 -2
- package/dist/{chunk-5464FJVN.js.map → chunk-HQKGVPIV.js.map} +1 -1
- package/dist/{chunk-RAEBKUW2.js → chunk-IVJVMR3S.js} +2 -2
- package/dist/{claude-pair-runtime-3MK5MUPN.js → claude-pair-runtime-CUFG7UQD.js} +2 -2
- package/dist/lib/manager-worker.js +144 -29
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +55 -1
- package/dist/mcp/index.js +52 -1
- package/dist/mcp/origami.js +52 -1
- package/dist/mcp/slack-channel.js +55 -1
- package/dist/mcp/telegram-channel.js +55 -1
- package/dist/{persistent-session-5HSYQBF7.js → persistent-session-6QB3XNY2.js} +3 -3
- package/dist/{responsiveness-probe-ZSB3DLLI.js → responsiveness-probe-ULU4DHEO.js} +3 -3
- package/dist/{session-auth-dead-J7SQAYRR.js → session-auth-dead-UXZ5DDKQ.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-HKG6EMAM.js.map → chunk-DDNFLITA.js.map} +0 -0
- /package/dist/{chunk-RAEBKUW2.js.map → chunk-IVJVMR3S.js.map} +0 -0
- /package/dist/{claude-pair-runtime-3MK5MUPN.js.map → claude-pair-runtime-CUFG7UQD.js.map} +0 -0
- /package/dist/{persistent-session-5HSYQBF7.js.map → persistent-session-6QB3XNY2.js.map} +0 -0
- /package/dist/{responsiveness-probe-ZSB3DLLI.js.map → responsiveness-probe-ULU4DHEO.js.map} +0 -0
- /package/dist/{session-auth-dead-J7SQAYRR.js.map → session-auth-dead-UXZ5DDKQ.js.map} +0 -0
|
@@ -35085,12 +35085,15 @@ function parseResetDateTime(humanDate, now) {
|
|
|
35085
35085
|
|
|
35086
35086
|
// ../core/dist/claude-code-usage/banner-parser.js
|
|
35087
35087
|
var SESSION_QUALIFIER = /^(?:session|\d{1,2}\s*-?\s*hours?|\d{1,2}h)$/i;
|
|
35088
|
+
var SPEND_QUALIFIER = /^(?:individual\s+)?spend$/i;
|
|
35088
35089
|
function classifyLimitScope(qualifier) {
|
|
35089
35090
|
const q = (qualifier ?? "").trim();
|
|
35090
35091
|
if (!q)
|
|
35091
35092
|
return "weekly";
|
|
35092
35093
|
if (SESSION_QUALIFIER.test(q))
|
|
35093
35094
|
return "session";
|
|
35095
|
+
if (SPEND_QUALIFIER.test(q))
|
|
35096
|
+
return "spend";
|
|
35094
35097
|
if (/^weekly$/i.test(q))
|
|
35095
35098
|
return "weekly";
|
|
35096
35099
|
return "unknown";
|
|
@@ -35127,7 +35130,58 @@ var BANNER_PATTERNS = [
|
|
|
35127
35130
|
// bounding the count, keeps it linear.
|
|
35128
35131
|
`${SUBJECT}hit\\s+your\\s+(?<qualifier>[a-z0-9]+(?:[\\s-]+[a-z0-9]+){0,3}\\s+)?limit${SEP}resets\\s+(?<reset>${RESET_DATE})`,
|
|
35129
35132
|
"i"
|
|
35130
|
-
)
|
|
35133
|
+
),
|
|
35134
|
+
// ENG-10365 — the Claude Team seat's INDIVIDUAL SPEND LIMIT.
|
|
35135
|
+
//
|
|
35136
|
+
// WHY THE TWO PATTERNS ABOVE CANNOT MATCH IT. Both require `limit` to be
|
|
35137
|
+
// followed immediately by a separator and then `resets`. The spend banner puts
|
|
35138
|
+
// its remedy between the two:
|
|
35139
|
+
//
|
|
35140
|
+
// You've hit your individual spend limit · run /usage-credits to ask your
|
|
35141
|
+
// admin for a higher limit · your weekly limit resets Sep 12, 5pm (UTC)
|
|
35142
|
+
// Continuing automatically at Sep 12, 5pm · esc to cancel
|
|
35143
|
+
//
|
|
35144
|
+
// so the adjacency fails and `parseUsageBanner` returned null — verified
|
|
35145
|
+
// against origin/main on the verbatim pane capture in ENG-10365 before this
|
|
35146
|
+
// pattern was written. Null means NO observation is POSTed, which means the
|
|
35147
|
+
// `claude_code_usage_observations` row never exists, which means
|
|
35148
|
+
// `usage-limit-monitor` never hears of the agent at all. cindy ran zero-second
|
|
35149
|
+
// turns for ~32 hours with `heartbeat_verdict fresh` and no usage alert of any
|
|
35150
|
+
// kind, because the whole chain starts here.
|
|
35151
|
+
//
|
|
35152
|
+
// THE GAP IS BOUNDED AND LAZY, deliberately. The real banner's gap is ~78
|
|
35153
|
+
// characters; 160 leaves 2x headroom for phrasing drift and for the pane's own
|
|
35154
|
+
// line wrap (which lands mid-sentence, as above, so `[\s\S]` and not `.`).
|
|
35155
|
+
// Lazy + bounded keeps it linear on the pane.log tails this parser runs over —
|
|
35156
|
+
// the same reason the saturated pattern refuses the naive `(a+)+` shape.
|
|
35157
|
+
//
|
|
35158
|
+
// WHAT IT INHERITS BY MATCHING AT ALL. Everything downstream keys on the
|
|
35159
|
+
// `usage_limit_reached` ALERT KIND rather than on the scope, so one matching
|
|
35160
|
+
// banner reaches the roster's `usage_limit_alert_open` flag (ENG-9634),
|
|
35161
|
+
// `resolveCappedAgents`, and both monitors that suppress on a capped agent.
|
|
35162
|
+
// That is why this fix is a regex and not a subsystem.
|
|
35163
|
+
//
|
|
35164
|
+
// AND A SECOND CONSUMER, which is worth stating precisely because it is easy
|
|
35165
|
+
// to overclaim. `rate-limit-classifier.ts:160` calls this parser to read the
|
|
35166
|
+
// RESET TIME out of a `rate_limit` / 429 transcript refusal, and
|
|
35167
|
+
// `readUsageCapUntil` (agent-serving-probe.ts:296) returns null — i.e. does NOT
|
|
35168
|
+
// defer — when that reset comes back null. So a parse failure here has always
|
|
35169
|
+
// disarmed the ENG-8197 host-side dispatch deferral for this banner, which
|
|
35170
|
+
// would explain cindy being dispatched into hourly while visibly blocked.
|
|
35171
|
+
//
|
|
35172
|
+
// NOT VERIFIED, and deliberately not claimed: whether a spend refusal is
|
|
35173
|
+
// written to the transcript as `error: 'rate_limit'` / `apiErrorStatus: 429`
|
|
35174
|
+
// at all. The classifier's verdict keys on those fields, not on this text. If
|
|
35175
|
+
// it is, the deferral starts working as a side effect of this fix; if it is
|
|
35176
|
+
// not, ENG-8197 is still blind to the spend ceiling and that is a separate
|
|
35177
|
+
// ticket. Nothing here depends on which.
|
|
35178
|
+
//
|
|
35179
|
+
// KNOWN LIMIT, stated rather than papered over: a spend banner that carries no
|
|
35180
|
+
// `resets` clause at all still yields null. `week_resets_at` drives the
|
|
35181
|
+
// monitor's auto-close, and synthesising an instant we never read is the exact
|
|
35182
|
+
// confident-and-false reporting ENG-8901 exists to stop. Every spend banner
|
|
35183
|
+
// observed so far carries one.
|
|
35184
|
+
new RegExp(`${SUBJECT}hit\\s+your\\s+(?<qualifier>(?:individual\\s+)?spend)\\s+limit[\\s\\S]{0,160}?resets\\s+(?<reset>${RESET_DATE})`, "i")
|
|
35131
35185
|
];
|
|
35132
35186
|
function parseUsageBanner(text, now = /* @__PURE__ */ new Date()) {
|
|
35133
35187
|
let bestIndex = -1;
|
package/dist/mcp/index.js
CHANGED
|
@@ -27729,7 +27729,58 @@ var BANNER_PATTERNS = [
|
|
|
27729
27729
|
// bounding the count, keeps it linear.
|
|
27730
27730
|
`${SUBJECT}hit\\s+your\\s+(?<qualifier>[a-z0-9]+(?:[\\s-]+[a-z0-9]+){0,3}\\s+)?limit${SEP}resets\\s+(?<reset>${RESET_DATE})`,
|
|
27731
27731
|
"i"
|
|
27732
|
-
)
|
|
27732
|
+
),
|
|
27733
|
+
// ENG-10365 — the Claude Team seat's INDIVIDUAL SPEND LIMIT.
|
|
27734
|
+
//
|
|
27735
|
+
// WHY THE TWO PATTERNS ABOVE CANNOT MATCH IT. Both require `limit` to be
|
|
27736
|
+
// followed immediately by a separator and then `resets`. The spend banner puts
|
|
27737
|
+
// its remedy between the two:
|
|
27738
|
+
//
|
|
27739
|
+
// You've hit your individual spend limit · run /usage-credits to ask your
|
|
27740
|
+
// admin for a higher limit · your weekly limit resets Sep 12, 5pm (UTC)
|
|
27741
|
+
// Continuing automatically at Sep 12, 5pm · esc to cancel
|
|
27742
|
+
//
|
|
27743
|
+
// so the adjacency fails and `parseUsageBanner` returned null — verified
|
|
27744
|
+
// against origin/main on the verbatim pane capture in ENG-10365 before this
|
|
27745
|
+
// pattern was written. Null means NO observation is POSTed, which means the
|
|
27746
|
+
// `claude_code_usage_observations` row never exists, which means
|
|
27747
|
+
// `usage-limit-monitor` never hears of the agent at all. cindy ran zero-second
|
|
27748
|
+
// turns for ~32 hours with `heartbeat_verdict fresh` and no usage alert of any
|
|
27749
|
+
// kind, because the whole chain starts here.
|
|
27750
|
+
//
|
|
27751
|
+
// THE GAP IS BOUNDED AND LAZY, deliberately. The real banner's gap is ~78
|
|
27752
|
+
// characters; 160 leaves 2x headroom for phrasing drift and for the pane's own
|
|
27753
|
+
// line wrap (which lands mid-sentence, as above, so `[\s\S]` and not `.`).
|
|
27754
|
+
// Lazy + bounded keeps it linear on the pane.log tails this parser runs over —
|
|
27755
|
+
// the same reason the saturated pattern refuses the naive `(a+)+` shape.
|
|
27756
|
+
//
|
|
27757
|
+
// WHAT IT INHERITS BY MATCHING AT ALL. Everything downstream keys on the
|
|
27758
|
+
// `usage_limit_reached` ALERT KIND rather than on the scope, so one matching
|
|
27759
|
+
// banner reaches the roster's `usage_limit_alert_open` flag (ENG-9634),
|
|
27760
|
+
// `resolveCappedAgents`, and both monitors that suppress on a capped agent.
|
|
27761
|
+
// That is why this fix is a regex and not a subsystem.
|
|
27762
|
+
//
|
|
27763
|
+
// AND A SECOND CONSUMER, which is worth stating precisely because it is easy
|
|
27764
|
+
// to overclaim. `rate-limit-classifier.ts:160` calls this parser to read the
|
|
27765
|
+
// RESET TIME out of a `rate_limit` / 429 transcript refusal, and
|
|
27766
|
+
// `readUsageCapUntil` (agent-serving-probe.ts:296) returns null — i.e. does NOT
|
|
27767
|
+
// defer — when that reset comes back null. So a parse failure here has always
|
|
27768
|
+
// disarmed the ENG-8197 host-side dispatch deferral for this banner, which
|
|
27769
|
+
// would explain cindy being dispatched into hourly while visibly blocked.
|
|
27770
|
+
//
|
|
27771
|
+
// NOT VERIFIED, and deliberately not claimed: whether a spend refusal is
|
|
27772
|
+
// written to the transcript as `error: 'rate_limit'` / `apiErrorStatus: 429`
|
|
27773
|
+
// at all. The classifier's verdict keys on those fields, not on this text. If
|
|
27774
|
+
// it is, the deferral starts working as a side effect of this fix; if it is
|
|
27775
|
+
// not, ENG-8197 is still blind to the spend ceiling and that is a separate
|
|
27776
|
+
// ticket. Nothing here depends on which.
|
|
27777
|
+
//
|
|
27778
|
+
// KNOWN LIMIT, stated rather than papered over: a spend banner that carries no
|
|
27779
|
+
// `resets` clause at all still yields null. `week_resets_at` drives the
|
|
27780
|
+
// monitor's auto-close, and synthesising an instant we never read is the exact
|
|
27781
|
+
// confident-and-false reporting ENG-8901 exists to stop. Every spend banner
|
|
27782
|
+
// observed so far carries one.
|
|
27783
|
+
new RegExp(`${SUBJECT}hit\\s+your\\s+(?<qualifier>(?:individual\\s+)?spend)\\s+limit[\\s\\S]{0,160}?resets\\s+(?<reset>${RESET_DATE})`, "i")
|
|
27733
27784
|
];
|
|
27734
27785
|
|
|
27735
27786
|
// ../core/dist/claude-code-usage/run-marker.js
|
package/dist/mcp/origami.js
CHANGED
|
@@ -41678,7 +41678,58 @@ var BANNER_PATTERNS = [
|
|
|
41678
41678
|
// bounding the count, keeps it linear.
|
|
41679
41679
|
`${SUBJECT}hit\\s+your\\s+(?<qualifier>[a-z0-9]+(?:[\\s-]+[a-z0-9]+){0,3}\\s+)?limit${SEP}resets\\s+(?<reset>${RESET_DATE})`,
|
|
41680
41680
|
"i"
|
|
41681
|
-
)
|
|
41681
|
+
),
|
|
41682
|
+
// ENG-10365 — the Claude Team seat's INDIVIDUAL SPEND LIMIT.
|
|
41683
|
+
//
|
|
41684
|
+
// WHY THE TWO PATTERNS ABOVE CANNOT MATCH IT. Both require `limit` to be
|
|
41685
|
+
// followed immediately by a separator and then `resets`. The spend banner puts
|
|
41686
|
+
// its remedy between the two:
|
|
41687
|
+
//
|
|
41688
|
+
// You've hit your individual spend limit · run /usage-credits to ask your
|
|
41689
|
+
// admin for a higher limit · your weekly limit resets Sep 12, 5pm (UTC)
|
|
41690
|
+
// Continuing automatically at Sep 12, 5pm · esc to cancel
|
|
41691
|
+
//
|
|
41692
|
+
// so the adjacency fails and `parseUsageBanner` returned null — verified
|
|
41693
|
+
// against origin/main on the verbatim pane capture in ENG-10365 before this
|
|
41694
|
+
// pattern was written. Null means NO observation is POSTed, which means the
|
|
41695
|
+
// `claude_code_usage_observations` row never exists, which means
|
|
41696
|
+
// `usage-limit-monitor` never hears of the agent at all. cindy ran zero-second
|
|
41697
|
+
// turns for ~32 hours with `heartbeat_verdict fresh` and no usage alert of any
|
|
41698
|
+
// kind, because the whole chain starts here.
|
|
41699
|
+
//
|
|
41700
|
+
// THE GAP IS BOUNDED AND LAZY, deliberately. The real banner's gap is ~78
|
|
41701
|
+
// characters; 160 leaves 2x headroom for phrasing drift and for the pane's own
|
|
41702
|
+
// line wrap (which lands mid-sentence, as above, so `[\s\S]` and not `.`).
|
|
41703
|
+
// Lazy + bounded keeps it linear on the pane.log tails this parser runs over —
|
|
41704
|
+
// the same reason the saturated pattern refuses the naive `(a+)+` shape.
|
|
41705
|
+
//
|
|
41706
|
+
// WHAT IT INHERITS BY MATCHING AT ALL. Everything downstream keys on the
|
|
41707
|
+
// `usage_limit_reached` ALERT KIND rather than on the scope, so one matching
|
|
41708
|
+
// banner reaches the roster's `usage_limit_alert_open` flag (ENG-9634),
|
|
41709
|
+
// `resolveCappedAgents`, and both monitors that suppress on a capped agent.
|
|
41710
|
+
// That is why this fix is a regex and not a subsystem.
|
|
41711
|
+
//
|
|
41712
|
+
// AND A SECOND CONSUMER, which is worth stating precisely because it is easy
|
|
41713
|
+
// to overclaim. `rate-limit-classifier.ts:160` calls this parser to read the
|
|
41714
|
+
// RESET TIME out of a `rate_limit` / 429 transcript refusal, and
|
|
41715
|
+
// `readUsageCapUntil` (agent-serving-probe.ts:296) returns null — i.e. does NOT
|
|
41716
|
+
// defer — when that reset comes back null. So a parse failure here has always
|
|
41717
|
+
// disarmed the ENG-8197 host-side dispatch deferral for this banner, which
|
|
41718
|
+
// would explain cindy being dispatched into hourly while visibly blocked.
|
|
41719
|
+
//
|
|
41720
|
+
// NOT VERIFIED, and deliberately not claimed: whether a spend refusal is
|
|
41721
|
+
// written to the transcript as `error: 'rate_limit'` / `apiErrorStatus: 429`
|
|
41722
|
+
// at all. The classifier's verdict keys on those fields, not on this text. If
|
|
41723
|
+
// it is, the deferral starts working as a side effect of this fix; if it is
|
|
41724
|
+
// not, ENG-8197 is still blind to the spend ceiling and that is a separate
|
|
41725
|
+
// ticket. Nothing here depends on which.
|
|
41726
|
+
//
|
|
41727
|
+
// KNOWN LIMIT, stated rather than papered over: a spend banner that carries no
|
|
41728
|
+
// `resets` clause at all still yields null. `week_resets_at` drives the
|
|
41729
|
+
// monitor's auto-close, and synthesising an instant we never read is the exact
|
|
41730
|
+
// confident-and-false reporting ENG-8901 exists to stop. Every spend banner
|
|
41731
|
+
// observed so far carries one.
|
|
41732
|
+
new RegExp(`${SUBJECT}hit\\s+your\\s+(?<qualifier>(?:individual\\s+)?spend)\\s+limit[\\s\\S]{0,160}?resets\\s+(?<reset>${RESET_DATE})`, "i")
|
|
41682
41733
|
];
|
|
41683
41734
|
|
|
41684
41735
|
// ../core/dist/claude-code-usage/run-marker.js
|
|
@@ -35942,12 +35942,15 @@ function parseResetDateTime(humanDate, now) {
|
|
|
35942
35942
|
|
|
35943
35943
|
// ../core/dist/claude-code-usage/banner-parser.js
|
|
35944
35944
|
var SESSION_QUALIFIER = /^(?:session|\d{1,2}\s*-?\s*hours?|\d{1,2}h)$/i;
|
|
35945
|
+
var SPEND_QUALIFIER = /^(?:individual\s+)?spend$/i;
|
|
35945
35946
|
function classifyLimitScope(qualifier) {
|
|
35946
35947
|
const q = (qualifier ?? "").trim();
|
|
35947
35948
|
if (!q)
|
|
35948
35949
|
return "weekly";
|
|
35949
35950
|
if (SESSION_QUALIFIER.test(q))
|
|
35950
35951
|
return "session";
|
|
35952
|
+
if (SPEND_QUALIFIER.test(q))
|
|
35953
|
+
return "spend";
|
|
35951
35954
|
if (/^weekly$/i.test(q))
|
|
35952
35955
|
return "weekly";
|
|
35953
35956
|
return "unknown";
|
|
@@ -35984,7 +35987,58 @@ var BANNER_PATTERNS = [
|
|
|
35984
35987
|
// bounding the count, keeps it linear.
|
|
35985
35988
|
`${SUBJECT}hit\\s+your\\s+(?<qualifier>[a-z0-9]+(?:[\\s-]+[a-z0-9]+){0,3}\\s+)?limit${SEP}resets\\s+(?<reset>${RESET_DATE})`,
|
|
35986
35989
|
"i"
|
|
35987
|
-
)
|
|
35990
|
+
),
|
|
35991
|
+
// ENG-10365 — the Claude Team seat's INDIVIDUAL SPEND LIMIT.
|
|
35992
|
+
//
|
|
35993
|
+
// WHY THE TWO PATTERNS ABOVE CANNOT MATCH IT. Both require `limit` to be
|
|
35994
|
+
// followed immediately by a separator and then `resets`. The spend banner puts
|
|
35995
|
+
// its remedy between the two:
|
|
35996
|
+
//
|
|
35997
|
+
// You've hit your individual spend limit · run /usage-credits to ask your
|
|
35998
|
+
// admin for a higher limit · your weekly limit resets Sep 12, 5pm (UTC)
|
|
35999
|
+
// Continuing automatically at Sep 12, 5pm · esc to cancel
|
|
36000
|
+
//
|
|
36001
|
+
// so the adjacency fails and `parseUsageBanner` returned null — verified
|
|
36002
|
+
// against origin/main on the verbatim pane capture in ENG-10365 before this
|
|
36003
|
+
// pattern was written. Null means NO observation is POSTed, which means the
|
|
36004
|
+
// `claude_code_usage_observations` row never exists, which means
|
|
36005
|
+
// `usage-limit-monitor` never hears of the agent at all. cindy ran zero-second
|
|
36006
|
+
// turns for ~32 hours with `heartbeat_verdict fresh` and no usage alert of any
|
|
36007
|
+
// kind, because the whole chain starts here.
|
|
36008
|
+
//
|
|
36009
|
+
// THE GAP IS BOUNDED AND LAZY, deliberately. The real banner's gap is ~78
|
|
36010
|
+
// characters; 160 leaves 2x headroom for phrasing drift and for the pane's own
|
|
36011
|
+
// line wrap (which lands mid-sentence, as above, so `[\s\S]` and not `.`).
|
|
36012
|
+
// Lazy + bounded keeps it linear on the pane.log tails this parser runs over —
|
|
36013
|
+
// the same reason the saturated pattern refuses the naive `(a+)+` shape.
|
|
36014
|
+
//
|
|
36015
|
+
// WHAT IT INHERITS BY MATCHING AT ALL. Everything downstream keys on the
|
|
36016
|
+
// `usage_limit_reached` ALERT KIND rather than on the scope, so one matching
|
|
36017
|
+
// banner reaches the roster's `usage_limit_alert_open` flag (ENG-9634),
|
|
36018
|
+
// `resolveCappedAgents`, and both monitors that suppress on a capped agent.
|
|
36019
|
+
// That is why this fix is a regex and not a subsystem.
|
|
36020
|
+
//
|
|
36021
|
+
// AND A SECOND CONSUMER, which is worth stating precisely because it is easy
|
|
36022
|
+
// to overclaim. `rate-limit-classifier.ts:160` calls this parser to read the
|
|
36023
|
+
// RESET TIME out of a `rate_limit` / 429 transcript refusal, and
|
|
36024
|
+
// `readUsageCapUntil` (agent-serving-probe.ts:296) returns null — i.e. does NOT
|
|
36025
|
+
// defer — when that reset comes back null. So a parse failure here has always
|
|
36026
|
+
// disarmed the ENG-8197 host-side dispatch deferral for this banner, which
|
|
36027
|
+
// would explain cindy being dispatched into hourly while visibly blocked.
|
|
36028
|
+
//
|
|
36029
|
+
// NOT VERIFIED, and deliberately not claimed: whether a spend refusal is
|
|
36030
|
+
// written to the transcript as `error: 'rate_limit'` / `apiErrorStatus: 429`
|
|
36031
|
+
// at all. The classifier's verdict keys on those fields, not on this text. If
|
|
36032
|
+
// it is, the deferral starts working as a side effect of this fix; if it is
|
|
36033
|
+
// not, ENG-8197 is still blind to the spend ceiling and that is a separate
|
|
36034
|
+
// ticket. Nothing here depends on which.
|
|
36035
|
+
//
|
|
36036
|
+
// KNOWN LIMIT, stated rather than papered over: a spend banner that carries no
|
|
36037
|
+
// `resets` clause at all still yields null. `week_resets_at` drives the
|
|
36038
|
+
// monitor's auto-close, and synthesising an instant we never read is the exact
|
|
36039
|
+
// confident-and-false reporting ENG-8901 exists to stop. Every spend banner
|
|
36040
|
+
// observed so far carries one.
|
|
36041
|
+
new RegExp(`${SUBJECT}hit\\s+your\\s+(?<qualifier>(?:individual\\s+)?spend)\\s+limit[\\s\\S]{0,160}?resets\\s+(?<reset>${RESET_DATE})`, "i")
|
|
35988
36042
|
];
|
|
35989
36043
|
function parseUsageBanner(text, now = /* @__PURE__ */ new Date()) {
|
|
35990
36044
|
let bestIndex = -1;
|
|
@@ -35992,12 +35992,15 @@ function parseResetDateTime(humanDate, now) {
|
|
|
35992
35992
|
|
|
35993
35993
|
// ../core/dist/claude-code-usage/banner-parser.js
|
|
35994
35994
|
var SESSION_QUALIFIER = /^(?:session|\d{1,2}\s*-?\s*hours?|\d{1,2}h)$/i;
|
|
35995
|
+
var SPEND_QUALIFIER = /^(?:individual\s+)?spend$/i;
|
|
35995
35996
|
function classifyLimitScope(qualifier) {
|
|
35996
35997
|
const q = (qualifier ?? "").trim();
|
|
35997
35998
|
if (!q)
|
|
35998
35999
|
return "weekly";
|
|
35999
36000
|
if (SESSION_QUALIFIER.test(q))
|
|
36000
36001
|
return "session";
|
|
36002
|
+
if (SPEND_QUALIFIER.test(q))
|
|
36003
|
+
return "spend";
|
|
36001
36004
|
if (/^weekly$/i.test(q))
|
|
36002
36005
|
return "weekly";
|
|
36003
36006
|
return "unknown";
|
|
@@ -36034,7 +36037,58 @@ var BANNER_PATTERNS = [
|
|
|
36034
36037
|
// bounding the count, keeps it linear.
|
|
36035
36038
|
`${SUBJECT}hit\\s+your\\s+(?<qualifier>[a-z0-9]+(?:[\\s-]+[a-z0-9]+){0,3}\\s+)?limit${SEP}resets\\s+(?<reset>${RESET_DATE})`,
|
|
36036
36039
|
"i"
|
|
36037
|
-
)
|
|
36040
|
+
),
|
|
36041
|
+
// ENG-10365 — the Claude Team seat's INDIVIDUAL SPEND LIMIT.
|
|
36042
|
+
//
|
|
36043
|
+
// WHY THE TWO PATTERNS ABOVE CANNOT MATCH IT. Both require `limit` to be
|
|
36044
|
+
// followed immediately by a separator and then `resets`. The spend banner puts
|
|
36045
|
+
// its remedy between the two:
|
|
36046
|
+
//
|
|
36047
|
+
// You've hit your individual spend limit · run /usage-credits to ask your
|
|
36048
|
+
// admin for a higher limit · your weekly limit resets Sep 12, 5pm (UTC)
|
|
36049
|
+
// Continuing automatically at Sep 12, 5pm · esc to cancel
|
|
36050
|
+
//
|
|
36051
|
+
// so the adjacency fails and `parseUsageBanner` returned null — verified
|
|
36052
|
+
// against origin/main on the verbatim pane capture in ENG-10365 before this
|
|
36053
|
+
// pattern was written. Null means NO observation is POSTed, which means the
|
|
36054
|
+
// `claude_code_usage_observations` row never exists, which means
|
|
36055
|
+
// `usage-limit-monitor` never hears of the agent at all. cindy ran zero-second
|
|
36056
|
+
// turns for ~32 hours with `heartbeat_verdict fresh` and no usage alert of any
|
|
36057
|
+
// kind, because the whole chain starts here.
|
|
36058
|
+
//
|
|
36059
|
+
// THE GAP IS BOUNDED AND LAZY, deliberately. The real banner's gap is ~78
|
|
36060
|
+
// characters; 160 leaves 2x headroom for phrasing drift and for the pane's own
|
|
36061
|
+
// line wrap (which lands mid-sentence, as above, so `[\s\S]` and not `.`).
|
|
36062
|
+
// Lazy + bounded keeps it linear on the pane.log tails this parser runs over —
|
|
36063
|
+
// the same reason the saturated pattern refuses the naive `(a+)+` shape.
|
|
36064
|
+
//
|
|
36065
|
+
// WHAT IT INHERITS BY MATCHING AT ALL. Everything downstream keys on the
|
|
36066
|
+
// `usage_limit_reached` ALERT KIND rather than on the scope, so one matching
|
|
36067
|
+
// banner reaches the roster's `usage_limit_alert_open` flag (ENG-9634),
|
|
36068
|
+
// `resolveCappedAgents`, and both monitors that suppress on a capped agent.
|
|
36069
|
+
// That is why this fix is a regex and not a subsystem.
|
|
36070
|
+
//
|
|
36071
|
+
// AND A SECOND CONSUMER, which is worth stating precisely because it is easy
|
|
36072
|
+
// to overclaim. `rate-limit-classifier.ts:160` calls this parser to read the
|
|
36073
|
+
// RESET TIME out of a `rate_limit` / 429 transcript refusal, and
|
|
36074
|
+
// `readUsageCapUntil` (agent-serving-probe.ts:296) returns null — i.e. does NOT
|
|
36075
|
+
// defer — when that reset comes back null. So a parse failure here has always
|
|
36076
|
+
// disarmed the ENG-8197 host-side dispatch deferral for this banner, which
|
|
36077
|
+
// would explain cindy being dispatched into hourly while visibly blocked.
|
|
36078
|
+
//
|
|
36079
|
+
// NOT VERIFIED, and deliberately not claimed: whether a spend refusal is
|
|
36080
|
+
// written to the transcript as `error: 'rate_limit'` / `apiErrorStatus: 429`
|
|
36081
|
+
// at all. The classifier's verdict keys on those fields, not on this text. If
|
|
36082
|
+
// it is, the deferral starts working as a side effect of this fix; if it is
|
|
36083
|
+
// not, ENG-8197 is still blind to the spend ceiling and that is a separate
|
|
36084
|
+
// ticket. Nothing here depends on which.
|
|
36085
|
+
//
|
|
36086
|
+
// KNOWN LIMIT, stated rather than papered over: a spend banner that carries no
|
|
36087
|
+
// `resets` clause at all still yields null. `week_resets_at` drives the
|
|
36088
|
+
// monitor's auto-close, and synthesising an instant we never read is the exact
|
|
36089
|
+
// confident-and-false reporting ENG-8901 exists to stop. Every spend banner
|
|
36090
|
+
// observed so far carries one.
|
|
36091
|
+
new RegExp(`${SUBJECT}hit\\s+your\\s+(?<qualifier>(?:individual\\s+)?spend)\\s+limit[\\s\\S]{0,160}?resets\\s+(?<reset>${RESET_DATE})`, "i")
|
|
36038
36092
|
];
|
|
36039
36093
|
function parseUsageBanner(text, now = /* @__PURE__ */ new Date()) {
|
|
36040
36094
|
let bestIndex = -1;
|
|
@@ -62,8 +62,8 @@ import {
|
|
|
62
62
|
writeDirectChatSessionState,
|
|
63
63
|
writeEgressAllowlist,
|
|
64
64
|
writePersistentClaudeWrapper
|
|
65
|
-
} from "./chunk-
|
|
66
|
-
import "./chunk-
|
|
65
|
+
} from "./chunk-IVJVMR3S.js";
|
|
66
|
+
import "./chunk-HQKGVPIV.js";
|
|
67
67
|
import "./chunk-XWVM4KPK.js";
|
|
68
68
|
export {
|
|
69
69
|
CLAUDE_HOST_WIDE,
|
|
@@ -130,4 +130,4 @@ export {
|
|
|
130
130
|
writeEgressAllowlist,
|
|
131
131
|
writePersistentClaudeWrapper
|
|
132
132
|
};
|
|
133
|
-
//# sourceMappingURL=persistent-session-
|
|
133
|
+
//# sourceMappingURL=persistent-session-6QB3XNY2.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-IVJVMR3S.js";
|
|
4
|
+
import "./chunk-HQKGVPIV.js";
|
|
5
5
|
import "./chunk-XWVM4KPK.js";
|
|
6
6
|
|
|
7
7
|
// src/lib/responsiveness-probe.ts
|
|
@@ -764,4 +764,4 @@ export {
|
|
|
764
764
|
readAndResetSlackReplyBindingClassifications,
|
|
765
765
|
readAndResetSlackReplyTargetClassifications
|
|
766
766
|
};
|
|
767
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
767
|
+
//# sourceMappingURL=responsiveness-probe-ULU4DHEO.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionTranscriptDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HQKGVPIV.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/session-auth-dead.ts
|
|
6
6
|
import { closeSync, openSync, readSync, readdirSync, statSync } from "fs";
|
|
@@ -203,4 +203,4 @@ export {
|
|
|
203
203
|
decideSessionAuthState,
|
|
204
204
|
probeSessionAuth
|
|
205
205
|
};
|
|
206
|
-
//# sourceMappingURL=session-auth-dead-
|
|
206
|
+
//# sourceMappingURL=session-auth-dead-UXZ5DDKQ.js.map
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|