@integrity-labs/agt-cli 0.28.1021 → 0.28.1023
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-X7SX25N6.js → chunk-BHKFVSIX.js} +10 -8
- package/dist/{chunk-X7SX25N6.js.map → chunk-BHKFVSIX.js.map} +1 -1
- package/dist/{chunk-SGAW3XWQ.js → chunk-NQB4AF4Q.js} +4 -4
- package/dist/{chunk-CVQDMHOP.js → chunk-RDQILPRF.js} +22 -2
- package/dist/{chunk-CVQDMHOP.js.map → chunk-RDQILPRF.js.map} +1 -1
- package/dist/{claude-pair-runtime-JQRJXNSL.js → claude-pair-runtime-C4DDKQ6N.js} +2 -2
- package/dist/lib/manager-worker.js +278 -15
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/mcp/direct-chat-channel.js +61 -10
- package/dist/mcp/index.js +9 -7
- package/dist/mcp/origami.js +9 -7
- package/dist/mcp/slack-channel.js +35 -10
- package/dist/mcp/telegram-channel.js +35 -10
- package/dist/{persistent-session-UZBB7EOS.js → persistent-session-3NQHNU6H.js} +3 -3
- package/dist/{responsiveness-probe-KLOUFBM5.js → responsiveness-probe-ZOXVXDPT.js} +3 -3
- package/dist/{session-auth-dead-JJUKS75B.js → session-auth-dead-ZKC2HH6T.js} +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-SGAW3XWQ.js.map → chunk-NQB4AF4Q.js.map} +0 -0
- /package/dist/{claude-pair-runtime-JQRJXNSL.js.map → claude-pair-runtime-C4DDKQ6N.js.map} +0 -0
- /package/dist/{persistent-session-UZBB7EOS.js.map → persistent-session-3NQHNU6H.js.map} +0 -0
- /package/dist/{responsiveness-probe-KLOUFBM5.js.map → responsiveness-probe-ZOXVXDPT.js.map} +0 -0
- /package/dist/{session-auth-dead-JJUKS75B.js.map → session-auth-dead-ZKC2HH6T.js.map} +0 -0
|
@@ -32966,13 +32966,18 @@ var OAUTH_PROVIDERS = {
|
|
|
32966
32966
|
// existing Xero install must RECONNECT for its token to carry this — the
|
|
32967
32967
|
// broker posts journals with the agent's own OAuth access_token.
|
|
32968
32968
|
"accounting.manualjournals",
|
|
32969
|
-
// accounting.reports.read → granular read-only replacements
|
|
32969
|
+
// accounting.reports.read → granular read-only replacements, ONE PER REPORT
|
|
32970
|
+
// TOOL THE SERVER REGISTERS (ENG-10961 follow-on). Bank summary, budget
|
|
32971
|
+
// summary and executive summary were requested here with no tool reading
|
|
32972
|
+
// them: #6463 removed the phantom `report-bank-summary` /
|
|
32973
|
+
// `report-budget-summary` names, and nothing ever called the executive
|
|
32974
|
+
// summary. Asking a customer to consent to read access nothing uses is the
|
|
32975
|
+
// least-privilege failure the granular list exists to avoid. Removing a
|
|
32976
|
+
// default can never raise a reconnect prompt - `computeMissingScopes` only
|
|
32977
|
+
// reports defaults the grant LACKS.
|
|
32970
32978
|
"accounting.reports.balancesheet.read",
|
|
32971
32979
|
"accounting.reports.profitandloss.read",
|
|
32972
32980
|
"accounting.reports.trialbalance.read",
|
|
32973
|
-
"accounting.reports.budgetsummary.read",
|
|
32974
|
-
"accounting.reports.banksummary.read",
|
|
32975
|
-
"accounting.reports.executivesummary.read",
|
|
32976
32981
|
"accounting.reports.aged.read"
|
|
32977
32982
|
],
|
|
32978
32983
|
// Read-only variant (ENG-6170): the `.read` granular scope for every
|
|
@@ -32995,9 +33000,6 @@ var OAUTH_PROVIDERS = {
|
|
|
32995
33000
|
"accounting.reports.balancesheet.read",
|
|
32996
33001
|
"accounting.reports.profitandloss.read",
|
|
32997
33002
|
"accounting.reports.trialbalance.read",
|
|
32998
|
-
"accounting.reports.budgetsummary.read",
|
|
32999
|
-
"accounting.reports.banksummary.read",
|
|
33000
|
-
"accounting.reports.executivesummary.read",
|
|
33001
33003
|
"accounting.reports.aged.read"
|
|
33002
33004
|
],
|
|
33003
33005
|
supportsRefresh: true,
|
|
@@ -39287,10 +39289,55 @@ function decideBusyAck(i) {
|
|
|
39287
39289
|
const paneFreshThreshold = i.paneFreshThresholdMs ?? ACK_PANE_FRESH_THRESHOLD_MS;
|
|
39288
39290
|
return i.paneLogFreshAgeMs != null && i.paneLogFreshAgeMs <= paneFreshThreshold;
|
|
39289
39291
|
}
|
|
39290
|
-
function busyAckNoticeText() {
|
|
39292
|
+
function busyAckNoticeText(usageLimit) {
|
|
39293
|
+
if (usageLimit) return giveUpNoticeText("usage_limit", usageLimit.resetsHint);
|
|
39291
39294
|
return "\u{1F6E0}\uFE0F I'm in the middle of something right now \u2014 I'll follow up on this as soon as I'm free.";
|
|
39292
39295
|
}
|
|
39296
|
+
var GIVE_UP_SIGNAL_FILENAME = "watchdog-give-up.json";
|
|
39293
39297
|
var GIVE_UP_SIGNAL_MAX_AGE_MS = 30 * 60 * 1e3;
|
|
39298
|
+
function readGiveUpSignal(path, now = Date.now()) {
|
|
39299
|
+
if (!path) return null;
|
|
39300
|
+
try {
|
|
39301
|
+
const raw = JSON.parse(readFileSync7(path, "utf8"));
|
|
39302
|
+
if (typeof raw.gave_up_at !== "string") return null;
|
|
39303
|
+
const t = Date.parse(raw.gave_up_at);
|
|
39304
|
+
if (!Number.isFinite(t) || t > now) return null;
|
|
39305
|
+
const reason = raw.reason === "transient_overload" ? "transient_overload" : raw.reason === "usage_limit" ? "usage_limit" : null;
|
|
39306
|
+
const hint = typeof raw.resets_hint === "string" && raw.resets_hint.trim().length > 0 ? raw.resets_hint.trim().slice(0, 40) : null;
|
|
39307
|
+
return { atMs: t, reason, resetsHint: hint };
|
|
39308
|
+
} catch {
|
|
39309
|
+
return null;
|
|
39310
|
+
}
|
|
39311
|
+
}
|
|
39312
|
+
var USAGE_LIMIT_LIVE_WINDOW_MS = 3 * 6e4;
|
|
39313
|
+
function readUsageLimitForBusyAck(agentDir, now = Date.now()) {
|
|
39314
|
+
if (!agentDir) return null;
|
|
39315
|
+
const path = join7(agentDir, GIVE_UP_SIGNAL_FILENAME);
|
|
39316
|
+
const sig = readGiveUpSignal(path, now);
|
|
39317
|
+
if (sig?.reason !== "usage_limit") return null;
|
|
39318
|
+
let lastSeenMs = null;
|
|
39319
|
+
try {
|
|
39320
|
+
const raw = JSON.parse(readFileSync7(path, "utf8"));
|
|
39321
|
+
if (typeof raw.usage_limit_last_seen_at === "string") {
|
|
39322
|
+
const t = Date.parse(raw.usage_limit_last_seen_at);
|
|
39323
|
+
if (Number.isFinite(t) && t <= now) lastSeenMs = t;
|
|
39324
|
+
}
|
|
39325
|
+
} catch {
|
|
39326
|
+
return null;
|
|
39327
|
+
}
|
|
39328
|
+
if (lastSeenMs === null) return null;
|
|
39329
|
+
if (now - lastSeenMs > USAGE_LIMIT_LIVE_WINDOW_MS) return null;
|
|
39330
|
+
return { resetsHint: sig.resetsHint };
|
|
39331
|
+
}
|
|
39332
|
+
function giveUpNoticeText(reason = null, resetsHint = null) {
|
|
39333
|
+
if (reason === "usage_limit") {
|
|
39334
|
+
return resetsHint ? `\u23F3 I've reached my usage limit for now, so I can't reply until ${resetsHint}. Your message is queued \u2014 I'll pick it up then, no need to resend.` : "\u23F3 I've reached my usage limit for now, so I can't reply just yet. Your message is queued \u2014 I'll pick it up as soon as it lifts, no need to resend.";
|
|
39335
|
+
}
|
|
39336
|
+
if (reason === "transient_overload") {
|
|
39337
|
+
return "\u26A0\uFE0F I hit a brief overload and couldn\u2019t finish your last message \u2014 please resend it in a moment.";
|
|
39338
|
+
}
|
|
39339
|
+
return "\u26A0\uFE0F I couldn't read your last message \u2014 please resend it.";
|
|
39340
|
+
}
|
|
39294
39341
|
function turnFailedNoticeText(failureClass) {
|
|
39295
39342
|
const cause = failureClass === "overloaded" ? "the service I run on is overloaded right now \u2014 nothing to do with you or what you asked for" : failureClass === "server_error" ? "something upstream of me is failing right now \u2014 nothing to do with you or what you asked for" : null;
|
|
39296
39343
|
if (cause === null) {
|
|
@@ -39693,7 +39740,8 @@ function probeTmuxSession(tmuxSession) {
|
|
|
39693
39740
|
return "alive";
|
|
39694
39741
|
} catch (err) {
|
|
39695
39742
|
const e = err;
|
|
39696
|
-
|
|
39743
|
+
const timedOut = e?.code === "ETIMEDOUT" || e?.error?.code === "ETIMEDOUT";
|
|
39744
|
+
if (e?.code === "ENOENT" || e?.error?.code === "ENOENT" || timedOut) return "unknown";
|
|
39697
39745
|
return "dead";
|
|
39698
39746
|
}
|
|
39699
39747
|
}
|
|
@@ -41263,7 +41311,10 @@ function postDirectChatBusyAckNotice(sessionId) {
|
|
|
41263
41311
|
}
|
|
41264
41312
|
lastBusyAckNoticeAt.set(sessionId, now);
|
|
41265
41313
|
void (async () => {
|
|
41266
|
-
const ok = await postDirectChatNoticeMessage(
|
|
41314
|
+
const ok = await postDirectChatNoticeMessage(
|
|
41315
|
+
sessionId,
|
|
41316
|
+
busyAckNoticeText(readUsageLimitForBusyAck(DIRECT_CHAT_CODE_NAME_AGENT_DIR))
|
|
41317
|
+
);
|
|
41267
41318
|
if (!ok) {
|
|
41268
41319
|
lastBusyAckNoticeAt.delete(sessionId);
|
|
41269
41320
|
process.stderr.write(
|
package/dist/mcp/index.js
CHANGED
|
@@ -25548,13 +25548,18 @@ var OAUTH_PROVIDERS = {
|
|
|
25548
25548
|
// existing Xero install must RECONNECT for its token to carry this — the
|
|
25549
25549
|
// broker posts journals with the agent's own OAuth access_token.
|
|
25550
25550
|
"accounting.manualjournals",
|
|
25551
|
-
// accounting.reports.read → granular read-only replacements
|
|
25551
|
+
// accounting.reports.read → granular read-only replacements, ONE PER REPORT
|
|
25552
|
+
// TOOL THE SERVER REGISTERS (ENG-10961 follow-on). Bank summary, budget
|
|
25553
|
+
// summary and executive summary were requested here with no tool reading
|
|
25554
|
+
// them: #6463 removed the phantom `report-bank-summary` /
|
|
25555
|
+
// `report-budget-summary` names, and nothing ever called the executive
|
|
25556
|
+
// summary. Asking a customer to consent to read access nothing uses is the
|
|
25557
|
+
// least-privilege failure the granular list exists to avoid. Removing a
|
|
25558
|
+
// default can never raise a reconnect prompt - `computeMissingScopes` only
|
|
25559
|
+
// reports defaults the grant LACKS.
|
|
25552
25560
|
"accounting.reports.balancesheet.read",
|
|
25553
25561
|
"accounting.reports.profitandloss.read",
|
|
25554
25562
|
"accounting.reports.trialbalance.read",
|
|
25555
|
-
"accounting.reports.budgetsummary.read",
|
|
25556
|
-
"accounting.reports.banksummary.read",
|
|
25557
|
-
"accounting.reports.executivesummary.read",
|
|
25558
25563
|
"accounting.reports.aged.read"
|
|
25559
25564
|
],
|
|
25560
25565
|
// Read-only variant (ENG-6170): the `.read` granular scope for every
|
|
@@ -25577,9 +25582,6 @@ var OAUTH_PROVIDERS = {
|
|
|
25577
25582
|
"accounting.reports.balancesheet.read",
|
|
25578
25583
|
"accounting.reports.profitandloss.read",
|
|
25579
25584
|
"accounting.reports.trialbalance.read",
|
|
25580
|
-
"accounting.reports.budgetsummary.read",
|
|
25581
|
-
"accounting.reports.banksummary.read",
|
|
25582
|
-
"accounting.reports.executivesummary.read",
|
|
25583
25585
|
"accounting.reports.aged.read"
|
|
25584
25586
|
],
|
|
25585
25587
|
supportsRefresh: true,
|
package/dist/mcp/origami.js
CHANGED
|
@@ -39699,13 +39699,18 @@ var OAUTH_PROVIDERS = {
|
|
|
39699
39699
|
// existing Xero install must RECONNECT for its token to carry this — the
|
|
39700
39700
|
// broker posts journals with the agent's own OAuth access_token.
|
|
39701
39701
|
"accounting.manualjournals",
|
|
39702
|
-
// accounting.reports.read → granular read-only replacements
|
|
39702
|
+
// accounting.reports.read → granular read-only replacements, ONE PER REPORT
|
|
39703
|
+
// TOOL THE SERVER REGISTERS (ENG-10961 follow-on). Bank summary, budget
|
|
39704
|
+
// summary and executive summary were requested here with no tool reading
|
|
39705
|
+
// them: #6463 removed the phantom `report-bank-summary` /
|
|
39706
|
+
// `report-budget-summary` names, and nothing ever called the executive
|
|
39707
|
+
// summary. Asking a customer to consent to read access nothing uses is the
|
|
39708
|
+
// least-privilege failure the granular list exists to avoid. Removing a
|
|
39709
|
+
// default can never raise a reconnect prompt - `computeMissingScopes` only
|
|
39710
|
+
// reports defaults the grant LACKS.
|
|
39703
39711
|
"accounting.reports.balancesheet.read",
|
|
39704
39712
|
"accounting.reports.profitandloss.read",
|
|
39705
39713
|
"accounting.reports.trialbalance.read",
|
|
39706
|
-
"accounting.reports.budgetsummary.read",
|
|
39707
|
-
"accounting.reports.banksummary.read",
|
|
39708
|
-
"accounting.reports.executivesummary.read",
|
|
39709
39714
|
"accounting.reports.aged.read"
|
|
39710
39715
|
],
|
|
39711
39716
|
// Read-only variant (ENG-6170): the `.read` granular scope for every
|
|
@@ -39728,9 +39733,6 @@ var OAUTH_PROVIDERS = {
|
|
|
39728
39733
|
"accounting.reports.balancesheet.read",
|
|
39729
39734
|
"accounting.reports.profitandloss.read",
|
|
39730
39735
|
"accounting.reports.trialbalance.read",
|
|
39731
|
-
"accounting.reports.budgetsummary.read",
|
|
39732
|
-
"accounting.reports.banksummary.read",
|
|
39733
|
-
"accounting.reports.executivesummary.read",
|
|
39734
39736
|
"accounting.reports.aged.read"
|
|
39735
39737
|
],
|
|
39736
39738
|
supportsRefresh: true,
|
|
@@ -33916,13 +33916,18 @@ var OAUTH_PROVIDERS = {
|
|
|
33916
33916
|
// existing Xero install must RECONNECT for its token to carry this — the
|
|
33917
33917
|
// broker posts journals with the agent's own OAuth access_token.
|
|
33918
33918
|
"accounting.manualjournals",
|
|
33919
|
-
// accounting.reports.read → granular read-only replacements
|
|
33919
|
+
// accounting.reports.read → granular read-only replacements, ONE PER REPORT
|
|
33920
|
+
// TOOL THE SERVER REGISTERS (ENG-10961 follow-on). Bank summary, budget
|
|
33921
|
+
// summary and executive summary were requested here with no tool reading
|
|
33922
|
+
// them: #6463 removed the phantom `report-bank-summary` /
|
|
33923
|
+
// `report-budget-summary` names, and nothing ever called the executive
|
|
33924
|
+
// summary. Asking a customer to consent to read access nothing uses is the
|
|
33925
|
+
// least-privilege failure the granular list exists to avoid. Removing a
|
|
33926
|
+
// default can never raise a reconnect prompt - `computeMissingScopes` only
|
|
33927
|
+
// reports defaults the grant LACKS.
|
|
33920
33928
|
"accounting.reports.balancesheet.read",
|
|
33921
33929
|
"accounting.reports.profitandloss.read",
|
|
33922
33930
|
"accounting.reports.trialbalance.read",
|
|
33923
|
-
"accounting.reports.budgetsummary.read",
|
|
33924
|
-
"accounting.reports.banksummary.read",
|
|
33925
|
-
"accounting.reports.executivesummary.read",
|
|
33926
33931
|
"accounting.reports.aged.read"
|
|
33927
33932
|
],
|
|
33928
33933
|
// Read-only variant (ENG-6170): the `.read` granular scope for every
|
|
@@ -33945,9 +33950,6 @@ var OAUTH_PROVIDERS = {
|
|
|
33945
33950
|
"accounting.reports.balancesheet.read",
|
|
33946
33951
|
"accounting.reports.profitandloss.read",
|
|
33947
33952
|
"accounting.reports.trialbalance.read",
|
|
33948
|
-
"accounting.reports.budgetsummary.read",
|
|
33949
|
-
"accounting.reports.banksummary.read",
|
|
33950
|
-
"accounting.reports.executivesummary.read",
|
|
33951
33953
|
"accounting.reports.aged.read"
|
|
33952
33954
|
],
|
|
33953
33955
|
supportsRefresh: true,
|
|
@@ -39967,7 +39969,8 @@ function decideBusyAck(i) {
|
|
|
39967
39969
|
const paneFreshThreshold = i.paneFreshThresholdMs ?? ACK_PANE_FRESH_THRESHOLD_MS;
|
|
39968
39970
|
return i.paneLogFreshAgeMs != null && i.paneLogFreshAgeMs <= paneFreshThreshold;
|
|
39969
39971
|
}
|
|
39970
|
-
function busyAckNoticeText() {
|
|
39972
|
+
function busyAckNoticeText(usageLimit) {
|
|
39973
|
+
if (usageLimit) return giveUpNoticeText("usage_limit", usageLimit.resetsHint);
|
|
39971
39974
|
return "\u{1F6E0}\uFE0F I'm in the middle of something right now \u2014 I'll follow up on this as soon as I'm free.";
|
|
39972
39975
|
}
|
|
39973
39976
|
var GIVE_UP_SIGNAL_FILENAME = "watchdog-give-up.json";
|
|
@@ -39986,6 +39989,26 @@ function readGiveUpSignal(path, now = Date.now()) {
|
|
|
39986
39989
|
return null;
|
|
39987
39990
|
}
|
|
39988
39991
|
}
|
|
39992
|
+
var USAGE_LIMIT_LIVE_WINDOW_MS = 3 * 6e4;
|
|
39993
|
+
function readUsageLimitForBusyAck(agentDir, now = Date.now()) {
|
|
39994
|
+
if (!agentDir) return null;
|
|
39995
|
+
const path = join3(agentDir, GIVE_UP_SIGNAL_FILENAME);
|
|
39996
|
+
const sig = readGiveUpSignal(path, now);
|
|
39997
|
+
if (sig?.reason !== "usage_limit") return null;
|
|
39998
|
+
let lastSeenMs = null;
|
|
39999
|
+
try {
|
|
40000
|
+
const raw = JSON.parse(readFileSync3(path, "utf8"));
|
|
40001
|
+
if (typeof raw.usage_limit_last_seen_at === "string") {
|
|
40002
|
+
const t = Date.parse(raw.usage_limit_last_seen_at);
|
|
40003
|
+
if (Number.isFinite(t) && t <= now) lastSeenMs = t;
|
|
40004
|
+
}
|
|
40005
|
+
} catch {
|
|
40006
|
+
return null;
|
|
40007
|
+
}
|
|
40008
|
+
if (lastSeenMs === null) return null;
|
|
40009
|
+
if (now - lastSeenMs > USAGE_LIMIT_LIVE_WINDOW_MS) return null;
|
|
40010
|
+
return { resetsHint: sig.resetsHint };
|
|
40011
|
+
}
|
|
39989
40012
|
function decideGiveUpNotice(input) {
|
|
39990
40013
|
const maxAge = input.maxAgeMs ?? GIVE_UP_SIGNAL_MAX_AGE_MS;
|
|
39991
40014
|
if (input.signalAtMs == null) return false;
|
|
@@ -40171,7 +40194,8 @@ function probeTmuxSession(tmuxSession) {
|
|
|
40171
40194
|
return "alive";
|
|
40172
40195
|
} catch (err) {
|
|
40173
40196
|
const e = err;
|
|
40174
|
-
|
|
40197
|
+
const timedOut = e?.code === "ETIMEDOUT" || e?.error?.code === "ETIMEDOUT";
|
|
40198
|
+
if (e?.code === "ENOENT" || e?.error?.code === "ENOENT" || timedOut) return "unknown";
|
|
40175
40199
|
return "dead";
|
|
40176
40200
|
}
|
|
40177
40201
|
}
|
|
@@ -45435,7 +45459,8 @@ function postBusyAckNotice(channel, threadTs, isThreadReply) {
|
|
|
45435
45459
|
},
|
|
45436
45460
|
body: JSON.stringify({
|
|
45437
45461
|
channel,
|
|
45438
|
-
|
|
45462
|
+
// ENG-10972: say RATE-LIMITED rather than "busy" when that is the truth.
|
|
45463
|
+
text: busyAckNoticeText(readUsageLimitForBusyAck(SLACK_AGENT_DIR)),
|
|
45439
45464
|
...threadTs ? { thread_ts: threadTs } : {}
|
|
45440
45465
|
}),
|
|
45441
45466
|
// Bound the request so a hung Slack call can't dangle to the platform
|
|
@@ -34025,13 +34025,18 @@ var OAUTH_PROVIDERS = {
|
|
|
34025
34025
|
// existing Xero install must RECONNECT for its token to carry this — the
|
|
34026
34026
|
// broker posts journals with the agent's own OAuth access_token.
|
|
34027
34027
|
"accounting.manualjournals",
|
|
34028
|
-
// accounting.reports.read → granular read-only replacements
|
|
34028
|
+
// accounting.reports.read → granular read-only replacements, ONE PER REPORT
|
|
34029
|
+
// TOOL THE SERVER REGISTERS (ENG-10961 follow-on). Bank summary, budget
|
|
34030
|
+
// summary and executive summary were requested here with no tool reading
|
|
34031
|
+
// them: #6463 removed the phantom `report-bank-summary` /
|
|
34032
|
+
// `report-budget-summary` names, and nothing ever called the executive
|
|
34033
|
+
// summary. Asking a customer to consent to read access nothing uses is the
|
|
34034
|
+
// least-privilege failure the granular list exists to avoid. Removing a
|
|
34035
|
+
// default can never raise a reconnect prompt - `computeMissingScopes` only
|
|
34036
|
+
// reports defaults the grant LACKS.
|
|
34029
34037
|
"accounting.reports.balancesheet.read",
|
|
34030
34038
|
"accounting.reports.profitandloss.read",
|
|
34031
34039
|
"accounting.reports.trialbalance.read",
|
|
34032
|
-
"accounting.reports.budgetsummary.read",
|
|
34033
|
-
"accounting.reports.banksummary.read",
|
|
34034
|
-
"accounting.reports.executivesummary.read",
|
|
34035
34040
|
"accounting.reports.aged.read"
|
|
34036
34041
|
],
|
|
34037
34042
|
// Read-only variant (ENG-6170): the `.read` granular scope for every
|
|
@@ -34054,9 +34059,6 @@ var OAUTH_PROVIDERS = {
|
|
|
34054
34059
|
"accounting.reports.balancesheet.read",
|
|
34055
34060
|
"accounting.reports.profitandloss.read",
|
|
34056
34061
|
"accounting.reports.trialbalance.read",
|
|
34057
|
-
"accounting.reports.budgetsummary.read",
|
|
34058
|
-
"accounting.reports.banksummary.read",
|
|
34059
|
-
"accounting.reports.executivesummary.read",
|
|
34060
34062
|
"accounting.reports.aged.read"
|
|
34061
34063
|
],
|
|
34062
34064
|
supportsRefresh: true,
|
|
@@ -40696,7 +40698,8 @@ function probeTmuxSession(tmuxSession) {
|
|
|
40696
40698
|
return "alive";
|
|
40697
40699
|
} catch (err) {
|
|
40698
40700
|
const e = err;
|
|
40699
|
-
|
|
40701
|
+
const timedOut = e?.code === "ETIMEDOUT" || e?.error?.code === "ETIMEDOUT";
|
|
40702
|
+
if (e?.code === "ENOENT" || e?.error?.code === "ENOENT" || timedOut) return "unknown";
|
|
40700
40703
|
return "dead";
|
|
40701
40704
|
}
|
|
40702
40705
|
}
|
|
@@ -42689,7 +42692,8 @@ function decideBusyAck(i) {
|
|
|
42689
42692
|
const paneFreshThreshold = i.paneFreshThresholdMs ?? ACK_PANE_FRESH_THRESHOLD_MS;
|
|
42690
42693
|
return i.paneLogFreshAgeMs != null && i.paneLogFreshAgeMs <= paneFreshThreshold;
|
|
42691
42694
|
}
|
|
42692
|
-
function busyAckNoticeText() {
|
|
42695
|
+
function busyAckNoticeText(usageLimit) {
|
|
42696
|
+
if (usageLimit) return giveUpNoticeText("usage_limit", usageLimit.resetsHint);
|
|
42693
42697
|
return "\u{1F6E0}\uFE0F I'm in the middle of something right now \u2014 I'll follow up on this as soon as I'm free.";
|
|
42694
42698
|
}
|
|
42695
42699
|
var GIVE_UP_SIGNAL_FILENAME = "watchdog-give-up.json";
|
|
@@ -42708,6 +42712,26 @@ function readGiveUpSignal(path, now = Date.now()) {
|
|
|
42708
42712
|
return null;
|
|
42709
42713
|
}
|
|
42710
42714
|
}
|
|
42715
|
+
var USAGE_LIMIT_LIVE_WINDOW_MS = 3 * 6e4;
|
|
42716
|
+
function readUsageLimitForBusyAck(agentDir, now = Date.now()) {
|
|
42717
|
+
if (!agentDir) return null;
|
|
42718
|
+
const path = join15(agentDir, GIVE_UP_SIGNAL_FILENAME);
|
|
42719
|
+
const sig = readGiveUpSignal(path, now);
|
|
42720
|
+
if (sig?.reason !== "usage_limit") return null;
|
|
42721
|
+
let lastSeenMs = null;
|
|
42722
|
+
try {
|
|
42723
|
+
const raw = JSON.parse(readFileSync13(path, "utf8"));
|
|
42724
|
+
if (typeof raw.usage_limit_last_seen_at === "string") {
|
|
42725
|
+
const t = Date.parse(raw.usage_limit_last_seen_at);
|
|
42726
|
+
if (Number.isFinite(t) && t <= now) lastSeenMs = t;
|
|
42727
|
+
}
|
|
42728
|
+
} catch {
|
|
42729
|
+
return null;
|
|
42730
|
+
}
|
|
42731
|
+
if (lastSeenMs === null) return null;
|
|
42732
|
+
if (now - lastSeenMs > USAGE_LIMIT_LIVE_WINDOW_MS) return null;
|
|
42733
|
+
return { resetsHint: sig.resetsHint };
|
|
42734
|
+
}
|
|
42711
42735
|
function decideGiveUpNotice(input) {
|
|
42712
42736
|
const maxAge = input.maxAgeMs ?? GIVE_UP_SIGNAL_MAX_AGE_MS;
|
|
42713
42737
|
if (input.signalAtMs == null) return false;
|
|
@@ -43541,7 +43565,8 @@ function postBusyAckNotice(chatId, messageId) {
|
|
|
43541
43565
|
"sendMessage",
|
|
43542
43566
|
{
|
|
43543
43567
|
chat_id: chatId,
|
|
43544
|
-
|
|
43568
|
+
// ENG-10972: say RATE-LIMITED rather than "busy" when that is the truth.
|
|
43569
|
+
text: busyAckNoticeText(readUsageLimitForBusyAck(TELEGRAM_AGENT_DIR)),
|
|
43545
43570
|
reply_to_message_id: Number(messageId),
|
|
43546
43571
|
allow_sending_without_reply: true
|
|
43547
43572
|
},
|
|
@@ -65,8 +65,8 @@ import {
|
|
|
65
65
|
writeDirectChatSessionState,
|
|
66
66
|
writeEgressAllowlist,
|
|
67
67
|
writePersistentClaudeWrapper
|
|
68
|
-
} from "./chunk-
|
|
69
|
-
import "./chunk-
|
|
68
|
+
} from "./chunk-RDQILPRF.js";
|
|
69
|
+
import "./chunk-BHKFVSIX.js";
|
|
70
70
|
import "./chunk-DHWNVVX4.js";
|
|
71
71
|
import "./chunk-XWVM4KPK.js";
|
|
72
72
|
import "./chunk-EL5MWGGH.js";
|
|
@@ -139,4 +139,4 @@ export {
|
|
|
139
139
|
writeEgressAllowlist,
|
|
140
140
|
writePersistentClaudeWrapper
|
|
141
141
|
};
|
|
142
|
-
//# sourceMappingURL=persistent-session-
|
|
142
|
+
//# sourceMappingURL=persistent-session-3NQHNU6H.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
paneLogPath
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RDQILPRF.js";
|
|
4
|
+
import "./chunk-BHKFVSIX.js";
|
|
5
5
|
import "./chunk-DHWNVVX4.js";
|
|
6
6
|
import "./chunk-XWVM4KPK.js";
|
|
7
7
|
import "./chunk-EL5MWGGH.js";
|
|
@@ -802,4 +802,4 @@ export {
|
|
|
802
802
|
readAndResetSlackReplyBindingClassifications,
|
|
803
803
|
readAndResetSlackReplyTargetClassifications
|
|
804
804
|
};
|
|
805
|
-
//# sourceMappingURL=responsiveness-probe-
|
|
805
|
+
//# sourceMappingURL=responsiveness-probe-ZOXVXDPT.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionTranscriptDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BHKFVSIX.js";
|
|
4
4
|
import "./chunk-DGUM43GV.js";
|
|
5
5
|
|
|
6
6
|
// src/lib/session-auth-dead.ts
|
|
@@ -204,4 +204,4 @@ export {
|
|
|
204
204
|
decideSessionAuthState,
|
|
205
205
|
probeSessionAuth
|
|
206
206
|
};
|
|
207
|
-
//# sourceMappingURL=session-auth-dead-
|
|
207
|
+
//# sourceMappingURL=session-auth-dead-ZKC2HH6T.js.map
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|