@codemieai/code 0.0.26 → 0.0.28

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 (229) hide show
  1. package/README.md +1 -1
  2. package/bin/codemie.js +20 -1
  3. package/dist/agents/codemie-code/agent.js +1 -1
  4. package/dist/agents/codemie-code/config.d.ts +1 -1
  5. package/dist/agents/codemie-code/config.d.ts.map +1 -1
  6. package/dist/agents/codemie-code/config.js +3 -3
  7. package/dist/agents/codemie-code/config.js.map +1 -1
  8. package/dist/agents/codemie-code/index.js +1 -1
  9. package/dist/agents/codemie-code/storage/todoStorage.d.ts.map +1 -1
  10. package/dist/agents/codemie-code/storage/todoStorage.js +2 -2
  11. package/dist/agents/codemie-code/storage/todoStorage.js.map +1 -1
  12. package/dist/agents/codemie-code/tools/index.js +1 -1
  13. package/dist/agents/codemie-code/tools/index.js.map +1 -1
  14. package/dist/agents/codemie-code/ui.d.ts.map +1 -1
  15. package/dist/agents/codemie-code/ui.js +9 -8
  16. package/dist/agents/codemie-code/ui.js.map +1 -1
  17. package/dist/agents/core/AgentCLI.js +2 -2
  18. package/dist/agents/core/AgentCLI.js.map +1 -1
  19. package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
  20. package/dist/agents/core/BaseAgentAdapter.js +6 -6
  21. package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
  22. package/dist/agents/core/BaseMetricsAdapter.js +1 -1
  23. package/dist/agents/core/BaseMetricsAdapter.js.map +1 -1
  24. package/dist/agents/core/lifecycle-helpers.d.ts +2 -1
  25. package/dist/agents/core/lifecycle-helpers.d.ts.map +1 -1
  26. package/dist/agents/core/lifecycle-helpers.js +38 -17
  27. package/dist/agents/core/lifecycle-helpers.js.map +1 -1
  28. package/dist/agents/core/metrics/MetricsOrchestrator.js +2 -2
  29. package/dist/agents/core/metrics/MetricsOrchestrator.js.map +1 -1
  30. package/dist/agents/core/metrics/core/DeltaWriter.js +1 -1
  31. package/dist/agents/core/metrics/core/DeltaWriter.js.map +1 -1
  32. package/dist/agents/core/metrics/session/SessionStore.js +1 -1
  33. package/dist/agents/core/metrics/session/SessionStore.js.map +1 -1
  34. package/dist/agents/core/metrics-config.d.ts.map +1 -1
  35. package/dist/agents/core/metrics-config.js +4 -3
  36. package/dist/agents/core/metrics-config.js.map +1 -1
  37. package/dist/agents/plugins/claude.metrics.js +2 -2
  38. package/dist/agents/plugins/claude.metrics.js.map +1 -1
  39. package/dist/agents/plugins/codemie-code.plugin.js +1 -1
  40. package/dist/agents/plugins/codemie-code.plugin.js.map +1 -1
  41. package/dist/agents/plugins/codex.metrics.d.ts +69 -0
  42. package/dist/agents/plugins/codex.metrics.d.ts.map +1 -0
  43. package/dist/agents/plugins/codex.metrics.js +483 -0
  44. package/dist/agents/plugins/codex.metrics.js.map +1 -0
  45. package/dist/agents/plugins/codex.plugin.d.ts +7 -3
  46. package/dist/agents/plugins/codex.plugin.d.ts.map +1 -1
  47. package/dist/agents/plugins/codex.plugin.js +41 -205
  48. package/dist/agents/plugins/codex.plugin.js.map +1 -1
  49. package/dist/agents/plugins/deepagents.plugin.js +1 -1
  50. package/dist/agents/plugins/deepagents.plugin.js.map +1 -1
  51. package/dist/agents/plugins/gemini.metrics.js +1 -1
  52. package/dist/agents/plugins/gemini.metrics.js.map +1 -1
  53. package/dist/cli/commands/analytics/data-loader.d.ts.map +1 -1
  54. package/dist/cli/commands/analytics/data-loader.js +2 -2
  55. package/dist/cli/commands/analytics/data-loader.js.map +1 -1
  56. package/dist/cli/commands/doctor/checks/AIConfigCheck.js +1 -1
  57. package/dist/cli/commands/doctor/checks/AIConfigCheck.js.map +1 -1
  58. package/dist/cli/commands/doctor/checks/AwsCliCheck.js +1 -1
  59. package/dist/cli/commands/doctor/checks/AwsCliCheck.js.map +1 -1
  60. package/dist/cli/commands/doctor/checks/NpmCheck.js +1 -1
  61. package/dist/cli/commands/doctor/checks/NpmCheck.js.map +1 -1
  62. package/dist/cli/commands/doctor/checks/PythonCheck.js +1 -1
  63. package/dist/cli/commands/doctor/checks/PythonCheck.js.map +1 -1
  64. package/dist/cli/commands/doctor/checks/UvCheck.js +1 -1
  65. package/dist/cli/commands/doctor/checks/UvCheck.js.map +1 -1
  66. package/dist/cli/commands/doctor/types.d.ts +1 -1
  67. package/dist/cli/commands/doctor/types.d.ts.map +1 -1
  68. package/dist/cli/commands/profile/auth.js +1 -1
  69. package/dist/cli/commands/profile/auth.js.map +1 -1
  70. package/dist/{utils/profile-display.d.ts → cli/commands/profile/display.d.ts} +3 -3
  71. package/dist/cli/commands/profile/display.d.ts.map +1 -0
  72. package/dist/{utils/profile-display.js → cli/commands/profile/display.js} +2 -2
  73. package/dist/cli/commands/profile/display.js.map +1 -0
  74. package/dist/cli/commands/profile/index.js +2 -2
  75. package/dist/cli/commands/profile/index.js.map +1 -1
  76. package/dist/cli/commands/setup.js +1 -1
  77. package/dist/cli/commands/setup.js.map +1 -1
  78. package/dist/cli/commands/update.d.ts +3 -0
  79. package/dist/cli/commands/update.d.ts.map +1 -0
  80. package/dist/cli/commands/update.js +290 -0
  81. package/dist/cli/commands/update.js.map +1 -0
  82. package/dist/cli/commands/version.js +1 -1
  83. package/dist/cli/commands/version.js.map +1 -1
  84. package/dist/cli/first-time.d.ts.map +1 -0
  85. package/dist/{utils → cli}/first-time.js +1 -1
  86. package/dist/cli/first-time.js.map +1 -0
  87. package/dist/cli/index.js +4 -2
  88. package/dist/cli/index.js.map +1 -1
  89. package/dist/env/manager.d.ts.map +1 -1
  90. package/dist/env/manager.js +3 -4
  91. package/dist/env/manager.js.map +1 -1
  92. package/dist/frameworks/core/BaseFrameworkAdapter.js +1 -1
  93. package/dist/frameworks/core/BaseFrameworkAdapter.js.map +1 -1
  94. package/dist/frameworks/plugins/bmad.plugin.js +2 -2
  95. package/dist/frameworks/plugins/bmad.plugin.js.map +1 -1
  96. package/dist/frameworks/plugins/speckit.plugin.js +1 -1
  97. package/dist/frameworks/plugins/speckit.plugin.js.map +1 -1
  98. package/dist/index.d.ts +1 -1
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.js +1 -1
  101. package/dist/index.js.map +1 -1
  102. package/dist/migrations/001-config-rename.migration.d.ts +33 -0
  103. package/dist/migrations/001-config-rename.migration.d.ts.map +1 -0
  104. package/dist/migrations/001-config-rename.migration.js +206 -0
  105. package/dist/migrations/001-config-rename.migration.js.map +1 -0
  106. package/dist/migrations/index.d.ts +22 -0
  107. package/dist/migrations/index.d.ts.map +1 -0
  108. package/dist/migrations/index.js +26 -0
  109. package/dist/migrations/index.js.map +1 -0
  110. package/dist/migrations/registry.d.ts +28 -0
  111. package/dist/migrations/registry.d.ts.map +1 -0
  112. package/dist/migrations/registry.js +35 -0
  113. package/dist/migrations/registry.js.map +1 -0
  114. package/dist/migrations/runner.d.ts +26 -0
  115. package/dist/migrations/runner.d.ts.map +1 -0
  116. package/dist/migrations/runner.js +117 -0
  117. package/dist/migrations/runner.js.map +1 -0
  118. package/dist/migrations/tracker.d.ts +40 -0
  119. package/dist/migrations/tracker.d.ts.map +1 -0
  120. package/dist/migrations/tracker.js +114 -0
  121. package/dist/migrations/tracker.js.map +1 -0
  122. package/dist/migrations/types.d.ts +54 -0
  123. package/dist/migrations/types.d.ts.map +1 -0
  124. package/dist/migrations/types.js +6 -0
  125. package/dist/migrations/types.js.map +1 -0
  126. package/dist/providers/core/base/http-client.js +1 -1
  127. package/dist/providers/core/types.d.ts +19 -0
  128. package/dist/providers/core/types.d.ts.map +1 -1
  129. package/dist/providers/integration/setup-ui.js +1 -1
  130. package/dist/providers/integration/setup-ui.js.map +1 -1
  131. package/dist/providers/plugins/bedrock/bedrock.health.d.ts +4 -0
  132. package/dist/providers/plugins/bedrock/bedrock.health.d.ts.map +1 -1
  133. package/dist/providers/plugins/bedrock/bedrock.health.js +23 -0
  134. package/dist/providers/plugins/bedrock/bedrock.health.js.map +1 -1
  135. package/dist/providers/plugins/bedrock/bedrock.template.d.ts.map +1 -1
  136. package/dist/providers/plugins/bedrock/bedrock.template.js +85 -0
  137. package/dist/providers/plugins/bedrock/bedrock.template.js.map +1 -1
  138. package/dist/providers/plugins/ollama/ollama.template.d.ts.map +1 -1
  139. package/dist/providers/plugins/ollama/ollama.template.js +10 -0
  140. package/dist/providers/plugins/ollama/ollama.template.js.map +1 -1
  141. package/dist/providers/plugins/sso/metrics/sync/sso.metrics-sender.js +1 -1
  142. package/dist/providers/plugins/sso/metrics/sync/sso.metrics-sender.js.map +1 -1
  143. package/dist/providers/plugins/sso/sso.auth.js +1 -1
  144. package/dist/providers/plugins/sso/sso.auth.js.map +1 -1
  145. package/dist/providers/plugins/sso/sso.http-client.d.ts +1 -1
  146. package/dist/providers/plugins/sso/sso.http-client.js +1 -1
  147. package/dist/providers/plugins/sso/sso.http-client.js.map +1 -1
  148. package/dist/providers/plugins/sso/sso.setup-steps.d.ts.map +1 -1
  149. package/dist/providers/plugins/sso/sso.setup-steps.js +11 -3
  150. package/dist/providers/plugins/sso/sso.setup-steps.js.map +1 -1
  151. package/dist/providers/plugins/sso/sso.template.d.ts.map +1 -1
  152. package/dist/providers/plugins/sso/sso.template.js +17 -0
  153. package/dist/providers/plugins/sso/sso.template.js.map +1 -1
  154. package/dist/utils/{config-loader.d.ts → config.d.ts} +6 -1
  155. package/dist/utils/config.d.ts.map +1 -0
  156. package/dist/utils/{config-loader.js → config.js} +39 -34
  157. package/dist/utils/config.js.map +1 -0
  158. package/dist/utils/errors.d.ts +89 -0
  159. package/dist/utils/errors.d.ts.map +1 -1
  160. package/dist/utils/errors.js +340 -0
  161. package/dist/utils/errors.js.map +1 -1
  162. package/dist/utils/exec.d.ts +6 -0
  163. package/dist/utils/exec.d.ts.map +1 -1
  164. package/dist/utils/exec.js +6 -0
  165. package/dist/utils/exec.js.map +1 -1
  166. package/dist/utils/logger.js +3 -3
  167. package/dist/utils/logger.js.map +1 -1
  168. package/dist/utils/{json-parser.d.ts → parsers.d.ts} +1 -1
  169. package/dist/utils/parsers.d.ts.map +1 -0
  170. package/dist/utils/{json-parser.js → parsers.js} +1 -1
  171. package/dist/utils/parsers.js.map +1 -0
  172. package/dist/utils/{path-utils.d.ts → paths.d.ts} +58 -8
  173. package/dist/utils/paths.d.ts.map +1 -0
  174. package/dist/utils/{path-utils.js → paths.js} +81 -8
  175. package/dist/utils/paths.js.map +1 -0
  176. package/dist/utils/{npm.d.ts → processes.d.ts} +42 -7
  177. package/dist/utils/processes.d.ts.map +1 -0
  178. package/dist/utils/{npm.js → processes.js} +123 -9
  179. package/dist/utils/processes.js.map +1 -0
  180. package/dist/utils/profile.d.ts +1 -16
  181. package/dist/utils/profile.d.ts.map +1 -1
  182. package/dist/utils/profile.js +1 -27
  183. package/dist/utils/profile.js.map +1 -1
  184. package/dist/utils/security.d.ts +62 -0
  185. package/dist/utils/security.d.ts.map +1 -0
  186. package/dist/utils/security.js +396 -0
  187. package/dist/utils/security.js.map +1 -0
  188. package/package.json +3 -3
  189. package/dist/utils/config-loader.d.ts.map +0 -1
  190. package/dist/utils/config-loader.js.map +0 -1
  191. package/dist/utils/credential-store.d.ts +0 -22
  192. package/dist/utils/credential-store.d.ts.map +0 -1
  193. package/dist/utils/credential-store.js +0 -165
  194. package/dist/utils/credential-store.js.map +0 -1
  195. package/dist/utils/dirname.d.ts +0 -7
  196. package/dist/utils/dirname.d.ts.map +0 -1
  197. package/dist/utils/dirname.js +0 -11
  198. package/dist/utils/dirname.js.map +0 -1
  199. package/dist/utils/error-context.d.ts +0 -90
  200. package/dist/utils/error-context.d.ts.map +0 -1
  201. package/dist/utils/error-context.js +0 -338
  202. package/dist/utils/error-context.js.map +0 -1
  203. package/dist/utils/first-time.d.ts.map +0 -1
  204. package/dist/utils/first-time.js.map +0 -1
  205. package/dist/utils/git.d.ts +0 -13
  206. package/dist/utils/git.d.ts.map +0 -1
  207. package/dist/utils/git.js +0 -37
  208. package/dist/utils/git.js.map +0 -1
  209. package/dist/utils/installation-id.d.ts +0 -10
  210. package/dist/utils/installation-id.d.ts.map +0 -1
  211. package/dist/utils/installation-id.js +0 -30
  212. package/dist/utils/installation-id.js.map +0 -1
  213. package/dist/utils/json-parser.d.ts.map +0 -1
  214. package/dist/utils/json-parser.js.map +0 -1
  215. package/dist/utils/npm.d.ts.map +0 -1
  216. package/dist/utils/npm.js.map +0 -1
  217. package/dist/utils/path-utils.d.ts.map +0 -1
  218. package/dist/utils/path-utils.js.map +0 -1
  219. package/dist/utils/profile-display.d.ts.map +0 -1
  220. package/dist/utils/profile-display.js.map +0 -1
  221. package/dist/utils/sanitize.d.ts +0 -28
  222. package/dist/utils/sanitize.d.ts.map +0 -1
  223. package/dist/utils/sanitize.js +0 -212
  224. package/dist/utils/sanitize.js.map +0 -1
  225. package/dist/utils/which.d.ts +0 -20
  226. package/dist/utils/which.d.ts.map +0 -1
  227. package/dist/utils/which.js +0 -54
  228. package/dist/utils/which.js.map +0 -1
  229. /package/dist/{utils → cli}/first-time.d.ts +0 -0
