@integrity-labs/agt-cli 0.28.1178 → 0.28.1179

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 (31) hide show
  1. package/dist/bin/agt.js +6 -6
  2. package/dist/{chunk-MO5JQVBG.js → chunk-2FHYCFZM.js} +2 -2
  3. package/dist/{chunk-3XURNDW5.js → chunk-GJD536LU.js} +6 -4
  4. package/dist/chunk-GJD536LU.js.map +1 -0
  5. package/dist/{chunk-R2NQG77N.js → chunk-KDYZNWZW.js} +2 -2
  6. package/dist/{chunk-DAIXT5DR.js → chunk-O5P2OS36.js} +5 -5
  7. package/dist/{chunk-MHSZBN6M.js → chunk-PINFVWGX.js} +109 -2
  8. package/dist/chunk-PINFVWGX.js.map +1 -0
  9. package/dist/{claude-code-updater-F2O3LAWX.js → claude-code-updater-LL7KVAU3.js} +3 -3
  10. package/dist/{claude-pair-runtime-I6KVCUBG.js → claude-pair-runtime-R5MNSUM7.js} +3 -3
  11. package/dist/lib/manager-worker.js +397 -261
  12. package/dist/lib/manager-worker.js.map +1 -1
  13. package/dist/mcp/direct-chat-channel.js +14 -1
  14. package/dist/mcp/index.js +147 -63
  15. package/dist/mcp/origami.js +14 -1
  16. package/dist/mcp/slack-channel.js +14 -1
  17. package/dist/mcp/telegram-channel.js +14 -1
  18. package/dist/{persistent-session-7HP4KOED.js → persistent-session-34QXCPJK.js} +4 -4
  19. package/dist/{responsiveness-probe-EPG7NOKI.js → responsiveness-probe-ZT6ITMYI.js} +4 -4
  20. package/dist/{session-auth-dead-IG3MKV2W.js → session-auth-dead-KAHV2ES2.js} +3 -3
  21. package/package.json +1 -1
  22. package/dist/chunk-3XURNDW5.js.map +0 -1
  23. package/dist/chunk-MHSZBN6M.js.map +0 -1
  24. /package/dist/{chunk-MO5JQVBG.js.map → chunk-2FHYCFZM.js.map} +0 -0
  25. /package/dist/{chunk-R2NQG77N.js.map → chunk-KDYZNWZW.js.map} +0 -0
  26. /package/dist/{chunk-DAIXT5DR.js.map → chunk-O5P2OS36.js.map} +0 -0
  27. /package/dist/{claude-code-updater-F2O3LAWX.js.map → claude-code-updater-LL7KVAU3.js.map} +0 -0
  28. /package/dist/{claude-pair-runtime-I6KVCUBG.js.map → claude-pair-runtime-R5MNSUM7.js.map} +0 -0
  29. /package/dist/{persistent-session-7HP4KOED.js.map → persistent-session-34QXCPJK.js.map} +0 -0
  30. /package/dist/{responsiveness-probe-EPG7NOKI.js.map → responsiveness-probe-ZT6ITMYI.js.map} +0 -0
  31. /package/dist/{session-auth-dead-IG3MKV2W.js.map → session-auth-dead-KAHV2ES2.js.map} +0 -0
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-XWVM4KPK.js";
5
5
  import {
6
6
  FORCED_UPDATE_HARD_DEADLINE_MS
7
- } from "./chunk-MHSZBN6M.js";
7
+ } from "./chunk-PINFVWGX.js";
8
8
  import {
9
9
  effectiveClaudeJsonPath
10
10
  } from "./chunk-AIUIMEUS.js";
@@ -722,4 +722,4 @@ export {
722
722
  probeClaudeInstalls,
723
723
  maybeUpdateClaudeCode
724
724
  };
