agentic-qe 2.7.1 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +105 -0
- package/README.md +2 -2
- package/dist/agents/CodeIntelligenceAgent.d.ts.map +1 -1
- package/dist/agents/CodeIntelligenceAgent.js +7 -5
- package/dist/agents/CodeIntelligenceAgent.js.map +1 -1
- package/dist/cli/commands/knowledge-graph.d.ts.map +1 -1
- package/dist/cli/commands/knowledge-graph.js +4 -2
- package/dist/cli/commands/knowledge-graph.js.map +1 -1
- package/dist/cli/commands/migrate/index.d.ts +14 -0
- package/dist/cli/commands/migrate/index.d.ts.map +1 -0
- package/dist/cli/commands/migrate/index.js +283 -0
- package/dist/cli/commands/migrate/index.js.map +1 -0
- package/dist/cli/formatters/KGOutputFormatter.d.ts.map +1 -1
- package/dist/cli/formatters/KGOutputFormatter.js +15 -6
- package/dist/cli/formatters/KGOutputFormatter.js.map +1 -1
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init/database-init.d.ts.map +1 -1
- package/dist/cli/init/database-init.js +105 -0
- package/dist/cli/init/database-init.js.map +1 -1
- package/dist/code-intelligence/orchestrator/CodeIntelligenceOrchestrator.d.ts +9 -3
- package/dist/code-intelligence/orchestrator/CodeIntelligenceOrchestrator.d.ts.map +1 -1
- package/dist/code-intelligence/orchestrator/CodeIntelligenceOrchestrator.js +41 -3
- package/dist/code-intelligence/orchestrator/CodeIntelligenceOrchestrator.js.map +1 -1
- package/dist/code-intelligence/service/CodeIntelligenceService.js +1 -1
- package/dist/code-intelligence/service/CodeIntelligenceService.js.map +1 -1
- package/dist/core/memory/HNSWVectorMemory.js +1 -1
- package/dist/learning/QLearning.d.ts +9 -1
- package/dist/learning/QLearning.d.ts.map +1 -1
- package/dist/learning/QLearning.js +50 -1
- package/dist/learning/QLearning.js.map +1 -1
- package/dist/learning/metrics/LearningMetrics.d.ts +37 -0
- package/dist/learning/metrics/LearningMetrics.d.ts.map +1 -1
- package/dist/learning/metrics/LearningMetrics.js +73 -0
- package/dist/learning/metrics/LearningMetrics.js.map +1 -1
- package/dist/mcp/handlers/fleet-init.d.ts +10 -0
- package/dist/mcp/handlers/fleet-init.d.ts.map +1 -1
- package/dist/mcp/handlers/fleet-init.js +61 -0
- package/dist/mcp/handlers/fleet-init.js.map +1 -1
- package/dist/mcp/handlers/learning/learning-store-pattern.d.ts +13 -0
- package/dist/mcp/handlers/learning/learning-store-pattern.d.ts.map +1 -1
- package/dist/mcp/handlers/learning/learning-store-pattern.js +38 -0
- package/dist/mcp/handlers/learning/learning-store-pattern.js.map +1 -1
- package/dist/mcp/handlers/phase3/Phase3DomainTools.d.ts +89 -0
- package/dist/mcp/handlers/phase3/Phase3DomainTools.d.ts.map +1 -1
- package/dist/mcp/handlers/phase3/Phase3DomainTools.js +110 -1
- package/dist/mcp/handlers/phase3/Phase3DomainTools.js.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.d.ts +27 -1
- package/dist/mcp/handlers/task-orchestrate.d.ts.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.js +188 -8
- package/dist/mcp/handlers/task-orchestrate.js.map +1 -1
- package/dist/mcp/server-instructions.d.ts +1 -1
- package/dist/mcp/server-instructions.js +1 -1
- package/dist/mcp/server.d.ts +6 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +92 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/services/AgentRegistry.d.ts +13 -0
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
- package/dist/mcp/services/AgentRegistry.js +66 -0
- package/dist/mcp/services/AgentRegistry.js.map +1 -1
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.d.ts +55 -0
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.d.ts.map +1 -1
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.js +233 -0
- package/dist/mcp/tools/qe/quality-gates/evaluate-quality-gate.js.map +1 -1
- package/dist/mcp/tools/qe/quality-gates/index.d.ts +5 -2
- package/dist/mcp/tools/qe/quality-gates/index.d.ts.map +1 -1
- package/dist/mcp/tools/qe/quality-gates/index.js +10 -1
- package/dist/mcp/tools/qe/quality-gates/index.js.map +1 -1
- package/dist/mcp/tools.d.ts +1 -0
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +156 -1
- package/dist/mcp/tools.js.map +1 -1
- package/dist/persistence/migrations/all-migrations.d.ts +18 -0
- package/dist/persistence/migrations/all-migrations.d.ts.map +1 -0
- package/dist/persistence/migrations/all-migrations.js +624 -0
- package/dist/persistence/migrations/all-migrations.js.map +1 -0
- package/dist/persistence/migrations/index.d.ts +110 -0
- package/dist/persistence/migrations/index.d.ts.map +1 -0
- package/dist/persistence/migrations/index.js +303 -0
- package/dist/persistence/migrations/index.js.map +1 -0
- package/dist/planning/GOAPPlanner.d.ts +128 -0
- package/dist/planning/GOAPPlanner.d.ts.map +1 -0
- package/dist/planning/GOAPPlanner.js +630 -0
- package/dist/planning/GOAPPlanner.js.map +1 -0
- package/dist/planning/WorldStateBuilder.d.ts +150 -0
- package/dist/planning/WorldStateBuilder.d.ts.map +1 -0
- package/dist/planning/WorldStateBuilder.js +267 -0
- package/dist/planning/WorldStateBuilder.js.map +1 -0
- package/dist/planning/actions/fleet-actions.d.ts +78 -0
- package/dist/planning/actions/fleet-actions.d.ts.map +1 -0
- package/dist/planning/actions/fleet-actions.js +329 -0
- package/dist/planning/actions/fleet-actions.js.map +1 -0
- package/dist/planning/actions/index.d.ts +61 -0
- package/dist/planning/actions/index.d.ts.map +1 -0
- package/dist/planning/actions/index.js +159 -0
- package/dist/planning/actions/index.js.map +1 -0
- package/dist/planning/actions/orchestration-actions.d.ts +61 -0
- package/dist/planning/actions/orchestration-actions.d.ts.map +1 -0
- package/dist/planning/actions/orchestration-actions.js +395 -0
- package/dist/planning/actions/orchestration-actions.js.map +1 -0
- package/dist/planning/actions/quality-gate-actions.d.ts +160 -0
- package/dist/planning/actions/quality-gate-actions.d.ts.map +1 -0
- package/dist/planning/actions/quality-gate-actions.js +639 -0
- package/dist/planning/actions/quality-gate-actions.js.map +1 -0
- package/dist/planning/actions/test-strategy-actions.d.ts +70 -0
- package/dist/planning/actions/test-strategy-actions.d.ts.map +1 -0
- package/dist/planning/actions/test-strategy-actions.js +278 -0
- package/dist/planning/actions/test-strategy-actions.js.map +1 -0
- package/dist/planning/execution/PlanExecutor.d.ts +124 -0
- package/dist/planning/execution/PlanExecutor.d.ts.map +1 -0
- package/dist/planning/execution/PlanExecutor.js +405 -0
- package/dist/planning/execution/PlanExecutor.js.map +1 -0
- package/dist/planning/execution/index.d.ts +12 -0
- package/dist/planning/execution/index.d.ts.map +1 -0
- package/dist/planning/execution/index.js +18 -0
- package/dist/planning/execution/index.js.map +1 -0
- package/dist/planning/goals/TaskWorkflowGoals.d.ts +67 -0
- package/dist/planning/goals/TaskWorkflowGoals.d.ts.map +1 -0
- package/dist/planning/goals/TaskWorkflowGoals.js +208 -0
- package/dist/planning/goals/TaskWorkflowGoals.js.map +1 -0
- package/dist/planning/goals/index.d.ts +10 -0
- package/dist/planning/goals/index.d.ts.map +1 -0
- package/dist/planning/goals/index.js +19 -0
- package/dist/planning/goals/index.js.map +1 -0
- package/dist/planning/index.d.ts +34 -0
- package/dist/planning/index.d.ts.map +1 -0
- package/dist/planning/index.js +176 -0
- package/dist/planning/index.js.map +1 -0
- package/dist/planning/integration/GOAPQualityGateIntegration.d.ts +229 -0
- package/dist/planning/integration/GOAPQualityGateIntegration.d.ts.map +1 -0
- package/dist/planning/integration/GOAPQualityGateIntegration.js +582 -0
- package/dist/planning/integration/GOAPQualityGateIntegration.js.map +1 -0
- package/dist/planning/integration/GOAPTaskOrchestration.d.ts +165 -0
- package/dist/planning/integration/GOAPTaskOrchestration.d.ts.map +1 -0
- package/dist/planning/integration/GOAPTaskOrchestration.js +490 -0
- package/dist/planning/integration/GOAPTaskOrchestration.js.map +1 -0
- package/dist/planning/integration/index.d.ts +14 -0
- package/dist/planning/integration/index.d.ts.map +1 -0
- package/dist/planning/integration/index.js +23 -0
- package/dist/planning/integration/index.js.map +1 -0
- package/dist/planning/types.d.ts +264 -0
- package/dist/planning/types.d.ts.map +1 -0
- package/dist/planning/types.js +63 -0
- package/dist/planning/types.js.map +1 -0
- package/dist/utils/Database.d.ts.map +1 -1
- package/dist/utils/Database.js +81 -2
- package/dist/utils/Database.js.map +1 -1
- package/package.json +6 -3
|
@@ -0,0 +1,624 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* All Database Migrations
|
|
4
|
+
*
|
|
5
|
+
* Each migration handles a specific schema change.
|
|
6
|
+
* Migrations are applied in order by version number.
|
|
7
|
+
*
|
|
8
|
+
* IMPORTANT: Never modify an existing migration after it's been released.
|
|
9
|
+
* Always create a new migration for schema changes.
|
|
10
|
+
*
|
|
11
|
+
* @module persistence/migrations/all-migrations
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.allMigrations = void 0;
|
|
15
|
+
/**
|
|
16
|
+
* Helper: Check if a table exists
|
|
17
|
+
*/
|
|
18
|
+
function tableExists(db, tableName) {
|
|
19
|
+
const row = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name=?").get(tableName);
|
|
20
|
+
return !!row;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Helper: Check if a column exists in a table
|
|
24
|
+
*/
|
|
25
|
+
function columnExists(db, tableName, columnName) {
|
|
26
|
+
try {
|
|
27
|
+
const columns = db.prepare(`PRAGMA table_info(${tableName})`).all();
|
|
28
|
+
return columns.some(c => c.name === columnName);
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Helper: Safe add column
|
|
36
|
+
*/
|
|
37
|
+
function safeAddColumn(db, tableName, columnName, columnDef) {
|
|
38
|
+
if (tableExists(db, tableName) && !columnExists(db, tableName, columnName)) {
|
|
39
|
+
try {
|
|
40
|
+
db.exec(`ALTER TABLE ${tableName} ADD COLUMN ${columnName} ${columnDef}`);
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
// Column may already exist with different definition
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Helper: Safe create index
|
|
49
|
+
*/
|
|
50
|
+
function safeCreateIndex(db, sql) {
|
|
51
|
+
try {
|
|
52
|
+
db.exec(sql);
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
// Index may already exist or columns may not exist
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Migration 001: Core Learning Tables
|
|
60
|
+
*
|
|
61
|
+
* Creates the foundational tables for the learning system.
|
|
62
|
+
* These tables store experiences, Q-values, and patterns.
|
|
63
|
+
* Uses defensive checks to handle existing tables with different schemas.
|
|
64
|
+
*/
|
|
65
|
+
const migration001CoreLearning = {
|
|
66
|
+
version: 1,
|
|
67
|
+
name: 'core_learning_tables',
|
|
68
|
+
description: 'Create core learning system tables (experiences, q_values, patterns)',
|
|
69
|
+
up: (db) => {
|
|
70
|
+
// Learning experiences - create if not exists
|
|
71
|
+
if (!tableExists(db, 'learning_experiences')) {
|
|
72
|
+
db.exec(`
|
|
73
|
+
CREATE TABLE learning_experiences (
|
|
74
|
+
id TEXT PRIMARY KEY,
|
|
75
|
+
agent_id TEXT NOT NULL,
|
|
76
|
+
state TEXT,
|
|
77
|
+
action TEXT,
|
|
78
|
+
reward REAL,
|
|
79
|
+
next_state TEXT,
|
|
80
|
+
metadata TEXT,
|
|
81
|
+
created_at TEXT DEFAULT CURRENT_TIMESTAMP
|
|
82
|
+
)
|
|
83
|
+
`);
|
|
84
|
+
}
|
|
85
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_learning_exp_agent ON learning_experiences(agent_id)');
|
|
86
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_learning_exp_created ON learning_experiences(created_at)');
|
|
87
|
+
// Q-values - create if not exists
|
|
88
|
+
if (!tableExists(db, 'q_values')) {
|
|
89
|
+
db.exec(`
|
|
90
|
+
CREATE TABLE q_values (
|
|
91
|
+
id TEXT PRIMARY KEY,
|
|
92
|
+
agent_id TEXT NOT NULL,
|
|
93
|
+
state TEXT,
|
|
94
|
+
action TEXT,
|
|
95
|
+
value REAL NOT NULL,
|
|
96
|
+
visits INTEGER DEFAULT 1,
|
|
97
|
+
updated_at TEXT DEFAULT CURRENT_TIMESTAMP
|
|
98
|
+
)
|
|
99
|
+
`);
|
|
100
|
+
}
|
|
101
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_qvalues_agent ON q_values(agent_id)');
|
|
102
|
+
// Only create unique index if state and action columns exist
|
|
103
|
+
if (columnExists(db, 'q_values', 'state') && columnExists(db, 'q_values', 'action')) {
|
|
104
|
+
safeCreateIndex(db, 'CREATE UNIQUE INDEX IF NOT EXISTS idx_qvalues_unique ON q_values(agent_id, state, action)');
|
|
105
|
+
}
|
|
106
|
+
// Patterns - create if not exists
|
|
107
|
+
if (!tableExists(db, 'patterns')) {
|
|
108
|
+
db.exec(`
|
|
109
|
+
CREATE TABLE patterns (
|
|
110
|
+
id TEXT PRIMARY KEY,
|
|
111
|
+
type TEXT NOT NULL,
|
|
112
|
+
content TEXT NOT NULL,
|
|
113
|
+
confidence REAL DEFAULT 0.5,
|
|
114
|
+
occurrences INTEGER DEFAULT 1,
|
|
115
|
+
metadata TEXT,
|
|
116
|
+
created_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
|
117
|
+
updated_at TEXT DEFAULT CURRENT_TIMESTAMP
|
|
118
|
+
)
|
|
119
|
+
`);
|
|
120
|
+
}
|
|
121
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_patterns_type ON patterns(type)');
|
|
122
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_patterns_confidence ON patterns(confidence)');
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Migration 002: Dream System Tables
|
|
127
|
+
*
|
|
128
|
+
* Creates tables for the dream consolidation system.
|
|
129
|
+
* Dreams process experiences during idle periods.
|
|
130
|
+
*/
|
|
131
|
+
const migration002DreamSystem = {
|
|
132
|
+
version: 2,
|
|
133
|
+
name: 'dream_system_tables',
|
|
134
|
+
description: 'Create dream system tables (cycles, insights, concepts)',
|
|
135
|
+
up: (db) => {
|
|
136
|
+
// Dream cycles - tracks dream consolidation sessions
|
|
137
|
+
if (!tableExists(db, 'dream_cycles')) {
|
|
138
|
+
db.exec(`
|
|
139
|
+
CREATE TABLE dream_cycles (
|
|
140
|
+
id TEXT PRIMARY KEY,
|
|
141
|
+
start_time INTEGER NOT NULL,
|
|
142
|
+
end_time INTEGER,
|
|
143
|
+
duration INTEGER,
|
|
144
|
+
concepts_processed INTEGER,
|
|
145
|
+
associations_found INTEGER,
|
|
146
|
+
insights_generated INTEGER,
|
|
147
|
+
status TEXT NOT NULL DEFAULT 'running',
|
|
148
|
+
error TEXT,
|
|
149
|
+
created_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now'))
|
|
150
|
+
)
|
|
151
|
+
`);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
// Add missing columns to existing table
|
|
155
|
+
safeAddColumn(db, 'dream_cycles', 'status', "TEXT DEFAULT 'running'");
|
|
156
|
+
safeAddColumn(db, 'dream_cycles', 'duration', 'INTEGER');
|
|
157
|
+
safeAddColumn(db, 'dream_cycles', 'concepts_processed', 'INTEGER');
|
|
158
|
+
safeAddColumn(db, 'dream_cycles', 'associations_found', 'INTEGER');
|
|
159
|
+
safeAddColumn(db, 'dream_cycles', 'insights_generated', 'INTEGER');
|
|
160
|
+
safeAddColumn(db, 'dream_cycles', 'error', 'TEXT');
|
|
161
|
+
}
|
|
162
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_dream_cycle_status ON dream_cycles(status)');
|
|
163
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_dream_cycle_time ON dream_cycles(start_time)');
|
|
164
|
+
// Dream insights - patterns discovered during dreams
|
|
165
|
+
if (!tableExists(db, 'dream_insights')) {
|
|
166
|
+
db.exec(`
|
|
167
|
+
CREATE TABLE dream_insights (
|
|
168
|
+
id TEXT PRIMARY KEY,
|
|
169
|
+
type TEXT NOT NULL,
|
|
170
|
+
title TEXT,
|
|
171
|
+
description TEXT NOT NULL,
|
|
172
|
+
associated_concepts TEXT,
|
|
173
|
+
novelty_score REAL DEFAULT 0.5,
|
|
174
|
+
confidence_score REAL DEFAULT 0.5,
|
|
175
|
+
actionable INTEGER DEFAULT 0,
|
|
176
|
+
suggested_action TEXT,
|
|
177
|
+
target_agent_types TEXT,
|
|
178
|
+
priority TEXT DEFAULT 'medium',
|
|
179
|
+
status TEXT DEFAULT 'pending',
|
|
180
|
+
created_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now')),
|
|
181
|
+
applied_at INTEGER,
|
|
182
|
+
outcome TEXT
|
|
183
|
+
)
|
|
184
|
+
`);
|
|
185
|
+
}
|
|
186
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_dream_insights_type ON dream_insights(type)');
|
|
187
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_dream_insights_status ON dream_insights(status)');
|
|
188
|
+
// Concept nodes - knowledge graph nodes
|
|
189
|
+
if (!tableExists(db, 'concept_nodes')) {
|
|
190
|
+
db.exec(`
|
|
191
|
+
CREATE TABLE concept_nodes (
|
|
192
|
+
id TEXT PRIMARY KEY,
|
|
193
|
+
type TEXT NOT NULL,
|
|
194
|
+
content TEXT NOT NULL,
|
|
195
|
+
embedding TEXT,
|
|
196
|
+
activation_level REAL DEFAULT 0.0,
|
|
197
|
+
last_activated INTEGER,
|
|
198
|
+
metadata TEXT,
|
|
199
|
+
created_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now'))
|
|
200
|
+
)
|
|
201
|
+
`);
|
|
202
|
+
}
|
|
203
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_concept_nodes_type ON concept_nodes(type)');
|
|
204
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_concept_nodes_activation ON concept_nodes(activation_level)');
|
|
205
|
+
// Concept edges - knowledge graph relationships
|
|
206
|
+
if (!tableExists(db, 'concept_edges')) {
|
|
207
|
+
db.exec(`
|
|
208
|
+
CREATE TABLE concept_edges (
|
|
209
|
+
id TEXT PRIMARY KEY,
|
|
210
|
+
source TEXT NOT NULL,
|
|
211
|
+
target TEXT NOT NULL,
|
|
212
|
+
weight REAL DEFAULT 1.0,
|
|
213
|
+
type TEXT DEFAULT 'related',
|
|
214
|
+
evidence TEXT,
|
|
215
|
+
created_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now')),
|
|
216
|
+
updated_at INTEGER
|
|
217
|
+
)
|
|
218
|
+
`);
|
|
219
|
+
}
|
|
220
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_concept_edges_source ON concept_edges(source)');
|
|
221
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_concept_edges_target ON concept_edges(target)');
|
|
222
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_concept_edges_type ON concept_edges(type)');
|
|
223
|
+
// Synthesized patterns - patterns created by combining others
|
|
224
|
+
if (!tableExists(db, 'synthesized_patterns')) {
|
|
225
|
+
db.exec(`
|
|
226
|
+
CREATE TABLE synthesized_patterns (
|
|
227
|
+
id TEXT PRIMARY KEY,
|
|
228
|
+
type TEXT NOT NULL,
|
|
229
|
+
description TEXT NOT NULL,
|
|
230
|
+
conditions TEXT,
|
|
231
|
+
actions TEXT,
|
|
232
|
+
confidence REAL DEFAULT 0.5,
|
|
233
|
+
supporting_experiences TEXT,
|
|
234
|
+
effectiveness REAL,
|
|
235
|
+
agent_types TEXT,
|
|
236
|
+
task_types TEXT,
|
|
237
|
+
created_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now')),
|
|
238
|
+
updated_at INTEGER
|
|
239
|
+
)
|
|
240
|
+
`);
|
|
241
|
+
}
|
|
242
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_synth_patterns_type ON synthesized_patterns(type)');
|
|
243
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_synth_patterns_confidence ON synthesized_patterns(confidence)');
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* Migration 003: Transfer Learning Tables
|
|
248
|
+
*
|
|
249
|
+
* Creates tables for knowledge transfer between agents.
|
|
250
|
+
*/
|
|
251
|
+
const migration003TransferLearning = {
|
|
252
|
+
version: 3,
|
|
253
|
+
name: 'transfer_learning_tables',
|
|
254
|
+
description: 'Create transfer learning tables (registry, requests, validations)',
|
|
255
|
+
up: (db) => {
|
|
256
|
+
// Transfer registry - tracks what can be transferred
|
|
257
|
+
if (!tableExists(db, 'transfer_registry')) {
|
|
258
|
+
db.exec(`
|
|
259
|
+
CREATE TABLE transfer_registry (
|
|
260
|
+
id TEXT PRIMARY KEY,
|
|
261
|
+
pattern_id TEXT NOT NULL,
|
|
262
|
+
source_agent TEXT NOT NULL,
|
|
263
|
+
target_agent TEXT NOT NULL,
|
|
264
|
+
transfer_id TEXT,
|
|
265
|
+
compatibility_score REAL DEFAULT 0.5,
|
|
266
|
+
validation_passed INTEGER DEFAULT 0,
|
|
267
|
+
transferred_at INTEGER,
|
|
268
|
+
status TEXT DEFAULT 'pending'
|
|
269
|
+
)
|
|
270
|
+
`);
|
|
271
|
+
}
|
|
272
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_transfer_reg_source ON transfer_registry(source_agent)');
|
|
273
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_transfer_reg_target ON transfer_registry(target_agent)');
|
|
274
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_transfer_reg_status ON transfer_registry(status)');
|
|
275
|
+
// Transfer requests - pending/completed transfers
|
|
276
|
+
if (!tableExists(db, 'transfer_requests')) {
|
|
277
|
+
db.exec(`
|
|
278
|
+
CREATE TABLE transfer_requests (
|
|
279
|
+
id TEXT PRIMARY KEY,
|
|
280
|
+
source_agent TEXT NOT NULL,
|
|
281
|
+
target_agent TEXT NOT NULL,
|
|
282
|
+
pattern_ids TEXT,
|
|
283
|
+
priority TEXT DEFAULT 'medium',
|
|
284
|
+
reason TEXT,
|
|
285
|
+
requested_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now')),
|
|
286
|
+
requested_by TEXT,
|
|
287
|
+
status TEXT DEFAULT 'pending',
|
|
288
|
+
result TEXT,
|
|
289
|
+
completed_at INTEGER
|
|
290
|
+
)
|
|
291
|
+
`);
|
|
292
|
+
}
|
|
293
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_transfer_req_status ON transfer_requests(status)');
|
|
294
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_transfer_req_source ON transfer_requests(source_agent)');
|
|
295
|
+
// Transfer validations - validation results
|
|
296
|
+
if (!tableExists(db, 'transfer_validations')) {
|
|
297
|
+
db.exec(`
|
|
298
|
+
CREATE TABLE transfer_validations (
|
|
299
|
+
id TEXT PRIMARY KEY,
|
|
300
|
+
transfer_id TEXT NOT NULL,
|
|
301
|
+
validation_type TEXT NOT NULL,
|
|
302
|
+
passed INTEGER DEFAULT 0,
|
|
303
|
+
score REAL,
|
|
304
|
+
details TEXT,
|
|
305
|
+
validated_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now'))
|
|
306
|
+
)
|
|
307
|
+
`);
|
|
308
|
+
}
|
|
309
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_transfer_val_transfer ON transfer_validations(transfer_id)');
|
|
310
|
+
// Captured experiences - raw experience capture before processing
|
|
311
|
+
if (!tableExists(db, 'captured_experiences')) {
|
|
312
|
+
db.exec(`
|
|
313
|
+
CREATE TABLE captured_experiences (
|
|
314
|
+
id TEXT PRIMARY KEY,
|
|
315
|
+
agent_id TEXT NOT NULL,
|
|
316
|
+
action TEXT NOT NULL,
|
|
317
|
+
context TEXT,
|
|
318
|
+
outcome TEXT,
|
|
319
|
+
reward REAL,
|
|
320
|
+
captured_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now')),
|
|
321
|
+
processed INTEGER DEFAULT 0
|
|
322
|
+
)
|
|
323
|
+
`);
|
|
324
|
+
}
|
|
325
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_captured_exp_agent ON captured_experiences(agent_id)');
|
|
326
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_captured_exp_processed ON captured_experiences(processed)');
|
|
327
|
+
// Baselines - performance baselines for agents
|
|
328
|
+
if (!tableExists(db, 'baselines')) {
|
|
329
|
+
db.exec(`
|
|
330
|
+
CREATE TABLE baselines (
|
|
331
|
+
id TEXT PRIMARY KEY,
|
|
332
|
+
metric_name TEXT NOT NULL,
|
|
333
|
+
agent_type TEXT,
|
|
334
|
+
baseline_value REAL NOT NULL,
|
|
335
|
+
sample_size INTEGER DEFAULT 0,
|
|
336
|
+
collected_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now')),
|
|
337
|
+
updated_at INTEGER
|
|
338
|
+
)
|
|
339
|
+
`);
|
|
340
|
+
}
|
|
341
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_baselines_metric ON baselines(metric_name)');
|
|
342
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_baselines_agent ON baselines(agent_type)');
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* Migration 004: GOAP Planning Tables
|
|
347
|
+
*
|
|
348
|
+
* Creates tables for Goal-Oriented Action Planning.
|
|
349
|
+
*/
|
|
350
|
+
const migration004GOAPPlanning = {
|
|
351
|
+
version: 4,
|
|
352
|
+
name: 'goap_planning_tables',
|
|
353
|
+
description: 'Create GOAP planning tables (goals, actions, plans, execution)',
|
|
354
|
+
up: (db) => {
|
|
355
|
+
// GOAP goals
|
|
356
|
+
if (!tableExists(db, 'goap_goals')) {
|
|
357
|
+
db.exec(`
|
|
358
|
+
CREATE TABLE goap_goals (
|
|
359
|
+
id TEXT PRIMARY KEY,
|
|
360
|
+
name TEXT NOT NULL,
|
|
361
|
+
description TEXT,
|
|
362
|
+
conditions TEXT NOT NULL,
|
|
363
|
+
priority REAL DEFAULT 1.0,
|
|
364
|
+
deadline INTEGER,
|
|
365
|
+
status TEXT DEFAULT 'pending',
|
|
366
|
+
created_at INTEGER DEFAULT (strftime('%s', 'now')),
|
|
367
|
+
completed_at INTEGER
|
|
368
|
+
)
|
|
369
|
+
`);
|
|
370
|
+
}
|
|
371
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_goap_goals_status ON goap_goals(status)');
|
|
372
|
+
// GOAP actions
|
|
373
|
+
if (!tableExists(db, 'goap_actions')) {
|
|
374
|
+
db.exec(`
|
|
375
|
+
CREATE TABLE goap_actions (
|
|
376
|
+
id TEXT PRIMARY KEY,
|
|
377
|
+
name TEXT NOT NULL,
|
|
378
|
+
description TEXT,
|
|
379
|
+
preconditions TEXT NOT NULL,
|
|
380
|
+
effects TEXT NOT NULL,
|
|
381
|
+
cost REAL DEFAULT 1.0,
|
|
382
|
+
duration_estimate INTEGER,
|
|
383
|
+
success_rate REAL DEFAULT 1.0,
|
|
384
|
+
execution_count INTEGER DEFAULT 0,
|
|
385
|
+
category TEXT,
|
|
386
|
+
created_at INTEGER DEFAULT (strftime('%s', 'now')),
|
|
387
|
+
updated_at INTEGER
|
|
388
|
+
)
|
|
389
|
+
`);
|
|
390
|
+
}
|
|
391
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_goap_actions_category ON goap_actions(category)');
|
|
392
|
+
// GOAP plans
|
|
393
|
+
if (!tableExists(db, 'goap_plans')) {
|
|
394
|
+
db.exec(`
|
|
395
|
+
CREATE TABLE goap_plans (
|
|
396
|
+
id TEXT PRIMARY KEY,
|
|
397
|
+
goal_id TEXT,
|
|
398
|
+
actions TEXT NOT NULL,
|
|
399
|
+
total_cost REAL,
|
|
400
|
+
estimated_duration INTEGER,
|
|
401
|
+
status TEXT DEFAULT 'pending',
|
|
402
|
+
created_at INTEGER DEFAULT (strftime('%s', 'now')),
|
|
403
|
+
started_at INTEGER,
|
|
404
|
+
completed_at INTEGER
|
|
405
|
+
)
|
|
406
|
+
`);
|
|
407
|
+
}
|
|
408
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_goap_plans_goal ON goap_plans(goal_id)');
|
|
409
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_goap_plans_status ON goap_plans(status)');
|
|
410
|
+
// GOAP execution steps
|
|
411
|
+
if (!tableExists(db, 'goap_execution_steps')) {
|
|
412
|
+
db.exec(`
|
|
413
|
+
CREATE TABLE goap_execution_steps (
|
|
414
|
+
id TEXT PRIMARY KEY,
|
|
415
|
+
plan_id TEXT NOT NULL,
|
|
416
|
+
action_id TEXT NOT NULL,
|
|
417
|
+
step_order INTEGER NOT NULL,
|
|
418
|
+
status TEXT DEFAULT 'pending',
|
|
419
|
+
started_at INTEGER,
|
|
420
|
+
completed_at INTEGER,
|
|
421
|
+
result TEXT,
|
|
422
|
+
error TEXT
|
|
423
|
+
)
|
|
424
|
+
`);
|
|
425
|
+
}
|
|
426
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_goap_exec_plan ON goap_execution_steps(plan_id)');
|
|
427
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_goap_exec_status ON goap_execution_steps(status)');
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
/**
|
|
431
|
+
* Migration 005: Memory and Events Tables
|
|
432
|
+
*
|
|
433
|
+
* Creates tables for memory management and event tracking.
|
|
434
|
+
*/
|
|
435
|
+
const migration005MemoryEvents = {
|
|
436
|
+
version: 5,
|
|
437
|
+
name: 'memory_events_tables',
|
|
438
|
+
description: 'Create memory and event tracking tables',
|
|
439
|
+
up: (db) => {
|
|
440
|
+
// Memory entries
|
|
441
|
+
if (!tableExists(db, 'memory_entries')) {
|
|
442
|
+
db.exec(`
|
|
443
|
+
CREATE TABLE memory_entries (
|
|
444
|
+
id TEXT PRIMARY KEY,
|
|
445
|
+
key TEXT NOT NULL,
|
|
446
|
+
value TEXT NOT NULL,
|
|
447
|
+
namespace TEXT DEFAULT 'default',
|
|
448
|
+
agent_id TEXT,
|
|
449
|
+
access_level TEXT DEFAULT 'private',
|
|
450
|
+
expires_at INTEGER,
|
|
451
|
+
created_at INTEGER DEFAULT (strftime('%s', 'now')),
|
|
452
|
+
updated_at INTEGER
|
|
453
|
+
)
|
|
454
|
+
`);
|
|
455
|
+
}
|
|
456
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_memory_key ON memory_entries(key)');
|
|
457
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_memory_namespace ON memory_entries(namespace)');
|
|
458
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_memory_agent ON memory_entries(agent_id)');
|
|
459
|
+
// Only create unique index if both columns exist
|
|
460
|
+
if (columnExists(db, 'memory_entries', 'namespace') && columnExists(db, 'memory_entries', 'key')) {
|
|
461
|
+
safeCreateIndex(db, 'CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_unique ON memory_entries(namespace, key)');
|
|
462
|
+
}
|
|
463
|
+
// Events
|
|
464
|
+
if (!tableExists(db, 'events')) {
|
|
465
|
+
db.exec(`
|
|
466
|
+
CREATE TABLE events (
|
|
467
|
+
id TEXT PRIMARY KEY,
|
|
468
|
+
type TEXT NOT NULL,
|
|
469
|
+
agent_id TEXT,
|
|
470
|
+
data TEXT,
|
|
471
|
+
timestamp INTEGER DEFAULT (strftime('%s', 'now'))
|
|
472
|
+
)
|
|
473
|
+
`);
|
|
474
|
+
}
|
|
475
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_events_type ON events(type)');
|
|
476
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_events_agent ON events(agent_id)');
|
|
477
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_events_timestamp ON events(timestamp)');
|
|
478
|
+
// Hints
|
|
479
|
+
if (!tableExists(db, 'hints')) {
|
|
480
|
+
db.exec(`
|
|
481
|
+
CREATE TABLE hints (
|
|
482
|
+
id TEXT PRIMARY KEY,
|
|
483
|
+
type TEXT NOT NULL,
|
|
484
|
+
content TEXT NOT NULL,
|
|
485
|
+
source TEXT,
|
|
486
|
+
confidence REAL DEFAULT 0.5,
|
|
487
|
+
applied INTEGER DEFAULT 0,
|
|
488
|
+
created_at INTEGER DEFAULT (strftime('%s', 'now'))
|
|
489
|
+
)
|
|
490
|
+
`);
|
|
491
|
+
}
|
|
492
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_hints_type ON hints(type)');
|
|
493
|
+
// Sessions
|
|
494
|
+
if (!tableExists(db, 'sessions')) {
|
|
495
|
+
db.exec(`
|
|
496
|
+
CREATE TABLE sessions (
|
|
497
|
+
id TEXT PRIMARY KEY,
|
|
498
|
+
agent_id TEXT,
|
|
499
|
+
started_at INTEGER DEFAULT (strftime('%s', 'now')),
|
|
500
|
+
ended_at INTEGER,
|
|
501
|
+
metadata TEXT
|
|
502
|
+
)
|
|
503
|
+
`);
|
|
504
|
+
}
|
|
505
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_sessions_agent ON sessions(agent_id)');
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
/**
|
|
509
|
+
* Migration 006: Agent Registry and Performance
|
|
510
|
+
*
|
|
511
|
+
* Creates tables for agent registration and performance tracking.
|
|
512
|
+
*/
|
|
513
|
+
const migration006AgentSystem = {
|
|
514
|
+
version: 6,
|
|
515
|
+
name: 'agent_system_tables',
|
|
516
|
+
description: 'Create agent registry and performance tables',
|
|
517
|
+
up: (db) => {
|
|
518
|
+
// Agent registry
|
|
519
|
+
if (!tableExists(db, 'agent_registry')) {
|
|
520
|
+
db.exec(`
|
|
521
|
+
CREATE TABLE agent_registry (
|
|
522
|
+
id TEXT PRIMARY KEY,
|
|
523
|
+
type TEXT NOT NULL,
|
|
524
|
+
name TEXT,
|
|
525
|
+
capabilities TEXT,
|
|
526
|
+
status TEXT DEFAULT 'active',
|
|
527
|
+
created_at INTEGER DEFAULT (strftime('%s', 'now')),
|
|
528
|
+
last_active INTEGER
|
|
529
|
+
)
|
|
530
|
+
`);
|
|
531
|
+
}
|
|
532
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_agent_reg_type ON agent_registry(type)');
|
|
533
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_agent_reg_status ON agent_registry(status)');
|
|
534
|
+
// Performance metrics
|
|
535
|
+
if (!tableExists(db, 'performance_metrics')) {
|
|
536
|
+
db.exec(`
|
|
537
|
+
CREATE TABLE performance_metrics (
|
|
538
|
+
id TEXT PRIMARY KEY,
|
|
539
|
+
agent_id TEXT,
|
|
540
|
+
metric_name TEXT NOT NULL,
|
|
541
|
+
metric_value REAL NOT NULL,
|
|
542
|
+
recorded_at INTEGER DEFAULT (strftime('%s', 'now'))
|
|
543
|
+
)
|
|
544
|
+
`);
|
|
545
|
+
}
|
|
546
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_perf_agent ON performance_metrics(agent_id)');
|
|
547
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_perf_metric ON performance_metrics(metric_name)');
|
|
548
|
+
// OODA cycles
|
|
549
|
+
if (!tableExists(db, 'ooda_cycles')) {
|
|
550
|
+
db.exec(`
|
|
551
|
+
CREATE TABLE ooda_cycles (
|
|
552
|
+
id TEXT PRIMARY KEY,
|
|
553
|
+
agent_id TEXT NOT NULL,
|
|
554
|
+
observe TEXT,
|
|
555
|
+
orient TEXT,
|
|
556
|
+
decide TEXT,
|
|
557
|
+
act TEXT,
|
|
558
|
+
outcome TEXT,
|
|
559
|
+
started_at INTEGER DEFAULT (strftime('%s', 'now')),
|
|
560
|
+
completed_at INTEGER
|
|
561
|
+
)
|
|
562
|
+
`);
|
|
563
|
+
}
|
|
564
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_ooda_agent ON ooda_cycles(agent_id)');
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
/**
|
|
568
|
+
* Migration 007: Learning History and Metrics
|
|
569
|
+
*
|
|
570
|
+
* Creates tables for tracking learning progress over time.
|
|
571
|
+
*/
|
|
572
|
+
const migration007LearningHistory = {
|
|
573
|
+
version: 7,
|
|
574
|
+
name: 'learning_history_tables',
|
|
575
|
+
description: 'Create learning history and metrics tables',
|
|
576
|
+
up: (db) => {
|
|
577
|
+
// Learning history
|
|
578
|
+
if (!tableExists(db, 'learning_history')) {
|
|
579
|
+
db.exec(`
|
|
580
|
+
CREATE TABLE learning_history (
|
|
581
|
+
id TEXT PRIMARY KEY,
|
|
582
|
+
agent_id TEXT NOT NULL,
|
|
583
|
+
episode INTEGER NOT NULL,
|
|
584
|
+
total_reward REAL,
|
|
585
|
+
steps INTEGER,
|
|
586
|
+
success INTEGER DEFAULT 0,
|
|
587
|
+
metadata TEXT,
|
|
588
|
+
created_at INTEGER DEFAULT (strftime('%s', 'now'))
|
|
589
|
+
)
|
|
590
|
+
`);
|
|
591
|
+
}
|
|
592
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_learn_hist_agent ON learning_history(agent_id)');
|
|
593
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_learn_hist_episode ON learning_history(episode)');
|
|
594
|
+
// Learning metrics
|
|
595
|
+
if (!tableExists(db, 'learning_metrics')) {
|
|
596
|
+
db.exec(`
|
|
597
|
+
CREATE TABLE learning_metrics (
|
|
598
|
+
id TEXT PRIMARY KEY,
|
|
599
|
+
agent_id TEXT NOT NULL,
|
|
600
|
+
metric_name TEXT NOT NULL,
|
|
601
|
+
metric_value REAL NOT NULL,
|
|
602
|
+
context TEXT,
|
|
603
|
+
recorded_at INTEGER DEFAULT (strftime('%s', 'now'))
|
|
604
|
+
)
|
|
605
|
+
`);
|
|
606
|
+
}
|
|
607
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_learn_metrics_agent ON learning_metrics(agent_id)');
|
|
608
|
+
safeCreateIndex(db, 'CREATE INDEX IF NOT EXISTS idx_learn_metrics_name ON learning_metrics(metric_name)');
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
/**
|
|
612
|
+
* All migrations in order
|
|
613
|
+
*/
|
|
614
|
+
exports.allMigrations = [
|
|
615
|
+
migration001CoreLearning,
|
|
616
|
+
migration002DreamSystem,
|
|
617
|
+
migration003TransferLearning,
|
|
618
|
+
migration004GOAPPlanning,
|
|
619
|
+
migration005MemoryEvents,
|
|
620
|
+
migration006AgentSystem,
|
|
621
|
+
migration007LearningHistory
|
|
622
|
+
];
|
|
623
|
+
exports.default = exports.allMigrations;
|
|
624
|
+
//# sourceMappingURL=all-migrations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"all-migrations.js","sourceRoot":"","sources":["../../../src/persistence/migrations/all-migrations.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAKH;;GAEG;AACH,SAAS,WAAW,CAAC,EAAqB,EAAE,SAAiB;IAC3D,MAAM,GAAG,GAAG,EAAE,CAAC,OAAO,CACpB,8DAA8D,CAC/D,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACjB,OAAO,CAAC,CAAC,GAAG,CAAC;AACf,CAAC;AAED;;G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