@integrity-labs/agt-cli 0.24.0 → 0.24.2

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 CHANGED
@@ -26,7 +26,7 @@ import {
26
26
  success,
27
27
  table,
28
28
  warn
29
- } from "../chunk-WZTRMJM4.js";
29
+ } from "../chunk-BXLWLI2U.js";
30
30
  import {
31
31
  CHANNEL_REGISTRY,
32
32
  DEPLOYMENT_TEMPLATES,
@@ -52,7 +52,7 @@ import {
52
52
  renderTemplate,
53
53
  resolveChannels,
54
54
  serializeManifestForSlackCli
55
- } from "../chunk-HSIESZMZ.js";
55
+ } from "../chunk-ECDTRQLA.js";
56
56
 
57
57
  // src/bin/agt.ts
58
58
  import { join as join10 } from "path";
@@ -3736,7 +3736,7 @@ import { execFileSync, execSync } from "child_process";
3736
3736
  import { existsSync as existsSync5, realpathSync } from "fs";
3737
3737
  import chalk17 from "chalk";
3738
3738
  import ora15 from "ora";
3739
- var cliVersion = true ? "0.24.0" : "dev";
3739
+ var cliVersion = true ? "0.24.2" : "dev";
3740
3740
  async function fetchLatestVersion() {
3741
3741
  const host2 = getHost();
3742
3742
  if (!host2) return null;
@@ -4268,7 +4268,7 @@ function handleError(err) {
4268
4268
  }
4269
4269
 
4270
4270
  // src/bin/agt.ts
4271
- var cliVersion2 = true ? "0.24.0" : "dev";
4271
+ var cliVersion2 = true ? "0.24.2" : "dev";
4272
4272
  var program = new Command();
4273
4273
  program.name("agt").description("Augmented CLI \u2014 agent provisioning and management").version(cliVersion2).option("--json", "Emit machine-readable JSON output (suppress spinners and colors)").option("--skip-update-check", "Skip the automatic update check on startup");
4274
4274
  program.hook("preAction", (thisCommand) => {
@@ -8,7 +8,7 @@ import {
8
8
  parseDeliveryTarget,
9
9
  registerFramework,
10
10
  wrapScheduledTaskPrompt
11
- } from "./chunk-HSIESZMZ.js";
11
+ } from "./chunk-ECDTRQLA.js";
12
12
 
13
13
  // ../../packages/core/dist/integrations/registry.js
14
14
  var INTEGRATION_REGISTRY = [
@@ -6717,4 +6717,4 @@ export {
6717
6717
  managerInstallSystemUnitCommand,
6718
6718
  managerUninstallSystemUnitCommand
6719
6719
  };
6720
- //# sourceMappingURL=chunk-WZTRMJM4.js.map
6720
+ //# sourceMappingURL=chunk-BXLWLI2U.js.map
@@ -1888,6 +1888,13 @@ function validateToolsFrontmatter(data) {
1888
1888
  };
1889
1889
  }
1890
1890
 
1891
+ // ../../packages/core/dist/alerts/snooze.js
1892
+ var FIXED_SECONDS = {
1893
+ "15m": 15 * 60,
1894
+ "1h": 60 * 60,
1895
+ "4h": 4 * 60 * 60
1896
+ };
1897
+
1891
1898
  // ../../packages/core/dist/generation/charter-generator.js
1892
1899
  import { stringify as stringifyYaml } from "yaml";
1893
1900
  function generateCharterMd(input) {
@@ -3168,6 +3175,85 @@ function parseResetDateTime(humanDate, now) {
3168
3175
  return candidate;
3169
3176
  }
3170
3177
 
3178
+ // ../../packages/core/dist/claude-code-usage/transcript-parser.js
3179
+ function nonNegInt(value) {
3180
+ if (typeof value !== "number" || !Number.isFinite(value))
3181
+ return 0;
3182
+ const floored = Math.floor(value);
3183
+ return floored > 0 ? floored : 0;
3184
+ }
3185
+ function emptyTotals() {
3186
+ return { inputTokens: 0, outputTokens: 0, cacheCreationTokens: 0, cacheReadTokens: 0 };
3187
+ }
3188
+ function parseTranscriptUsage(jsonl) {
3189
+ const byId = /* @__PURE__ */ new Map();
3190
+ let sessionStartedAt = null;
3191
+ let lastObservedAt = null;
3192
+ let syntheticCounter = 0;
3193
+ const lines = jsonl.split("\n");
3194
+ for (const line of lines) {
3195
+ const trimmed = line.trim();
3196
+ if (!trimmed)
3197
+ continue;
3198
+ let obj;
3199
+ try {
3200
+ obj = JSON.parse(trimmed);
3201
+ } catch {
3202
+ continue;
3203
+ }
3204
+ if (typeof obj !== "object" || obj === null)
3205
+ continue;
3206
+ const record = obj;
3207
+ if (record.type !== "assistant")
3208
+ continue;
3209
+ const message = record.message;
3210
+ if (typeof message !== "object" || message === null)
3211
+ continue;
3212
+ const msg = message;
3213
+ const usage = msg.usage;
3214
+ if (typeof usage !== "object" || usage === null)
3215
+ continue;
3216
+ const u = usage;
3217
+ const model = typeof msg.model === "string" && msg.model ? msg.model : "unknown";
3218
+ const entry = {
3219
+ model,
3220
+ totals: {
3221
+ inputTokens: nonNegInt(u.input_tokens),
3222
+ outputTokens: nonNegInt(u.output_tokens),
3223
+ cacheCreationTokens: nonNegInt(u.cache_creation_input_tokens),
3224
+ cacheReadTokens: nonNegInt(u.cache_read_input_tokens)
3225
+ }
3226
+ };
3227
+ const id = typeof msg.id === "string" && msg.id ? msg.id : `__noid_${syntheticCounter++}`;
3228
+ byId.set(id, entry);
3229
+ const ts = record.timestamp;
3230
+ if (typeof ts === "string" && ts) {
3231
+ if (sessionStartedAt === null || ts < sessionStartedAt)
3232
+ sessionStartedAt = ts;
3233
+ if (lastObservedAt === null || ts > lastObservedAt)
3234
+ lastObservedAt = ts;
3235
+ }
3236
+ }
3237
+ const byModel = /* @__PURE__ */ new Map();
3238
+ for (const { model, totals } of byId.values()) {
3239
+ const acc = byModel.get(model) ?? emptyTotals();
3240
+ acc.inputTokens += totals.inputTokens;
3241
+ acc.outputTokens += totals.outputTokens;
3242
+ acc.cacheCreationTokens += totals.cacheCreationTokens;
3243
+ acc.cacheReadTokens += totals.cacheReadTokens;
3244
+ byModel.set(model, acc);
3245
+ }
3246
+ return {
3247
+ byModel,
3248
+ sessionStartedAt,
3249
+ lastObservedAt,
3250
+ messageCount: byId.size
3251
+ };
3252
+ }
3253
+ function isEmptyTotals(totals) {
3254
+ return totals.inputTokens === 0 && totals.outputTokens === 0 && totals.cacheCreationTokens === 0 && totals.cacheReadTokens === 0;
3255
+ }
3256
+
3171
3257
  export {
3172
3258
  wrapScheduledTaskPrompt,
3173
3259
  parseDeliveryTarget,
@@ -3206,7 +3292,9 @@ export {
3206
3292
  detectDrift,
3207
3293
  classifyOutput,
3208
3294
  parseUsageBanner,
3295
+ parseTranscriptUsage,
3296
+ isEmptyTotals,
3209
3297
  KANBAN_LOOP_COMMAND,
3210
3298
  KANBAN_CHECK_COMMAND
3211
3299
  };
3212
- //# sourceMappingURL=chunk-HSIESZMZ.js.map
3300
+ //# sourceMappingURL=chunk-ECDTRQLA.js.map