swarmdo 1.4.8 → 1.6.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.
Files changed (215) hide show
  1. package/.claude/helpers/statusline.cjs +7 -7
  2. package/README.md +9 -6
  3. package/package.json +5 -3
  4. package/v3/@swarmdo/cli/dist/src/commands/compact.d.ts +16 -0
  5. package/v3/@swarmdo/cli/dist/src/commands/compact.js +106 -0
  6. package/v3/@swarmdo/cli/dist/src/commands/hooks.js +26 -24
  7. package/v3/@swarmdo/cli/dist/src/commands/index.js +10 -3
  8. package/v3/@swarmdo/cli/dist/src/commands/integrations.d.ts +14 -0
  9. package/v3/@swarmdo/cli/dist/src/commands/integrations.js +158 -0
  10. package/v3/@swarmdo/cli/dist/src/commands/memory.js +50 -1
  11. package/v3/@swarmdo/cli/dist/src/commands/providers.js +3 -0
  12. package/v3/@swarmdo/cli/dist/src/commands/release.d.ts +15 -0
  13. package/v3/@swarmdo/cli/dist/src/commands/release.js +241 -0
  14. package/v3/@swarmdo/cli/dist/src/commands/security.js +14 -0
  15. package/v3/@swarmdo/cli/dist/src/commands/transcript.js +82 -1
  16. package/v3/@swarmdo/cli/dist/src/commands/usage.js +80 -1
  17. package/v3/@swarmdo/cli/dist/src/compact/compact.d.ts +60 -0
  18. package/v3/@swarmdo/cli/dist/src/compact/compact.js +170 -0
  19. package/v3/@swarmdo/cli/dist/src/config-lint/lint.js +11 -1
  20. package/v3/@swarmdo/cli/dist/src/index.js +4 -2
  21. package/v3/@swarmdo/cli/dist/src/init/statusline-generator.js +6 -6
  22. package/v3/@swarmdo/cli/dist/src/integrations/integrations.d.ts +54 -0
  23. package/v3/@swarmdo/cli/dist/src/integrations/integrations.js +162 -0
  24. package/v3/@swarmdo/cli/dist/src/mcp-tools/agent-execute-core.js +25 -3
  25. package/v3/@swarmdo/cli/dist/src/mcp-tools/agentdb-tools.js +8 -8
  26. package/v3/@swarmdo/cli/dist/src/memory/graph-edge-writer.d.ts +12 -0
  27. package/v3/@swarmdo/cli/dist/src/memory/graph-edge-writer.js +32 -1
  28. package/v3/@swarmdo/cli/dist/src/memory-vault/watch.d.ts +32 -0
  29. package/v3/@swarmdo/cli/dist/src/memory-vault/watch.js +66 -0
  30. package/v3/@swarmdo/cli/dist/src/providers/openrouter-config.d.ts +91 -0
  31. package/v3/@swarmdo/cli/dist/src/providers/openrouter-config.js +186 -0
  32. package/v3/@swarmdo/cli/dist/src/release/release.d.ts +72 -0
  33. package/v3/@swarmdo/cli/dist/src/release/release.js +86 -0
  34. package/v3/@swarmdo/cli/dist/src/resilience/backoff.d.ts +23 -0
  35. package/v3/@swarmdo/cli/dist/src/resilience/backoff.js +30 -0
  36. package/v3/@swarmdo/cli/dist/src/swarmvector/model-router.js +14 -0
  37. package/v3/@swarmdo/cli/dist/src/transcript/search.d.ts +39 -0
  38. package/v3/@swarmdo/cli/dist/src/transcript/search.js +67 -0
  39. package/v3/@swarmdo/cli/dist/src/usage/diff.d.ts +69 -0
  40. package/v3/@swarmdo/cli/dist/src/usage/diff.js +112 -0
  41. package/v3/@swarmdo/cli/package.json +4 -4
  42. package/v3/@swarmdo/cli-core/dist/src/index.js +1 -1
  43. package/v3/@swarmdo/codex/dist/cli.js +0 -0
  44. package/v3/@swarmdo/hooks/dist/cli/guidance-cli.js +0 -0
  45. package/v3/@swarmdo/hooks/dist/statusline/index.d.ts +3 -3
  46. package/v3/@swarmdo/hooks/dist/statusline/index.js +3 -3
  47. package/v3/@swarmdo/integration/dist/__tests__/agentic-flow-agent.test.js +4 -1
  48. package/v3/@swarmdo/neural/dist/flash-attention.d.ts +1 -1
  49. package/v3/@swarmdo/neural/dist/flash-attention.js +1 -1
  50. package/v3/@swarmdo/plugin-agent-federation/dist/plugin.js +1 -1
  51. package/v3/@swarmdo/plugin-agent-federation/dist/transport/midstream-aware-loader.js +2 -2
  52. package/v3/@swarmdo/providers/dist/swarmvector-provider.d.ts +1 -1
  53. package/v3/@swarmdo/providers/dist/swarmvector-provider.js +1 -1
  54. package/v3/@swarmdo/security/dist/input-validator.d.ts +6 -6
  55. package/v3/@swarmdo/shared/dist/hooks/safety/git-commit.js +1 -1
  56. package/v3/@swarmdo/shared/dist/mcp/transport/http.js +8 -1
  57. package/v3/vendor/agentdb/package.json +0 -1
  58. package/v3/vendor/agentic-flow/package.json +0 -1
  59. package/.claude/scheduled_tasks.lock +0 -1
  60. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/__init__.cpython-314.pyc +0 -0
  61. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/__main__.cpython-314.pyc +0 -0
  62. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/cli.cpython-314.pyc +0 -0
  63. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/compress.cpython-314.pyc +0 -0
  64. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/detect.cpython-314.pyc +0 -0
  65. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/validate.cpython-314.pyc +0 -0
  66. package/v3/@swarmdo/plugin-iot-cognitum/dist/application/index.d.ts +0 -2
  67. package/v3/@swarmdo/plugin-iot-cognitum/dist/application/index.js +0 -2
  68. package/v3/@swarmdo/plugin-iot-cognitum/dist/application/iot-coordinator.d.ts +0 -138
  69. package/v3/@swarmdo/plugin-iot-cognitum/dist/application/iot-coordinator.js +0 -418
  70. package/v3/@swarmdo/plugin-iot-cognitum/dist/bin.d.ts +0 -15
  71. package/v3/@swarmdo/plugin-iot-cognitum/dist/bin.js +0 -240
  72. package/v3/@swarmdo/plugin-iot-cognitum/dist/cli-commands.d.ts +0 -7
  73. package/v3/@swarmdo/plugin-iot-cognitum/dist/cli-commands.js +0 -508
  74. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-agent.d.ts +0 -54
  75. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-agent.js +0 -2
  76. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-fleet.d.ts +0 -46
  77. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-fleet.js +0 -2
  78. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-trust-level.d.ts +0 -18
  79. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-trust-level.js +0 -28
  80. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/index.d.ts +0 -5
  81. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/index.js +0 -2
  82. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/telemetry.d.ts +0 -35
  83. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/telemetry.js +0 -2
  84. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/device-repository.d.ts +0 -11
  85. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/device-repository.js +0 -2
  86. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/fleet-repository.d.ts +0 -9
  87. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/fleet-repository.js +0 -2
  88. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/index.d.ts +0 -5
  89. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/index.js +0 -2
  90. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/telemetry-repository.d.ts +0 -12
  91. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/telemetry-repository.js +0 -2
  92. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/trust-history-repository.d.ts +0 -19
  93. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/trust-history-repository.js +0 -2
  94. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/anomaly-detection-service.d.ts +0 -44
  95. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/anomaly-detection-service.js +0 -117
  96. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/device-lifecycle-service.d.ts +0 -70
  97. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/device-lifecycle-service.js +0 -194
  98. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/firmware-orchestration-service.d.ts +0 -69
  99. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/firmware-orchestration-service.js +0 -139
  100. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/fleet-topology-service.d.ts +0 -34
  101. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/fleet-topology-service.js +0 -101
  102. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/index.d.ts +0 -10
  103. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/index.js +0 -10
  104. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/mesh-service.d.ts +0 -64
  105. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/mesh-service.js +0 -70
  106. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/sona-integration-service.d.ts +0 -44
  107. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/sona-integration-service.js +0 -79
  108. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-ingestion-service.d.ts +0 -37
  109. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-ingestion-service.js +0 -39
  110. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-service.d.ts +0 -67
  111. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-service.js +0 -58
  112. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/witness-verification-service.d.ts +0 -45
  113. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/witness-verification-service.js +0 -63
  114. package/v3/@swarmdo/plugin-iot-cognitum/dist/index.d.ts +0 -26
  115. package/v3/@swarmdo/plugin-iot-cognitum/dist/index.js +0 -17
  116. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/agentdb-telemetry-repository.d.ts +0 -51
  117. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/agentdb-telemetry-repository.js +0 -110
  118. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-device-repository.d.ts +0 -13
  119. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-device-repository.js +0 -25
  120. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-fleet-repository.d.ts +0 -11
  121. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-fleet-repository.js +0 -19
  122. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-trust-history-repository.d.ts +0 -11
  123. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-trust-history-repository.js +0 -27
  124. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/index.d.ts +0 -6
  125. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/index.js +0 -6
  126. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/seed-client-factory.d.ts +0 -41
  127. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/seed-client-factory.js +0 -64
  128. package/v3/@swarmdo/plugin-iot-cognitum/dist/mcp-tools.d.ts +0 -8
  129. package/v3/@swarmdo/plugin-iot-cognitum/dist/mcp-tools.js +0 -703
  130. package/v3/@swarmdo/plugin-iot-cognitum/dist/plugin.d.ts +0 -23
  131. package/v3/@swarmdo/plugin-iot-cognitum/dist/plugin.js +0 -239
  132. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/anomaly-scan-worker.d.ts +0 -17
  133. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/anomaly-scan-worker.js +0 -42
  134. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/firmware-watch-worker.d.ts +0 -18
  135. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/firmware-watch-worker.js +0 -45
  136. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/health-probe-worker.d.ts +0 -19
  137. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/health-probe-worker.js +0 -50
  138. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/mesh-sync-worker.d.ts +0 -19
  139. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/mesh-sync-worker.js +0 -47
  140. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/telemetry-ingest-worker.d.ts +0 -17
  141. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/telemetry-ingest-worker.js +0 -40
  142. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/witness-audit-worker.d.ts +0 -18
  143. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/witness-audit-worker.js +0 -51
  144. package/v3/@swarmdo/testing/dist/fixtures/agent-fixtures.d.ts +0 -214
  145. package/v3/@swarmdo/testing/dist/fixtures/agent-fixtures.js +0 -595
  146. package/v3/@swarmdo/testing/dist/fixtures/agents.d.ts +0 -76
  147. package/v3/@swarmdo/testing/dist/fixtures/agents.js +0 -158
  148. package/v3/@swarmdo/testing/dist/fixtures/configurations.d.ts +0 -157
  149. package/v3/@swarmdo/testing/dist/fixtures/configurations.js +0 -337
  150. package/v3/@swarmdo/testing/dist/fixtures/index.d.ts +0 -10
  151. package/v3/@swarmdo/testing/dist/fixtures/index.js +0 -17
  152. package/v3/@swarmdo/testing/dist/fixtures/mcp-fixtures.d.ts +0 -329
  153. package/v3/@swarmdo/testing/dist/fixtures/mcp-fixtures.js +0 -714
  154. package/v3/@swarmdo/testing/dist/fixtures/memory-entries.d.ts +0 -159
  155. package/v3/@swarmdo/testing/dist/fixtures/memory-entries.js +0 -262
  156. package/v3/@swarmdo/testing/dist/fixtures/memory-fixtures.d.ts +0 -290
  157. package/v3/@swarmdo/testing/dist/fixtures/memory-fixtures.js +0 -547
  158. package/v3/@swarmdo/testing/dist/fixtures/swarm-fixtures.d.ts +0 -289
  159. package/v3/@swarmdo/testing/dist/fixtures/swarm-fixtures.js +0 -534
  160. package/v3/@swarmdo/testing/dist/fixtures/tasks.d.ts +0 -106
  161. package/v3/@swarmdo/testing/dist/fixtures/tasks.js +0 -229
  162. package/v3/@swarmdo/testing/dist/helpers/assertion-helpers.d.ts +0 -213
  163. package/v3/@swarmdo/testing/dist/helpers/assertion-helpers.js +0 -435
  164. package/v3/@swarmdo/testing/dist/helpers/assertions.d.ts +0 -135
  165. package/v3/@swarmdo/testing/dist/helpers/assertions.js +0 -217
  166. package/v3/@swarmdo/testing/dist/helpers/create-mock.d.ts +0 -96
  167. package/v3/@swarmdo/testing/dist/helpers/create-mock.js +0 -164
  168. package/v3/@swarmdo/testing/dist/helpers/index.d.ts +0 -14
  169. package/v3/@swarmdo/testing/dist/helpers/index.js +0 -22
  170. package/v3/@swarmdo/testing/dist/helpers/mock-factory.d.ts +0 -323
  171. package/v3/@swarmdo/testing/dist/helpers/mock-factory.js +0 -350
  172. package/v3/@swarmdo/testing/dist/helpers/setup-teardown.d.ts +0 -271
  173. package/v3/@swarmdo/testing/dist/helpers/setup-teardown.js +0 -446
  174. package/v3/@swarmdo/testing/dist/helpers/swarm-instance.d.ts +0 -142
  175. package/v3/@swarmdo/testing/dist/helpers/swarm-instance.js +0 -205
  176. package/v3/@swarmdo/testing/dist/helpers/test-application.d.ts +0 -190
  177. package/v3/@swarmdo/testing/dist/helpers/test-application.js +0 -138
  178. package/v3/@swarmdo/testing/dist/helpers/test-utils.d.ts +0 -274
  179. package/v3/@swarmdo/testing/dist/helpers/test-utils.js +0 -456
  180. package/v3/@swarmdo/testing/dist/index.d.ts +0 -42
  181. package/v3/@swarmdo/testing/dist/index.js +0 -66
  182. package/v3/@swarmdo/testing/dist/mocks/index.d.ts +0 -8
  183. package/v3/@swarmdo/testing/dist/mocks/index.js +0 -10
  184. package/v3/@swarmdo/testing/dist/mocks/mock-mcp-client.d.ts +0 -206
  185. package/v3/@swarmdo/testing/dist/mocks/mock-mcp-client.js +0 -575
  186. package/v3/@swarmdo/testing/dist/mocks/mock-services.d.ts +0 -287
  187. package/v3/@swarmdo/testing/dist/mocks/mock-services.js +0 -563
  188. package/v3/@swarmdo/testing/dist/regression/api-contract.d.ts +0 -109
  189. package/v3/@swarmdo/testing/dist/regression/api-contract.js +0 -374
  190. package/v3/@swarmdo/testing/dist/regression/index.d.ts +0 -18
  191. package/v3/@swarmdo/testing/dist/regression/index.js +0 -18
  192. package/v3/@swarmdo/testing/dist/regression/integration-regression.d.ts +0 -67
  193. package/v3/@swarmdo/testing/dist/regression/integration-regression.js +0 -334
  194. package/v3/@swarmdo/testing/dist/regression/performance-baseline.d.ts +0 -106
  195. package/v3/@swarmdo/testing/dist/regression/performance-baseline.js +0 -268
  196. package/v3/@swarmdo/testing/dist/regression/regression-runner.d.ts +0 -124
  197. package/v3/@swarmdo/testing/dist/regression/regression-runner.js +0 -227
  198. package/v3/@swarmdo/testing/dist/regression/security-regression.d.ts +0 -73
  199. package/v3/@swarmdo/testing/dist/regression/security-regression.js +0 -258
  200. package/v3/@swarmdo/testing/dist/setup.d.ts +0 -43
  201. package/v3/@swarmdo/testing/dist/setup.js +0 -91
  202. package/v3/@swarmdo/testing/dist/v2-compat/api-compat.test.d.ts +0 -10
  203. package/v3/@swarmdo/testing/dist/v2-compat/api-compat.test.js +0 -433
  204. package/v3/@swarmdo/testing/dist/v2-compat/cli-compat.test.d.ts +0 -10
  205. package/v3/@swarmdo/testing/dist/v2-compat/cli-compat.test.js +0 -352
  206. package/v3/@swarmdo/testing/dist/v2-compat/compatibility-validator.d.ts +0 -206
  207. package/v3/@swarmdo/testing/dist/v2-compat/compatibility-validator.js +0 -839
  208. package/v3/@swarmdo/testing/dist/v2-compat/hooks-compat.test.d.ts +0 -10
  209. package/v3/@swarmdo/testing/dist/v2-compat/hooks-compat.test.js +0 -428
  210. package/v3/@swarmdo/testing/dist/v2-compat/index.d.ts +0 -38
  211. package/v3/@swarmdo/testing/dist/v2-compat/index.js +0 -41
  212. package/v3/@swarmdo/testing/dist/v2-compat/mcp-compat.test.d.ts +0 -10
  213. package/v3/@swarmdo/testing/dist/v2-compat/mcp-compat.test.js +0 -419
  214. package/v3/@swarmdo/testing/dist/v2-compat/report-generator.d.ts +0 -34
  215. package/v3/@swarmdo/testing/dist/v2-compat/report-generator.js +0 -372
