@codemieai/code 0.7.1 → 0.9.0

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 (161) hide show
  1. package/dist/agents/core/AgentCLI.d.ts +4 -1
  2. package/dist/agents/core/AgentCLI.d.ts.map +1 -1
  3. package/dist/agents/core/AgentCLI.js +106 -5
  4. package/dist/agents/core/AgentCLI.js.map +1 -1
  5. package/dist/agents/core/session/session-origin-audit.d.ts +4 -0
  6. package/dist/agents/core/session/session-origin-audit.d.ts.map +1 -0
  7. package/dist/agents/core/session/session-origin-audit.js +57 -0
  8. package/dist/agents/core/session/session-origin-audit.js.map +1 -0
  9. package/dist/agents/core/session/session-ownership.d.ts +2 -0
  10. package/dist/agents/core/session/session-ownership.d.ts.map +1 -0
  11. package/dist/agents/core/session/session-ownership.js +27 -0
  12. package/dist/agents/core/session/session-ownership.js.map +1 -0
  13. package/dist/agents/core/types.d.ts +26 -0
  14. package/dist/agents/core/types.d.ts.map +1 -1
  15. package/dist/agents/plugins/claude/claude.plugin.d.ts +2 -1
  16. package/dist/agents/plugins/claude/claude.plugin.d.ts.map +1 -1
  17. package/dist/agents/plugins/claude/claude.plugin.js +16 -3
  18. package/dist/agents/plugins/claude/claude.plugin.js.map +1 -1
  19. package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.d.ts.map +1 -1
  20. package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js +2 -0
  21. package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js.map +1 -1
  22. package/dist/agents/plugins/codex/codex.plugin.d.ts +8 -0
  23. package/dist/agents/plugins/codex/codex.plugin.d.ts.map +1 -1
  24. package/dist/agents/plugins/codex/codex.plugin.js +14 -0
  25. package/dist/agents/plugins/codex/codex.plugin.js.map +1 -1
  26. package/dist/agents/plugins/codex/session/processors/codex.conversations-processor.d.ts.map +1 -1
  27. package/dist/agents/plugins/codex/session/processors/codex.conversations-processor.js +2 -0
  28. package/dist/agents/plugins/codex/session/processors/codex.conversations-processor.js.map +1 -1
  29. package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.d.ts.map +1 -1
  30. package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.js +2 -0
  31. package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.js.map +1 -1
  32. package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.d.ts.map +1 -1
  33. package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.js +2 -0
  34. package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.js.map +1 -1
  35. package/dist/cli/commands/analytics/aggregator.js +1 -1
  36. package/dist/cli/commands/analytics/aggregator.js.map +1 -1
  37. package/dist/cli/commands/analytics/cost/cost-enricher.d.ts.map +1 -1
  38. package/dist/cli/commands/analytics/cost/cost-enricher.js +45 -9
  39. package/dist/cli/commands/analytics/cost/cost-enricher.js.map +1 -1
  40. package/dist/cli/commands/analytics/cost/pricing.d.ts +1 -0
  41. package/dist/cli/commands/analytics/cost/pricing.d.ts.map +1 -1
  42. package/dist/cli/commands/analytics/cost/pricing.js +66 -0
  43. package/dist/cli/commands/analytics/cost/pricing.js.map +1 -1
  44. package/dist/cli/commands/analytics/cost/pricing.json +8 -1
  45. package/dist/cli/commands/analytics/cost/usage-readers.d.ts +2 -0
  46. package/dist/cli/commands/analytics/cost/usage-readers.d.ts.map +1 -1
  47. package/dist/cli/commands/analytics/cost/usage-readers.js +36 -2
  48. package/dist/cli/commands/analytics/cost/usage-readers.js.map +1 -1
  49. package/dist/cli/commands/analytics/data-loader.d.ts +2 -3
  50. package/dist/cli/commands/analytics/data-loader.d.ts.map +1 -1
  51. package/dist/cli/commands/analytics/formatter.d.ts.map +1 -1
  52. package/dist/cli/commands/analytics/formatter.js +4 -1
  53. package/dist/cli/commands/analytics/formatter.js.map +1 -1
  54. package/dist/cli/commands/analytics/index.d.ts.map +1 -1
  55. package/dist/cli/commands/analytics/index.js +137 -134
  56. package/dist/cli/commands/analytics/index.js.map +1 -1
  57. package/dist/cli/commands/analytics/native-loader.d.ts +2 -0
  58. package/dist/cli/commands/analytics/native-loader.d.ts.map +1 -1
  59. package/dist/cli/commands/analytics/native-loader.js +85 -3
  60. package/dist/cli/commands/analytics/native-loader.js.map +1 -1
  61. package/dist/cli/commands/analytics/otel-loader.d.ts +97 -0
  62. package/dist/cli/commands/analytics/otel-loader.d.ts.map +1 -0
  63. package/dist/cli/commands/analytics/otel-loader.js +504 -0
  64. package/dist/cli/commands/analytics/otel-loader.js.map +1 -0
  65. package/dist/cli/commands/analytics/report/client/app.js +56 -25
  66. package/dist/cli/commands/analytics/report/payload-builder.d.ts.map +1 -1
  67. package/dist/cli/commands/analytics/report/payload-builder.js +8 -3
  68. package/dist/cli/commands/analytics/report/payload-builder.js.map +1 -1
  69. package/dist/cli/commands/analytics/report/session-source-detector.d.ts +29 -0
  70. package/dist/cli/commands/analytics/report/session-source-detector.d.ts.map +1 -0
  71. package/dist/cli/commands/analytics/report/session-source-detector.js +64 -0
  72. package/dist/cli/commands/analytics/report/session-source-detector.js.map +1 -0
  73. package/dist/cli/commands/analytics/report/template.html +6 -2
  74. package/dist/cli/commands/analytics/report/types.d.ts +2 -0
  75. package/dist/cli/commands/analytics/report/types.d.ts.map +1 -1
  76. package/dist/cli/commands/analytics/sources/otel-source.d.ts +12 -0
  77. package/dist/cli/commands/analytics/sources/otel-source.d.ts.map +1 -0
  78. package/dist/cli/commands/analytics/sources/otel-source.js +44 -0
  79. package/dist/cli/commands/analytics/sources/otel-source.js.map +1 -0
  80. package/dist/cli/commands/analytics/sources/sessions-source.d.ts +10 -0
  81. package/dist/cli/commands/analytics/sources/sessions-source.d.ts.map +1 -0
  82. package/dist/cli/commands/analytics/sources/sessions-source.js +27 -0
  83. package/dist/cli/commands/analytics/sources/sessions-source.js.map +1 -0
  84. package/dist/cli/commands/analytics/sources/types.d.ts +38 -0
  85. package/dist/cli/commands/analytics/sources/types.d.ts.map +1 -0
  86. package/dist/cli/commands/analytics/sources/types.js +2 -0
  87. package/dist/cli/commands/analytics/sources/types.js.map +1 -0
  88. package/dist/cli/commands/analytics/types.d.ts +7 -0
  89. package/dist/cli/commands/analytics/types.d.ts.map +1 -1
  90. package/dist/cli/commands/assistants/chat/index.d.ts.map +1 -1
  91. package/dist/cli/commands/assistants/chat/index.js +8 -0
  92. package/dist/cli/commands/assistants/chat/index.js.map +1 -1
  93. package/dist/cli/commands/assistants/chat/types.d.ts +1 -0
  94. package/dist/cli/commands/assistants/chat/types.d.ts.map +1 -1
  95. package/dist/cli/commands/assistants/setup/index.js +2 -2
  96. package/dist/cli/commands/assistants/setup/index.js.map +1 -1
  97. package/dist/cli/commands/doctor/checks/JWTAuthCheck.d.ts.map +1 -1
  98. package/dist/cli/commands/doctor/checks/JWTAuthCheck.js +4 -2
  99. package/dist/cli/commands/doctor/checks/JWTAuthCheck.js.map +1 -1
  100. package/dist/cli/commands/hook.d.ts.map +1 -1
  101. package/dist/cli/commands/hook.js +51 -0
  102. package/dist/cli/commands/hook.js.map +1 -1
  103. package/dist/cli/commands/models.js +1 -1
  104. package/dist/cli/commands/models.js.map +1 -1
  105. package/dist/cli/commands/skills/add.d.ts.map +1 -1
  106. package/dist/cli/commands/skills/add.js +4 -0
  107. package/dist/cli/commands/skills/add.js.map +1 -1
  108. package/dist/env/types.d.ts +2 -0
  109. package/dist/env/types.d.ts.map +1 -1
  110. package/dist/env/types.js.map +1 -1
  111. package/dist/providers/core/default-agent-hooks.d.ts +10 -0
  112. package/dist/providers/core/default-agent-hooks.d.ts.map +1 -0
  113. package/dist/providers/core/default-agent-hooks.js +54 -0
  114. package/dist/providers/core/default-agent-hooks.js.map +1 -0
  115. package/dist/providers/core/types.d.ts +20 -0
  116. package/dist/providers/core/types.d.ts.map +1 -1
  117. package/dist/providers/core/types.js +20 -0
  118. package/dist/providers/core/types.js.map +1 -1
  119. package/dist/providers/plugins/jwt/index.d.ts +2 -0
  120. package/dist/providers/plugins/jwt/index.d.ts.map +1 -1
  121. package/dist/providers/plugins/jwt/index.js +6 -3
  122. package/dist/providers/plugins/jwt/index.js.map +1 -1
  123. package/dist/providers/plugins/jwt/jwt.models.d.ts +12 -0
  124. package/dist/providers/plugins/jwt/jwt.models.d.ts.map +1 -0
  125. package/dist/providers/plugins/jwt/jwt.models.js +28 -0
  126. package/dist/providers/plugins/jwt/jwt.models.js.map +1 -0
  127. package/dist/providers/plugins/jwt/jwt.setup-steps.d.ts +1 -1
  128. package/dist/providers/plugins/jwt/jwt.setup-steps.d.ts.map +1 -1
  129. package/dist/providers/plugins/jwt/jwt.setup-steps.js +10 -9
  130. package/dist/providers/plugins/jwt/jwt.setup-steps.js.map +1 -1
  131. package/dist/providers/plugins/jwt/jwt.template.d.ts +1 -1
  132. package/dist/providers/plugins/jwt/jwt.template.d.ts.map +1 -1
  133. package/dist/providers/plugins/jwt/jwt.template.js +9 -6
  134. package/dist/providers/plugins/jwt/jwt.template.js.map +1 -1
  135. package/dist/providers/plugins/jwt/jwt.utils.d.ts +16 -0
  136. package/dist/providers/plugins/jwt/jwt.utils.d.ts.map +1 -0
  137. package/dist/providers/plugins/jwt/jwt.utils.js +21 -0
  138. package/dist/providers/plugins/jwt/jwt.utils.js.map +1 -0
  139. package/dist/providers/plugins/sso/proxy/sso.proxy.d.ts.map +1 -1
  140. package/dist/providers/plugins/sso/proxy/sso.proxy.js +3 -2
  141. package/dist/providers/plugins/sso/proxy/sso.proxy.js.map +1 -1
  142. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.d.ts.map +1 -1
  143. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js +4 -0
  144. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js.map +1 -1
  145. package/dist/providers/plugins/sso/sso.template.d.ts.map +1 -1
  146. package/dist/providers/plugins/sso/sso.template.js +6 -82
  147. package/dist/providers/plugins/sso/sso.template.js.map +1 -1
  148. package/dist/utils/auth.d.ts +1 -1
  149. package/dist/utils/auth.d.ts.map +1 -1
  150. package/dist/utils/auth.js +18 -1
  151. package/dist/utils/auth.js.map +1 -1
  152. package/dist/utils/config.d.ts +14 -0
  153. package/dist/utils/config.d.ts.map +1 -1
  154. package/dist/utils/config.js +48 -7
  155. package/dist/utils/config.js.map +1 -1
  156. package/dist/utils/errors.d.ts +3 -0
  157. package/dist/utils/errors.d.ts.map +1 -1
  158. package/dist/utils/errors.js +12 -3
  159. package/dist/utils/errors.js.map +1 -1
  160. package/package.json +13 -9
  161. package/scripts/validate-secrets.js +82 -20
