@integrity-labs/agt-cli 0.28.694 → 0.28.696

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.
Files changed (24) hide show
  1. package/dist/bin/agt.js +5 -5
  2. package/dist/{chunk-YLADZNC5.js → chunk-QCYRC5FK.js} +2 -2
  3. package/dist/{chunk-7F4RC4PU.js → chunk-WB6ERJPU.js} +4 -4
  4. package/dist/{chunk-NYWCE5JH.js → chunk-Y7AHOXHP.js} +255 -80
  5. package/dist/chunk-Y7AHOXHP.js.map +1 -0
  6. package/dist/{claude-pair-runtime-WRVD63Q7.js → claude-pair-runtime-I7MIDQSW.js} +2 -2
  7. package/dist/lib/manager-worker.js +271 -144
  8. package/dist/lib/manager-worker.js.map +1 -1
  9. package/dist/mcp/direct-chat-channel.js +114 -79
  10. package/dist/mcp/index.js +49 -4
  11. package/dist/mcp/origami.js +49 -4
  12. package/dist/mcp/slack-channel.js +114 -79
  13. package/dist/mcp/telegram-channel.js +114 -79
  14. package/dist/{persistent-session-WC27KXJE.js → persistent-session-5ZWDVVIH.js} +3 -3
  15. package/dist/{responsiveness-probe-V5M5OXNB.js → responsiveness-probe-KDQFIROB.js} +3 -3
  16. package/dist/{session-auth-dead-TVTRCTJR.js → session-auth-dead-7S7IQGNX.js} +2 -2
  17. package/package.json +1 -1
  18. package/dist/chunk-NYWCE5JH.js.map +0 -1
  19. /package/dist/{chunk-YLADZNC5.js.map → chunk-QCYRC5FK.js.map} +0 -0
  20. /package/dist/{chunk-7F4RC4PU.js.map → chunk-WB6ERJPU.js.map} +0 -0
  21. /package/dist/{claude-pair-runtime-WRVD63Q7.js.map → claude-pair-runtime-I7MIDQSW.js.map} +0 -0
  22. /package/dist/{persistent-session-WC27KXJE.js.map → persistent-session-5ZWDVVIH.js.map} +0 -0
  23. /package/dist/{responsiveness-probe-V5M5OXNB.js.map → responsiveness-probe-KDQFIROB.js.map} +0 -0
  24. /package/dist/{session-auth-dead-TVTRCTJR.js.map → session-auth-dead-7S7IQGNX.js.map} +0 -0
