codex-session-insights 0.1.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.
- package/LICENSE +21 -0
- package/README.md +199 -0
- package/bin/codex-insights.js +9 -0
- package/lib/cli.js +1002 -0
- package/lib/codex-data.js +640 -0
- package/lib/llm-insights.js +1486 -0
- package/lib/model-provider.js +589 -0
- package/lib/report.js +1383 -0
- package/lib/types.d.ts +87 -0
- package/package.json +47 -0
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export interface CountMap {
|
|
2
|
+
[key: string]: number
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface SessionSummary {
|
|
6
|
+
id: string
|
|
7
|
+
title: string
|
|
8
|
+
cwd: string
|
|
9
|
+
model?: string
|
|
10
|
+
archived?: boolean
|
|
11
|
+
updatedAt: string
|
|
12
|
+
durationMinutes: number
|
|
13
|
+
userMessages: number
|
|
14
|
+
assistantMessages: number
|
|
15
|
+
totalToolCalls: number
|
|
16
|
+
totalCommandFailures: number
|
|
17
|
+
totalTokens: number
|
|
18
|
+
totalGitCommits: number
|
|
19
|
+
totalToolErrors: number
|
|
20
|
+
filesModified: number
|
|
21
|
+
linesAdded: number
|
|
22
|
+
linesRemoved: number
|
|
23
|
+
userInterruptions: number
|
|
24
|
+
usesTaskAgent: boolean
|
|
25
|
+
usesMcp: boolean
|
|
26
|
+
usesWebSearch: boolean
|
|
27
|
+
usesWebFetch: boolean
|
|
28
|
+
toolCounts: CountMap
|
|
29
|
+
toolFailures: CountMap
|
|
30
|
+
firstUserMessage?: string
|
|
31
|
+
transcriptForAnalysis?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface SessionFacet {
|
|
35
|
+
threadId: string
|
|
36
|
+
title: string
|
|
37
|
+
cwd: string
|
|
38
|
+
updatedAt: string
|
|
39
|
+
durationMinutes: number
|
|
40
|
+
userMessages: number
|
|
41
|
+
assistantMessages: number
|
|
42
|
+
totalToolCalls: number
|
|
43
|
+
totalCommandFailures: number
|
|
44
|
+
underlying_goal: string
|
|
45
|
+
goal_categories: CountMap
|
|
46
|
+
outcome: string
|
|
47
|
+
user_satisfaction_counts: CountMap
|
|
48
|
+
assistant_helpfulness: string
|
|
49
|
+
session_type: string
|
|
50
|
+
friction_counts: CountMap
|
|
51
|
+
friction_detail: string
|
|
52
|
+
primary_success: string
|
|
53
|
+
brief_summary: string
|
|
54
|
+
user_instructions: string[]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface UsageCounter {
|
|
58
|
+
calls: number
|
|
59
|
+
inputTokens: number
|
|
60
|
+
cachedInputTokens: number
|
|
61
|
+
outputTokens: number
|
|
62
|
+
totalTokens: number
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface AnalysisUsage {
|
|
66
|
+
total: UsageCounter
|
|
67
|
+
byModel: Array<UsageCounter & { label: string }>
|
|
68
|
+
byStage: Array<UsageCounter & { label: string }>
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface AtAGlance {
|
|
72
|
+
whats_working: string
|
|
73
|
+
whats_hindering: string
|
|
74
|
+
quick_wins: string
|
|
75
|
+
ambitious_workflows: string
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface InsightsSections {
|
|
79
|
+
at_a_glance: AtAGlance
|
|
80
|
+
project_areas: unknown
|
|
81
|
+
interaction_style: unknown
|
|
82
|
+
what_works: unknown
|
|
83
|
+
friction_analysis: unknown
|
|
84
|
+
suggestions: unknown
|
|
85
|
+
on_the_horizon: unknown
|
|
86
|
+
fun_ending: unknown
|
|
87
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "codex-session-insights",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Generate a report analyzing your Codex sessions.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"codex-session-insights": "./bin/codex-insights.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"lib",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=18"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/cosformula/codex-session-insights.git"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/cosformula/codex-session-insights#readme",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/cosformula/codex-session-insights/issues"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"report": "node ./bin/codex-insights.js report",
|
|
28
|
+
"generate:test-report": "node ./scripts/generate-test-report.mjs",
|
|
29
|
+
"test": "node --test",
|
|
30
|
+
"check": "node --check ./bin/codex-insights.js && node --check ./lib/cli.js && node --check ./lib/codex-data.js && node --check ./lib/report.js && node --check ./lib/llm-insights.js && node --check ./lib/model-provider.js && npm run typecheck",
|
|
31
|
+
"typecheck": "tsc --noEmit"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"codex",
|
|
35
|
+
"insights",
|
|
36
|
+
"cli",
|
|
37
|
+
"report"
|
|
38
|
+
],
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@inquirer/prompts": "^7.8.6",
|
|
41
|
+
"ora": "^8.2.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^24.6.0",
|
|
45
|
+
"typescript": "^5.9.3"
|
|
46
|
+
}
|
|
47
|
+
}
|