@optimizely/ocp-local-env 1.0.0-beta.6 → 1.0.0-beta.8

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 (142) hide show
  1. package/dist/package.json +2 -1
  2. package/dist/public/bundle.0a495807b6ef336cb500.js +3 -0
  3. package/dist/public/{bundle.932ab47a0dbf0319bc8b.js.LICENSE.txt → bundle.0a495807b6ef336cb500.js.LICENSE.txt} +33 -0
  4. package/dist/public/bundle.0a495807b6ef336cb500.js.map +1 -0
  5. package/dist/public/index.html +1 -1
  6. package/dist/src/cli.js +46 -19
  7. package/dist/src/cli.js.map +1 -1
  8. package/dist/src/executor/DestinationExecutor.js +13 -8
  9. package/dist/src/executor/DestinationExecutor.js.map +1 -1
  10. package/dist/src/executor/FunctionExecutor.js +4 -2
  11. package/dist/src/executor/FunctionExecutor.js.map +1 -1
  12. package/dist/src/executor/JobExecutor.js +1 -1
  13. package/dist/src/executor/JobExecutor.js.map +1 -1
  14. package/dist/src/executor/LifecycleExecutor.js +4 -2
  15. package/dist/src/executor/LifecycleExecutor.js.map +1 -1
  16. package/dist/src/executor/SourceExecutor.d.ts +32 -0
  17. package/dist/src/executor/SourceExecutor.js +163 -0
  18. package/dist/src/executor/SourceExecutor.js.map +1 -0
  19. package/dist/src/local_engine/LocalFunctionApi.d.ts +17 -0
  20. package/dist/src/local_engine/LocalFunctionApi.js +54 -0
  21. package/dist/src/local_engine/LocalFunctionApi.js.map +1 -0
  22. package/dist/src/local_engine/LocalJobApi.d.ts +38 -0
  23. package/dist/src/local_engine/LocalJobApi.js +180 -0
  24. package/dist/src/local_engine/LocalJobApi.js.map +1 -0
  25. package/dist/src/local_engine/local-engine-child-base.d.ts +16 -0
  26. package/dist/src/local_engine/local-engine-child-base.js +201 -14
  27. package/dist/src/local_engine/local-engine-child-base.js.map +1 -1
  28. package/dist/src/local_engine/local-engine-client.d.ts +70 -1
  29. package/dist/src/local_engine/local-engine-client.js +545 -26
  30. package/dist/src/local_engine/local-engine-client.js.map +1 -1
  31. package/dist/src/local_engine/local-engine-types.d.ts +99 -2
  32. package/dist/src/local_engine/local-engine-unified.d.ts +18 -0
  33. package/dist/src/local_engine/local-engine-unified.js +228 -2
  34. package/dist/src/local_engine/local-engine-unified.js.map +1 -1
  35. package/dist/src/local_engine/local-engine-utils.js +34 -7
  36. package/dist/src/local_engine/local-engine-utils.js.map +1 -1
  37. package/dist/src/local_engine/localSDKConfig.d.ts +2 -1
  38. package/dist/src/local_engine/localSDKConfig.js +95 -249
  39. package/dist/src/local_engine/localSDKConfig.js.map +1 -1
  40. package/dist/src/local_engine/storage/BaseKVStoreWrapper.d.ts +38 -0
  41. package/dist/src/local_engine/storage/BaseKVStoreWrapper.js +110 -0
  42. package/dist/src/local_engine/storage/BaseKVStoreWrapper.js.map +1 -0
  43. package/dist/src/local_engine/storage/LocalConfigStore.d.ts +18 -0
  44. package/dist/src/local_engine/storage/LocalConfigStore.js +52 -3
  45. package/dist/src/local_engine/storage/LocalConfigStore.js.map +1 -1
  46. package/dist/src/local_engine/storage/LocalJobStore.d.ts +1 -0
  47. package/dist/src/local_engine/storage/LocalJobStore.js +12 -2
  48. package/dist/src/local_engine/storage/LocalJobStore.js.map +1 -1
  49. package/dist/src/local_engine/storage/LocalKVStore.d.ts +1 -0
  50. package/dist/src/local_engine/storage/LocalKVStore.js +134 -75
  51. package/dist/src/local_engine/storage/LocalKVStore.js.map +1 -1
  52. package/dist/src/local_engine/storage/LocalNotificationStore.d.ts +1 -0
  53. package/dist/src/local_engine/storage/LocalNotificationStore.js +17 -3
  54. package/dist/src/local_engine/storage/LocalNotificationStore.js.map +1 -1
  55. package/dist/src/local_engine/storage/LocalSecretsStore.d.ts +1 -0
  56. package/dist/src/local_engine/storage/LocalSecretsStore.js +37 -6
  57. package/dist/src/local_engine/storage/LocalSecretsStore.js.map +1 -1
  58. package/dist/src/local_engine/storage/LocalSecretsStoreWrapper.d.ts +19 -0
  59. package/dist/src/local_engine/storage/LocalSecretsStoreWrapper.js +52 -0
  60. package/dist/src/local_engine/storage/LocalSecretsStoreWrapper.js.map +1 -0
  61. package/dist/src/local_engine/storage/LocalSettingsStore.d.ts +1 -0
  62. package/dist/src/local_engine/storage/LocalSettingsStore.js +61 -11
  63. package/dist/src/local_engine/storage/LocalSettingsStore.js.map +1 -1
  64. package/dist/src/local_engine/storage/LocalSettingsStoreWrapper.d.ts +15 -0
  65. package/dist/src/local_engine/storage/LocalSettingsStoreWrapper.js +28 -0
  66. package/dist/src/local_engine/storage/LocalSettingsStoreWrapper.js.map +1 -0
  67. package/dist/src/local_engine/storage/SourceDataStore.d.ts +23 -0
  68. package/dist/src/local_engine/storage/SourceDataStore.js +83 -0
  69. package/dist/src/local_engine/storage/SourceDataStore.js.map +1 -0
  70. package/dist/src/local_engine/storage/SourceJobExecutionStore.d.ts +25 -0
  71. package/dist/src/local_engine/storage/SourceJobExecutionStore.js +61 -0
  72. package/dist/src/local_engine/storage/SourceJobExecutionStore.js.map +1 -0
  73. package/dist/src/local_engine/types.d.ts +1 -0
  74. package/dist/src/local_engine/utils.js +20 -4
  75. package/dist/src/local_engine/utils.js.map +1 -1
  76. package/dist/src/logging/LogManager.d.ts +191 -34
  77. package/dist/src/logging/LogManager.js +209 -103
  78. package/dist/src/logging/LogManager.js.map +1 -1
  79. package/dist/src/server/api/destinations.js +33 -7
  80. package/dist/src/server/api/destinations.js.map +1 -1
  81. package/dist/src/server/api/functions.js +2 -1
  82. package/dist/src/server/api/functions.js.map +1 -1
  83. package/dist/src/server/api/jobs.js +3 -0
  84. package/dist/src/server/api/jobs.js.map +1 -1
  85. package/dist/src/server/api/sources.d.ts +7 -0
  86. package/dist/src/server/api/sources.js +382 -0
  87. package/dist/src/server/api/sources.js.map +1 -0
  88. package/dist/src/server/api/v1.js +54 -3
  89. package/dist/src/server/api/v1.js.map +1 -1
  90. package/dist/src/server/api.js +64 -3
  91. package/dist/src/server/api.js.map +1 -1
  92. package/dist/src/server.js +213 -23
  93. package/dist/src/server.js.map +1 -1
  94. package/dist/src/ui/components/App.js +195 -24
  95. package/dist/src/ui/components/App.js.map +1 -1
  96. package/dist/src/ui/components/DestinationsView.d.ts +8 -0
  97. package/dist/src/ui/components/DestinationsView.js +30 -9
  98. package/dist/src/ui/components/DestinationsView.js.map +1 -1
  99. package/dist/src/ui/components/FunctionsView.d.ts +7 -0
  100. package/dist/src/ui/components/FunctionsView.js +69 -9
  101. package/dist/src/ui/components/FunctionsView.js.map +1 -1
  102. package/dist/src/ui/components/JobsView.d.ts +7 -0
  103. package/dist/src/ui/components/JobsView.js +55 -15
  104. package/dist/src/ui/components/JobsView.js.map +1 -1
  105. package/dist/src/ui/components/SourceDataViewer.d.ts +8 -0
  106. package/dist/src/ui/components/SourceDataViewer.js +84 -0
  107. package/dist/src/ui/components/SourceDataViewer.js.map +1 -0
  108. package/dist/src/ui/components/SourceJobsSection.d.ts +8 -0
  109. package/dist/src/ui/components/SourceJobsSection.js +99 -0
  110. package/dist/src/ui/components/SourceJobsSection.js.map +1 -0
  111. package/dist/src/ui/components/SourceLifecycleSection.d.ts +7 -0
  112. package/dist/src/ui/components/SourceLifecycleSection.js +58 -0
  113. package/dist/src/ui/components/SourceLifecycleSection.js.map +1 -0
  114. package/dist/src/ui/components/SourceSchemaViewer.d.ts +7 -0
  115. package/dist/src/ui/components/SourceSchemaViewer.js +65 -0
  116. package/dist/src/ui/components/SourceSchemaViewer.js.map +1 -0
  117. package/dist/src/ui/components/SourceWebhookEditor.d.ts +8 -0
  118. package/dist/src/ui/components/SourceWebhookEditor.js +168 -0
  119. package/dist/src/ui/components/SourceWebhookEditor.js.map +1 -0
  120. package/dist/src/ui/components/SourcesView.d.ts +14 -0
  121. package/dist/src/ui/components/SourcesView.js +74 -0
  122. package/dist/src/ui/components/SourcesView.js.map +1 -0
  123. package/dist/src/ui/components/TabbedConsole.d.ts +3 -1
  124. package/dist/src/ui/components/TabbedConsole.js +81 -11
  125. package/dist/src/ui/components/TabbedConsole.js.map +1 -1
  126. package/dist/src/ui/hooks/useEntityNavigation.d.ts +72 -0
  127. package/dist/src/ui/hooks/useEntityNavigation.js +150 -0
  128. package/dist/src/ui/hooks/useEntityNavigation.js.map +1 -0
  129. package/dist/src/ui/hooks/useQueryParams.d.ts +6 -0
  130. package/dist/src/ui/hooks/useQueryParams.js +39 -0
  131. package/dist/src/ui/hooks/useQueryParams.js.map +1 -0
  132. package/dist/src/ui/index.js +3 -2
  133. package/dist/src/ui/index.js.map +1 -1
  134. package/dist/src/utils/functionEndpoints.d.ts +24 -0
  135. package/dist/src/utils/functionEndpoints.js +45 -0
  136. package/dist/src/utils/functionEndpoints.js.map +1 -0
  137. package/package.json +2 -1
  138. package/dist/public/bundle.932ab47a0dbf0319bc8b.js +0 -3
  139. package/dist/public/bundle.932ab47a0dbf0319bc8b.js.map +0 -1
  140. package/dist/src/server/api/lifecycle.d.ts +0 -6
  141. package/dist/src/server/api/lifecycle.js +0 -72
  142. package/dist/src/server/api/lifecycle.js.map +0 -1
