agentel 0.2.6 → 0.2.8

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/src/config.js CHANGED
@@ -45,6 +45,7 @@ function defaultConfig(env = process.env) {
45
45
  },
46
46
  imports: {
47
47
  defaultSinceDays: 30,
48
+ updateSince: "",
48
49
  sources: IMPORT_SOURCE_ORDER,
49
50
  autoDiscoverSources: true
50
51
  },
@@ -246,6 +247,7 @@ function parseConfigValue(value) {
246
247
  function normalizeConfigKeyValue(key, value) {
247
248
  if (key === "imports.sources") return normalizeImportSources(value);
248
249
  if (key === "imports.defaultSinceDays") return normalizeNonNegativeInteger(value, 30);
250
+ if (key === "imports.updateSince") return normalizeImportSinceValue(value);
249
251
  if (key === "sync.intervalMinutes" || key === "index.intervalMinutes" || key === "index.batteryIntervalMinutes") {
250
252
  return normalizeSyncInterval(value);
251
253
  }
@@ -253,6 +255,15 @@ function normalizeConfigKeyValue(key, value) {
253
255
  return value;
254
256
  }
255
257
 
258
+ function normalizeImportSinceValue(value) {
259
+ const text = String(value || "").trim().toLowerCase();
260
+ if (!text) return "";
261
+ if (text === "all") return "all";
262
+ const match = text.match(/^(\d+)([dhm])$/);
263
+ if (!match) return text;
264
+ return `${Math.max(1, Math.round(Number(match[1])))}${match[2]}`;
265
+ }
266
+
256
267
  function normalizeImportSources(value) {
257
268
  const raw = Array.isArray(value)
258
269
  ? value
@@ -607,6 +607,7 @@ function geminiUsage(value) {
607
607
  totalTokens,
608
608
  thoughtsTokens,
609
609
  cacheReadTokens,
610
+ cacheReadTokensIncludedInInput: cacheReadTokens ? true : undefined,
610
611
  toolUsePromptTokens
611
612
  });
612
613
  return Object.keys(normalized).length ? normalized : null;
@@ -880,7 +881,7 @@ function geminiSessionSummaryUsage(summary) {
880
881
  cacheInputTokens += numberValue(model.cacheReadTokens) || 0;
881
882
  }
882
883
  if (!inputTokens && !outputTokens && !cacheInputTokens) return null;
883
- return { inputTokens, outputTokens, cacheInputTokens, totalTokens: inputTokens + outputTokens };
884
+ return { inputTokens, outputTokens, cacheInputTokens, cacheInputTokensIncludedInInput: cacheInputTokens ? true : undefined, totalTokens: inputTokens + outputTokens };
884
885
  }
885
886
 
886
887
  function mergeGeminiSessionSummaries(summaries) {