@@ -34750,6 +34750,111 @@ var CONDITIONAL_DELIVERY_BODY = [
34750
34750
  // ../core/dist/liveness/agent-liveness.js
34751
34751
  var FRESH_HEARTBEAT_THRESHOLD_MS = 2 * 60 * 1e3;
34752
34752
 
34753
+ // ../core/dist/claude-code-usage/reset-time.js
34754
+ var MONTHS = [
34755
+ "jan",
34756
+ "feb",
34757
+ "mar",
34758
+ "apr",
34759
+ "may",
34760
+ "jun",
34761
+ "jul",
34762
+ "aug",
34763
+ "sep",
34764
+ "oct",
34765
+ "nov",
34766
+ "dec"
34767
+ ];
34768
+ var FULL_MONTHS = [
34769
+ "january",
34770
+ "february",
34771
+ "march",
34772
+ "april",
34773
+ "may",
34774
+ "june",
34775
+ "july",
34776
+ "august",
34777
+ "september",
34778
+ "october",
34779
+ "november",
34780
+ "december"
34781
+ ];
34782
+ var MONTH_TOKENS = new Map([
34783
+ ...MONTHS.map((m, i) => [m, i]),
34784
+ ...FULL_MONTHS.map((m, i) => [m, i]),
34785
+ // "Sept" is the one four-letter abbreviation in common use and is inside the
34786
+ // {3,9} the grammar accepts, so it is reachable and must resolve.
34787
+ ["sept", 8]
34788
+ ]);
34789
+ var TIME_OF_DAY_SOURCE = /\d{1,2}(?::\d{2})?\s*(?:am|pm)(?:\s*\(?UTC\)?)?/.source;
34790
+ var RESET_DATE_SOURCE = `(?:[A-Za-z]{3,9}\\s+\\d{1,2}(?:\\s*,\\s*${TIME_OF_DAY_SOURCE})?|${TIME_OF_DAY_SOURCE})`;
34791
+ var TIME_TAIL = /,\s*(\d{1,2})(?::(\d{2}))?\s*(am|pm)(?:\s*\(?UTC\)?)?\s*$/i;
34792
+ var TIME_ONLY = /^(\d{1,2})(?::(\d{2}))?\s*(am|pm)(?:\s*\(?UTC\)?)?$/i;
34793
+ var MS_PER_DAY = 24 * 60 * 60 * 1e3;
34794
+ function parseAmPm(hourStr, minStr, ampm) {
34795
+ const rawHour = Number.parseInt(hourStr, 10);
34796
+ if (!Number.isFinite(rawHour) || rawHour < 1 || rawHour > 12)
34797
+ return null;
34798
+ let minute = 0;
34799
+ if (minStr) {
34800
+ minute = Number.parseInt(minStr, 10);
34801
+ if (!Number.isFinite(minute) || minute < 0 || minute > 59)
34802
+ return null;
34803
+ }
34804
+ const isPm = ampm.toLowerCase() === "pm";
34805
+ return { hour: rawHour % 12 + (isPm ? 12 : 0), minute };
34806
+ }
34807
+ function parseResetDateTime(humanDate, now) {
34808
+ const trimmed = humanDate.trim();
34809
+ const timeOnly = trimmed.match(TIME_ONLY);
34810
+ if (timeOnly) {
34811
+ const hm = parseAmPm(timeOnly[1], timeOnly[2], timeOnly[3]);
34812
+ if (!hm)
34813
+ return null;
34814
+ const todayAt = Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), hm.hour, hm.minute);
34815
+ return {
34816
+ at: new Date(todayAt <= now.getTime() ? todayAt + MS_PER_DAY : todayAt),
34817
+ precision: "hour_only"
34818
+ };
34819
+ }
34820
+ const timeMatch = trimmed.match(TIME_TAIL);
34821
+ const dateOnly = timeMatch ? trimmed.slice(0, timeMatch.index).trim() : trimmed;
34822
+ const parts = dateOnly.split(/\s+/);
34823
+ if (parts.length !== 2)
34824
+ return null;
34825
+ const lookedUpMonth = MONTH_TOKENS.get(parts[0].toLowerCase());
34826
+ if (lookedUpMonth === void 0)
34827
+ return null;
34828
+ const month = lookedUpMonth;
34829
+ const day = Number.parseInt(parts[1], 10);
34830
+ if (!Number.isFinite(day) || day < 1 || day > 31)
34831
+ return null;
34832
+ let hour = 0;
34833
+ let minute = 0;
34834
+ if (timeMatch) {
34835
+ const hm = parseAmPm(timeMatch[1], timeMatch[2], timeMatch[3]);
34836
+ if (!hm)
34837
+ return null;
34838
+ hour = hm.hour;
34839
+ minute = hm.minute;
34840
+ }
34841
+ const baseYear = now.getUTCFullYear();
34842
+ let resolved = null;
34843
+ let bestDelta = Number.POSITIVE_INFINITY;
34844
+ for (const y of [baseYear - 1, baseYear, baseYear + 1]) {
34845
+ const candidate = new Date(Date.UTC(y, month, day, hour, minute));
34846
+ if (candidate.getUTCFullYear() !== y || candidate.getUTCMonth() !== month || candidate.getUTCDate() !== day) {
34847
+ continue;
34848
+ }
34849
+ const delta = Math.abs(candidate.getTime() - now.getTime());
34850
+ if (delta < bestDelta) {
34851
+ bestDelta = delta;
34852
+ resolved = candidate;
34853
+ }
34854
+ }
34855
+ return resolved ? { at: resolved, precision: "dated" } : null;
34856
+ }
34857
+
34753
34858
  // ../core/dist/claude-code-usage/banner-parser.js
34754
34859
  var SESSION_QUALIFIER = /^(?:session|\d{1,2}\s*-?\s*hours?|\d{1,2}h)$/i;