@@ -8,12 +8,14 @@ const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const NumberSet_1 = require("./NumberSet");
10
10
  const StringSet_1 = require("./StringSet");
11
+ const LogManager_1 = require("../../logging/LogManager");
11
12
  /**
12
13
  * Local implementation of KVStore that persists data to disk
13
14
  * Follows the pattern of LocalSettingsStore with singleton per app directory
14
15
  */
15
16
  class LocalKVStore {
16
17
  constructor(appRootDir, storeFileName = "kvstore.json") {
18
+ this.logManager = LogManager_1.LogManager.getInstance();
17
19
  this.appRootDir = appRootDir;
18
20
  this.storeFileName = storeFileName;
19
21
  this.configDirPath = path_1.default.join(appRootDir, ".ocp-local");
@@ -61,7 +63,12 @@ class LocalKVStore {
61
63
  }
62
64
  }
63
65
  catch (error) {
64
- console.warn(`Failed to ensure KV store file exists at ${this.kvStorePath}:`, error);
66
+ this.logManager.warn(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'Failed to ensure KV store file exists', {
67
+ id: 'unknown',
68
+ store: 'LocalKVStore',
69
+ operation: 'set',
70
+ error
71
+ });
65
72
  }
66
73
  }
67
74
  /**
@@ -89,7 +96,12 @@ class LocalKVStore {
89
96
  return cleanedData;
90
97
  }
91
98
  catch (error) {
92
- console.warn(`Failed to load KV store from ${this.kvStorePath}:`, error);
99
+ this.logManager.warn(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'Failed to load KV store from disk', {
100
+ id: 'unknown',
101
+ store: 'LocalKVStore',
102
+ operation: 'get',
103
+ error
104
+ });
93
105
  return {};
94
106
  }
95
107
  }
@@ -118,7 +130,12 @@ class LocalKVStore {
118
130
  fs_1.default.renameSync(tempPath, this.kvStorePath);
119
131
  }
120
132
  catch (error) {
121
- console.error(`Failed to save KV store to ${this.kvStorePath}:`, error);
133
+ this.logManager.error(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'Failed to save KV store to disk', {
134
+ id: 'unknown',
135
+ store: 'LocalKVStore',
136
+ operation: 'set',
137
+ error
138
+ });
122
139
  throw error;
123
140
  }
124
141
  }
@@ -179,11 +196,21 @@ class LocalKVStore {
179
196
  // Basic Operations
180
197
  // ===================================================================================================================
181
198
  async get(key, fields) {
182
- console.log(`[LocalKVStore] GET request: key="${key}", fields=${JSON.stringify(fields)}`);
199
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'GET request', {
200
+ id: key || 'unknown',
201
+ store: 'LocalKVStore',
202
+ operation: 'get',
203
+ key
204
+ });
183
205
  try {
184
206
  const item = this.getStoredItem(key);
185
207
  if (!item) {
186
- console.log(`[LocalKVStore] GET result: key="${key}" -> {}`);
208
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'GET result: empty', {
209
+ id: key || 'unknown',
210
+ store: 'LocalKVStore',
211
+ operation: 'get',
212
+ key
213
+ });
187
214
  return {};
188
215
  }
189
216
  if (fields && fields.length > 0) {
@@ -194,38 +221,54 @@ class LocalKVStore {
194
221
  filteredData[field] = item.data[field];
195
222
  }
196
223
  });
197
- console.log(`[LocalKVStore] GET result: key="${key}" -> ${JSON.stringify(filteredData)}`);
224
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'GET result: filtered', {
225
+ id: key || 'unknown',
226
+ store: 'LocalKVStore',
227
+ operation: 'get',
228
+ key
229
+ });
198
230
  return filteredData;
199
231
  }
200
232
  else {
201
233
  // Return all data
202
- console.log(`[LocalKVStore] GET result: key="${key}" -> ${JSON.stringify(item.data)}`);
234
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'GET result: full', {
235
+ id: key || 'unknown',
236
+ store: 'LocalKVStore',
237
+ operation: 'get',
238
+ key
239
+ });
203
240
  return item.data;
204
241
  }
205
242
  }
206
243
  catch (error) {
207
- console.warn(`[LocalKVStore] GET failed: key="${key}":`, error);
244
+ this.logManager.error(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'GET failed', {
245
+ id: key || 'unknown',
246
+ store: 'LocalKVStore',
247
+ operation: 'get',
248
+ key,
249
+ error
250
+ });
208
251
  return {};
209
252
  }
210
253
  }
211
254
  async put(key, value, options) {
212
- console.log(`[LocalKVStore] PUT request: key="${key}", value=${JSON.stringify(value)}`);
255
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PUT request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
213
256
  try {
214
257
  // Get previous value
215
258
  const previousItem = this.getStoredItem(key);
216
259
  const previousValue = previousItem ? previousItem.data : {};
217
260
  // Store new value
218
261
  this.storeItem(key, value, options);
219
- console.log(`[LocalKVStore] PUT completed: key="${key}"`);
262
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PUT completed', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
220
263
  return previousValue;
221
264
  }
222
265
  catch (error) {
223
- console.warn(`[LocalKVStore] PUT failed: key="${key}":`, error);
266
+ this.logManager.error(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PUT failed', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key, error });
224
267
  throw error;
225
268
  }
226
269
  }
227
270
  async patch(key, valueOrUpdater, options) {
228
- console.log(`[LocalKVStore] PATCH request: key="${key}"`);
271
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PATCH request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
229
272
  try {
230
273
  // Get current value
231
274
  const currentItem = this.getStoredItem(key);
@@ -250,21 +293,21 @@ class LocalKVStore {
250
293
  }
251
294
  // Store updated value
252
295
  this.storeItem(key, newValue, options);
253
- console.log(`[LocalKVStore] PATCH completed: key="${key}"`);
296
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PATCH completed', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
254
297
  return currentValue;
255
298
  }
256
299
  catch (error) {
257
- console.warn(`[LocalKVStore] PATCH failed: key="${key}":`, error);
300
+ this.logManager.error(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PATCH failed', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key, error });
258
301
  throw error;
259
302
  }
260
303
  }
261
304
  async delete(key, fields) {
262
- console.log(`[LocalKVStore] DELETE request: key="${key}", fields=${JSON.stringify(fields)}`);
305
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'DELETE request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'delete', key });
263
306
  try {
264
307
  const storeData = this.loadDataFromDisk();
265
308
  const item = storeData[key];
266
309
  if (!item) {
267
- console.log(`[LocalKVStore] DELETE result: key="${key}" -> {} (not found)`);
310
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'DELETE result: not found', { id: key || 'unknown', store: 'LocalKVStore', operation: 'delete', key });
268
311
  return {};
269
312
  }
270
313
  const deserializedData = this.deserializeValue(item.data);
@@ -272,7 +315,7 @@ class LocalKVStore {
272
315
  // Delete entire object
273
316
  delete storeData[key];
274
317
  this.saveDataToDisk(storeData);
275
- console.log(`[LocalKVStore] DELETE completed: deleted entire key="${key}"`);
318
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'DELETE completed: deleted entire key', { id: key || 'unknown', store: 'LocalKVStore', operation: 'delete', key });
276
319
  return deserializedData;
277
320
  }
278
321
  else {
@@ -285,25 +328,25 @@ class LocalKVStore {
285
328
  }
286
329
  });
287
330
  this.saveDataToDisk(storeData);
288
- console.log(`[LocalKVStore] DELETE completed: deleted fields ${JSON.stringify(fields)} from key="${key}"`);
331
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'DELETE completed: deleted fields', { id: key || 'unknown', store: 'LocalKVStore', operation: 'delete', key });
289
332
  return this.deserializeValue(deletedFields);
290
333
  }
291
334
  }
292
335
  catch (error) {
293
- console.warn(`[LocalKVStore] DELETE failed: key="${key}":`, error);
336
+ this.logManager.error(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'DELETE failed', { id: key || 'unknown', store: 'LocalKVStore', operation: 'delete', key, error });
294
337
  throw error;
295
338
  }
296
339
  }
297
340
  async exists(key) {
298
- console.log(`[LocalKVStore] EXISTS request: key="${key}"`);
341
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'EXISTS request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'exists', key });
299
342
  try {
300
343
  const item = this.getStoredItem(key);
301
344
  const exists = item !== null;
302
- console.log(`[LocalKVStore] EXISTS result: key="${key}" -> ${exists}`);
345
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'EXISTS result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'exists', key });
303
346
  return exists;
304
347
  }
305
348
  catch (error) {
306
- console.warn(`[LocalKVStore] EXISTS failed: key="${key}":`, error);
349
+ this.logManager.error(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'EXISTS failed', { id: key || 'unknown', store: 'LocalKVStore', operation: 'exists', key, error });
307
350
  return false;
308
351
  }
309
352
  }
@@ -311,7 +354,7 @@ class LocalKVStore {
311
354
  // Numeric Operations
312
355
  // ===================================================================================================================
313
356
  async increment(key, field, amount = 1, options) {
314
- console.log(`[LocalKVStore] INCREMENT request: key="${key}", field="${field}", amount=${amount}`);
357
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'INCREMENT request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
315
358
  return this.patch(key, (previous) => {
316
359
  const currentValue = previous[field];
317
360
  if (currentValue !== undefined && typeof currentValue !== "number") {
@@ -328,7 +371,7 @@ class LocalKVStore {
328
371
  });
329
372
  }
330
373
  async incrementMulti(key, fieldAmounts, options) {
331
- console.log(`[LocalKVStore] INCREMENT_MULTI request: key="${key}", fieldAmounts=${JSON.stringify(fieldAmounts)}`);
374
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'INCREMENT_MULTI request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
332
375
  return this.patch(key, (previous) => {
333
376
  const updated = { ...previous };
334
377
  for (const [field, amount] of Object.entries(fieldAmounts)) {
@@ -354,7 +397,7 @@ class LocalKVStore {
354
397
  // List Operations
355
398
  // ===================================================================================================================
356
399
  async shift(key, field) {
357
- console.log(`[LocalKVStore] SHIFT request: key="${key}", field="${field}"`);
400
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'SHIFT request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
358
401
  let shiftedElement = undefined;
359
402
  await this.patch(key, (previous) => {
360
403
  const currentValue = previous[field];
@@ -376,11 +419,11 @@ class LocalKVStore {
376
419
  [field]: updatedList,
377
420
  };
378
421
  });
379
- console.log(`[LocalKVStore] SHIFT result: key="${key}", field="${field}" -> ${JSON.stringify(shiftedElement)}`);
422
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'SHIFT result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
380
423
  return shiftedElement;
381
424
  }
382
425
  async shiftMulti(key, fieldCounts) {
383
- console.log(`[LocalKVStore] SHIFT_MULTI request: key="${key}", fieldCounts=${JSON.stringify(fieldCounts)}`);
426
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'SHIFT_MULTI request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
384
427
  const shiftedItems = {};
385
428
  return this.patch(key, (previous) => {
386
429
  const updated = { ...previous };
@@ -401,7 +444,7 @@ class LocalKVStore {
401
444
  }).then(() => shiftedItems);
402
445
  }
403
446
  async unshift(key, field, value) {
404
- console.log(`[LocalKVStore] UNSHIFT request: key="${key}", field="${field}", value=${JSON.stringify(value)}`);
447
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'UNSHIFT request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
405
448
  await this.patch(key, (previous) => {
406
449
  const currentValue = previous[field];
407
450
  if (currentValue === undefined) {
@@ -422,7 +465,7 @@ class LocalKVStore {
422
465
  });
423
466
  }
424
467
  async unshiftMulti(key, fieldValues) {
425
- console.log(`[LocalKVStore] UNSHIFT_MULTI request: key="${key}", fieldValues=${JSON.stringify(fieldValues)}`);
468
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'UNSHIFT_MULTI request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
426
469
  await this.patch(key, (previous) => {
427
470
  const updated = { ...previous };
428
471
  for (const [field, values] of Object.entries(fieldValues)) {
@@ -443,37 +486,37 @@ class LocalKVStore {
443
486
  });
444
487
  }
445
488
  async peek(key, field) {
446
- console.log(`[LocalKVStore] PEEK request: key="${key}", field="${field}"`);
489
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PEEK request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
447
490
  try {
448
491
  const item = this.getStoredItem(key);
449
492
  if (!item) {
450
- console.log(`[LocalKVStore] PEEK result: key="${key}" -> undefined (key not found)`);
493
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PEEK result: key not found', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
451
494
  return undefined;
452
495
  }
453
496
  const fieldValue = item.data[field];
454
497
  if (fieldValue === undefined) {
455
- console.log(`[LocalKVStore] PEEK result: key="${key}", field="${field}" -> undefined (field not found)`);
498
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PEEK result: field not found', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
456
499
  return undefined;
457
500
  }
458
501
  if (!Array.isArray(fieldValue)) {
459
- console.log(`[LocalKVStore] PEEK result: key="${key}", field="${field}" -> undefined (not a list)`);
502
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PEEK result: not a list', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
460
503
  return undefined;
461
504
  }
462
505
  if (fieldValue.length === 0) {
463
- console.log(`[LocalKVStore] PEEK result: key="${key}", field="${field}" -> undefined (empty list)`);
506
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PEEK result: empty list', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
464
507
  return undefined;
465
508
  }
466
509
  const firstElement = fieldValue[0];
467
- console.log(`[LocalKVStore] PEEK result: key="${key}", field="${field}" -> ${JSON.stringify(firstElement)}`);
510
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PEEK result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
468
511
  return firstElement;
469
512
  }
470
513
  catch (error) {
471
- console.warn(`[LocalKVStore] PEEK failed: key="${key}", field="${field}":`, error);
514
+ this.logManager.error(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PEEK failed', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key, error });
472
515
  return undefined;
473
516
  }
474
517
  }
475
518
  async peekMulti(key, fieldCounts) {
476
- console.log(`[LocalKVStore] PEEK_MULTI request: key="${key}", fieldCounts=${JSON.stringify(fieldCounts)}`);
519
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PEEK_MULTI request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
477
520
  const result = {};
478
521
  try {
479
522
  const item = this.getStoredItem(key);
@@ -493,11 +536,11 @@ class LocalKVStore {
493
536
  const actualCount = Math.min(count, fieldValue.length);
494
537
  result[field] = fieldValue.slice(0, actualCount);
495
538
  }
496
- console.log(`[LocalKVStore] PEEK_MULTI result: key="${key}" -> ${JSON.stringify(result)}`);
539
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PEEK_MULTI result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
497
540
  return result;
498
541
  }
499
542
  catch (error) {
500
- console.warn(`[LocalKVStore] PEEK_MULTI failed: key="${key}":`, error);
543
+ this.logManager.error(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'PEEK_MULTI failed', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key, error });
501
544
  // Return empty arrays for all fields on error
502
545
  for (const field of Object.keys(fieldCounts)) {
503
546
  result[field] = [];
@@ -506,7 +549,7 @@ class LocalKVStore {
506
549
  }
507
550
  }
508
551
  async append(key, field, value) {
509
- console.log(`[LocalKVStore] APPEND request: key="${key}", field="${field}", value=${JSON.stringify(value)}`);
552
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'APPEND request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
510
553
  await this.patch(key, (previous) => {
511
554
  const currentValue = previous[field];
512
555
  if (currentValue === undefined) {
@@ -527,7 +570,7 @@ class LocalKVStore {
527
570
  });
528
571
  }
529
572
  async appendMulti(key, fieldValues) {
530
- console.log(`[LocalKVStore] APPEND_MULTI request: key="${key}", fieldValues=${JSON.stringify(fieldValues)}`);
573
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'APPEND_MULTI request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
531
574
  await this.patch(key, (previous) => {
532
575
  const updated = { ...previous };
533
576
  for (const [field, values] of Object.entries(fieldValues)) {
@@ -551,7 +594,7 @@ class LocalKVStore {
551
594
  // NumberSet Operations
552
595
  // ===================================================================================================================
553
596
  async addNumber(key, field, value) {
554
- console.log(`[LocalKVStore] ADD_NUMBER request: key="${key}", field="${field}", value=${value}`);
597
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'ADD_NUMBER request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
555
598
  let wasAdded = false;
556
599
  await this.patch(key, (previous) => {
557
600
  const currentValue = previous[field];
@@ -580,11 +623,11 @@ class LocalKVStore {
580
623
  }
581
624
  return previous;
582
625
  });
583
- console.log(`[LocalKVStore] ADD_NUMBER result: key="${key}", field="${field}" -> ${wasAdded}`);
626
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'ADD_NUMBER result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
584
627
  return wasAdded;
585
628
  }
586
629
  async addNumberMulti(key, fieldValues) {
587
- console.log(`[LocalKVStore] ADD_NUMBER_MULTI request: key="${key}", fieldValues=${JSON.stringify(fieldValues)}`);
630
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'ADD_NUMBER_MULTI request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
588
631
  const addedValues = {};
589
632
  await this.patch(key, (previous) => {
590
633
  const updated = { ...previous };
@@ -615,11 +658,11 @@ class LocalKVStore {
615
658
  }
616
659
  return updated;
617
660
  });
618
- console.log(`[LocalKVStore] ADD_NUMBER_MULTI result: key="${key}" -> ${JSON.stringify(addedValues)}`);
661
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'ADD_NUMBER_MULTI result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
619
662
  return addedValues;
620
663
  }
621
664
  async removeNumber(key, field, value) {
622
- console.log(`[LocalKVStore] REMOVE_NUMBER request: key="${key}", field="${field}", value=${value}`);
665
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'REMOVE_NUMBER request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
623
666
  let wasRemoved = false;
624
667
  await this.patch(key, (previous) => {
625
668
  const currentValue = previous[field];
@@ -642,11 +685,11 @@ class LocalKVStore {
642
685
  }
643
686
  return previous;
644
687
  });
645
- console.log(`[LocalKVStore] REMOVE_NUMBER result: key="${key}", field="${field}" -> ${wasRemoved}`);
688
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'REMOVE_NUMBER result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
646
689
  return wasRemoved;
647
690
  }
648
691
  async removeNumberMulti(key, fieldValues) {
649
- console.log(`[LocalKVStore] REMOVE_NUMBER_MULTI request: key="${key}", fieldValues=${JSON.stringify(fieldValues)}`);
692
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'REMOVE_NUMBER_MULTI request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
650
693
  const removedValues = {};
651
694
  await this.patch(key, (previous) => {
652
695
  const updated = { ...previous };
@@ -673,36 +716,36 @@ class LocalKVStore {
673
716
  }
674
717
  return updated;
675
718
  });
676
- console.log(`[LocalKVStore] REMOVE_NUMBER_MULTI result: key="${key}" -> ${JSON.stringify(removedValues)}`);
719
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'REMOVE_NUMBER_MULTI result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
677
720
  return removedValues;
678
721
  }
679
722
  async hasNumber(key, field, value) {
680
- console.log(`[LocalKVStore] HAS_NUMBER request: key="${key}", field="${field}", value=${value}`);
723
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_NUMBER request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
681
724
  try {
682
725
  const item = this.getStoredItem(key);
683
726
  if (!item) {
684
- console.log(`[LocalKVStore] HAS_NUMBER result: key="${key}" -> false (key not found)`);
727
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_NUMBER result: key not found', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
685
728
  return false;
686
729
  }
687
730
  const fieldValue = item.data[field];
688
731
  if (fieldValue === undefined) {
689
- console.log(`[LocalKVStore] HAS_NUMBER result: key="${key}", field="${field}" -> false (field not found)`);
732
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_NUMBER result: field not found', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
690
733
  return false;
691
734
  }
692
735
  if (!(fieldValue instanceof NumberSet_1.NumberSet)) {
693
736
  throw new Error(`Field "${field}" is not a NumberSet`);
694
737
  }
695
738
  const hasValue = fieldValue.has(value);
696
- console.log(`[LocalKVStore] HAS_NUMBER result: key="${key}", field="${field}" -> ${hasValue}`);
739
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_NUMBER result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
697
740
  return hasValue;
698
741
  }
699
742
  catch (error) {
700
- console.warn(`[LocalKVStore] HAS_NUMBER failed: key="${key}", field="${field}":`, error);
743
+ this.logManager.error(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_NUMBER failed', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key, error });
701
744
  throw error;
702
745
  }
703
746
  }
704
747
  async hasNumberMulti(key, fieldValues) {
705
- console.log(`[LocalKVStore] HAS_NUMBER_MULTI request: key="${key}", fieldValues=${JSON.stringify(fieldValues)}`);
748
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_NUMBER_MULTI request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
706
749
  const result = {};
707
750
  try {
708
751
  const item = this.getStoredItem(key);
@@ -731,11 +774,17 @@ class LocalKVStore {
731
774
  }
732
775
  result[field] = existingValues;
733
776
  }
734
- console.log(`[LocalKVStore] HAS_NUMBER_MULTI result: key="${key}" -> ${JSON.stringify(result)}`);
777
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_NUMBER_MULTI result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
735
778
  return result;
736
779
  }
737
780
  catch (error) {
738
- console.warn(`[LocalKVStore] HAS_NUMBER_MULTI failed: key="${key}":`, error);
781
+ this.logManager.error(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_NUMBER_MULTI failed', {
782
+ id: key || 'unknown',
783
+ store: 'LocalKVStore',
784
+ operation: 'get',
785
+ key,
786
+ error
787
+ });
739
788
  throw error;
740
789
  }
741
790
  }
@@ -743,7 +792,7 @@ class LocalKVStore {
743
792
  // StringSet Operations
744
793
  // ===================================================================================================================
745
794
  async addString(key, field, value) {
746
- console.log(`[LocalKVStore] ADD_STRING request: key="${key}", field="${field}", value="${value}"`);
795
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'ADD_STRING request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
747
796
  let wasAdded = false;
748
797
  await this.patch(key, (previous) => {
749
798
  const currentValue = previous[field];
@@ -772,11 +821,11 @@ class LocalKVStore {
772
821
  }
773
822
  return previous;
774
823
  });
775
- console.log(`[LocalKVStore] ADD_STRING result: key="${key}", field="${field}" -> ${wasAdded}`);
824
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'ADD_STRING result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
776
825
  return wasAdded;
777
826
  }
778
827
  async addStringMulti(key, fieldValues) {
779
- console.log(`[LocalKVStore] ADD_STRING_MULTI request: key="${key}", fieldValues=${JSON.stringify(fieldValues)}`);
828
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'ADD_STRING_MULTI request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
780
829
  const addedValues = {};
781
830
  await this.patch(key, (previous) => {
782
831
  const updated = { ...previous };
@@ -807,11 +856,11 @@ class LocalKVStore {
807
856
  }
808
857
  return updated;
809
858
  });
810
- console.log(`[LocalKVStore] ADD_STRING_MULTI result: key="${key}" -> ${JSON.stringify(addedValues)}`);
859
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'ADD_STRING_MULTI result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
811
860
  return addedValues;
812
861
  }
813
862
  async removeString(key, field, value) {
814
- console.log(`[LocalKVStore] REMOVE_STRING request: key="${key}", field="${field}", value="${value}"`);
863
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'REMOVE_STRING request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
815
864
  let wasRemoved = false;
816
865
  await this.patch(key, (previous) => {
817
866
  const currentValue = previous[field];
@@ -834,11 +883,11 @@ class LocalKVStore {
834
883
  }
835
884
  return previous;
836
885
  });
837
- console.log(`[LocalKVStore] REMOVE_STRING result: key="${key}", field="${field}" -> ${wasRemoved}`);
886
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'REMOVE_STRING result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
838
887
  return wasRemoved;
839
888
  }
840
889
  async removeStringMulti(key, fieldValues) {
841
- console.log(`[LocalKVStore] REMOVE_STRING_MULTI request: key="${key}", fieldValues=${JSON.stringify(fieldValues)}`);
890
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'REMOVE_STRING_MULTI request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
842
891
  const removedValues = {};
843
892
  await this.patch(key, (previous) => {
844
893
  const updated = { ...previous };
@@ -865,36 +914,36 @@ class LocalKVStore {
865
914
  }
866
915
  return updated;
867
916
  });
868
- console.log(`[LocalKVStore] REMOVE_STRING_MULTI result: key="${key}" -> ${JSON.stringify(removedValues)}`);
917
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'REMOVE_STRING_MULTI result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'set', key });
869
918
  return removedValues;
870
919
  }
871
920
  async hasString(key, field, value) {
872
- console.log(`[LocalKVStore] HAS_STRING request: key="${key}", field="${field}", value="${value}"`);
921
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_STRING request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
873
922
  try {
874
923
  const item = this.getStoredItem(key);
875
924
  if (!item) {
876
- console.log(`[LocalKVStore] HAS_STRING result: key="${key}" -> false (key not found)`);
925
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_STRING result: key not found', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
877
926
  return false;
878
927
  }
879
928
  const fieldValue = item.data[field];
880
929
  if (fieldValue === undefined) {
881
- console.log(`[LocalKVStore] HAS_STRING result: key="${key}", field="${field}" -> false (field not found)`);
930
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_STRING result: field not found', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
882
931
  return false;
883
932
  }
884
933
  if (!(fieldValue instanceof StringSet_1.StringSet)) {
885
934
  throw new Error(`Field "${field}" is not a StringSet`);
886
935
  }
887
936
  const hasValue = fieldValue.has(value);
888
- console.log(`[LocalKVStore] HAS_STRING result: key="${key}", field="${field}" -> ${hasValue}`);
937
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_STRING result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
889
938
  return hasValue;
890
939
  }
891
940
  catch (error) {
892
- console.warn(`[LocalKVStore] HAS_STRING failed: key="${key}", field="${field}":`, error);
941
+ this.logManager.error(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_STRING failed', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key, error });
893
942
  throw error;
894
943
  }
895
944
  }
896
945
  async hasStringMulti(key, fieldValues) {
897
- console.log(`[LocalKVStore] HAS_STRING_MULTI request: key="${key}", fieldValues=${JSON.stringify(fieldValues)}`);
946
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_STRING_MULTI request', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
898
947
  const result = {};
899
948
  try {
900
949
  const item = this.getStoredItem(key);
@@ -923,11 +972,11 @@ class LocalKVStore {
923
972
  }
924
973
  result[field] = existingValues;
925
974
  }
926
- console.log(`[LocalKVStore] HAS_STRING_MULTI result: key="${key}" -> ${JSON.stringify(result)}`);
975
+ this.logManager.debug(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_STRING_MULTI result', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key });
927
976
  return result;
928
977
  }
929
978
  catch (error) {
930
- console.warn(`[LocalKVStore] HAS_STRING_MULTI failed: key="${key}":`, error);
979
+ this.logManager.error(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, 'HAS_STRING_MULTI failed', { id: key || 'unknown', store: 'LocalKVStore', operation: 'get', key, error });
931
980
  throw error;
932
981
  }
933
982
  }
@@ -947,7 +996,12 @@ class LocalKVStore {
947
996
  return result;
948
997
  }
949
998
  catch (error) {
950
- console.warn("Failed to get all KV data:", error);
999
+ this.logManager.warn(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, "Failed to get all KV data:", {
1000
+ id: 'all',
1001
+ store: 'LocalKVStore',
1002
+ operation: 'get',
1003
+ error
1004
+ });
951
1005
  return {};
952
1006
  }
953
1007
  }
@@ -985,7 +1039,12 @@ class LocalKVStore {
985
1039
  return Object.keys(storeData);
986
1040
  }
987
1041
  catch (error) {
988
- console.warn("Failed to get all KV keys:", error);
1042
+ this.logManager.warn(LogManager_1.LogSource.System, LogManager_1.LogCategory.KVStore, "Failed to get all KV keys:", {
1043
+ id: 'all',
1044
+ store: 'LocalKVStore',
1045
+ operation: 'list',
1046
+ error
1047
+ });
989
1048
  return [];
990
1049
  }
991
1050
  }