@@ -1,159 +0,0 @@
1
- /**
2
- * V3 Swarmdo Memory Entry Fixtures
3
- *
4
- * Test data for memory and AgentDB testing
5
- * Following London School principle of explicit test data
6
- */
7
- /**
8
- * Memory entry interface
9
- */
10
- export interface MemoryEntry {
11
- key: string;
12
- value: unknown;
13
- metadata: MemoryMetadata;
14
- embedding?: number[];
15
- createdAt: Date;
16
- updatedAt: Date;
17
- expiresAt?: Date;
18
- }
19
- /**
20
- * Memory metadata interface
21
- */
22
- export interface MemoryMetadata {
23
- type: 'short-term' | 'long-term' | 'semantic' | 'episodic';
24
- tags: string[];
25
- source?: string;
26
- confidence?: number;
27
- ttl?: number;
28
- }
29
- /**
30
- * Vector search query interface
31
- */
32
- export interface VectorQuery {
33
- embedding: number[];
34
- topK: number;
35
- threshold?: number;
36
- filters?: Record<string, unknown>;
37
- }
38
- /**
39
- * Search result interface
40
- */
41
- export interface SearchResult {
42
- key: string;
43
- value: unknown;
44
- score: number;
45
- metadata: MemoryMetadata;
46
- }
47
- /**
48
- * Pre-defined memory entries for testing
49
- */
50
- export declare const memoryEntries: Record<string, MemoryEntry>;
51
- /**
52
- * Pre-defined search results for testing
53
- */
54
- export declare const searchResults: Record<string, SearchResult[]>;
55
- /**
56
- * Generate mock embedding vector
57
- * Creates deterministic embeddings based on seed string
58
- */
59
- export declare function generateMockEmbedding(dimensions: number, seed: string): number[];
60
- /**
61
- * Factory function to create memory entry with overrides
62
- */
63
- export declare function createMemoryEntry(base: keyof typeof memoryEntries, overrides?: Partial<MemoryEntry>): MemoryEntry;
64
- /**
65
- * Factory function to create vector query
66
- */
67
- export declare function createVectorQuery(overrides?: Partial<VectorQuery>): VectorQuery;
68
- /**
69
- * Create batch of memory entries for performance testing
70
- */
71
- export declare function createMemoryBatch(count: number, type?: MemoryMetadata['type']): MemoryEntry[];
72
- /**
73
- * Invalid memory entries for error testing
74
- */
75
- export declare const invalidMemoryEntries: {
76
- emptyKey: {
77
- key: string;
78
- value: {
79
- data: string;
80
- };
81
- metadata: {
82
- type: "short-term";
83
- tags: never[];
84
- };
85
- createdAt: Date;
86
- updatedAt: Date;
87
- };
88
- nullValue: {
89
- key: string;
90
- value: null;
91
- metadata: {
92
- type: "short-term";
93
- tags: never[];
94
- };
95
- createdAt: Date;
96
- updatedAt: Date;
97
- };
98
- invalidEmbeddingDimension: {
99
- key: string;
100
- value: {
101
- data: string;
102
- };
103
- metadata: {
104
- type: "semantic";
105
- tags: never[];
106
- };
107
- embedding: number[];
108
- createdAt: Date;
109
- updatedAt: Date;
110
- };
111
- expiredEntry: {
112
- key: string;
113
- value: {
114
- data: string;
115
- };
116
- metadata: {
117
- type: "short-term";
118
- tags: never[];
119
- ttl: number;
120
- };
121
- createdAt: Date;
122
- updatedAt: Date;
123
- expiresAt: Date;
124
- };
125
- };
126
- /**
127
- * AgentDB specific test data
128
- */
129
- export declare const agentDBTestData: {
130
- hnswConfig: {
131
- M: number;
132
- efConstruction: number;
133
- efSearch: number;
134
- dimensions: number;
135
- };
136
- performanceTargets: {
137
- searchSpeedupMin: number;
138
- searchSpeedupMax: number;
139
- memoryReduction: number;
140
- insertionTime: number;
141
- searchTime: number;
142
- };
143
- quantizationConfigs: {
144
- scalar4bit: {
145
- bits: number;
146
- compressionRatio: number;
147
- };
148
- scalar8bit: {
149
- bits: number;
150
- compressionRatio: number;
151
- };
152
- product: {
153
- subvectors: number;
154
- bits: number;
155
- compressionRatio: number;
156
- };
157
- };
158
- };
159
- //# sourceMappingURL=memory-entries.d.ts.map
@@ -1,262 +0,0 @@
1
- /**
2
- * V3 Swarmdo Memory Entry Fixtures
3
- *
4
- * Test data for memory and AgentDB testing
5
- * Following London School principle of explicit test data
6
- */
7
- /**
8
- * Pre-defined memory entries for testing
9
- */
10
- export const memoryEntries = {
11
- agentPattern: {
12
- key: 'pattern:agent:queen-coordinator',
13
- value: {
14
- pattern: 'orchestration',
15
- successRate: 0.95,
16
- avgDuration: 150,
17
- },
18
- metadata: {
19
- type: 'semantic',
20
- tags: ['agent', 'pattern', 'queen'],
21
- source: 'learning-module',
22
- confidence: 0.92,
23
- },
24
- embedding: generateMockEmbedding(384, 'orchestration'),
25
- createdAt: new Date('2024-01-01T00:00:00Z'),
26
- updatedAt: new Date('2024-01-15T12:00:00Z'),
27
- },
28
- securityRule: {
29
- key: 'rule:security:path-traversal',
30
- value: {
31
- rule: 'block-path-traversal',
32
- patterns: ['../', '~/', '/etc/'],
33
- severity: 'critical',
34
- },
35
- metadata: {
36
- type: 'long-term',
37
- tags: ['security', 'rule', 'validation'],
38
- source: 'security-module',
39
- confidence: 1.0,
40
- },
41
- embedding: generateMockEmbedding(384, 'security'),
42
- createdAt: new Date('2024-01-01T00:00:00Z'),
43
- updatedAt: new Date('2024-01-01T00:00:00Z'),
44
- },
45
- taskMemory: {
46
- key: 'task:memory:impl-001',
47
- value: {
48
- taskId: 'impl-001',
49
- context: 'implementing security module',
50
- decisions: ['use argon2 for hashing', 'implement path validation'],
51
- },
52
- metadata: {
53
- type: 'episodic',
54
- tags: ['task', 'implementation', 'security'],
55
- ttl: 86400000, // 24 hours
56
- },
57
- embedding: generateMockEmbedding(384, 'implementation'),
58
- createdAt: new Date('2024-01-15T10:00:00Z'),
59
- updatedAt: new Date('2024-01-15T10:00:00Z'),
60
- expiresAt: new Date('2024-01-16T10:00:00Z'),
61
- },
62
- sessionContext: {
63
- key: 'session:context:session-001',
64
- value: {
65
- sessionId: 'session-001',
66
- user: 'developer',
67
- activeAgents: ['queen-coordinator', 'coder'],
68
- currentTask: 'security-implementation',
69
- },
70
- metadata: {
71
- type: 'short-term',
72
- tags: ['session', 'context'],
73
- ttl: 3600000, // 1 hour
74
- },
75
- createdAt: new Date('2024-01-15T14:00:00Z'),
76
- updatedAt: new Date('2024-01-15T14:30:00Z'),
77
- expiresAt: new Date('2024-01-15T15:30:00Z'),
78
- },
79
- learningTrajectory: {
80
- key: 'learning:trajectory:traj-001',
81
- value: {
82
- trajectoryId: 'traj-001',
83
- steps: [
84
- { action: 'analyze', result: 'success', reward: 0.8 },
85
- { action: 'implement', result: 'success', reward: 0.9 },
86
- { action: 'test', result: 'success', reward: 1.0 },
87
- ],
88
- totalReward: 2.7,
89
- },
90
- metadata: {
91
- type: 'long-term',
92
- tags: ['learning', 'trajectory', 'reinforcement'],
93
- source: 'reasoningbank',
94
- confidence: 0.88,
95
- },
96
- embedding: generateMockEmbedding(384, 'learning'),
97
- createdAt: new Date('2024-01-10T00:00:00Z'),
98
- updatedAt: new Date('2024-01-15T00:00:00Z'),
99
- },
100
- };
101
- /**
102
- * Pre-defined search results for testing
103
- */
104
- export const searchResults = {
105
- securityPatterns: [
106
- {
107
- key: 'pattern:security:input-validation',
108
- value: { pattern: 'validate all inputs', effectiveness: 0.99 },
109
- score: 0.95,
110
- metadata: { type: 'semantic', tags: ['security', 'pattern'] },
111
- },
112
- {
113
- key: 'pattern:security:output-encoding',
114
- value: { pattern: 'encode all outputs', effectiveness: 0.97 },
115
- score: 0.88,
116
- metadata: { type: 'semantic', tags: ['security', 'pattern'] },
117
- },
118
- {
119
- key: 'pattern:security:least-privilege',
120
- value: { pattern: 'minimal permissions', effectiveness: 0.95 },
121
- score: 0.82,
122
- metadata: { type: 'semantic', tags: ['security', 'pattern'] },
123
- },
124
- ],
125
- agentPatterns: [
126
- {
127
- key: 'pattern:agent:coordination',
128
- value: { pattern: 'hierarchical coordination', successRate: 0.92 },
129
- score: 0.91,
130
- metadata: { type: 'semantic', tags: ['agent', 'pattern'] },
131
- },
132
- {
133
- key: 'pattern:agent:communication',
134
- value: { pattern: 'async messaging', successRate: 0.89 },
135
- score: 0.85,
136
- metadata: { type: 'semantic', tags: ['agent', 'pattern'] },
137
- },
138
- ],
139
- emptyResults: [],
140
- };
141
- /**
142
- * Generate mock embedding vector
143
- * Creates deterministic embeddings based on seed string
144
- */
145
- export function generateMockEmbedding(dimensions, seed) {
146
- const seedHash = hashString(seed);
147
- return Array.from({ length: dimensions }, (_, i) => {
148
- const value = Math.sin(seedHash + i * 0.1) * 0.5 + 0.5;
149
- return Math.round(value * 10000) / 10000; // 4 decimal places
150
- });
151
- }
152
- /**
153
- * Simple string hash function for deterministic embeddings
154
- */
155
- function hashString(str) {
156
- let hash = 0;
157
- for (let i = 0; i < str.length; i++) {
158
- hash = ((hash << 5) - hash + str.charCodeAt(i)) | 0;
159
- }
160
- return hash;
161
- }
162
- /**
163
- * Factory function to create memory entry with overrides
164
- */
165
- export function createMemoryEntry(base, overrides) {
166
- return {
167
- ...memoryEntries[base],
168
- ...overrides,
169
- key: overrides?.key ?? memoryEntries[base].key,
170
- createdAt: overrides?.createdAt ?? new Date(),
171
- updatedAt: overrides?.updatedAt ?? new Date(),
172
- };
173
- }
174
- /**
175
- * Factory function to create vector query
176
- */
177
- export function createVectorQuery(overrides) {
178
- return {
179
- embedding: overrides?.embedding ?? generateMockEmbedding(384, 'query'),
180
- topK: overrides?.topK ?? 10,
181
- threshold: overrides?.threshold ?? 0.7,
182
- filters: overrides?.filters,
183
- };
184
- }
185
- /**
186
- * Create batch of memory entries for performance testing
187
- */
188
- export function createMemoryBatch(count, type = 'semantic') {
189
- return Array.from({ length: count }, (_, i) => ({
190
- key: `batch:entry:${i}`,
191
- value: { index: i, data: `test data ${i}` },
192
- metadata: {
193
- type,
194
- tags: [`batch`, `entry-${i}`],
195
- },
196
- embedding: generateMockEmbedding(384, `batch-${i}`),
197
- createdAt: new Date(),
198
- updatedAt: new Date(),
199
- }));
200
- }
201
- /**
202
- * Invalid memory entries for error testing
203
- */
204
- export const invalidMemoryEntries = {
205
- emptyKey: {
206
- key: '',
207
- value: { data: 'test' },
208
- metadata: { type: 'short-term', tags: [] },
209
- createdAt: new Date(),
210
- updatedAt: new Date(),
211
- },
212
- nullValue: {
213
- key: 'valid-key',
214
- value: null,
215
- metadata: { type: 'short-term', tags: [] },
216
- createdAt: new Date(),
217
- updatedAt: new Date(),
218
- },
219
- invalidEmbeddingDimension: {
220
- key: 'valid-key',
221
- value: { data: 'test' },
222
- metadata: { type: 'semantic', tags: [] },
223
- embedding: [0.1, 0.2], // Wrong dimension
224
- createdAt: new Date(),
225
- updatedAt: new Date(),
226
- },
227
- expiredEntry: {
228
- key: 'expired-key',
229
- value: { data: 'expired' },
230
- metadata: { type: 'short-term', tags: [], ttl: -1000 },
231
- createdAt: new Date('2024-01-01T00:00:00Z'),
232
- updatedAt: new Date('2024-01-01T00:00:00Z'),
233
- expiresAt: new Date('2024-01-01T00:01:00Z'),
234
- },
235
- };
236
- /**
237
- * AgentDB specific test data
238
- */
239
- export const agentDBTestData = {
240
- // HNSW index configuration
241
- hnswConfig: {
242
- M: 16,
243
- efConstruction: 200,
244
- efSearch: 50,
245
- dimensions: 384,
246
- },
247
- // Expected performance metrics
248
- performanceTargets: {
249
- searchSpeedupMin: 150,
250
- searchSpeedupMax: 12500,
251
- memoryReduction: 0.50,
252
- insertionTime: 1, // ms
253
- searchTime: 0.1, // ms for 1M vectors
254
- },
255
- // Quantization configurations
256
- quantizationConfigs: {
257
- scalar4bit: { bits: 4, compressionRatio: 8 },
258
- scalar8bit: { bits: 8, compressionRatio: 4 },
259
- product: { subvectors: 8, bits: 8, compressionRatio: 32 },
260
- },
261
- };
262
- //# sourceMappingURL=memory-entries.js.map
@@ -1,290 +0,0 @@
1
- /**
2
- * @swarmdo/testing - Memory Fixtures
3
- *
4
- * Comprehensive mock memory entries and backend configurations for testing.
5
- * Supports AgentDB, HNSW indexing, vector search, and ReasoningBank patterns.
6
- *
7
- * Based on ADR-006 (Unified Memory Service) and ADR-009 (Hybrid Memory Backend).
8
- */
9
- import { type Mock } from 'vitest';
10
- /**
11
- * Memory entry types
12
- */
13
- export type MemoryType = 'short-term' | 'long-term' | 'semantic' | 'episodic' | 'procedural';
14
- /**
15
- * Memory backend types
16
- */
17
- export type MemoryBackendType = 'sqlite' | 'agentdb' | 'hybrid' | 'redis' | 'memory';
18
- /**
19
- * Memory entry interface
20
- */
21
- export interface MemoryEntry {
22
- key: string;
23
- value: unknown;
24
- metadata: MemoryMetadata;
25
- embedding?: number[];
26
- createdAt: Date;
27
- updatedAt: Date;
28
- expiresAt?: Date;
29
- accessCount?: number;
30
- }
31
- /**
32
- * Memory metadata interface
33
- */
34
- export interface MemoryMetadata {
35
- type: MemoryType;
36
- tags: string[];
37
- source?: string;
38
- confidence?: number;
39
- ttl?: number;
40
- agentId?: string;
41
- sessionId?: string;
42
- }
43
- /**
44
- * Vector query interface
45
- */
46
- export interface VectorQuery {
47
- embedding: number[];
48
- topK: number;
49
- threshold?: number;
50
- filters?: Record<string, unknown>;
51
- includeMetadata?: boolean;
52
- rerank?: boolean;
53
- }
54
- /**
55
- * Search result interface
56
- */
57
- export interface SearchResult {
58
- key: string;
59
- value: unknown;
60
- score: number;
61
- metadata: MemoryMetadata;
62
- distance?: number;
63
- }
64
- /**
65
- * HNSW index configuration
66
- */
67
- export interface HNSWConfig {
68
- M: number;
69
- efConstruction: number;
70
- efSearch: number;
71
- dimensions: number;
72
- metric: 'cosine' | 'euclidean' | 'dot';
73
- }
74
- /**
75
- * Quantization configuration
76
- */
77
- export interface QuantizationConfig {
78
- enabled: boolean;
79
- bits: 4 | 8 | 16;
80
- type: 'scalar' | 'product';
81
- compressionRatio?: number;
82
- }
83
- /**
84
- * Memory backend configuration
85
- */
86
- export interface MemoryBackendConfig {
87
- type: MemoryBackendType;
88
- path?: string;
89
- maxSize?: number;
90
- ttlMs?: number;
91
- vectorDimensions?: number;
92
- hnswConfig?: HNSWConfig;
93
- quantization?: QuantizationConfig;
94
- caching?: {
95
- enabled: boolean;
96
- maxSize: number;
97
- ttl: number;
98
- strategy: 'lru' | 'lfu' | 'arc';
99
- };
100
- }
101
- /**
102
- * Learned pattern interface (for ReasoningBank)
103
- */
104
- export interface LearnedPattern {
105
- id: string;
106
- sessionId: string;
107
- task: string;
108
- input: string;
109
- output: string;
110
- reward: number;
111
- success: boolean;
112
- critique?: string;
113
- tokensUsed?: number;
114
- latencyMs?: number;
115
- createdAt: Date;
116
- embedding?: number[];
117
- }
118
- /**
119
- * Generate deterministic mock embedding vector
120
- */
121
- export declare function generateMockEmbedding(dimensions: number, seed: string): number[];
122
- /**
123
- * Pre-defined memory entries for testing
124
- */
125
- export declare const memoryEntries: Record<string, MemoryEntry>;
126
- /**
127
- * Pre-defined search results for testing
128
- */
129
- export declare const searchResults: Record<string, SearchResult[]>;
130
- /**
131
- * Pre-defined learned patterns for ReasoningBank testing
132
- */
133
- export declare const learnedPatterns: Record<string, LearnedPattern>;
134
- /**
135
- * Pre-defined HNSW configurations
136
- */
137
- export declare const hnswConfigs: Record<string, HNSWConfig>;
138
- /**
139
- * Pre-defined quantization configurations
140
- */
141
- export declare const quantizationConfigs: Record<string, QuantizationConfig>;
142
- /**
143
- * Pre-defined memory backend configurations
144
- */
145
- export declare const memoryBackendConfigs: Record<string, MemoryBackendConfig>;
146
- /**
147
- * Performance targets from V3 specifications
148
- */
149
- export declare const performanceTargets: {
150
- searchSpeedupMin: number;
151
- searchSpeedupMax: number;
152
- memoryReduction: number;
153
- insertionTime: number;
154
- searchTime: number;
155
- flashAttentionSpeedup: number[];
156
- };
157
- /**
158
- * Factory function to create memory entry with overrides
159
- */
160
- export declare function createMemoryEntry(base: keyof typeof memoryEntries, overrides?: Partial<MemoryEntry>): MemoryEntry;
161
- /**
162
- * Factory function to create vector query
163
- */
164
- export declare function createVectorQuery(overrides?: Partial<VectorQuery>): VectorQuery;
165
- /**
166
- * Factory function to create learned pattern
167
- */
168
- export declare function createLearnedPattern(base: keyof typeof learnedPatterns, overrides?: Partial<LearnedPattern>): LearnedPattern;
169
- /**
170
- * Factory function to create HNSW config
171
- */
172
- export declare function createHNSWConfig(base?: keyof typeof hnswConfigs, overrides?: Partial<HNSWConfig>): HNSWConfig;
173
- /**
174
- * Factory function to create memory backend config
175
- */
176
- export declare function createMemoryBackendConfig(base?: keyof typeof memoryBackendConfigs, overrides?: Partial<MemoryBackendConfig>): MemoryBackendConfig;
177
- /**
178
- * Create batch of memory entries for performance testing
179
- */
180
- export declare function createMemoryBatch(count: number, type?: MemoryType, dimensions?: number): MemoryEntry[];
181
- /**
182
- * Create embeddings batch for vector index testing
183
- */
184
- export declare function createEmbeddingsBatch(count: number, dimensions?: number): {
185
- id: string;
186
- embedding: number[];
187
- }[];
188
- /**
189
- * Invalid memory entries for error testing
190
- */
191
- export declare const invalidMemoryEntries: {
192
- emptyKey: {
193
- key: string;
194
- value: {
195
- data: string;
196
- };
197
- metadata: {
198
- type: "short-term";
199
- tags: never[];
200
- };
201
- createdAt: Date;
202
- updatedAt: Date;
203
- };
204
- nullValue: {
205
- key: string;
206
- value: null;
207
- metadata: {
208
- type: "short-term";
209
- tags: never[];
210
- };
211
- createdAt: Date;
212
- updatedAt: Date;
213
- };
214
- invalidEmbeddingDimension: {
215
- key: string;
216
- value: {
217
- data: string;
218
- };
219
- metadata: {
220
- type: "semantic";
221
- tags: never[];
222
- };
223
- embedding: number[];
224
- createdAt: Date;
225
- updatedAt: Date;
226
- };
227
- expiredEntry: {
228
- key: string;
229
- value: {
230
- data: string;
231
- };
232
- metadata: {
233
- type: "short-term";
234
- tags: never[];
235
- ttl: number;
236
- };
237
- createdAt: Date;
238
- updatedAt: Date;
239
- expiresAt: Date;
240
- };
241
- invalidTags: {
242
- key: string;
243
- value: {
244
- data: string;
245
- };
246
- metadata: {
247
- type: "short-term";
248
- tags: string[];
249
- };
250
- createdAt: Date;
251
- updatedAt: Date;
252
- };
253
- };
254
- /**
255
- * Mock memory service interface
256
- */
257
- export interface MockMemoryService {
258
- store: Mock<(key: string, value: unknown, metadata?: MemoryMetadata) => Promise<void>>;
259
- retrieve: Mock<(key: string) => Promise<unknown>>;
260
- search: Mock<(query: VectorQuery) => Promise<SearchResult[]>>;
261
- delete: Mock<(key: string) => Promise<void>>;
262
- clear: Mock<() => Promise<void>>;
263
- getStats: Mock<() => Promise<{
264
- totalEntries: number;
265
- sizeBytes: number;
266
- }>>;
267
- }
268
- /**
269
- * Create a mock memory service
270
- */
271
- export declare function createMockMemoryService(): MockMemoryService;
272
- /**
273
- * Mock AgentDB interface
274
- */
275
- export interface MockAgentDB {
276
- insert: Mock<(id: string, embedding: number[], metadata?: unknown) => Promise<void>>;
277
- search: Mock<(embedding: number[], k: number) => Promise<SearchResult[]>>;
278
- delete: Mock<(id: string) => Promise<void>>;
279
- update: Mock<(id: string, embedding: number[], metadata?: unknown) => Promise<void>>;
280
- getStats: Mock<() => Promise<{
281
- vectorCount: number;
282
- indexSize: number;
283
- }>>;
284
- rebuildIndex: Mock<() => Promise<void>>;
285
- }
286
- /**
287
- * Create a mock AgentDB instance
288
- */
289
- export declare function createMockAgentDB(): MockAgentDB;
290
- //# sourceMappingURL=memory-fixtures.d.ts.map