@@ -802,18 +802,22 @@
802
802
  var list = fs.slice().sort(function (a, b) { return b.startTime - a.startTime; });
803
803
  if (q) {
804
804
  var ql = q.toLowerCase();
805
- list = list.filter(function (s) { return (s.sessionId + ' ' + s.agentName + ' ' + s.project + ' ' + s.branch).toLowerCase().indexOf(ql) >= 0; });
805
+ list = list.filter(function (s) { return (s.sessionId + ' ' + s.agentName + ' ' + s.project + ' ' + s.branch + ' ' + (s.title || '') + ' ' + (s.sessionSource || '')).toLowerCase().indexOf(ql) >= 0; });
806
806
  }
807
807
  var shown = list.slice(0, 300);
808
808
  holder.innerHTML = tableHTML(
809
- ['Date', 'Agent', 'Project', 'Branch', 'Turns', 'Net lines', 'Input', 'Output', 'Cached', 'Cost'],
809
+ ['Date', 'Prompt', 'Agent', 'Project', 'Branch', 'Source', 'Turns', 'Net lines', 'Input', 'Output', 'Cached', 'Cost'],
810
810
  shown.map(function (s) {
811
+ var branchCell = s.branch ? '<span title="' + esc(s.branch) + '" style="max-width:90px;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle">' + esc(s.branch) + '</span>' : '—';
812
+ var promptCell = '<span title="' + esc(s.title || '') + '" style="max-width:280px;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;color:var(--color-text-muted);font-size:12px">' + esc(truncStr(s.title || '—', 80)) + '</span>';
813
+ var sourceCell = '<span class="tag tag-sm">' + esc(s.sessionSource || 'Pure chat') + '</span>';
811
814
  return [new Date(s.startTime).toISOString().slice(0, 16).replace('T', ' '),
815
+ promptCell,
812
816
  '<span class="tag tag-sm" style="text-transform:capitalize">' + esc(s.agentName) + '</span>',
813
- '<span title="' + esc(s.project) + '">' + esc(shortPath(s.project)) + '</span>', esc(s.branch || '—'),
817
+ '<span title="' + esc(s.project) + '">' + esc(shortPath(s.project)) + '</span>', branchCell, sourceCell,
814
818
  fmtNum(s.turns), fmtNum(s.netLines), fmtTokens(tkIn(s)), fmtTokens(tkOut(s)), fmtTokens(tkCached(s)), fmtUSD(s.costUSD)];
815
819
  }),
816
- [false, false, false, false, true, true, true, true, true, true],
820
+ [false, false, false, false, false, false, true, true, true, true, true, true],
817
821
  shown.map(function (s) { return 'class="clickable" data-session="' + esc(s.sessionId) + '"'; }));