@@ -1,165 +0,0 @@
1
- import * as crypto from 'crypto';
2
- import * as fs from 'fs/promises';
3
- import * as path from 'path';
4
- import * as os from 'os';
5
- const SERVICE_NAME = 'codemie-code';
6
- const ACCOUNT_NAME = 'sso-credentials';
7
- const FALLBACK_FILE = path.join(os.homedir(), '.codemie', 'sso-credentials.enc');
8
- const CREDENTIALS_DIR = path.join(os.homedir(), '.codemie', 'credentials');
9
- /**
10
- * Lazy load keytar to avoid requiring system dependencies during test imports
11
- * Falls back gracefully if keytar is not available (e.g., in CI environments)
12
- */
13
- let keytar = undefined;
14
- async function getKeytar() {
15
- if (keytar !== undefined) {
16
- return keytar;
17
- }
18
- try {
19
- keytar = await import('keytar');
20
- return keytar;
21
- }
22
- catch {
23
- // Keytar not available (missing system dependencies)
24
- keytar = null;
25
- return null;
26
- }
27
- }
28
- export class CredentialStore {
29
- static instance;
30
- encryptionKey;
31
- constructor() {
32
- this.encryptionKey = this.getOrCreateEncryptionKey();
33
- }
34
- static getInstance() {
35
- if (!CredentialStore.instance) {
36
- CredentialStore.instance = new CredentialStore();
37
- }
38
- return CredentialStore.instance;
39
- }
40
- /**
41
- * Generate a storage key for a given base URL
42
- * @param baseUrl - The base URL to hash
43
- * @returns Storage key (e.g., "sso-abc123...")
44
- */
45
- getUrlStorageKey(baseUrl) {
46
- const normalized = baseUrl.replace(/\/$/, '').toLowerCase();
47
- const hash = crypto.createHash('sha256').update(normalized).digest('hex');
48
- return `sso-${hash}`;
49
- }
50
- async storeSSOCredentials(credentials, baseUrl) {
51
- const encrypted = this.encrypt(JSON.stringify(credentials));
52
- // Determine storage key based on whether baseUrl is provided
53
- const accountName = baseUrl ? this.getUrlStorageKey(baseUrl) : ACCOUNT_NAME;
54
- const filePath = baseUrl
55
- ? path.join(CREDENTIALS_DIR, `${this.getUrlStorageKey(baseUrl)}.enc`)
56
- : FALLBACK_FILE;
57
- // Store to keychain if available (best effort, don't fail if it errors)
58
- const keytarModule = await getKeytar();
59
- if (keytarModule) {
60
- try {
61
- await keytarModule.setPassword(SERVICE_NAME, accountName, encrypted);
62
- }
63
- catch {
64
- // Continue to file storage even if keychain fails
65
- }
66
- }
67
- // Always store to file as well for consistency
68
- await this.storeToFile(encrypted, filePath);
69
- }
70
- async retrieveSSOCredentials(baseUrl) {
71
- // Determine storage key based on whether baseUrl is provided
72
- const accountName = baseUrl ? this.getUrlStorageKey(baseUrl) : ACCOUNT_NAME;
73
- const filePath = baseUrl
74
- ? path.join(CREDENTIALS_DIR, `${this.getUrlStorageKey(baseUrl)}.enc`)
75
- : FALLBACK_FILE;
76
- // Try keychain first if available
77
- const keytarModule = await getKeytar();
78
- if (keytarModule) {
79
- try {
80
- const encrypted = await keytarModule.getPassword(SERVICE_NAME, accountName);
81
- if (encrypted) {
82
- const decrypted = this.decrypt(encrypted);
83
- return JSON.parse(decrypted);
84
- }
85
- }
86
- catch {
87
- // Fall through to file storage
88
- }
89
- }
90
- // Always try file storage as fallback
91
- try {
92
- const encrypted = await this.retrieveFromFile(filePath);
93
- if (encrypted) {
94
- const decrypted = this.decrypt(encrypted);
95
- return JSON.parse(decrypted);
96
- }
97
- }
98
- catch {
99
- // Unable to decrypt file storage
100
- }
101
- return null;
102
- }
103
- async clearSSOCredentials(baseUrl) {
104
- // Determine storage key based on whether baseUrl is provided
105
- const accountName = baseUrl ? this.getUrlStorageKey(baseUrl) : ACCOUNT_NAME;
106
- const filePath = baseUrl
107
- ? path.join(CREDENTIALS_DIR, `${this.getUrlStorageKey(baseUrl)}.enc`)
108
- : FALLBACK_FILE;
109
- // Clear keychain if available
110
- const keytarModule = await getKeytar();
111
- if (keytarModule) {
112
- try {
113
- await keytarModule.deletePassword(SERVICE_NAME, accountName);
114
- }
115
- catch {
116
- // Ignore errors, will try file storage next
117
- }
118
- }
119
- // Also clear file storage
120
- try {
121
- await fs.unlink(filePath);
122
- }
123
- catch {
124
- // Ignore file not found errors
125
- }
126
- }
127
- encrypt(text) {
128
- const iv = crypto.randomBytes(16);
129
- // Use a proper 32-byte key by hashing the encryptionKey
130
- const key = crypto.createHash('sha256').update(this.encryptionKey).digest();
131
- const cipher = crypto.createCipheriv('aes-256-cbc', key, iv);
132
- let encrypted = cipher.update(text, 'utf8', 'hex');
133
- encrypted += cipher.final('hex');
134
- return iv.toString('hex') + ':' + encrypted;
135
- }
136
- decrypt(text) {
137
- const [ivHex, encryptedHex] = text.split(':');
138
- const iv = Buffer.from(ivHex, 'hex');
139
- // Use a proper 32-byte key by hashing the encryptionKey
140
- const key = crypto.createHash('sha256').update(this.encryptionKey).digest();
141
- const decipher = crypto.createDecipheriv('aes-256-cbc', key, iv);
142
- let decrypted = decipher.update(encryptedHex, 'hex', 'utf8');
143
- decrypted += decipher.final('utf8');
144
- return decrypted;
145
- }
146
- getOrCreateEncryptionKey() {
147
- // Use machine-specific key based on hardware info
148
- const machineId = os.hostname() + os.platform() + os.arch();
149
- return crypto.createHash('sha256').update(machineId).digest('hex');
150
- }
151
- async storeToFile(encrypted, filePath) {
152
- const dir = path.dirname(filePath);
153
- await fs.mkdir(dir, { recursive: true });
154
- await fs.writeFile(filePath, encrypted, 'utf8');
155
- }
156
- async retrieveFromFile(filePath) {
157
- try {
158
- return await fs.readFile(filePath, 'utf8');
159
- }
160
- catch {
161
- return null;
162
- }
163
- }
164
- }
165
- //# sourceMappingURL=credential-store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"credential-store.js","sourceRoot":"","sources":["../../src/utils/credential-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAGzB,MAAM,YAAY,GAAG,cAAc,CAAC;AACpC,MAAM,YAAY,GAAG,iBAAiB,CAAC;AACvC,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,qBAAqB,CAAC,CAAC;AACjF,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;AAE3E;;;GAGG;AACH,IAAI,MAAM,GAA+C,SAAS,CAAC;AACnE,KAAK,UAAU,SAAS;IACtB,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;QAChC,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,MAAM,CAAC;QACP,qDAAqD;QACrD,MAAM,GAAG,IAAI,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,OAAO,eAAe;IAClB,MAAM,CAAC,QAAQ,CAAkB;IACjC,aAAa,CAAS;IAE9B;QACE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,wBAAwB,EAAE,CAAC;I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AAS,EAAE,MAAM,CAAC,CAAC;IAClD,CAAC;IAEO,KAAK,CAAC,gBAAgB,CAAC,QAAgB;QAC7C,IAAI,CAAC;YACH,OAAO,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC7C,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Get the directory name of the current module (ESM equivalent of __dirname)
3
- * @param importMetaUrl - Pass import.meta.url from the calling module
4
- * @returns The directory path
5
- */
6
- export declare function getDirname(importMetaUrl: string): string;
7
- //# sourceMappingURL=dirname.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dirname.d.ts","sourceRoot":"","sources":["../../src/utils/dirname.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAExD"}
@@ -1,11 +0,0 @@
1
- import { fileURLToPath } from 'url';
2
- import { dirname } from 'path';
3
- /**
4
- * Get the directory name of the current module (ESM equivalent of __dirname)
5
- * @param importMetaUrl - Pass import.meta.url from the calling module
6
- * @returns The directory path
7
- */
8
- export function getDirname(importMetaUrl) {
9
- return dirname(fileURLToPath(importMetaUrl));
10
- }
11
- //# sourceMappingURL=dirname.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dirname.js","sourceRoot":"","sources":["../../src/utils/dirname.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,aAAqB;IAC9C,OAAO,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC;AAC/C,CAAC"}
@@ -1,90 +0,0 @@
1
- /**
2
- * Comprehensive error context for debugging
3
- */
4
- export interface ErrorContext {
5
- error: {
6
- message: string;
7
- name: string;
8
- stack?: string;
9
- code?: string;
10
- };
11
- system: {
12
- platform: string;
13
- platformVersion: string;
14
- arch: string;
15
- nodeVersion: string;
16
- };
17
- client: {
18
- name: string;
19
- version: string;
20
- };
21
- session?: {
22
- sessionId?: string;
23
- agent?: string;
24
- provider?: string;
25
- model?: string;
26
- profile?: string;
27
- };
28
- timestamp: string;
29
- }
30
- /**
31
- * Create comprehensive error context for logging and debugging
32
- *
33
- * @param error - The error that occurred
34
- * @param sessionContext - Optional session context (session ID, agent, provider, etc.)
35
- * @returns Complete error context with system info, client version, and stack trace
36
- *
37
- * @example
38
- * ```typescript
39
- * try {
40
- * await writeMetrics();
41
- * } catch (error) {
42
- * const context = createErrorContext(error, { sessionId, agent: 'claude' });
43
- * logger.error('Metrics write failed', context);
44
- * }
45
- * ```
46
- */
47
- export declare function createErrorContext(error: unknown, sessionContext?: ErrorContext['session']): ErrorContext;
48
- /**
49
- * Format error context as human-readable string for console display
50
- *
51
- * @param context - Error context to format
52
- * @param options - Formatting options
53
- * @returns Formatted error message
54
- *
55
- * @example
56
- * ```typescript
57
- * const context = createErrorContext(error, { sessionId });
58
- * console.error(formatErrorForUser(context, { showStack: false }));
59
- * ```
60
- */
61
- export declare function formatErrorForUser(context: ErrorContext, options?: {
62
- showStack?: boolean;
63
- showSystem?: boolean;
64
- }): string;
65
- /**
66
- * Format error context as JSON for logging to file
67
- *
68
- * @param context - Error context to format
69
- * @returns JSON string with full error details
70
- */
71
- export declare function formatErrorForLog(context: ErrorContext): string;
72
- /**
73
- * Create user-friendly explanation for common error types
74
- *
75
- * @param error - The error that occurred
76
- * @returns Human-readable explanation and suggested actions
77
- */
78
- export declare function getErrorExplanation(error: unknown): {
79
- explanation: string;
80
- suggestions: string[];
81
- };
82
- /**
83
- * Format error with explanation for user display
84
- *
85
- * @param error - The error that occurred
86
- * @param sessionContext - Optional session context
87
- * @returns Formatted error message with explanation
88
- */
89
- export declare function formatErrorWithExplanation(error: unknown, sessionContext?: ErrorContext['session']): string;
90
- //# sourceMappingURL=error-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-context.d.ts","sourceRoot":"","sources":["../../src/utils/error-context.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,WAAW,YAAY;IAE3B,KAAK,EAAE;QACL,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAGF,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;QACjB,eAAe,EAAE,MAAM,CAAC;QACxB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IAGF,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IAGF,OAAO,CAAC,EAAE;QACR,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IAGF,SAAS,EAAE,MAAM,CAAC;CACnB;AA+FD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,OAAO,EACd,cAAc,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,GACvC,YAAY,CAWd;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,YAAY,EACrB,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,GAC1D,MAAM,CAsDR;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAE/D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAmFA;AA6BD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,OAAO,EACd,cAAc,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,GACvC,MAAM,CAgCR"}
@@ -1,338 +0,0 @@
1
- import { platform, release, arch } from 'os';
2
- import { readFileSync } from 'fs';
3
- import { join } from 'path';
4
- import { fileURLToPath } from 'url';
5
- import { dirname } from 'path';
6
- const __filename = fileURLToPath(import.meta.url);
7
- const __dirname = dirname(__filename);
8
- /**
9
- * Get client version from package.json
10
- */
11
- function getClientVersion() {
12
- try {
13
- // Try to read package.json from project root
14
- const packageJsonPath = join(__dirname, '..', '..', 'package.json');
15
- const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
16
- return packageJson.version || 'unknown';
17
- }
18
- catch {
19
- return 'unknown';
20
- }
21
- }
22
- /**
23
- * Get detailed OS information
24
- */
25
- function getSystemInfo() {
26
- return {
27
- platform: platform(),
28
- platformVersion: release(),
29
- arch: arch(),
30
- nodeVersion: process.version
31
- };
32
- }
33
- /**
34
- * Extract error details from unknown error type
35
- */
36
- function extractErrorDetails(error) {
37
- if (error instanceof Error) {
38
- return {
39
- message: error.message,
40
- name: error.name,
41
- stack: error.stack,
42
- code: error.code
43
- };
44
- }
45
- if (typeof error === 'string') {
46
- return {
47
- message: error,
48
- name: 'Error',
49
- stack: new Error(error).stack
50
- };
51
- }
52
- // Handle objects (extract meaningful info)
53
- if (typeof error === 'object' && error !== null) {
54
- const errorObj = error;
55
- let message;
56
- if (typeof errorObj.message === 'string' && errorObj.message.trim()) {
57
- message = errorObj.message;
58
- }
59
- else if (typeof errorObj.error === 'string' && errorObj.error.trim()) {
60
- message = errorObj.error;
61
- }
62
- else if (typeof errorObj.description === 'string' && errorObj.description.trim()) {
63
- message = errorObj.description;
64
- }
65
- else {
66
- try {
67
- const stringified = JSON.stringify(error, null, 2);
68
- if (stringified && stringified !== '{}' && stringified !== '[object Object]') {
69
- message = stringified;
70
- }
71
- else {
72
- message = `Error object: ${Object.keys(errorObj).join(', ')}`;
73
- }
74
- }
75
- catch {
76
- message = `Error object: ${Object.keys(errorObj).join(', ')}`;
77
- }
78
- }
79
- const name = (typeof errorObj.name === 'string' ? errorObj.name : null) || 'UnknownError';
80
- const code = (typeof errorObj.code === 'string' ? errorObj.code : undefined);
81
- const stack = (typeof errorObj.stack === 'string' ? errorObj.stack : undefined) || new Error(message).stack;
82
- return {
83
- message,
84
- name,
85
- stack,
86
- code
87
- };
88
- }
89
- // Fallback for primitives
90
- const message = String(error);
91
- return {
92
- message,
93
- name: 'UnknownError',
94
- stack: new Error(message).stack
95
- };
96
- }
97
- /**
98
- * Create comprehensive error context for logging and debugging
99
- *
100
- * @param error - The error that occurred
101
- * @param sessionContext - Optional session context (session ID, agent, provider, etc.)
102
- * @returns Complete error context with system info, client version, and stack trace
103
- *
104
- * @example
105
- * ```typescript
106
- * try {
107
- * await writeMetrics();
108
- * } catch (error) {
109
- * const context = createErrorContext(error, { sessionId, agent: 'claude' });
110
- * logger.error('Metrics write failed', context);
111
- * }
112
- * ```
113
- */
114
- export function createErrorContext(error, sessionContext) {
115
- return {
116
- error: extractErrorDetails(error),
117
- system: getSystemInfo(),
118
- client: {
119
- name: 'codemie-code',
120
- version: getClientVersion()
121
- },
122
- session: sessionContext,
123
- timestamp: new Date().toISOString()
124
- };
125
- }
126
- /**
127
- * Format error context as human-readable string for console display
128
- *
129
- * @param context - Error context to format
130
- * @param options - Formatting options
131
- * @returns Formatted error message
132
- *
133
- * @example
134
- * ```typescript
135
- * const context = createErrorContext(error, { sessionId });
136
- * console.error(formatErrorForUser(context, { showStack: false }));
137
- * ```
138
- */
139
- export function formatErrorForUser(context, options = {}) {
140
- const { showStack = false, showSystem = true } = options;
141
- const lines = [];
142
- // Error message (just the message, not the name) - wrapped at 100 chars
143
- const wrappedError = wrapText(context.error.message, 97, ' '); // 97 to account for "❌ " prefix
144
- lines.push(`❌ ${wrappedError[0].trim()}`);
145
- for (let i = 1; i < wrappedError.length; i++) {
146
- lines.push(wrappedError[i]);
147
- }
148
- // System info (for support/debugging)
149
- if (showSystem) {
150
- lines.push('');
151
- lines.push('System Information:');
152
- lines.push(` • OS: ${context.system.platform} ${context.system.platformVersion} (${context.system.arch})`);
153
- lines.push(` • Node.js: ${context.system.nodeVersion}`);
154
- lines.push(` • CodeMie CLI: v${context.client.version}`);
155
- }
156
- // Session context (if available)
157
- if (context.session) {
158
- lines.push('');
159
- lines.push('Session Information:');
160
- if (context.session.sessionId) {
161
- lines.push(` • Session ID: ${context.session.sessionId}`);
162
- }
163
- if (context.session.agent) {
164
- lines.push(` • Agent: ${context.session.agent}`);
165
- }
166
- if (context.session.provider) {
167
- lines.push(` • Provider: ${context.session.provider}`);
168
- }
169
- if (context.session.model) {
170
- lines.push(` • Model: ${context.session.model}`);
171
- }
172
- if (context.session.profile) {
173
- lines.push(` • Profile: ${context.session.profile}`);
174
- }
175
- }
176
- // Stack trace (for debugging)
177
- if (showStack && context.error.stack) {
178
- lines.push('');
179
- lines.push('Stack Trace:');
180
- lines.push(context.error.stack);
181
- }
182
- // Timestamp
183
- lines.push('');
184
- lines.push(`Timestamp: ${context.timestamp}`);
185
- return lines.join('\n');
186
- }
187
- /**
188
- * Format error context as JSON for logging to file
189
- *
190
- * @param context - Error context to format
191
- * @returns JSON string with full error details
192
- */
193
- export function formatErrorForLog(context) {
194
- return JSON.stringify(context, null, 2);
195
- }
196
- /**
197
- * Create user-friendly explanation for common error types
198
- *
199
- * @param error - The error that occurred
200
- * @returns Human-readable explanation and suggested actions
201
- */
202
- export function getErrorExplanation(error) {
203
- const errorDetails = extractErrorDetails(error);
204
- const message = errorDetails.message.toLowerCase();
205
- const code = errorDetails.code?.toUpperCase();
206
- // File system errors - metrics specific context
207
- if (code === 'ENOENT') {
208
- return {
209
- explanation: 'Unable to access metrics storage directory. The agent will work, but you\'re missing important features: token usage tracking, cost monitoring, session history, and usage analytics. This limits your ability to optimize and monitor your AI usage.',
210
- suggestions: [
211
- 'Without metrics: No token tracking, no usage insights, no session history',
212
- 'To enable these features: Check if ~/.codemie/metrics/ directory exists',
213
- 'Ensure you have proper file system permissions'
214
- ]
215
- };
216
- }
217
- if (code === 'EACCES' || code === 'EPERM') {
218
- return {
219
- explanation: 'Cannot write to metrics directory due to permissions. The agent will work, but important features are disabled: token tracking (you won\'t know your costs), usage analytics (can\'t optimize), and session history (can\'t review past work). We recommend fixing this.',
220
- suggestions: [
221
- 'You\'re missing: Token/cost tracking, usage insights, session history',
222
- 'To enable these features: Fix file permissions on ~/.codemie/ directory',
223
- 'Run: chmod -R u+w ~/.codemie/ to restore access'
224
- ]
225
- };
226
- }
227
- if (code === 'ENOSPC') {
228
- return {
229
- explanation: 'Insufficient disk space for metrics storage. The agent will work, but critical features are unavailable: you cannot track token usage, monitor costs, view session history, or access usage insights until space is freed.',
230
- suggestions: [
231
- 'You\'re missing: Token/cost tracking, usage insights, session history',
232
- 'Free up disk space to enable these important features',
233
- 'Clean up old log files: ~/.codemie/logs/ or other unnecessary files'
234
- ]
235
- };
236
- }
237
- // Network errors
238
- if (message.includes('timeout') || code === 'ETIMEDOUT') {
239
- return {
240
- explanation: 'Network timeout during metrics sync. The agent will work, but your usage data isn\'t being synced to the server. You\'ll lose visibility into token usage, costs, and session history across devices or for team analytics.',
241
- suggestions: [
242
- 'You\'re missing: Cross-device sync, team analytics, historical usage data',
243
- 'Check your internet connection to restore sync',
244
- 'Local metrics will sync automatically when connection is restored'
245
- ]
246
- };
247
- }
248
- if (message.includes('econnrefused') || code === 'ECONNREFUSED') {
249
- return {
250
- explanation: 'Cannot connect to analytics server. The agent will work, but you\'re losing important tracking: no token usage monitoring, no cost tracking, no session history. You won\'t be able to optimize your AI usage or track expenses.',
251
- suggestions: [
252
- 'You\'re missing: Token/cost tracking, session history, usage optimization',
253
- 'Check if the analytics service is running and accessible',
254
- 'Verify your network and firewall settings allow connections'
255
- ]
256
- };
257
- }
258
- // Metrics-specific errors
259
- if (message.includes('metric') || message.includes('session')) {
260
- return {
261
- explanation: 'Unable to store usage analytics. The agent will work, but you cannot track tokens, monitor costs, view session history, or access usage insights. This is a significant disadvantage for managing AI usage and expenses.',
262
- suggestions: [
263
- 'You\'re missing: Token/cost tracking, usage insights, session history',
264
- 'To enable these important features: Check ~/.codemie/metrics/ directory permissions',
265
- 'These features help you optimize usage and control costs'
266
- ]
267
- };
268
- }
269
- // Generic error
270
- return {
271
- explanation: 'Metrics collection encountered an issue. The agent will work, but important features are unavailable: token tracking, cost monitoring, usage analytics, and session history. You won\'t be able to optimize your AI usage or track expenses.',
272
- suggestions: [
273
- 'You\'re missing: Token/cost tracking, usage insights, session history',
274
- 'These features are important for monitoring and optimizing AI usage',
275
- 'See log details below for technical information to resolve this'
276
- ]
277
- };
278
- }
279
- /**
280
- * Wrap text to a maximum line length
281
- */
282
- function wrapText(text, maxLength, indent = '') {
283
- const words = text.split(' ');
284
- const lines = [];
285
- let currentLine = indent;
286
- for (const word of words) {
287
- const testLine = currentLine + (currentLine === indent ? '' : ' ') + word;
288
- if (testLine.length <= maxLength) {
289
- currentLine = testLine;
290
- }
291
- else {
292
- if (currentLine !== indent) {
293
- lines.push(currentLine);
294
- }
295
- currentLine = indent + word;
296
- }
297
- }
298
- if (currentLine !== indent) {
299
- lines.push(currentLine);
300
- }
301
- return lines;
302
- }
303
- /**
304
- * Format error with explanation for user display
305
- *
306
- * @param error - The error that occurred
307
- * @param sessionContext - Optional session context
308
- * @returns Formatted error message with explanation
309
- */
310
- export function formatErrorWithExplanation(error, sessionContext) {
311
- const context = createErrorContext(error, sessionContext);
312
- const { explanation, suggestions } = getErrorExplanation(error);
313
- const lines = [];
314
- // Explanation first (user-friendly) - wrapped at 100 chars
315
- const wrappedExplanation = wrapText(explanation, 97, ' '); // 97 to account for "💡 " prefix
316
- lines.push(`💡 ${wrappedExplanation[0].trim()}`);
317
- for (let i = 1; i < wrappedExplanation.length; i++) {
318
- lines.push(wrappedExplanation[i]);
319
- }
320
- lines.push('');
321
- // Technical error details
322
- lines.push(formatErrorForUser(context, { showStack: false, showSystem: true }));
323
- // Suggestions
324
- if (suggestions.length > 0) {
325
- lines.push('');
326
- lines.push('Suggested actions:');
327
- suggestions.forEach(suggestion => {
328
- // Wrap each suggestion at 100 chars, accounting for " • " prefix
329
- const wrappedSuggestion = wrapText(suggestion, 96, ' '); // 96 to account for " • " prefix
330
- lines.push(` • ${wrappedSuggestion[0].trim()}`);
331
- for (let i = 1; i < wrappedSuggestion.length; i++) {
332
- lines.push(wrappedSuggestion[i]);
333
- }
334
- });
335
- }
336
- return lines.join('\n');
337
- }
338
- //# sourceMappingURL=error-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-context.js","sourceRoot":"","sources":["../../src/utils/error-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAyCtC;;GAEG;AACH,SAAS,gBAAgB;IACvB,IAAI,CAAC;QACH,6CAA6C;QAC7C,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK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