-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpackage.json
More file actions
331 lines (331 loc) · 13 KB
/
package.json
File metadata and controls
331 lines (331 loc) · 13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
{
"name": "copilot-token-tracker",
"displayName": "Copilot Token Tracker",
"description": "Shows daily and monthly (estimated) GitHub Copilot token usage stats in VS Code status bar",
"version": "0.0.20",
"publisher": "RobBos",
"engines": {
"vscode": "^1.110.0"
},
"repository": {
"type": "git",
"url": "https://github.com/rajbos/github-copilot-token-usage"
},
"author": {
"name": "Rob Bos",
"email": "rob@example.com"
},
"categories": [
"Other"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "copilot-token-tracker.refresh",
"title": "Refresh Token Usage",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.showDetails",
"title": "Show Token Usage Details",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.showChart",
"title": "Show Token Usage Chart",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.showUsageAnalysis",
"title": "Show Usage Analysis Dashboard",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.generateDiagnosticReport",
"title": "Generate Diagnostic Report",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.showMaturity",
"title": "Show Copilot Fluency Score",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.showFluencyLevelViewer",
"title": "Show Fluency Level Viewer (Debug Only)",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.configureBackend",
"title": "Configure Backend",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.copyBackendConfig",
"title": "Copy Backend Config (No Secrets)",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.exportCurrentView",
"title": "Export Current View (JSON)",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.setBackendSharedKey",
"title": "Set Backend Storage Shared Key",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.rotateBackendSharedKey",
"title": "Rotate Backend Storage Shared Key",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.clearBackendSharedKey",
"title": "Clear Backend Storage Shared Key",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.toggleBackendWorkspaceMachineNameSync",
"title": "Backend: Toggle Workspace/Machine Name Sync",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.setSharingProfile",
"title": "Set Sharing Profile",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.clearAzureSettings",
"title": "Clear Azure Settings",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.clearCache",
"title": "Clear Cache",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.showDashboard",
"title": "Show Team Dashboard",
"category": "Copilot Token Tracker"
},
{
"command": "copilot-token-tracker.showEnvironmental",
"title": "Show Environmental Impact",
"category": "Copilot Token Tracker"
}
],
"configuration": {
"title": "Copilot Token Tracker",
"properties": {
"copilotTokenTracker.backend.enabled": {
"type": "boolean",
"default": false,
"description": "Enable backend sync to an Azure-backed store (default: Azure Storage Tables)."
},
"copilotTokenTracker.backend.backend": {
"type": "string",
"enum": [
"storageTables"
],
"default": "storageTables",
"description": "Backend sync backend. MVP supports Azure Storage Tables."
},
"copilotTokenTracker.backend.authMode": {
"type": "string",
"enum": [
"entraId",
"sharedKey"
],
"default": "entraId",
"description": "Authentication mode for backend sync data-plane access. Default is Entra ID RBAC (DefaultAzureCredential). Shared Key uses VS Code SecretStorage and does not sync across devices."
},
"copilotTokenTracker.backend.datasetId": {
"type": "string",
"default": "default",
"description": "Logical dataset identifier to avoid accidental mixing when sharing a backend."
},
"copilotTokenTracker.backend.sharingProfile": {
"type": "string",
"enum": [
"off",
"soloFull",
"teamAnonymized",
"teamPseudonymous",
"teamIdentified"
],
"default": "off",
"description": "Sharing Profile (single source of truth): off (no cloud sync), soloFull (personal full fidelity), teamAnonymized (no per-user key), teamPseudonymous (stable per-user key), teamIdentified (explicit identity)."
},
"copilotTokenTracker.backend.userId": {
"type": "string",
"default": "",
"description": "Optional user identifier to enable team-wide reporting with per-user filtering. Empty disables the user dimension."
},
"copilotTokenTracker.backend.shareWithTeam": {
"type": "boolean",
"default": false,
"description": "Explicit consent flag. When false, no per-user identifier is written to the backend store."
},
"copilotTokenTracker.backend.shareWorkspaceMachineNames": {
"type": "boolean",
"default": false,
"description": "When team sharing is enabled, also write workspace and machine display names to the backend store (may contain sensitive information)."
},
"copilotTokenTracker.backend.shareConsentAt": {
"type": "string",
"default": "",
"description": "ISO timestamp when team sharing was enabled (consent recorded)."
},
"copilotTokenTracker.backend.userIdentityMode": {
"type": "string",
"enum": [
"pseudonymous",
"teamAlias",
"entraObjectId"
],
"default": "pseudonymous",
"description": "How the per-user dimension is derived when team sharing is enabled. pseudonymous hashes Entra claims scoped to datasetId; teamAlias uses backend.userId (validated); entraObjectId stores a GUID (advanced)."
},
"copilotTokenTracker.backend.userIdMode": {
"type": "string",
"enum": [
"alias",
"custom"
],
"default": "alias",
"description": "How the user identifier is intended to be used. 'alias' is recommended; 'custom' may contain personal data (PII)."
},
"copilotTokenTracker.backend.subscriptionId": {
"type": "string",
"default": "",
"description": "Azure subscription ID used for provisioning (wizard-managed)."
},
"copilotTokenTracker.backend.resourceGroup": {
"type": "string",
"default": "",
"description": "Azure resource group name for the Storage account (wizard-managed)."
},
"copilotTokenTracker.backend.storageAccount": {
"type": "string",
"default": "",
"description": "Azure Storage account name for backend sync (wizard-managed)."
},
"copilotTokenTracker.backend.aggTable": {
"type": "string",
"default": "usageAggDaily",
"description": "Azure Table name for daily rollups."
},
"copilotTokenTracker.backend.eventsTable": {
"type": "string",
"default": "usageEvents",
"description": "Azure Table name for optional raw events (not required for MVP reporting)."
},
"copilotTokenTracker.backend.lookbackDays": {
"type": "number",
"default": 30,
"minimum": 1,
"maximum": 90,
"description": "Default backfill/lookback window (days) for syncing local usage to the backend store."
},
"copilotTokenTracker.backend.includeMachineBreakdown": {
"type": "boolean",
"default": false,
"description": "Include machine dimension in backend rollups. Recommended for correct cross-device convergence."
},
"copilotTokenTracker.backend.blobUploadEnabled": {
"type": "boolean",
"default": false,
"description": "Enable uploading session log files to Azure Blob Storage. Files are uploaded with configurable frequency and can be used by GitHub Copilot Coding Agent."
},
"copilotTokenTracker.backend.blobContainerName": {
"type": "string",
"default": "copilot-session-logs",
"description": "Name of the Azure Blob Storage container for session log files."
},
"copilotTokenTracker.backend.blobUploadFrequencyHours": {
"type": "number",
"default": 24,
"minimum": 1,
"maximum": 168,
"description": "How often to upload session log files to blob storage (in hours). Default is once per day (24 hours)."
},
"copilotTokenTracker.backend.blobCompressFiles": {
"type": "boolean",
"default": true,
"description": "Compress session log files with gzip before uploading to blob storage to reduce storage costs and bandwidth."
},
"copilot-token-tracker.sampleDataDirectory": {
"type": "string",
"default": "",
"description": "Screenshot/demo mode: when set to a folder path, overrides all session file scanning and returns only .json/.jsonl files from this directory. Leave empty for normal operation."
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "npm run check-types && npm run lint && node esbuild.js",
"watch": "npm-run-all -p watch:*",
"watch:esbuild": "node esbuild.js --watch",
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
"package": "npm run check-types && npm run lint && node esbuild.js --production",
"compile-tests": "node -e \"const fs = require('fs'); fs.mkdirSync('out/test', { recursive: true }); fs.cpSync('package.json', 'out/package.json', { force: true }); fs.cpSync('package.json', 'out/test/package.json', { force: true });\" && tsc -p tsconfig.tests.json",
"watch-tests": "tsc -p tsconfig.tests.json -w",
"pretest": "npm run compile && npm run compile-tests && npm run lint",
"check-types": "tsc --noEmit",
"lint": "eslint src",
"lint:css": "stylelint \"src/webview/**/*.css\"",
"lint:json": "node scripts/validate-json.js",
"test": "vscode-test",
"test:node": "npm run compile-tests && node --require ./out/test/unit/vscode-shim-register.js --test --test-force-exit out/test/unit/*.test.js",
"test:coverage": "npm run compile-tests && node --require ./out/test/unit/vscode-shim-register.js --experimental-test-coverage --test --test-force-exit --test-coverage-lines=80 --test-coverage-functions=80 --test-coverage-branches=60 --test-coverage-include=out/src/backend/**/*.js --test-coverage-include=out/src/utils/**/*.js out/test/unit/*.test.js",
"pre-release": "node scripts/pre-release.js",
"capture-screenshots": "pwsh -File scripts/capture-screenshots.ps1",
"sync-changelog": "node scripts/sync-changelog.js",
"sync-changelog:test": "node scripts/sync-changelog.js --test"
},
"devDependencies": {
"@github/copilot": "^1.0.5",
"@types/mocha": "^10.0.10",
"@types/node": "^25.5.0",
"@types/vscode": "1.110.0",
"@typescript-eslint/eslint-plugin": "^8.57.0",
"@typescript-eslint/parser": "^8.42.0",
"@vscode/test-cli": "^0.0.12",
"@vscode/test-electron": "^2.5.2",
"@vscode/vsce": "^3.7.1",
"esbuild": "^0.27.4",
"eslint": "^9.39.2",
"npm-run-all": "^4.1.5",
"stylelint": "^17.4.0",
"stylelint-config-standard": "^40.0.0",
"typescript": "^5.9.3"
},
"dependencies": {
"@azure/arm-resources": "^7.0.0",
"@azure/arm-resources-subscriptions": "^2.1.0",
"@azure/arm-storage": "^19.1.0",
"@azure/arm-subscriptions": "^6.0.0",
"@azure/data-tables": "^13.3.2",
"@azure/identity": "^4.13.0",
"@azure/storage-blob": "^12.31.0",
"@vscode/webview-ui-toolkit": "^1.4.0",
"chart.js": "^4.4.1",
"html-escape": "^2.0.0",
"html2canvas": "1.4.1",
"jsdom": "^29.0.0",
"jspdf": "4.2.1",
"pptxgenjs": "4.0.1",
"sql.js": "1.14.1"
},
"overrides": {
"diff": ">=8.0.3",
"serialize-javascript": ">=7.0.3"
}
}