818
822
  if (list.length > 300) holder.appendChild(el('p', 'text-muted', '<span style="font-size:12px">Showing first 300 of ' + list.length + '.</span>'));
819
823
  }
@@ -900,7 +904,7 @@
900
904
  return Math.floor(ms / 3600000) + 'h ' + Math.round((ms % 3600000) / 60000) + 'm';
901
905
  }
902
906
  // Side panel content for a selected timeline step.
903
- function tlDetailEl(d) {
907
+ function tlDetailEl(d, sessionStart) {
904
908
  var panel = el('div', '');
905
909
  if (!d) {
906
910
  panel.appendChild(el('div', 'tl-side-empty', 'Click a timeline step to see details.'));
@@ -914,10 +918,12 @@
914
918
  panel.appendChild(nameEl);
915
919
  var hasCost = d.costUSD != null;
916
920
  var hasTok = d.tokens != null;
921
+ var startOffset = sessionStart != null && d.start != null ? Math.max(0, d.start - sessionStart) : null;
917
922
  panel.appendChild(statsEl([
918
923
  ['Cost', hasCost ? fmtUSD(d.costUSD) : '—', ''],
919
924
  ['Tokens', hasTok ? fmtTokens(d.tokens.total) : '—', ''],
920
925
  ['Duration', fmtTimelineDuration(d.durationMs), ''],
926
+ ['Started', startOffset != null ? fmtTimelineDuration(startOffset) : '—', 'into session'],
921
927
  ]));
922
928
  if (hasTok) {
923
929
  var tok = d.tokens;
@@ -958,36 +964,45 @@
958
964
  }
959
965
  return panel;
960
966
  }
961
- // Gantt of agent/skill/command dispatches: session span on top, each step bar positioned
962
- // by wall-clock start time relative to the activity window (proportional scaling).
963
- // min-width 28px (CSS) plus a floor on % width keeps short steps visible and clickable.
967
+ // Gantt of top-level dispatches: session span on top, then every agent/skill/command
968
+ // dispatch positioned by wall-clock start time across the activity window, so each bar
969
+ // sits where it actually ran. Short skills and 0ms commands fall back to the CSS
970
+ // min-width (28px) so they stay visible as markers without distorting the time scale.
964
971
  function timelineEl(s) {
965
- var dispatches = (s.dispatches || []).filter(function (d) {
966
- return d.kind === 'agent' || d.kind === 'skill' || d.kind === 'command';
967
- }).sort(function (a, b) { return a.start - b.start; });
968
- // Scale bars to the agent activity window, not the full session duration.
969
- // Agent bars fill the track proportionally relative to each other; absolute
970
- // start offset (vs. session start) is shown in the side panel detail view.
971
- var actStart = dispatches.length ? dispatches.reduce(function (m, d) { return Math.min(m, d.start); }, Infinity) : s.startTime;
972
- var actEnd = dispatches.length ? dispatches.reduce(function (m, d) { return Math.max(m, d.start + (d.durationMs || 0)); }, -Infinity) : s.startTime + s.durationMs;
973
- var ganttSpan = Math.max(1, actEnd - actStart);
972
+ var dispatches = (s.dispatches || []).slice().sort(function (a, b) { return a.start - b.start; });
973
+ // Window = union of the tracked session span and the dispatch activity span. Resumed or
974
+ // compacted sessions can carry transcript dispatches that fall OUTSIDE the tracked
975
+ // start→end window; scaling to the session window alone would clamp them all to left:0%
976
+ // (single-column pile-up). The union positions every bar correctly and collapses back to
977
+ // exactly the session window for the normal case (dispatches fully inside it).
978
+ var winStart = s.startTime;
979
+ var winEnd = s.startTime + (s.durationMs || 0);
980
+ dispatches.forEach(function (d) {
981
+ if (d.start < winStart) winStart = d.start;
982
+ var end = d.start + (d.durationMs || 0);
983
+ if (end > winEnd) winEnd = end;
984
+ });
985
+ var ganttSpan = Math.max(1, winEnd - winStart);
974
986
 
975
987
  var container = el('div', 'tl-container');
976
988
  var gantt = el('div', 'tl-gantt timeline');
977
989
  var sidePane = el('div', 'tl-side');
978
990
 
979
- var selected = dispatches[0] || null;
980
- sidePane.appendChild(tlDetailEl(selected));
991
+ var selected = dispatches.filter(function (d) { return d.kind === 'agent'; })[0] || dispatches[0] || null;
992
+ sidePane.appendChild(tlDetailEl(selected, winStart));
981
993
 
982
994
  function selectDispatch(d, barEl) {
983
995
  gantt.querySelectorAll('.tl-bar[data-dispatch]').forEach(function(b) {
984
996
  b.style.outline = b === barEl ? '2px solid rgba(255,255,255,0.55)' : 'none';
985
997
  });
986
998
  sidePane.innerHTML = '';
987
- sidePane.appendChild(tlDetailEl(d));
999
+ sidePane.appendChild(tlDetailEl(d, winStart));
988
1000
  }
989
1001
 
990
- gantt.appendChild(tlRow('session', '#259F4C', 0, 100, fmtTimelineDuration(s.durationMs), fmtUSD(s.costUSD), true));
1002
+ // Session bar spans the full window (the activity envelope). Its label shows the envelope
1003
+ // span — equal to the tracked duration in the normal case, but revealing the true span when
1004
+ // the tracked duration under-counts (e.g. dispatches predating a post-compaction window).
1005
+ gantt.appendChild(tlRow('session', '#259F4C', 0, 100, fmtTimelineDuration(ganttSpan), fmtUSD(s.costUSD), true));
991
1006
 
992
1007
  var occ = {};
993
1008
  dispatches.forEach(function (d) {
@@ -995,8 +1010,8 @@
995
1010
  var total = dispatches.filter(function (x) { return x.kind === d.kind && x.name === d.name; }).length;
996
1011
  occ[key] = (occ[key] || 0) + 1;
997
1012
  var label = d.kind + ' · ' + d.name + (total > 1 ? ' #' + occ[key] : '');
998
- var leftPct = Math.max(0, (d.start - actStart) / ganttSpan * 100);
999
- var wPct = Math.max(0.8, (d.durationMs || 0) / ganttSpan * 100);
1013
+ var leftPct = Math.max(0, (d.start - winStart) / ganttSpan * 100);
1014
+ var wPct = (d.durationMs || 0) / ganttSpan * 100;
1000
1015
  if (leftPct + wPct > 100) wPct = Math.max(0, 100 - leftPct);
1001
1016
  var barText = d.costUSD != null && wPct >= 8 ? fmtUSD(d.costUSD) : '';
1002
1017
  var color = PALETTE[hashStr(key) % PALETTE.length];
@@ -1036,8 +1051,24 @@
1036
1051
  var metaBits = [s.agentName, (s.models && s.models[0]) || null, shortPath(s.project), s.branch].filter(Boolean);
1037
1052
  htxt.appendChild(el('div', 'modal-meta', metaBits.map(function (b) { return esc(b); }).join(' · ')));
1038
1053
  head.appendChild(htxt);
1054
+ var headBtns = el('div'); headBtns.style.cssText = 'display:flex;gap:6px;align-items:center;flex-shrink:0;';
1055
+ var exportBtn = el('button', 'modal-export', '↓ JSON');
1056
+ exportBtn.setAttribute('aria-label', 'Export session as JSON');
1057
+ exportBtn.setAttribute('title', 'Export session details as JSON');
1058
+ exportBtn.addEventListener('click', function () {
1059
+ var json = JSON.stringify(s, null, 2);
1060
+ var blob = new Blob([json], { type: 'application/json' });
1061
+ var url = URL.createObjectURL(blob);
1062
+ var a = document.createElement('a');
1063
+ var date = new Date(s.startTime).toISOString().slice(0, 10);
1064
+ a.href = url; a.download = 'session-' + date + '-' + String(s.sessionId).slice(0, 8) + '.json';
1065
+ document.body.appendChild(a); a.click(); document.body.removeChild(a);
1066
+ URL.revokeObjectURL(url);
1067
+ });
1068
+ headBtns.appendChild(exportBtn);
1039
1069
  var close = el('button', 'modal-close', '✕'); close.setAttribute('aria-label', 'Close'); close.addEventListener('click', closeSessionModal);
1040
- head.appendChild(close);
1070
+ headBtns.appendChild(close);
1071
+ head.appendChild(headBtns);
1041
1072
  modal.appendChild(head);
1042
1073
 
1043
1074
  var body = el('div', 'modal-body');
@@ -1102,7 +1133,7 @@
1102
1133
  // Timeline — Gantt of all top-level agent, skill, and command dispatches.
1103
1134
  var hasDispatches = (s.dispatches || []).length > 0;
1104
1135
  var hasCostData = (s.dispatches || []).some(function (d) { return d.costUSD != null; });
1105
- var tlSubtitle = hasDispatches ? (hasCostData ? 'click a step for cost, token & timing details · long idle gaps compressed' : 'click a step for timing details · long idle gaps compressed') : '';
1136
+ var tlSubtitle = hasDispatches ? (hasCostData ? 'click a step for cost, token & timing details · positioned across the session' : 'click a step for timing details · positioned across the session') : '';
1106
1137
  var tlCard = card('Timeline', tlSubtitle);
1107
1138
  if (hasDispatches) {
1108
1139
  tlCard._body.appendChild(timelineEl(s));
@@ -1 +1 @@
1
- {"version":3,"file":"payload-builder.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/report/payload-builder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAiB,MAAM,kBAAkB,CAAC;AAErF,OAAO,KAAK,EAAE,aAAa,EAAmC,MAAM,YAAY,CAAC;AAEjF,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,cAAc,GAClB,aAAa,CAoHf"}
1
+ {"version":3,"file":"payload-builder.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/report/payload-builder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAiB,MAAM,kBAAkB,CAAC;AAErF,OAAO,KAAK,EAAE,aAAa,EAAmC,MAAM,YAAY,CAAC;AAGjF,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,cAAc,GAClB,aAAa,CAwHf"}
@@ -4,6 +4,7 @@
4
4
  * `generatedAt` so this stays deterministic and unit-testable.
5
5
  */
6
6
  import { emptyUsage } from '../cost/cost-calculator.js';
7
+ import { detectSessionSource } from './session-source-detector.js';
7
8
  export function buildPayload(root, costIndex, summary, ctx) {
8
9
  const sessions = [];
9
10
  const agents = new Set();
@@ -23,6 +24,9 @@ export function buildPayload(root, costIndex, summary, ctx) {
23
24
  seen.add(s.sessionId);
24
25
  const cost = costIndex.get(s.sessionId);
25
26
  agents.add(s.agentName);
27
+ const skillInvocations = s.skillInvocations ?? [];
28
+ const agentInvocations = s.agentInvocations ?? [];
29
+ const commandInvocations = s.commandInvocations ?? [];
26
30
  const cov = coverageMap.get(s.agentName) ?? { agentName: s.agentName, total: 0, priced: 0, withLog: 0 };
27
31
  cov.total += 1;
28
32
  if (cost?.hadLog) {
@@ -64,9 +68,10 @@ export function buildPayload(root, costIndex, summary, ctx) {
64
68
  perModelCost: cost?.perModel ?? [],
65
69
  ...(cost?.costSeries && cost.costSeries.length ? { costSeries: cost.costSeries } : {}),
66
70
  ...(cost?.dispatches && cost.dispatches.length ? { dispatches: cost.dispatches } : {}),
67
- skillInvocations: s.skillInvocations ?? [],
68
- agentInvocations: s.agentInvocations ?? [],
69
- commandInvocations: s.commandInvocations ?? [],
71
+ skillInvocations,
72
+ agentInvocations,
73
+ commandInvocations,
74
+ sessionSource: detectSessionSource({ skillInvocations, agentInvocations, commandInvocations }),
70
75
  });
71
76
  }
72
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"payload-builder.js","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/report/payload-builder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AASxD,MAAM,UAAU,YAAY,CAC1B,IAAmB,EACnB,SAA2B,EAC3B,OAAoB,EACpB,GAAmB;IAEnB,MAAM,QAAQ,GAA0B,EAAE,CAAC;IAC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AC,CAAC,QAAQ,CAAC;QACvB,cAAc,IAAI,CAAC,CAAC,cAAc,CAAC;QACnC,gBAAgB,IAAI,CAAC,CAAC,gBAAgB,CAAC;QACvC,YAAY,IAAI,CAAC,CAAC,OAAO,CAAC;QAC1B,gBAAgB,IAAI,CAAC,CAAC,gBAAgB,CAAC;QACvC,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;YACvC,cAAc,IAAI,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAe;QACvB,WAAW,EAAE,GAAG,CAAC,WAAW;QAC5B,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC;QACnB,aAAa,EAAE,GAAG,CAAC,aAAa;QAChC,MAAM,EAAE;YACN,QAAQ,EAAE,QAAQ,CAAC,MAAM;YACzB,UAAU;YACV,KAAK;YACL,KAAK;YACL,QAAQ;YACR,cAAc;YACd,eAAe,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,gBAAgB,GAAG,cAAc,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;YACjG,YAAY;YACZ,gBAAgB;YAChB,cAAc;SACf;QACD,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,QAAQ,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;KACtE,CAAC;IAEF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC5B,CAAC"}
1
+ {"version":3,"file":"payload-builder.js","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/report/payload-builder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,UAAU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ACtC,QAAQ,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;KACtE,CAAC;IAEF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Session-source classification: labels each session by the SDLC tooling/framework
3
+ * signal found in its skill/agent/command invocation names. Ordered, first-match-wins
4
+ * strategy list — new bundles register by adding an entry here, not by editing a
5
+ * branching if/else chain. Detection is name-based only (skill/agent/command names
6
+ * already captured by the report pipeline); it does not inspect the filesystem.
7
+ */
8
+ import type { NamedInvocationStats } from '../types.js';
9
+ export interface SessionInvocationNames {
10
+ skillInvocations: NamedInvocationStats[];
11
+ agentInvocations: NamedInvocationStats[];
12
+ commandInvocations: NamedInvocationStats[];
13
+ }
14
+ export interface SessionSourceDetector {
15
+ /** Stable id, e.g. 'sdlc-factory'. */
16
+ name: string;
17
+ /** Display label shown in the report's Source column when this detector matches. */
18
+ label: string;
19
+ /** True if any invocation name (already lowercased) signals this bundle. */
20
+ matches(names: string[]): boolean;
21
+ }
22
+ export declare const PURE_CHAT_LABEL = "Pure chat";
23
+ export declare const SESSION_SOURCE_DETECTORS: SessionSourceDetector[];
24
+ /**
25
+ * Classify a session's tooling/framework source. Detectors are tried in order;
26
+ * the first match wins. Falls back to {@link PURE_CHAT_LABEL} when none match.
27
+ */
28
+ export declare function detectSessionSource(session: SessionInvocationNames, detectors?: SessionSourceDetector[]): string;
29
+ //# sourceMappingURL=session-source-detector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-source-detector.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/report/session-source-detector.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,EAAE,oBAAoB,EAAE,CAAC;IACzC,gBAAgB,EAAE,oBAAoB,EAAE,CAAC;IACzC,kBAAkB,EAAE,oBAAoB,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,qBAAqB;IACpC,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;CACnC;AAED,eAAO,MAAM,eAAe,cAAc,CAAC;AAwB3C,eAAO,MAAM,wBAAwB,EAAE,qBAAqB,EA0B3D,CAAC;AAEF;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,sBAAsB,EAC/B,SAAS,GAAE,qBAAqB,EAA6B,GAC5D,MAAM,CAQR"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Session-source classification: labels each session by the SDLC tooling/framework
3
+ * signal found in its skill/agent/command invocation names. Ordered, first-match-wins
4
+ * strategy list — new bundles register by adding an entry here, not by editing a
5
+ * branching if/else chain. Detection is name-based only (skill/agent/command names
6
+ * already captured by the report pipeline); it does not inspect the filesystem.
7
+ */
8
+ export const PURE_CHAT_LABEL = 'Pure chat';
9
+ function collectNames(session) {
10
+ return [...session.skillInvocations, ...session.agentInvocations, ...session.commandInvocations].map((n) => n.name.toLowerCase());
11
+ }
12
+ function hasPrefix(names, prefix) {
13
+ return names.some((n) => n.startsWith(prefix));
14
+ }
15
+ function hasExact(names, candidates) {
16
+ return names.some((n) => candidates.includes(n));
17
+ }
18
+ function hasSubstring(names, substrings) {
19
+ return names.some((n) => substrings.some((s) => n.includes(s)));
20
+ }
21
+ // Unnamespaced slash commands from the external sdlc-factory skill bundle — distinct
22
+ // from the namespaced `sdlc-factory:` prefix seen on skill/agent invocations.
23
+ const SDLC_FACTORY_COMMANDS = ['sdlc-light', 'sdlc-task', 'sdlc-autonomous'];
24
+ export const SESSION_SOURCE_DETECTORS = [
25
+ {
26
+ name: 'sdlc-factory',
27
+ label: 'CodeMie AI Factory',
28
+ matches: (names) => hasPrefix(names, 'sdlc-factory:') || hasExact(names, SDLC_FACTORY_COMMANDS),
29
+ },
30
+ {
31
+ name: 'superpowers',
32
+ label: 'Superpowers',
33
+ matches: (names) => hasPrefix(names, 'superpowers:'),
34
+ },
35
+ {
36
+ name: 'openspec',
37
+ label: 'OpenSpec',
38
+ matches: (names) => hasSubstring(names, ['openspec', 'open-spec']),
39
+ },
40
+ {
41
+ name: 'speckit',
42
+ label: 'SpecKit',
43
+ matches: (names) => hasSubstring(names, ['speckit', 'spec-kit']),
44
+ },
45
+ {
46
+ name: 'bmad',
47
+ label: 'BMAD',
48
+ matches: (names) => hasSubstring(names, ['bmad']),
49
+ },
50
+ ];
51
+ /**
52
+ * Classify a session's tooling/framework source. Detectors are tried in order;
53
+ * the first match wins. Falls back to {@link PURE_CHAT_LABEL} when none match.
54
+ */
55
+ export function detectSessionSource(session, detectors = SESSION_SOURCE_DETECTORS) {
56
+ const names = collectNames(session);
57
+ for (const detector of detectors) {
58
+ if (detector.matches(names)) {
59
+ return detector.label;
60
+ }
61
+ }
62
+ return PURE_CHAT_LABEL;
63
+ }
64
+ //# sourceMappingURL=session-source-detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-source-detector.js","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/report/session-source-detector.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmBH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;AAE3C,SAAS,YAAY,CAAC,OAA+B;IACnD,OAAO,CAAC,GAAG,OAAO,CAAC,gBAAgB,EAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACzG,CAAC,CAAC,IAAI,CAAC,WAAW,EA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CAAC;KACnE;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;KACjE;IACD;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC;KAClD;CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAA+B,EAC/B,YAAqC,wBAAwB;IAE7D,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACpC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,IAAI,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,QAAQ,CAAC,KAAK,CAAC;QACxB,CAAC;IACH,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC"}
@@ -136,13 +136,15 @@
136
136
  .proj-sessions .table td:first-child { white-space: normal; word-break: break-word; }
137
137
 
138
138
  /* session-detail modal */
139
- .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.62); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: var(--z-modal, 50); padding: 24px; }
139
+ .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.72); display: flex; align-items: center; justify-content: center; z-index: var(--z-modal, 50); padding: 24px; }
140
140
  .modal { background: var(--color-bg-card); border: 1px solid var(--color-border-structural); border-radius: var(--radius-xl, 12px); box-shadow: var(--shadow-lg); width: 100%; max-width: 880px; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
141
141
  .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--color-border-structural); }
142
142
  .modal-title { font-size: 15px; font-weight: 700; color: var(--color-text-primary); margin: 0 0 3px; }
143
143
  .modal-meta { font-size: 12px; color: var(--color-text-muted); text-transform: capitalize; }
144
144
  .modal-close { background: transparent; border: 1px solid var(--color-border-structural); color: var(--color-text-muted); border-radius: 8px; height: 30px; width: 30px; cursor: pointer; font-size: 12px; flex-shrink: 0; }
145
145
  .modal-close:hover { color: var(--color-text-primary); background: var(--color-bg-tertiary); }
146
+ .modal-export { background: transparent; border: 1px solid var(--color-border-structural); color: var(--color-text-muted); border-radius: 8px; height: 30px; padding: 0 10px; cursor: pointer; font-size: 12px; flex-shrink: 0; white-space: nowrap; font-family: inherit; }
147
+ .modal-export:hover { color: var(--color-primary, #7C5CFC); background: var(--color-bg-tertiary); border-color: var(--color-primary, #7C5CFC); }
146
148
  .modal-body { padding: 18px 20px; overflow-y: auto; }
147
149
  .modal-body .card { margin-bottom: 14px; }
148
150
  /* light, borderless stat grid (replaces the heavy box-in-box KPIs) */
@@ -180,13 +182,15 @@
180
182
  .tl-tok-seg { border-radius: 2px; }
181
183
 
182
184
  /* session-detail modal */
183
- .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.62); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: var(--z-modal, 50); padding: 24px; }
185
+ .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.72); display: flex; align-items: center; justify-content: center; z-index: var(--z-modal, 50); padding: 24px; }
184
186
  .modal { background: var(--color-bg-card); border: 1px solid var(--color-border-structural); border-radius: var(--radius-xl, 12px); box-shadow: var(--shadow-lg); width: 100%; max-width: 880px; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
185
187
  .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--color-border-structural); }