725
- //# sourceMappingURL=chunk-R2NQG77N.js.map
725
+ //# sourceMappingURL=chunk-KDYZNWZW.js.map
@@ -16,11 +16,11 @@ import {
16
16
  parseEnvFileEntries,
17
17
  parseEnvIntegrations,
18
18
  shellQuote
19
- } from "./chunk-3XURNDW5.js";
19
+ } from "./chunk-GJD536LU.js";
20
20
  import {
21
21
  readDailySessionPin,
22
22
  sessionTranscriptDir
23
- } from "./chunk-MO5JQVBG.js";
23
+ } from "./chunk-2FHYCFZM.js";
24
24
  import {
25
25
  classifyUnanswerablePane,
26
26
  isConsumerTermsDialogVisible,
@@ -91,7 +91,7 @@ import {
91
91
  scanConfigForLiteralSecrets,
92
92
  worseConnectivityOutcome,
93
93
  wrapScheduledTaskPrompt
94
- } from "./chunk-MHSZBN6M.js";
94
+ } from "./chunk-PINFVWGX.js";
95
95
  import {
96
96
  claudeJsonPathFor,
97
97
  effectiveClaudeJsonPath,
@@ -8079,7 +8079,7 @@ function exchangeFailureKind(err) {
8079
8079
  }
8080
8080
 
8081
8081
  // src/lib/api-client.ts
8082
- var agtCliVersion = true ? "0.28.1178" : "dev";
8082
+ var agtCliVersion = true ? "0.28.1179" : "dev";
8083
8083
  var lastConfigHash = null;
8084
8084
  function setConfigHash(hash) {
8085
8085
  lastConfigHash = hash && hash.length > 0 ? hash : null;
@@ -13614,4 +13614,4 @@ export {
13614
13614
  managerInstallSystemUnitCommand,
13615
13615
  managerUninstallSystemUnitCommand
13616
13616
  };
13617
- //# sourceMappingURL=chunk-DAIXT5DR.js.map
13617
+ //# sourceMappingURL=chunk-O5P2OS36.js.map
@@ -7844,7 +7844,11 @@ var FLAG_REGISTRY = [
7844
7844
  defaultValue: false
7845
7845
  },
7846
7846
  {
7847
- key: "ninja-lists",
7847
+ // Was 'ninja-lists' (ENG-11740). Migration 20261101000004 copied that row
7848
+ // and its overrides to this key; the old row stays until ENG-11742, so an
7849
+ // API binary still reading the old key during the deploy keeps its value.
7850
+ // flag-archive-allow: ninja-lists renamed to ninja-apps; the old row is copied, then archived in step 4 of the Apps rename
7851
+ key: "ninja-apps",
7848
7852
  description: 'Apps, formerly Ninja Lists (ADR-0120): small tables agents and people fill and review together. Gates the "Apps" nav item, the /apps pages AND the /ninja-lists API, per org. Unlike its siblings `projects-menu` / `ninjafy-notes-menu`, this is the whole feature\'s gate, not only its menu entry: the surface is unlaunched, so an org with the flag off gets 404 from the API rather than a hidden link to a working one.',
7849
7853
  flagType: "boolean",
7850
7854
  // PUBLIC (ADR-0022 §2): the nav shells read it via usePublicBooleanFlag and
@@ -16368,6 +16372,106 @@ function analyzeFailingTurnRun(jsonl, opts = {}) {
16368
16372
  };
16369
16373
  }
16370
16374
 
16375
+ // ../../packages/core/dist/claude-code-usage/session-activity.js
16376
+ var NO_TRANSCRIPT_ACTIVITY = Object.freeze({
16377
+ lastToolName: null,
16378
+ lastToolAtMs: null,
16379
+ lastCompletedTurnAtMs: null,
16380
+ newestTurnOpen: false
16381
+ });
16382
+ function parseMs(value) {
16383
+ if (typeof value !== "string" || !value)
16384
+ return null;
16385
+ const ms = Date.parse(value);
16386
+ return Number.isFinite(ms) ? ms : null;
16387
+ }
16388
+ function blockTypes(content) {
16389
+ if (!Array.isArray(content))
16390
+ return [];
16391
+ return content.filter((b) => typeof b === "object" && b !== null);
16392
+ }
16393
+ var LOCAL_COMMAND_ECHO = /^\s*<(command-name|command-message|local-command-stdout|local-command-stderr|local-command-caveat)>/;
16394
+ var COMPLETED_STOP_REASONS = /* @__PURE__ */ new Set(["end_turn", "stop_sequence"]);
16395
+ function userRecordOpensTurn(record, content) {
16396
+ if (record.isCompactSummary === true)
16397
+ return false;
16398
+ if (typeof content === "string")
16399
+ return !LOCAL_COMMAND_ECHO.test(content);
16400
+ const blocks = blockTypes(content);
16401
+ if (blocks.some((b) => b.type === "tool_result"))
16402
+ return true;
16403
+ return blocks.some((b) => b.type === "text" && typeof b.text === "string" && !LOCAL_COMMAND_ECHO.test(b.text));
16404
+ }
16405
+ function summarizeTranscriptActivity(jsonl) {
16406
+ let lastToolName = null;
16407
+ let lastToolAtMs = null;
16408
+ let lastCompletedTurnAtMs = null;
16409
+ let newestTurnOpen = false;
16410
+ let trailingEndAtMs = null;
16411
+ for (const line of jsonl.split("\n")) {
16412
+ if (!line.trim())
16413
+ continue;
16414
+ let record;
16415
+ try {
16416
+ record = JSON.parse(line);
16417
+ } catch {
16418
+ continue;
16419
+ }
16420
+ if (record.isSidechain === true || record.isMeta === true)
16421
+ continue;
16422
+ const message = record.message;
16423
+ if (typeof message !== "object" || message === null)
16424
+ continue;
16425
+ const blocks = blockTypes(message.content);
16426
+ if (record.type === "user") {
16427
+ if (!userRecordOpensTurn(record, message.content))
16428
+ continue;
16429
+ if (blocks.some((b) => b.type === "tool_result")) {
16430
+ newestTurnOpen = false;
16431
+ continue;
16432
+ }
16433
+ if (trailingEndAtMs !== null)
16434
+ lastCompletedTurnAtMs = trailingEndAtMs;
16435
+ trailingEndAtMs = null;
16436
+ newestTurnOpen = true;
16437
+ } else if (record.type === "assistant") {
16438
+ if (record.isApiErrorMessage === true) {
16439
+ newestTurnOpen = true;
16440
+ trailingEndAtMs = null;
16441
+ continue;
16442
+ }
16443
+ const atMs = parseMs(record.timestamp);
16444
+ const tools = blocks.filter((b) => b.type === "tool_use");
16445
+ const lastTool = tools[tools.length - 1];
16446
+ if (lastTool && typeof lastTool.name === "string") {
16447
+ lastToolName = lastTool.name;
16448
+ lastToolAtMs = atMs;
16449
+ newestTurnOpen = true;
16450
+ trailingEndAtMs = null;
16451
+ } else if (typeof message.stop_reason === "string") {
16452
+ newestTurnOpen = message.stop_reason === "tool_use";
16453
+ trailingEndAtMs = COMPLETED_STOP_REASONS.has(message.stop_reason) ? atMs : null;
16454
+ } else if (blocks.length > 0) {
16455
+ newestTurnOpen = false;
16456
+ if (blocks.some((b) => b.type === "text"))
16457
+ trailingEndAtMs = atMs;
16458
+ }
16459
+ }
16460
+ }
16461
+ if (trailingEndAtMs !== null)
16462
+ lastCompletedTurnAtMs = trailingEndAtMs;
16463
+ return { lastToolName, lastToolAtMs, lastCompletedTurnAtMs, newestTurnOpen };
16464
+ }
16465
+ var OPEN_TURN_QUIET_MS = 12e4;
16466
+ function resolveSessionActivityState(args) {
16467
+ const { pane, transcript, transcriptMtimeMs, nowMs } = args;
16468
+ if (pane.state !== "idle_at_prompt" || !transcript.newestTurnOpen || transcriptMtimeMs === null) {
16469
+ return pane.state;
16470
+ }
16471
+ return nowMs - transcriptMtimeMs < OPEN_TURN_QUIET_MS ? "mid_turn" : "turn_killed";
16472
+ }
16473
+ var AGENT_STATUS_STALE_MS = 10 * 60 * 1e3;
16474
+
16371
16475
  // ../../packages/core/dist/account-enforcement/marker.js
16372
16476
  var ACCOUNT_ENFORCEMENT_MARKER_FILENAME = "account-enforcement.json";
16373
16477
  var ACCOUNT_ENFORCEMENT_MARKER_VERSION = 1;
@@ -17382,6 +17486,9 @@ export {
17382
17486
  FAILING_TURN_DEFAULT_MAX_TURN_MS,
17383
17487
  NO_FAILING_TURN_RUN,
17384
17488
  analyzeFailingTurnRun,
17489
+ NO_TRANSCRIPT_ACTIVITY,
17490
+ summarizeTranscriptActivity,
17491
+ resolveSessionActivityState,
17385
17492
  ACCOUNT_ENFORCEMENT_MARKER_FILENAME,
17386
17493
  serializeAccountEnforcementMarker,
17387
17494
  KANBAN_CHECK_COMMAND,
@@ -17415,4 +17522,4 @@ export {
17415
17522
  isForcedUpdatePastDeadline,
17416
17523
  shouldMintReplacementKey
17417
17524
  };
17418
- //# sourceMappingURL=chunk-MHSZBN6M.js.map
17525
+ //# sourceMappingURL=chunk-PINFVWGX.js.map