34755
34860
  function classifyLimitScope(qualifier) {
@@ -34764,8 +34869,7 @@ function classifyLimitScope(qualifier) {
34764
34869
  }
34765
34870
  var SEP = /[\s·\-–—]+/.source;
34766
34871
  var SUBJECT = /(?:You(?:['’]ve|\s+have)?\s+)?/.source;
34767
- var TIME_OF_DAY = /\d{1,2}(?::\d{2})?\s*(?:am|pm)(?:\s*\(?UTC\)?)?/.source;
34768
- var RESET_DATE = `(?:[A-Za-z]{3,9}\\s+\\d{1,2}(?:\\s*,\\s*${TIME_OF_DAY})?|${TIME_OF_DAY})`;
34872
+ var RESET_DATE = RESET_DATE_SOURCE;
34769
34873
  var BANNER_PATTERNS = [
34770
34874
  // Percentage form — pct in group 1, reset in group 2.
34771
34875
  new RegExp(`${SUBJECT}used\\s+(\\d{1,3})%\\s+of\\s+your\\s+weekly\\s+limit${SEP}resets\\s+(${RESET_DATE})`, "i"),
@@ -34840,82 +34944,6 @@ function parseUsageBanner(text, now = /* @__PURE__ */ new Date()) {
34840
34944
  }
34841
34945
  return best;
34842
34946
  }
34843
- var MONTHS = [
34844
- "jan",
34845
- "feb",
34846
- "mar",
34847
- "apr",
34848
- "may",
34849
- "jun",
34850
- "jul",
34851
- "aug",
34852
- "sep",
34853
- "oct",
34854
- "nov",
34855
- "dec"
34856
- ];
34857
- var TIME_TAIL = /,\s*(\d{1,2})(?::(\d{2}))?\s*(am|pm)(?:\s*\(?UTC\)?)?\s*$/i;
34858
- var TIME_ONLY = /^(\d{1,2})(?::(\d{2}))?\s*(am|pm)(?:\s*\(?UTC\)?)?$/i;
34859
- var MS_PER_DAY = 24 * 60 * 60 * 1e3;
34860
- function parseAmPm(hourStr, minStr, ampm) {
34861
- const rawHour = Number.parseInt(hourStr, 10);
34862
- if (!Number.isFinite(rawHour) || rawHour < 1 || rawHour > 12)
34863
- return null;
34864
- let minute = 0;
34865
- if (minStr) {
34866
- minute = Number.parseInt(minStr, 10);
34867
- if (!Number.isFinite(minute) || minute < 0 || minute > 59)
34868
- return null;
34869
- }
34870
- const isPm = ampm.toLowerCase() === "pm";
34871
- return { hour: rawHour % 12 + (isPm ? 12 : 0), minute };
34872
- }
34873
- function parseResetDateTime(humanDate, now) {
34874
- const trimmed = humanDate.trim();
34875
- const timeOnly = trimmed.match(TIME_ONLY);
34876
- if (timeOnly) {
34877
- const hm = parseAmPm(timeOnly[1], timeOnly[2], timeOnly[3]);
34878
- if (!hm)
34879
- return null;
34880
- const todayAt = Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), hm.hour, hm.minute);
34881
- return {
34882
- at: new Date(todayAt <= now.getTime() ? todayAt + MS_PER_DAY : todayAt),
34883
- precision: "hour_only"
34884
- };
34885
- }
34886
- const timeMatch = trimmed.match(TIME_TAIL);
34887
- const dateOnly = timeMatch ? trimmed.slice(0, timeMatch.index).trim() : trimmed;
34888
- const parts = dateOnly.split(/\s+/);
34889
- if (parts.length !== 2)
34890
- return null;
34891
- const month = MONTHS.indexOf(parts[0].slice(0, 3).toLowerCase());
34892
- if (month < 0)
34893
- return null;
34894
- const day = Number.parseInt(parts[1], 10);
34895
- if (!Number.isFinite(day) || day < 1 || day > 31)
34896
- return null;
34897
- let hour = 0;
34898
- let minute = 0;
34899
- if (timeMatch) {
34900
- const hm = parseAmPm(timeMatch[1], timeMatch[2], timeMatch[3]);
34901
- if (!hm)
34902
- return null;
34903
- hour = hm.hour;
34904
- minute = hm.minute;
34905
- }
34906
- const baseYear = now.getUTCFullYear();
34907
- let resolved = null;
34908
- let bestDelta = Number.POSITIVE_INFINITY;
34909
- for (const y of [baseYear - 1, baseYear, baseYear + 1]) {
34910
- const candidate = new Date(Date.UTC(y, month, day, hour, minute));
34911
- const delta = Math.abs(candidate.getTime() - now.getTime());
34912
- if (delta < bestDelta) {
34913
- bestDelta = delta;
34914
- resolved = candidate;
34915
- }
34916
- }
34917
- return resolved ? { at: resolved, precision: "dated" } : null;
34918
- }
34919
34947
 
34920
34948
  // ../core/dist/claude-code-usage/run-marker.js
34921
34949
  var RUN_MARKER_RE = /<!--\s*agt-run:([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})\s*-->/;
@@ -34934,6 +34962,13 @@ function buildUsageLimitReplyText(limitedUntil) {
34934
34962
  return `Your agent has hit its Claude Code usage limit until ${formatUtcClock(limitedUntil)}. It'll pick back up once the limit resets \u2014 please try again after then.`;
34935
34963
  }
34936
34964
 
34965
+ // ../core/dist/claude-code-usage/usage-report-parser.js
34966
+ var SEP2 = /[\s·\-–—]+/.source;
34967
+ var WINDOW_LINE = new RegExp(`^\\s*Current\\s+(session|week)(?:\\s*\\(([^)]*)\\))?\\s*:\\s*(\\d{1,3})%\\s+used(?:${SEP2}resets\\s+(${RESET_DATE_SOURCE}))?\\s*$`, "gim");
34968
+
34969
+ // ../core/dist/claude-code-usage/host-usage-reading.js
34970
+ var RESET_JITTER_TOLERANCE_MS = 5 * 60 * 1e3;
34971
+
34937
34972
  // ../core/dist/claude-code-usage/rate-limit-classifier.js
34938
34973
  var UNKNOWN_RATE_LIMIT = Object.freeze({
34939
34974
  verdict: "unknown",
@@ -36290,7 +36325,7 @@ var FLAG_REGISTRY = [
36290
36325
  },
36291
36326
  {
36292
36327
  key: "tool-call-audit",
36293
- description: "Host-side tool-call audit extraction (ENG-8575, slice 3 of ENG-8427): the manager scans agent transcripts for tool calls, redacts each to identity-without-content, and POSTs them to /host/tool-calls. Boolean gate; ships dark \u2014 when off the manager reads no transcripts and sends nothing, so 0 agent_tool_calls rows fleet-wide is the expected steady state until it is armed. NOT the commercial gate: /host/tool-calls independently re-checks the advanced_governance entitlement and refuses regardless of this flag, because the host is customer-owned infrastructure. This flag is rollout control only.",
36328
+ description: "Host-side tool-call audit extraction (ENG-8575, slice 3 of ENG-8427): the manager scans agent transcripts for tool calls, redacts each to identity-without-content, and POSTs them to /host/tool-calls. Boolean gate; when off the manager reads no transcripts and sends nothing. ARMED STAGE-WIDE SINCE 2026-08-17 \u2014 the compiled default below is what a host resolves when nothing else says otherwise, NOT a description of the fleet. This text once asserted the opposite and outlived its truth by nine days, which is what got ENG-9472 filed to arm an already-armed flag. Query the table, do not infer it from this line. NOT the commercial gate: /host/tool-calls independently re-checks the advanced_governance entitlement and refuses regardless of this flag, because the host is customer-owned infrastructure. This flag is rollout control only.",
36294
36329
  flagType: "boolean",
36295
36330
  // Declared safe value is `false` (no extraction). Fail-safe direction: a
36296
36331
  // flag-DB read error must never start shipping tool-call metadata across the
@@ -43,8 +43,8 @@ import {
43
43
  writeDirectChatSessionState,
44
44
  writeEgressAllowlist,
45
45
  writePersistentClaudeWrapper
46
- } from "./chunk-YLADZNC5.js";
47
- import "./chunk-NYWCE5JH.js";
46
+ } from "./chunk-QCYRC5FK.js";
47
+ import "./chunk-Y7AHOXHP.js";
48
48
  import "./chunk-XWVM4KPK.js";
49
49
  export {
50
50
  EGRESS_BASELINE_DOMAINS,
@@ -92,4 +92,4 @@ export {
92
92
  writeEgressAllowlist,
93
93
  writePersistentClaudeWrapper
94
94
  };
95
- //# sourceMappingURL=persistent-session-WC27KXJE.js.map
95
+ //# sourceMappingURL=persistent-session-5ZWDVVIH.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  paneLogPath
3
- } from "./chunk-YLADZNC5.js";
4
- import "./chunk-NYWCE5JH.js";
3
+ } from "./chunk-QCYRC5FK.js";
4
+ import "./chunk-Y7AHOXHP.js";
5
5
  import "./chunk-XWVM4KPK.js";
6
6
 
7
7
  // src/lib/responsiveness-probe.ts
@@ -745,4 +745,4 @@ export {
745
745
  readAndResetSlackReplyBindingClassifications,
746
746
  readAndResetSlackReplyTargetClassifications
747
747
  };
748
- //# sourceMappingURL=responsiveness-probe-V5M5OXNB.js.map
748
+ //# sourceMappingURL=responsiveness-probe-KDQFIROB.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sessionTranscriptDir
3
- } from "./chunk-NYWCE5JH.js";
3
+ } from "./chunk-Y7AHOXHP.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-TVTRCTJR.js.map
206
+ //# sourceMappingURL=session-auth-dead-7S7IQGNX.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integrity-labs/agt-cli",
3
- "version": "0.28.694",
3
+ "version": "0.28.696",
4
4
  "description": "Augmented Team CLI — agent provisioning and management",
5
5
  "type": "module",
6
6
  "engines": {