186
188
  .modal-title { font-size: 15px; font-weight: 700; color: var(--color-text-primary); margin: 0 0 3px; }
187
189
  .modal-meta { font-size: 12px; color: var(--color-text-muted); text-transform: capitalize; }
188
190
  .modal-close { background: transparent; border: 1px solid var(--color-border-structural); color: var(--color-text-muted); border-radius: 8px; height: 30px; width: 30px; cursor: pointer; font-size: 12px; flex-shrink: 0; }
189
191
  .modal-close:hover { color: var(--color-text-primary); background: var(--color-bg-tertiary); }
192
+ .modal-export { background: transparent; border: 1px solid var(--color-border-structural); color: var(--color-text-muted); border-radius: 8px; height: 30px; padding: 0 10px; cursor: pointer; font-size: 12px; flex-shrink: 0; white-space: nowrap; font-family: inherit; }
193
+ .modal-export:hover { color: var(--color-primary, #7C5CFC); background: var(--color-bg-tertiary); border-color: var(--color-primary, #7C5CFC); }
190
194
  .modal-body { padding: 18px 20px; overflow-y: auto; }
191
195
  .modal-body .card { margin-bottom: 14px; }
192
196
  /* light, borderless stat grid (replaces the heavy box-in-box KPIs) */
@@ -32,6 +32,8 @@ export interface ReportSessionRecord {
32
32
  skillInvocations: NamedInvocationStats[];
33
33
  agentInvocations: NamedInvocationStats[];
34
34
  commandInvocations: NamedInvocationStats[];
35
+ /** Tooling/framework classified from the invocation names above — see session-source-detector.ts. */
36
+ sessionSource: string;
35
37
  tokens: TokenUsage;
36
38
  costUSD: number;
37
39
  cacheReadCostUSD: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/report/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC7G,OAAO,KAAK,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnE,iFAAiF;AACjF,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAA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M,CAAC;QACvB,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB,EAAE,MAAM,CAAC;QACzB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/report/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC7G,OAAO,KAAK,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnE,iFAAiF;AACjF,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE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} from './types.js';
2
+ /**
3
+ * OTEL source: a flattened otel-events.jsonl file. Cost is authoritative (native
4
+ * `cost_usd`), so it is returned up-front and bypasses the cost-enricher.
5
+ */
6
+ export declare class OtelSource implements AnalyticsSource {
7
+ private readonly file;
8
+ private readonly user?;
9
+ constructor(file: string, user?: string | undefined);
10
+ load(opts: SourceLoadOptions): Promise<SourceResult>;
11
+ }
12
+ //# sourceMappingURL=otel-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"otel-source.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/sources/otel-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEnF;;;GAGG;AACH,qBAAa,UAAW,YAAW,eAAe;IACpC,OAAO,CAAC,QAAQ,CAAC,IAAI;IAAU,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAApC,IAAI,EAAE,MAAM,EAAmB,IAAI,CAAC,EAAE,MAAM,YAAA;IAEnE,IAAI,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC;CAiC3D"}
@@ -0,0 +1,44 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { AnalyticsSourceError } from '../../../../utils/errors.js';
3
+ import { MetricsDataLoader } from '../data-loader.js';
4
+ /**
5
+ * OTEL source: a flattened otel-events.jsonl file. Cost is authoritative (native
6
+ * `cost_usd`), so it is returned up-front and bypasses the cost-enricher.
7
+ */
8
+ export class OtelSource {
9
+ file;
10
+ user;
11
+ constructor(file, user) {
12
+ this.file = file;
13
+ this.user = user;
14
+ }
15
+ async load(opts) {
16
+ if (!existsSync(this.file)) {
17
+ throw new AnalyticsSourceError(`OTEL file not found: ${this.file}`);
18
+ }
19
+ const { loadOtelSessions } = await import('../otel-loader.js');
20
+ const res = loadOtelSessions({
21
+ file: this.file,
22
+ filter: { user: this.user, since: opts.filter.fromDate, until: opts.filter.toDate },
23
+ });
24
+ // Honor the structural CLI filters OTEL can evaluate from session metadata. `--user` and the
25
+ // time window are already applied inside loadOtelSessions (on api_request user/ts); apply the
26
+ // rest here so they are not silently ignored — and so a report is never mislabeled (e.g.
27
+ // `--project foo` must not produce a "project: foo" report that still contains every project).
28
+ // The structural filter is date-free: re-applying the window would conflict with the
29
+ // api_request-time filter already done. `--session` is matched explicitly because
30
+ // sessionMatchesFilter does not cover session id. The cost index is left intact — entries for
31
+ // dropped sessions are inert (downstream only reads cost for sessions present in rawSessions,
32
+ // and keepSessionIds cannot resurrect a session the aggregator never sees).
33
+ const structural = {
34
+ ...(opts.filter.agentName && { agentName: opts.filter.agentName }),
35
+ ...(opts.filter.projectPattern && { projectPattern: opts.filter.projectPattern }),
36
+ ...(opts.filter.branch && { branch: opts.filter.branch }),
37
+ };
38
+ const loader = new MetricsDataLoader();
39
+ const rawSessions = res.rawSessions.filter((s) => (!opts.filter.sessionId || s.sessionId === opts.filter.sessionId) &&
40
+ loader.sessionMatchesFilter(s, structural));
41
+ return { rawSessions, cost: { index: res.costIndex, summary: res.summary } };
42
+ }
43
+ }
44
+ //# sourceMappingURL=otel-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"otel-source.js","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/sources/otel-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAItD;;;GAGG;AACH,MAAM,OAAO,UAAU;IACQ;IAA+B;IAA5D,YAA6B,IAAY,EAAmB,IAAa;QAA5C,SAAI,GAAJ,IAAI,CAAQ;QAAmB,SAAI,GAAJ,IAAI,CAAS;IAAG,CAAC;IAE7E,KAAK,CAAC,IAAI,CAAC,IAAuB;QAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAA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AAC,CAAC,EAAE,UAAU,CAAC,CAC7C,CAAC;QAEF,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,EAAE,CAAC;IAC/E,CAAC;CACF"}
@@ -0,0 +1,10 @@
1
+ import type { AnalyticsSource, SourceLoadOptions, SourceResult } from './types.js';
2
+ /**
3
+ * Local-session source: ~/.codemie tracked sessions merged with discovered native agent
4
+ * logs (plain `claude` etc.). Cost is omitted here and derived by the cost-enricher only
5
+ * when a report is requested, matching the original analytics behavior.
6
+ */
7
+ export declare class SessionsSource implements AnalyticsSource {
8
+ load(opts: SourceLoadOptions): Promise<SourceResult>;
9
+ }
10
+ //# sourceMappingURL=sessions-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sessions-source.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/sources/sessions-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEnF;;;;GAIG;AACH,qBAAa,cAAe,YAAW,eAAe;IAC9C,IAAI,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC;CAmB3D"}
@@ -0,0 +1,27 @@
1
+ import { MetricsDataLoader } from '../data-loader.js';
2
+ import { logger } from '../../../../utils/logger.js';
3
+ /**
4
+ * Local-session source: ~/.codemie tracked sessions merged with discovered native agent
5
+ * logs (plain `claude` etc.). Cost is omitted here and derived by the cost-enricher only
6
+ * when a report is requested, matching the original analytics behavior.
7
+ */
8
+ export class SessionsSource {
9
+ async load(opts) {
10
+ const loader = new MetricsDataLoader();
11
+ const rawSessions = loader.loadSessions(opts.filter);
12
+ // Discover native agent logs (not tracked by CodeMie) and merge so analytics reflect
13
+ // ALL usage. Deduped against tracked logs inside the loader.
14
+ if (opts.scanNative !== false) {
15
+ try {
16
+ const { loadNativeSessions } = await import('../native-loader.js');
17
+ const natives = (await loadNativeSessions(opts.filter)).filter((s) => loader.sessionMatchesFilter(s, opts.filter));
18
+ rawSessions.push(...natives);
19
+ }
20
+ catch (error) {
21
+ logger.debug('Native session discovery failed (continuing with tracked sessions):', error);
22
+ }
23
+ }
24
+ return { rawSessions };
25
+ }
26
+ }
27
+ //# sourceMappingURL=sessions-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sessions-source.js","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/sources/sessions-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAGrD;;;;GAIG;AACH,MAAM,OAAO,cAAc;IACzB,KAAK,CAAC,IAAI,CAAC,IAAuB;QAChC,MAAM,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;QACvC,MAAM,WAAW,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAErD,qFAAqF;QACrF,6DAA6D;QAC7D,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE,CAAC;YAC9B,IAAI,CAAC;gBACH,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,CAAC;gBACnE,MAAM,OAAO,GAAG,CAAC,MAAM,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACnE,MAAM,CAAC,oBAAoB,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAC5C,CAAC;gBACF,WAAW,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;YAC/B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,CAAC,KAAK,CAAC,qEAAqE,EAAE,KAAK,CAAC,CAAC;YAC7F,CAAC;QACH,CAAC;QACD,OAAO,EAAE,WAAW,EAAE,CAAC;IACzB,CAAC;CACF"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Analytics source seam.
3
+ *
4
+ * Every data backend implements {@link AnalyticsSource}: it loads its data and returns the
5
+ * same {@link SourceResult} the aggregate → report pipeline consumes, so the CLI stays
6
+ * agnostic to where the data came from.
7
+ *
8
+ * Today: {@link SessionsSource} (local ~/.codemie + native logs) and OtelSource
9
+ * (flattened otel-events.jsonl). Future remote backends (Prometheus, Loki, Langfuse) become
10
+ * one new `AnalyticsSource` + one thin `analytics <name>` subcommand each, with connection
11
+ * URL + auth resolved from the `.codemie` config/profile (never CLI flags) — e.g.
12
+ * "analyticsSources": { "prod-langfuse": { "type": "langfuse", "url": "…", "authEnv": "LANGFUSE_TOKEN" } }
13
+ * where `authEnv` names the env var holding the token. No connector code exists yet.
14
+ */
15
+ import type { RawSessionData } from '../data-loader.js';
16
+ import type { AnalyticsFilter } from '../types.js';
17
+ import type { SessionCostIndex, CostSummary } from '../cost/types.js';
18
+ export interface SourceLoadOptions {
19
+ filter: AnalyticsFilter;
20
+ /** Sessions source only: skip native agent-log discovery. Ignored by other sources. */
21
+ scanNative?: boolean;
22
+ }
23
+ export interface SourceResult {
24
+ rawSessions: RawSessionData[];
25
+ /**
26
+ * Authoritative cost, present only when the source carries it in its own data
27
+ * (e.g. OTEL `cost_usd`). Omitted when cost must be derived later from correlated logs
28
+ * (local sessions → cost-enricher); the runner enriches in that case.
29
+ */
30
+ cost?: {
31
+ index: SessionCostIndex;
32
+ summary: CostSummary;
33
+ };
34
+ }
35
+ export interface AnalyticsSource {
36
+ load(opts: SourceLoadOptions): Promise<SourceResult>;
37
+ }
38
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/sources/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEtE,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,eAAe,CAAC;IACxB,uFAAuF;IACvF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B;;;;OAIG;IACH,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,gBAAgB,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,CAAC;CAC1D;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACtD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/cli/commands/analytics/sources/types.ts"],"names":[],"mappings":""}
@@ -199,4 +199,11 @@ export interface AnalyticsOptions {
199
199
  /** When false (via --no-scan-native), skip native-log discovery and use tracked sessions only. */
200
200
  scanNative?: boolean;
201
201
  }
202
+ /** Options for the `analytics otel` subcommand: the shared base plus OTEL-specific flags. */
203
+ export interface OtelCommandOptions extends AnalyticsOptions {
204
+ /** Path to the flattened OTEL events file (required). */
205
+ file: string;
206
+ /** Scope OTEL analytics to one user (matches native user.email or user.id). */
207
+ user?: string;
208
+ }
202
209
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/analytics/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,aAAa,EACb,UAAU,EACX,MAAM,uCAAuC,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C;IACtB,0HAA0H;IAC1H,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACxC,kGAAkG;IAClG,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/analytics/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,aAAa,EACb,UAAU,EACX,MAAM,uCAAuC,CAAC;AAG/C,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,iBAAiB,EAAE,UAAU,CAAC;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,oBA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AAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0HAA0H;IAC1H,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACxC,kGAAkG;IAClG,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,6FAA6F;AAC7F,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/assistants/chat/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAiCrD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/assistants/chat/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBpC;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAkCrD"}