macro-agent 0.0.15 → 0.0.17

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 (44) hide show
  1. package/dist/acp/index.d.ts +1 -1
  2. package/dist/acp/index.d.ts.map +1 -1
  3. package/dist/acp/index.js.map +1 -1
  4. package/dist/acp/macro-agent.d.ts +21 -0
  5. package/dist/acp/macro-agent.d.ts.map +1 -1
  6. package/dist/acp/macro-agent.js +182 -0
  7. package/dist/acp/macro-agent.js.map +1 -1
  8. package/dist/acp/types.d.ts +31 -2
  9. package/dist/acp/types.d.ts.map +1 -1
  10. package/dist/acp/types.js.map +1 -1
  11. package/dist/agent/agent-manager.d.ts.map +1 -1
  12. package/dist/agent/agent-manager.js +23 -5
  13. package/dist/agent/agent-manager.js.map +1 -1
  14. package/dist/map/adapter/acp-over-map.d.ts +15 -0
  15. package/dist/map/adapter/acp-over-map.d.ts.map +1 -1
  16. package/dist/map/adapter/acp-over-map.js +204 -9
  17. package/dist/map/adapter/acp-over-map.js.map +1 -1
  18. package/dist/store/event-store.d.ts.map +1 -1
  19. package/dist/store/event-store.js +92 -53
  20. package/dist/store/event-store.js.map +1 -1
  21. package/dist/store/instance.d.ts +0 -2
  22. package/dist/store/instance.d.ts.map +1 -1
  23. package/dist/store/instance.js +1 -24
  24. package/dist/store/instance.js.map +1 -1
  25. package/package.json +3 -3
  26. package/references/acp-factory-ref/package-lock.json +2 -2
  27. package/references/acp-factory-ref/package.json +2 -2
  28. package/references/claude-code-acp/package-lock.json +2 -2
  29. package/references/claude-code-acp/package.json +1 -1
  30. package/references/claude-code-acp/src/acp-agent.ts +3 -6
  31. package/src/acp/__tests__/history.test.ts +526 -0
  32. package/src/acp/__tests__/integration.test.ts +2 -1
  33. package/src/acp/index.ts +4 -0
  34. package/src/acp/macro-agent.ts +329 -85
  35. package/src/acp/types.ts +39 -2
  36. package/src/agent/__tests__/agent-manager.test.ts +4 -6
  37. package/src/agent/agent-manager.ts +24 -5
  38. package/src/map/adapter/__tests__/acp-over-map-history.test.ts +664 -0
  39. package/src/map/adapter/__tests__/acp-over-map-persistence.e2e.test.ts +440 -0
  40. package/src/map/adapter/acp-over-map.ts +246 -7
  41. package/src/store/__tests__/event-store.test.ts +4 -12
  42. package/src/store/__tests__/instance.test.ts +5 -7
  43. package/src/store/event-store.ts +115 -57
  44. package/src/store/instance.ts +1 -29
@@ -213,9 +213,6 @@ export interface ResolvedInstance {
213
213
  /** Whether this is a new instance */
214
214
  isNew: boolean;
215
215
 
216
- /** Whether this is using legacy path mode */
217
- isLegacy: boolean;
218
-
219
216
  /** Backend type to use */
220
217
  backendType: string;
221
218
  }
@@ -300,25 +297,11 @@ export function resolveInstancePath(config: StoreConfig): ResolvedInstance {
300
297
  instancePath: ':memory:',
301
298
  namespace,
302
299
  isNew: true,
303
- isLegacy: false,
304
300
  backendType: 'memory',
305
301
  };
306
302
  }
307
303
 
308
- // Legacy path takes precedence for backward compat
309
- if (config.path) {
310
- const legacyInstanceId = deriveInstanceIdFromPath(config.path);
311
- return {
312
- instanceId: legacyInstanceId,
313
- instancePath: config.path,
314
- namespace,
315
- isNew: !fs.existsSync(config.path),
316
- isLegacy: true,
317
- backendType: 'json',
318
- };
319
- }
320
-
321
- // New instance resolution
304
+ // Instance resolution
322
305
  const instanceId = config.instanceId ?? generateInstanceId();
323
306
 
324
307
  if (!isValidInstanceId(instanceId)) {
@@ -339,21 +322,10 @@ export function resolveInstancePath(config: StoreConfig): ResolvedInstance {
339
322
  instancePath,
340
323
  namespace,
341
324
  isNew,
342
- isLegacy: false,
343
325
  backendType,
344
326
  };
345
327
  }
346
328
 
347
- /**
348
- * Derive an instance ID from a legacy path
349
- */
350
- function deriveInstanceIdFromPath(legacyPath: string): string {
351
- // Use the filename without extension as the instance ID
352
- const basename = path.basename(legacyPath, path.extname(legacyPath));
353
- // Sanitize to valid instance ID
354
- return basename.replace(/[^a-zA-Z0-9_-]/g, '_');
355
- }
356
-
357
329
  // ─────────────────────────────────────────────────────────────────────────────
358
330
  // Instance Directory Management
359
331
  // ─────────────────────────────────────────────────────────────────────────────