@codemieai/code 0.11.0 → 0.12.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 (101) hide show
  1. package/dist/agents/core/session/BaseSessionAdapter.d.ts +19 -0
  2. package/dist/agents/core/session/BaseSessionAdapter.d.ts.map +1 -1
  3. package/dist/agents/core/types.d.ts +10 -0
  4. package/dist/agents/core/types.d.ts.map +1 -1
  5. package/dist/agents/plugins/copilot-cli/copilot-cli-event-types.d.ts +146 -0
  6. package/dist/agents/plugins/copilot-cli/copilot-cli-event-types.d.ts.map +1 -0
  7. package/dist/agents/plugins/copilot-cli/copilot-cli-event-types.js +12 -0
  8. package/dist/agents/plugins/copilot-cli/copilot-cli-event-types.js.map +1 -0
  9. package/dist/agents/plugins/copilot-cli/copilot-cli.constants.d.ts +11 -0
  10. package/dist/agents/plugins/copilot-cli/copilot-cli.constants.d.ts.map +1 -0
  11. package/dist/agents/plugins/copilot-cli/copilot-cli.constants.js +11 -0
  12. package/dist/agents/plugins/copilot-cli/copilot-cli.constants.js.map +1 -0
  13. package/dist/agents/plugins/copilot-cli/copilot-cli.paths.d.ts +11 -0
  14. package/dist/agents/plugins/copilot-cli/copilot-cli.paths.d.ts.map +1 -0
  15. package/dist/agents/plugins/copilot-cli/copilot-cli.paths.js +21 -0
  16. package/dist/agents/plugins/copilot-cli/copilot-cli.paths.js.map +1 -0
  17. package/dist/agents/plugins/copilot-cli/copilot-cli.plugin.d.ts +30 -0
  18. package/dist/agents/plugins/copilot-cli/copilot-cli.plugin.d.ts.map +1 -0
  19. package/dist/agents/plugins/copilot-cli/copilot-cli.plugin.js +64 -0
  20. package/dist/agents/plugins/copilot-cli/copilot-cli.plugin.js.map +1 -0
  21. package/dist/agents/plugins/copilot-cli/copilot-cli.session.d.ts +43 -0
  22. package/dist/agents/plugins/copilot-cli/copilot-cli.session.d.ts.map +1 -0
  23. package/dist/agents/plugins/copilot-cli/copilot-cli.session.js +331 -0
  24. package/dist/agents/plugins/copilot-cli/copilot-cli.session.js.map +1 -0
  25. package/dist/agents/plugins/copilot-cli/copilot-cli.storage-utils.d.ts +10 -0
  26. package/dist/agents/plugins/copilot-cli/copilot-cli.storage-utils.d.ts.map +1 -0
  27. package/dist/agents/plugins/copilot-cli/copilot-cli.storage-utils.js +41 -0
  28. package/dist/agents/plugins/copilot-cli/copilot-cli.storage-utils.js.map +1 -0
  29. package/dist/agents/plugins/copilot-cli/copilot-cli.usage.d.ts +37 -0
  30. package/dist/agents/plugins/copilot-cli/copilot-cli.usage.d.ts.map +1 -0
  31. package/dist/agents/plugins/copilot-cli/copilot-cli.usage.js +96 -0
  32. package/dist/agents/plugins/copilot-cli/copilot-cli.usage.js.map +1 -0
  33. package/dist/agents/plugins/copilot-cli/copilot-cli.workspace.d.ts +17 -0
  34. package/dist/agents/plugins/copilot-cli/copilot-cli.workspace.d.ts.map +1 -0
  35. package/dist/agents/plugins/copilot-cli/copilot-cli.workspace.js +58 -0
  36. package/dist/agents/plugins/copilot-cli/copilot-cli.workspace.js.map +1 -0
  37. package/dist/agents/plugins/copilot-cli/index.d.ts +2 -0
  38. package/dist/agents/plugins/copilot-cli/index.d.ts.map +1 -0
  39. package/dist/agents/plugins/copilot-cli/index.js +2 -0
  40. package/dist/agents/plugins/copilot-cli/index.js.map +1 -0
  41. package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.d.ts +15 -0
  42. package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.d.ts.map +1 -0
  43. package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.js +20 -0
  44. package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.js.map +1 -0
  45. package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.metrics-processor.d.ts +16 -0
  46. package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.metrics-processor.d.ts.map +1 -0
  47. package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.metrics-processor.js +22 -0
  48. package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.metrics-processor.js.map +1 -0
  49. package/dist/agents/registry.d.ts +20 -0
  50. package/dist/agents/registry.d.ts.map +1 -1
  51. package/dist/agents/registry.js +29 -2
  52. package/dist/agents/registry.js.map +1 -1
  53. package/dist/cli/commands/analytics/agent-labels.d.ts +3 -0
  54. package/dist/cli/commands/analytics/agent-labels.d.ts.map +1 -0
  55. package/dist/cli/commands/analytics/agent-labels.js +19 -0
  56. package/dist/cli/commands/analytics/agent-labels.js.map +1 -0
  57. package/dist/cli/commands/analytics/cost/cost-enricher.d.ts.map +1 -1
  58. package/dist/cli/commands/analytics/cost/cost-enricher.js +12 -0
  59. package/dist/cli/commands/analytics/cost/cost-enricher.js.map +1 -1
  60. package/dist/cli/commands/analytics/cost/types.d.ts +10 -0
  61. package/dist/cli/commands/analytics/cost/types.d.ts.map +1 -1
  62. package/dist/cli/commands/analytics/cost/usage-readers.d.ts.map +1 -1
  63. package/dist/cli/commands/analytics/cost/usage-readers.js +54 -0
  64. package/dist/cli/commands/analytics/cost/usage-readers.js.map +1 -1
  65. package/dist/cli/commands/analytics/formatter.d.ts.map +1 -1
  66. package/dist/cli/commands/analytics/formatter.js +10 -2
  67. package/dist/cli/commands/analytics/formatter.js.map +1 -1
  68. package/dist/cli/commands/analytics/index.d.ts.map +1 -1
  69. package/dist/cli/commands/analytics/index.js +21 -0
  70. package/dist/cli/commands/analytics/index.js.map +1 -1
  71. package/dist/cli/commands/analytics/native-loader.d.ts.map +1 -1
  72. package/dist/cli/commands/analytics/native-loader.js +28 -3
  73. package/dist/cli/commands/analytics/native-loader.js.map +1 -1
  74. package/dist/cli/commands/analytics/report/client/app.js +32 -14
  75. package/dist/cli/commands/analytics/report/payload-builder.d.ts.map +1 -1
  76. package/dist/cli/commands/analytics/report/payload-builder.js +7 -0
  77. package/dist/cli/commands/analytics/report/payload-builder.js.map +1 -1
  78. package/dist/cli/commands/analytics/report/types.d.ts +10 -0
  79. package/dist/cli/commands/analytics/report/types.d.ts.map +1 -1
  80. package/dist/cli/commands/install.js +2 -2
  81. package/dist/cli/commands/install.js.map +1 -1
  82. package/dist/cli/commands/list.js +1 -1
  83. package/dist/cli/commands/list.js.map +1 -1
  84. package/dist/cli/commands/setup.d.ts +3 -1
  85. package/dist/cli/commands/setup.d.ts.map +1 -1
  86. package/dist/cli/commands/setup.js +87 -63
  87. package/dist/cli/commands/setup.js.map +1 -1
  88. package/dist/cli/commands/uninstall.js +1 -1
  89. package/dist/cli/commands/uninstall.js.map +1 -1
  90. package/dist/cli/commands/update.js +2 -2
  91. package/dist/cli/commands/update.js.map +1 -1
  92. package/dist/cli/first-time.js +3 -3
  93. package/dist/cli/first-time.js.map +1 -1
  94. package/dist/providers/core/types.d.ts +16 -0
  95. package/dist/providers/core/types.d.ts.map +1 -1
  96. package/dist/providers/core/types.js.map +1 -1
  97. package/dist/providers/plugins/sso/sso.setup-steps.d.ts.map +1 -1
  98. package/dist/providers/plugins/sso/sso.setup-steps.js +39 -22
  99. package/dist/providers/plugins/sso/sso.setup-steps.js.map +1 -1
  100. package/package.json +1 -2
  101. package/scripts/release.sh +54 -0
@@ -0,0 +1,331 @@
1
+ /**
2
+ * Copilot CLI Session Adapter.
3
+ *
4
+ * Sessions live at `~/.copilot/session-state/<uuid>/` (or `$COPILOT_HOME/...`), one
5
+ * directory per session, each holding a `workspace.yaml` manifest and — from the
6
+ * schema-bearing CLI versions — an `events.jsonl` transcript.
7
+ *
8
+ * Discovery reads only the manifest; transcripts are opened during parse, so a report run
9
+ * never pays to read a transcript it goes on to filter out.
10
+ *
11
+ * Modeled on `CodexSessionAdapter` (`src/agents/plugins/codex/codex.session.ts`), the
12
+ * closest analog — a natively-discovered JSONL agent. Discovery here is simpler: Codex
13
+ * walks `YYYY/MM/DD` directories and stats mtimes, whereas Copilot's flat layout plus the
14
+ * manifest's own timestamps make both unnecessary.
15
+ */
16
+ import { readdirSync, existsSync } from 'fs';
17
+ import { join } from 'path';
18
+ import { getCopilotSessionStateRoot } from './copilot-cli.paths.js';
19
+ import { readWorkspaceManifest } from './copilot-cli.workspace.js';
20
+ import { COPILOT_CLI_AGENT_NAME } from './copilot-cli.constants.js';
21
+ import { readCopilotEventsTolerant } from './copilot-cli.storage-utils.js';
22
+ import { extractCopilotUsage } from './copilot-cli.usage.js';
23
+ import { CopilotCliMetricsProcessor } from './session/processors/copilot-cli.metrics-processor.js';
24
+ import { CopilotCliConversationsProcessor } from './session/processors/copilot-cli.conversations-processor.js';
25
+ import { logger } from '../../../utils/logger.js';
26
+ const DEFAULT_MAX_AGE_DAYS = 30;
27
+ const MS_PER_DAY = 24 * 60 * 60 * 1000;
28
+ /**
29
+ * Copilot tools that write to disk. `view` also carries a `path` but is a read, and the
30
+ * aggregator excludes reads from the changed-files metrics.
31
+ */
32
+ const FILE_WRITE_TOOLS = new Set(['create', 'edit']);
33
+ /** Trailing-slash-insensitive directory comparison. */
34
+ function sameDir(a, b) {
35
+ if (!a) {
36
+ return false;
37
+ }
38
+ return a.replace(/\/+$/, '') === b.replace(/\/+$/, '');
39
+ }
40
+ export class CopilotCliSessionAdapter {
41
+ metadata;
42
+ agentName = COPILOT_CLI_AGENT_NAME;
43
+ processors = [];
44
+ constructor(metadata) {
45
+ this.metadata = metadata;
46
+ this.registerProcessor(new CopilotCliMetricsProcessor());
47
+ this.registerProcessor(new CopilotCliConversationsProcessor());
48
+ }
49
+ registerProcessor(processor) {
50
+ this.processors.push(processor);
51
+ this.processors.sort((a, b) => a.priority - b.priority);
52
+ logger.debug(`[copilot-cli-adapter] Registered processor: ${processor.name} (priority: ${processor.priority})`);
53
+ }
54
+ /**
55
+ * Enumerate `session-state/<uuid>/` directories that carry a transcript, newest first.
56
+ *
57
+ * Directories without `events.jsonl` are pre-schema sessions with nothing to parse or
58
+ * price, and are skipped rather than surfaced as empty rows.
59
+ */
60
+ async discoverSessions(options) {
61
+ const root = getCopilotSessionStateRoot();
62
+ if (!existsSync(root)) {
63
+ logger.debug(`[copilot-cli-discovery] no session-state directory at ${root}`);
64
+ return [];
65
+ }
66
+ let dirNames;
67
+ try {
68
+ dirNames = readdirSync(root, { withFileTypes: true })
69
+ .filter((entry) => entry.isDirectory())
70
+ .map((entry) => entry.name);
71
+ }
72
+ catch (error) {
73
+ logger.debug('[copilot-cli-discovery] failed to read session-state:', error);
74
+ return [];
75
+ }
76
+ const maxAgeDays = options?.maxAgeDays ?? DEFAULT_MAX_AGE_DAYS;
77
+ const cutoffMs = Date.now() - maxAgeDays * MS_PER_DAY;
78
+ const results = [];
79
+ for (const name of dirNames) {
80
+ const dir = join(root, name);
81
+ const eventsPath = join(dir, 'events.jsonl');
82
+ if (!existsSync(eventsPath)) {
83
+ continue;
84
+ }
85
+ const manifest = readWorkspaceManifest(dir);
86
+ if (!manifest) {
87
+ continue;
88
+ }
89
+ const { createdAt } = manifest;
90
+ if (createdAt === undefined) {
91
+ if (!options?.includeTimestampless) {
92
+ continue;
93
+ }
94
+ }
95
+ else if (createdAt < cutoffMs) {
96
+ continue;
97
+ }
98
+ const projectPath = manifest.cwd ?? manifest.gitRoot;
99
+ if (options?.cwd && !sameDir(projectPath, options.cwd)) {
100
+ continue;
101
+ }
102
+ results.push({
103
+ sessionId: manifest.id,
104
+ filePath: eventsPath,
105
+ projectPath,
106
+ createdAt: createdAt ?? 0,
107
+ updatedAt: manifest.updatedAt,
108
+ agentName: this.agentName,
109
+ });
110
+ }
111
+ results.sort((a, b) => b.createdAt - a.createdAt);
112
+ if (options?.limit && options.limit > 0) {
113
+ logger.debug(`[copilot-cli-discovery] found ${results.length} session(s), returning ${options.limit}`);
114
+ return results.slice(0, options.limit);
115
+ }
116
+ logger.debug(`[copilot-cli-discovery] found ${results.length} session(s)`);
117
+ return results;
118
+ }
119
+ /**
120
+ * Read `events.jsonl` into the unified `ParsedSession`.
121
+ *
122
+ * `messages` carries the RAW per-model Copilot buckets — `readCopilotCli` in
123
+ * `usage-readers.ts` owns the conversion into `TokenUsage`, so the OpenAI/Anthropic
124
+ * convention mismatch lives in exactly one place.
125
+ */
126
+ async parseSessionFile(filePath, sessionId) {
127
+ const events = readCopilotEventsTolerant(filePath);
128
+ const start = events.find((e) => e.type === 'session.start')?.data;
129
+ const shutdown = [...events].reverse().find((e) => e.type === 'session.shutdown')?.data;
130
+ const usage = extractCopilotUsage(events);
131
+ const tools = {};
132
+ const toolStatus = {};
133
+ const skillInvocations = {};
134
+ const userPrompts = [];
135
+ const fileOperations = [];
136
+ const context = start?.context;
137
+ const cwd = context?.cwd ?? context?.gitRoot;
138
+ const branch = context?.branch;
139
+ // Per-turn records in the Claude-shaped form `synthesizeRawSession` understands, so
140
+ // native synthesis derives turns, models, timestamps, cwd and branch correctly. These
141
+ // carry no `usage`, so `readCopilotCli` skips them; the per-model usage rows appended
142
+ // afterwards carry no `type`, so turn counting skips those. Orthogonal filters.
143
+ const turnRecords = [];
144
+ // tool.execution_start is the ONLY event carrying the tool name and arguments;
145
+ // tool.execution_complete carries just toolCallId + a boolean success. Pair by id.
146
+ const toolCallById = new Map();
147
+ // Only the newest CLI builds put `model` on each assistant.message; 1.0.17 and every
148
+ // 0.0.x omit it. Track the model in effect from session.model_change so those turns
149
+ // are still attributed, and remember which turns stayed unlabelled for the
150
+ // single-model backfill below.
151
+ let currentModel;
152
+ const unlabelledTurns = [];
153
+ for (const event of events) {
154
+ switch (event.type) {
155
+ case 'tool.execution_start': {
156
+ const data = (event.data ?? {});
157
+ if (!data.toolCallId || !data.toolName) {
158
+ break;
159
+ }
160
+ // Remember the name and target path; whether the write actually happened is
161
+ // only known at tool.execution_complete.
162
+ toolCallById.set(data.toolCallId, { name: data.toolName, path: data.arguments?.path });
163
+ break;
164
+ }
165
+ case 'tool.execution_complete': {
166
+ const data = (event.data ?? {});
167
+ const call = data.toolCallId ? toolCallById.get(data.toolCallId) : undefined;
168
+ if (!call) {
169
+ break; // orphaned completion (truncated transcript) — nothing to attribute
170
+ }
171
+ tools[call.name] = (tools[call.name] ?? 0) + 1;
172
+ const bucket = toolStatus[call.name] ?? { success: 0, failure: 0 };
173
+ const failed = data.success === false || data.error !== undefined;
174
+ bucket[failed ? 'failure' : 'success'] += 1;
175
+ toolStatus[call.name] = bucket;
176
+ // Record the file operation only once the write is known to have SUCCEEDED.
177
+ // A failed edit/create (permission denied, bad old_str) must not count as a
178
+ // changed file, or the report inflates filesChanged and can attach the
179
+ // session's line totals to a file that was never written.
180
+ if (!failed && call.path && FILE_WRITE_TOOLS.has(call.name)) {
181
+ fileOperations.push({ type: call.name === 'create' ? 'write' : 'edit', path: call.path });
182
+ }
183
+ break;
184
+ }
185
+ case 'skill.invoked': {
186
+ const data = (event.data ?? {});
187
+ const name = data.skill ?? data.name;
188
+ if (name) {
189
+ skillInvocations[name] = (skillInvocations[name] ?? 0) + 1;
190
+ }
191
+ break;
192
+ }
193
+ case 'user.message': {
194
+ const text = event.data?.text;
195
+ if (typeof text === 'string' && text.trim()) {
196
+ userPrompts.push({ count: 1, text });
197
+ }
198
+ turnRecords.push({
199
+ type: 'user',
200
+ timestamp: event.timestamp,
201
+ cwd,
202
+ gitBranch: branch,
203
+ message: { role: 'user', content: typeof text === 'string' ? text : '' },
204
+ });
205
+ break;
206
+ }
207
+ case 'session.model_change': {
208
+ const next = event.data?.newModel;
209
+ if (next) {
210
+ currentModel = next;
211
+ }
212
+ break;
213
+ }
214
+ case 'assistant.message': {
215
+ const data = (event.data ?? {});
216
+ const record = {
217
+ type: 'assistant',
218
+ timestamp: event.timestamp,
219
+ cwd,
220
+ gitBranch: branch,
221
+ message: { role: 'assistant', model: data.model ?? currentModel },
222
+ };
223
+ if (!record.message.model) {
224
+ unlabelledTurns.push(record);
225
+ }
226
+ turnRecords.push(record);
227
+ break;
228
+ }
229
+ default:
230
+ break;
231
+ }
232
+ }
233
+ // Last resort: if turns are still unlabelled but the shutdown rollup shows the session
234
+ // used exactly ONE model, every turn must have been that model. With two or more,
235
+ // attributing an unlabelled turn to either would be a fabrication — leave it unknown.
236
+ if (unlabelledTurns.length > 0) {
237
+ const usedModels = Object.keys(shutdown?.modelMetrics ?? {});
238
+ if (usedModels.length === 1) {
239
+ for (const turn of unlabelledTurns) {
240
+ turn.message.model = usedModels[0];
241
+ }
242
+ }
243
+ }
244
+ // session.shutdown.codeChanges is the authoritative churn figure, but reports only
245
+ // session-wide line totals plus a file list — no per-file deltas. Merge it into the
246
+ // per-file operations already gathered from tool arguments rather than appending a
247
+ // second entry for the same path, which would double-count the file.
248
+ const changes = shutdown?.codeChanges;
249
+ if (changes) {
250
+ for (const path of changes.filesModified ?? []) {
251
+ if (!fileOperations.some((op) => op.path === path)) {
252
+ fileOperations.push({ type: 'edit', path });
253
+ }
254
+ }
255
+ // Copilot gives no per-file split, so the session totals land on one entry. Prefer a
256
+ // file shutdown actually lists as modified — the first tool-derived entry may be a
257
+ // file that was opened but never changed, and crediting churn to it would be wrong.
258
+ const modified = new Set(changes.filesModified ?? []);
259
+ const target = fileOperations.find((op) => op.path !== undefined && modified.has(op.path)) ?? fileOperations[0];
260
+ if (target) {
261
+ target.linesAdded = changes.linesAdded ?? 0;
262
+ target.linesRemoved = changes.linesRemoved ?? 0;
263
+ }
264
+ }
265
+ return {
266
+ sessionId,
267
+ agentName: this.metadata.displayName,
268
+ agentVersion: start?.copilotVersion,
269
+ metadata: {
270
+ projectPath: cwd,
271
+ createdAt: start?.startTime,
272
+ repository: context?.repository,
273
+ branch,
274
+ gitBranch: branch,
275
+ },
276
+ messages: [...turnRecords, ...usage.messages],
277
+ usageMeta: {
278
+ premiumRequests: usage.premiumRequests,
279
+ usagePartial: usage.partial,
280
+ usageUnavailableReason: usage.unavailableReason,
281
+ },
282
+ metrics: {
283
+ tools,
284
+ toolStatus,
285
+ fileOperations,
286
+ skillInvocations,
287
+ userPrompts,
288
+ },
289
+ };
290
+ }
291
+ /** Parse once, then run every registered processor in priority order. */
292
+ async processSession(filePath, sessionId, context) {
293
+ const parsed = await this.parseSessionFile(filePath, sessionId);
294
+ const processors = {};
295
+ const failedProcessors = [];
296
+ let totalRecords = 0;
297
+ for (const processor of this.processors) {
298
+ if (!processor.shouldProcess(parsed)) {
299
+ continue;
300
+ }
301
+ try {
302
+ const result = await processor.process(parsed, context);
303
+ const recordsProcessed = result.metadata?.recordsProcessed ?? 0;
304
+ totalRecords += recordsProcessed;
305
+ processors[processor.name] = {
306
+ success: result.success,
307
+ message: result.message,
308
+ recordsProcessed,
309
+ };
310
+ if (!result.success) {
311
+ failedProcessors.push(processor.name);
312
+ }
313
+ }
314
+ catch (error) {
315
+ logger.error(`[copilot-cli-adapter] Processor ${processor.name} failed:`, error);
316
+ processors[processor.name] = {
317
+ success: false,
318
+ message: error instanceof Error ? error.message : String(error),
319
+ };
320
+ failedProcessors.push(processor.name);
321
+ }
322
+ }
323
+ return {
324
+ success: failedProcessors.length === 0,
325
+ processors,
326
+ totalRecords,
327
+ failedProcessors,
328
+ };
329
+ }
330
+ }
331
+ //# sourceMappingURL=copilot-cli.session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copilot-cli.session.js","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAc5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAS7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,uDAAuD,CAAC;AACnG,OAAO,EAAE,gCAAgC,EAAE,MAAM,6DAA6D,CAA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BACpB,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;gBACxC,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,CAAC,KAAK,CAAC,mCAAmC,SAAS,CAAC,IAAI,UAAU,EAAE,KAAK,CAAC,CAAC;gBACjF,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG;oBAC3B,OAAO,EAAE,KAAK;oBACd,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;iBAChE,CAAC;gBACF,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;QAED,OAAO;YACL,OAAO,EAAE,gBAAgB,CAAC,MAAM,KAAK,CAAC;YACtC,UAAU;YACV,YAAY;YACZ,gBAAgB;SACjB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Tolerant reader for Copilot's `events.jsonl`.
3
+ *
4
+ * A live session's final line can be truncated mid-write, and the schema is undocumented,
5
+ * so unparseable lines are dropped rather than thrown. The cost enricher catches per
6
+ * session anyway, but degrading here keeps one bad line from discarding a whole session.
7
+ */
8
+ import type { CopilotEvent } from './copilot-cli-event-types.js';
9
+ export declare function readCopilotEventsTolerant(filePath: string): CopilotEvent[];
10
+ //# sourceMappingURL=copilot-cli.storage-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copilot-cli.storage-utils.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.storage-utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAGjE,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,EAAE,CA+B1E"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Tolerant reader for Copilot's `events.jsonl`.
3
+ *
4
+ * A live session's final line can be truncated mid-write, and the schema is undocumented,
5
+ * so unparseable lines are dropped rather than thrown. The cost enricher catches per
6
+ * session anyway, but degrading here keeps one bad line from discarding a whole session.
7
+ */
8
+ import { readFileSync } from 'fs';
9
+ import { logger } from '../../../utils/logger.js';
10
+ export function readCopilotEventsTolerant(filePath) {
11
+ let text;
12
+ try {
13
+ text = readFileSync(filePath, 'utf-8');
14
+ }
15
+ catch (error) {
16
+ logger.debug(`[copilot-cli] unreadable events.jsonl at ${filePath}:`, error);
17
+ return [];
18
+ }
19
+ const events = [];
20
+ let dropped = 0;
21
+ for (const line of text.split('\n')) {
22
+ const trimmed = line.trim();
23
+ if (!trimmed) {
24
+ continue;
25
+ }
26
+ try {
27
+ const parsed = JSON.parse(trimmed);
28
+ if (parsed && typeof parsed === 'object') {
29
+ events.push(parsed);
30
+ }
31
+ }
32
+ catch {
33
+ dropped++;
34
+ }
35
+ }
36
+ if (dropped > 0) {
37
+ logger.debug(`[copilot-cli] dropped ${dropped} unparseable line(s) in ${filePath}`);
38
+ }
39
+ return events;
40
+ }
41
+ //# sourceMappingURL=copilot-cli.storage-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copilot-cli.storage-utils.js","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.storage-utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,MAAM,UAAU,yBAAyB,CAAC,QAAgB;IACxD,IAAI,IAAY,CAAC;IACjB,IAAI,CAAC;QACH,IAAI,GAAG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,4CAA4C,QAAQ,GAAG,EAAE,KAAK,CAAC,CAAC;QAC7E,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,MAAM,GAAmB,EAAE,CAAC;IAClC,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,SAAS;QACX,CAAC;QACD,IAAI,CAAC;YACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;gBACzC,MAAM,CAAC,IAAI,CAAC,MAAsB,CAAC,CAAC;YACtC,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,MAAM,CAAC,KAAK,CAAC,yBAAyB,OAAO,2BAA2B,QAAQ,EAAE,CAAC,CAAC;IACtF,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Token extraction from a Copilot CLI transcript, in three tiers.
3
+ *
4
+ * Tier 1 — `session.shutdown`.`modelMetrics`: the authoritative per-model rollup, carrying
5
+ * input, output, cache-read, cache-write and reasoning buckets plus request counts.
6
+ * Tier 2 — per-turn `assistant.message`: recovers output tokens and request counts exactly
7
+ * (verified against tier 1 on real mixed-model sessions), but NO event carries
8
+ * per-turn input or cache tokens. Marked partial, because input outweighs output
9
+ * by roughly 100:1 and an output-only figure is a severe undercount.
10
+ * Tier 3 — neither: the session carries no usage data and is listed unpriced with a reason.
11
+ *
12
+ * Buckets are emitted RAW, in Copilot's own OpenAI-convention field names. Conversion into
13
+ * the repository's Anthropic-convention `TokenUsage` happens in exactly one place —
14
+ * `readCopilotCli` in `src/cli/commands/analytics/cost/usage-readers.ts` — so the
15
+ * convention mismatch has a single, testable seam.
16
+ */
17
+ import type { CopilotEvent, CopilotUsageBuckets } from './copilot-cli-event-types.js';
18
+ /** One model's usage within a session, as Copilot reported it. */
19
+ export interface CopilotUsageMessage {
20
+ model: string;
21
+ usage: CopilotUsageBuckets;
22
+ /** API request count for this model; not the same as premium requests. */
23
+ requests?: number;
24
+ /** True when reconstructed from per-turn events (output tokens only). */
25
+ partial?: boolean;
26
+ }
27
+ export interface CopilotUsageExtract {
28
+ messages: CopilotUsageMessage[];
29
+ /** GitHub's actual billing unit for the session, when recorded. */
30
+ premiumRequests?: number;
31
+ /** True when any model's usage was reconstructed rather than read from the rollup. */
32
+ partial: boolean;
33
+ /** Why the session could not be priced; absent when usage was found. */
34
+ unavailableReason?: string;
35
+ }
36
+ export declare function extractCopilotUsage(events: CopilotEvent[]): CopilotUsageExtract;
37
+ //# sourceMappingURL=copilot-cli.usage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copilot-cli.usage.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.usage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EACV,YAAY,EAGZ,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAEtC,kEAAkE;AAClE,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,mBAAmB,CAAC;IAC3B,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,OAAO,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAkED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,mBAAmB,CAyB/E"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Token extraction from a Copilot CLI transcript, in three tiers.
3
+ *
4
+ * Tier 1 — `session.shutdown`.`modelMetrics`: the authoritative per-model rollup, carrying
5
+ * input, output, cache-read, cache-write and reasoning buckets plus request counts.
6
+ * Tier 2 — per-turn `assistant.message`: recovers output tokens and request counts exactly
7
+ * (verified against tier 1 on real mixed-model sessions), but NO event carries
8
+ * per-turn input or cache tokens. Marked partial, because input outweighs output
9
+ * by roughly 100:1 and an output-only figure is a severe undercount.
10
+ * Tier 3 — neither: the session carries no usage data and is listed unpriced with a reason.
11
+ *
12
+ * Buckets are emitted RAW, in Copilot's own OpenAI-convention field names. Conversion into
13
+ * the repository's Anthropic-convention `TokenUsage` happens in exactly one place —
14
+ * `readCopilotCli` in `src/cli/commands/analytics/cost/usage-readers.ts` — so the
15
+ * convention mismatch has a single, testable seam.
16
+ */
17
+ const NO_USAGE_REASON = 'No usage data in transcript — this Copilot CLI version recorded no token telemetry';
18
+ /** Last shutdown wins: a resumed session can record more than one. */
19
+ function lastShutdown(events) {
20
+ let found = null;
21
+ for (const event of events) {
22
+ if (event.type === 'session.shutdown' && event.data) {
23
+ found = event.data;
24
+ }
25
+ }
26
+ return found;
27
+ }
28
+ function fromShutdown(data) {
29
+ const messages = [];
30
+ for (const [model, entry] of Object.entries(data.modelMetrics ?? {})) {
31
+ if (!entry?.usage) {
32
+ continue;
33
+ }
34
+ messages.push({ model, usage: entry.usage, requests: entry.requests?.count });
35
+ }
36
+ return messages;
37
+ }
38
+ function fromPerTurn(events) {
39
+ const byModel = new Map();
40
+ // Tier 2 exists for builds that never write session.shutdown — and those are exactly the
41
+ // builds that also omit per-turn `model`. Tracking the model in effect from
42
+ // session.model_change is what makes this fallback reachable at all; requiring
43
+ // `data.model` would skip every turn on the versions this tier is for.
44
+ let currentModel;
45
+ for (const event of events) {
46
+ if (event.type === 'session.model_change') {
47
+ const next = event.data?.newModel;
48
+ if (next) {
49
+ currentModel = next;
50
+ }
51
+ continue;
52
+ }
53
+ if (event.type !== 'assistant.message' || !event.data) {
54
+ continue;
55
+ }
56
+ const data = event.data;
57
+ const model = data.model ?? currentModel;
58
+ if (!model || typeof data.outputTokens !== 'number') {
59
+ continue; // no model signal anywhere — attributing it would be a guess
60
+ }
61
+ const accumulated = byModel.get(model) ?? { output: 0, requests: 0 };
62
+ accumulated.output += data.outputTokens;
63
+ accumulated.requests += 1;
64
+ byModel.set(model, accumulated);
65
+ }
66
+ return [...byModel.entries()].map(([model, accumulated]) => ({
67
+ model,
68
+ usage: { outputTokens: accumulated.output },
69
+ requests: accumulated.requests,
70
+ partial: true,
71
+ }));
72
+ }
73
+ export function extractCopilotUsage(events) {
74
+ const shutdown = lastShutdown(events);
75
+ if (shutdown) {
76
+ const messages = fromShutdown(shutdown);
77
+ if (messages.length > 0) {
78
+ return { messages, premiumRequests: shutdown.totalPremiumRequests, partial: false };
79
+ }
80
+ }
81
+ const perTurn = fromPerTurn(events);
82
+ if (perTurn.length > 0) {
83
+ return {
84
+ messages: perTurn,
85
+ premiumRequests: shutdown?.totalPremiumRequests,
86
+ partial: true,
87
+ };
88
+ }
89
+ return {
90
+ messages: [],
91
+ premiumRequests: shutdown?.totalPremiumRequests,
92
+ partial: false,
93
+ unavailableReason: NO_USAGE_REASON,
94
+ };
95
+ }
96
+ //# sourceMappingURL=copilot-cli.usage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copilot-cli.usage.js","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.usage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA6BH,MAAM,eAAe,GACnB,oFAAoF,CAAC;AAEvF,sEAAsE;AACtE,SAAS,YAAY,CAAC,MAAsB;IAC1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AAO,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO;YACL,QAAQ,EAAE,OAAO;YACjB,eAAe,EAAE,QAAQ,EAAE,oBAAoB;YAC/C,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,QAAQ,EAAE,oBAAoB;QAC/C,OAAO,EAAE,KAAK;QACd,iBAAiB,EAAE,eAAe;KACnC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Reads `~/.copilot/session-state/<uuid>/workspace.yaml`.
3
+ *
4
+ * This is the discovery manifest: it carries session identity, project path, repository,
5
+ * branch, and timestamps in a few hundred bytes, so discovery never has to open a
6
+ * transcript. That matters — real `events.jsonl` files reach megabytes, and a report run
7
+ * would otherwise pay to read transcripts it goes on to filter out.
8
+ */
9
+ import type { CopilotWorkspaceManifest } from './copilot-cli-event-types.js';
10
+ /**
11
+ * Parse one session directory's manifest.
12
+ *
13
+ * Returns null when the file is missing, unreadable, malformed, or carries no session id.
14
+ * Never throws — a single unreadable session directory must not abort discovery.
15
+ */
16
+ export declare function readWorkspaceManifest(sessionDir: string): CopilotWorkspaceManifest | null;
17
+ //# sourceMappingURL=copilot-cli.workspace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copilot-cli.workspace.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,wBAAwB,EAAoB,MAAM,8BAA8B,CAAC;AAY/F;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,wBAAwB,GAAG,IAAI,CA+BzF"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Reads `~/.copilot/session-state/<uuid>/workspace.yaml`.
3
+ *
4
+ * This is the discovery manifest: it carries session identity, project path, repository,
5
+ * branch, and timestamps in a few hundred bytes, so discovery never has to open a
6
+ * transcript. That matters — real `events.jsonl` files reach megabytes, and a report run
7
+ * would otherwise pay to read transcripts it goes on to filter out.
8
+ */
9
+ import { readFileSync } from 'fs';
10
+ import { join } from 'path';
11
+ import { parse as parseYaml } from 'yaml';
12
+ import { logger } from '../../../utils/logger.js';
13
+ /** ISO-8601 to epoch ms; undefined when absent or unparseable. */
14
+ function toEpochMs(iso) {
15
+ if (!iso) {
16
+ return undefined;
17
+ }
18
+ const ms = Date.parse(iso);
19
+ return Number.isNaN(ms) ? undefined : ms;
20
+ }
21
+ /**
22
+ * Parse one session directory's manifest.
23
+ *
24
+ * Returns null when the file is missing, unreadable, malformed, or carries no session id.
25
+ * Never throws — a single unreadable session directory must not abort discovery.
26
+ */
27
+ export function readWorkspaceManifest(sessionDir) {
28
+ let text;
29
+ try {
30
+ text = readFileSync(join(sessionDir, 'workspace.yaml'), 'utf-8');
31
+ }
32
+ catch {
33
+ return null;
34
+ }
35
+ let raw;
36
+ try {
37
+ raw = (parseYaml(text) ?? {});
38
+ }
39
+ catch (error) {
40
+ logger.debug(`[copilot-cli] malformed workspace.yaml in ${sessionDir}:`, error);
41
+ return null;
42
+ }
43
+ if (!raw || typeof raw !== 'object' || !raw.id) {
44
+ return null;
45
+ }
46
+ return {
47
+ id: raw.id,
48
+ cwd: raw.cwd,
49
+ gitRoot: raw.git_root,
50
+ repository: raw.repository,
51
+ hostType: raw.host_type,
52
+ branch: raw.branch,
53
+ name: raw.name,
54
+ createdAt: toEpochMs(raw.created_at),
55
+ updatedAt: toEpochMs(raw.updated_at),
56
+ };
57
+ }
58
+ //# sourceMappingURL=copilot-cli.workspace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copilot-cli.workspace.js","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;G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AAC,GAAG;QACZ,OAAO,EAAE,GAAG,CAAC,QAAQ;QACrB,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,QAAQ,EAAE,GAAG,CAAC,SAAS;QACvB,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC;QACpC,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC;KACrC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { CopilotCliPlugin, CopilotCliPluginMetadata, COPILOT_CLI_AGENT_NAME, COPILOT_CLI_DISPLAY_NAME, } from './copilot-cli.plugin.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC"}