overmind-mcp 1.0.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.
- package/LICENSE +21 -0
- package/README.md +111 -0
- package/dist/.claude/sessions.json +4 -0
- package/dist/bin/cli.d.ts +3 -0
- package/dist/bin/cli.d.ts.map +1 -0
- package/dist/bin/cli.js +22 -0
- package/dist/bin/cli.js.map +1 -0
- package/dist/btc_enrichment.sql +42 -0
- package/dist/btc_enrichments_2026-02-05.json +57 -0
- package/dist/btc_pattern_2026-02-05_0523.json +24 -0
- package/dist/btc_pattern_enrichments.sql +69 -0
- package/dist/btc_pattern_enrichments_batch2.sql +78 -0
- package/dist/btc_pattern_enrichments_batch3.sql +93 -0
- package/dist/btc_pattern_enrichments_batch4.sql +58 -0
- package/dist/btc_pattern_enrichments_batch5.sql +113 -0
- package/dist/btc_pattern_enrichments_batch6.sql +42 -0
- package/dist/btc_sequence_0549_0553_2026-02-05.json +64 -0
- package/dist/btc_sequence_0621_0622_2026-02-05.json +36 -0
- package/dist/btc_sequence_enrichment_20260205.sql +59 -0
- package/dist/btc_sequence_enrichment_20260205_0557-0558.sql +45 -0
- package/dist/btc_sequence_volatility_collapse_2026-02-05.json +58 -0
- package/dist/btc_vector_analysis_2026-02-05.json +96 -0
- package/dist/check_schema.js +23 -0
- package/dist/check_schema_fa.js +22 -0
- package/dist/embed-analytics.json +1 -0
- package/dist/enrich_119847.js +121 -0
- package/dist/enrich_119850.js +105 -0
- package/dist/enrich_btc.js +57 -0
- package/dist/enrich_btc_batch5.js +95 -0
- package/dist/enrich_btc_batch6_sequence_0557_0558.js +78 -0
- package/dist/enrich_btc_batch_live.js +187 -0
- package/dist/enrich_btc_final.js +141 -0
- package/dist/enrich_btc_patterns.js +134 -0
- package/dist/enrich_pattern.js +48 -0
- package/dist/enrich_pattern.sql +26 -0
- package/dist/enrich_pattern_119857.js +54 -0
- package/dist/enrich_pattern_121084.js +57 -0
- package/dist/enrich_pattern_121086.js +66 -0
- package/dist/enrich_patterns.js +114 -0
- package/dist/enrich_patterns.sql +4 -0
- package/dist/enrichment.sql +17 -0
- package/dist/enrichments_data.js +36 -0
- package/dist/example.test.js +6 -0
- package/dist/import_pattern_enrichments_2026-02-05_volatility_collapse.sql +66 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/insert_enrichments.js +69 -0
- package/dist/insert_enrichments.mjs +94 -0
- package/dist/lib/config.d.ts +26 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +31 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/sessions.d.ts +3 -0
- package/dist/lib/sessions.d.ts.map +1 -0
- package/dist/lib/sessions.js +40 -0
- package/dist/lib/sessions.js.map +1 -0
- package/dist/nul +0 -0
- package/dist/pattern_enrichment_119807.sql +34 -0
- package/dist/pattern_enrichment_119811.sql +22 -0
- package/dist/pattern_enrichment_119812.sql +23 -0
- package/dist/pattern_enrichment_119821_119822_exhaustion.sql +35 -0
- package/dist/pattern_enrichment_119826.sql +31 -0
- package/dist/pattern_enrichment_119847.sql +58 -0
- package/dist/pattern_enrichment_119848.sql +34 -0
- package/dist/pattern_enrichment_119853.sql +41 -0
- package/dist/pattern_enrichment_119856.sql +42 -0
- package/dist/pattern_enrichment_119857.sql +38 -0
- package/dist/pattern_enrichment_121027.sql +36 -0
- package/dist/pattern_enrichment_121067.sql +38 -0
- package/dist/pattern_enrichment_121086.sql +40 -0
- package/dist/pattern_enrichment_121090.sql +41 -0
- package/dist/pattern_enrichment_121138.sql +46 -0
- package/dist/pattern_enrichment_121172.sql +31 -0
- package/dist/pattern_enrichment_121189.sql +31 -0
- package/dist/pattern_enrichment_121195.sql +32 -0
- package/dist/pattern_enrichment_121207.sql +15 -0
- package/dist/pattern_enrichment_121214.sql +15 -0
- package/dist/pattern_enrichment_121217.sql +15 -0
- package/dist/pattern_enrichment_121221.sql +15 -0
- package/dist/pattern_enrichment_121314.sql +14 -0
- package/dist/pattern_enrichment_121316.sql +31 -0
- package/dist/pattern_enrichment_121325.sql +31 -0
- package/dist/pattern_enrichment_121327.sql +15 -0
- package/dist/pattern_enrichments_batch.sql +70 -0
- package/dist/pattern_enrichments_batch_2026-02-05.json +81 -0
- package/dist/prompts/agent_prompts.d.ts +2 -0
- package/dist/prompts/agent_prompts.d.ts.map +1 -0
- package/dist/prompts/agent_prompts.js +25 -0
- package/dist/prompts/agent_prompts.js.map +1 -0
- package/dist/run_enrichments.js +72 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +62 -0
- package/dist/server.js.map +1 -0
- package/dist/services/AgentManager.d.ts +22 -0
- package/dist/services/AgentManager.d.ts.map +1 -0
- package/dist/services/AgentManager.js +163 -0
- package/dist/services/AgentManager.js.map +1 -0
- package/dist/services/ClaudeRunner.d.ts +19 -0
- package/dist/services/ClaudeRunner.d.ts.map +1 -0
- package/dist/services/ClaudeRunner.js +160 -0
- package/dist/services/ClaudeRunner.js.map +1 -0
- package/dist/services/PromptManager.d.ts +16 -0
- package/dist/services/PromptManager.d.ts.map +1 -0
- package/dist/services/PromptManager.js +54 -0
- package/dist/services/PromptManager.js.map +1 -0
- package/dist/start_bot.d.ts +2 -0
- package/dist/start_bot.d.ts.map +1 -0
- package/dist/start_bot.js +26 -0
- package/dist/start_bot.js.map +1 -0
- package/dist/tools/create_agent.d.ts +19 -0
- package/dist/tools/create_agent.d.ts.map +1 -0
- package/dist/tools/create_agent.js +49 -0
- package/dist/tools/create_agent.js.map +1 -0
- package/dist/tools/manage_agents.d.ts +35 -0
- package/dist/tools/manage_agents.d.ts.map +1 -0
- package/dist/tools/manage_agents.js +121 -0
- package/dist/tools/manage_agents.js.map +1 -0
- package/dist/tools/manage_prompts.d.ts +27 -0
- package/dist/tools/manage_prompts.d.ts.map +1 -0
- package/dist/tools/manage_prompts.js +66 -0
- package/dist/tools/manage_prompts.js.map +1 -0
- package/dist/tools/run_claude.d.ts +19 -0
- package/dist/tools/run_claude.d.ts.map +1 -0
- package/dist/tools/run_claude.js +66 -0
- package/dist/tools/run_claude.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Données d'enrichissement préparées pour insertion
|
|
2
|
+
const enrichments = [
|
|
3
|
+
{
|
|
4
|
+
semantic_context_id: 119780,
|
|
5
|
+
narrative: "BTC distribution reversal confirmed. After extended uptrend (Trend 0.5→0), momentum collapsed (0.739→0.587) with conviction surge (0.00→1.00). Price rejected upper Keltner band (0.987→0.431). Technical distribution pattern with strong bearish confirmation.",
|
|
6
|
+
model_version: "claude-3.5-sonnet-batch-enrichment",
|
|
7
|
+
metadata: {
|
|
8
|
+
pattern_type: "reversal_confirmation",
|
|
9
|
+
symbol: "BTCUSDT_PERP_BINANCE",
|
|
10
|
+
timeframe: "1m",
|
|
11
|
+
conviction_change: "0.00→1.00",
|
|
12
|
+
trend_change: "0.5→0",
|
|
13
|
+
momentum_drop: "20.6%",
|
|
14
|
+
sequence_position: "acceleration_phase",
|
|
15
|
+
confidence: "high"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
semantic_context_id: 119779,
|
|
20
|
+
narrative: "Critical BTC reversal inflection point. Trend shifted from bullish (0.5) to neutral (0) exactly at momentum peak (0.782). Price at upper Bollinger Band (0.752) with zero conviction - typical distribution exhaustion signal. Slope still elevated (0.027) suggesting residual bullish energy.",
|
|
21
|
+
model_version: "claude-3.5-sonnet-batch-enrichment",
|
|
22
|
+
metadata: {
|
|
23
|
+
pattern_type: "reversal_inflection",
|
|
24
|
+
symbol: "BTCUSDT_PERP_BINANCE",
|
|
25
|
+
timeframe: "1m",
|
|
26
|
+
trend_flip: "0.5→0",
|
|
27
|
+
bb_position: "0.752 (upper)",
|
|
28
|
+
conviction: "0.00 (exhaustion)",
|
|
29
|
+
slope_residual: "0.027",
|
|
30
|
+
sequence_position: "pivot_point",
|
|
31
|
+
confidence: "high"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
console.log(JSON.stringify(enrichments, null, 2));
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
-- ============================================================
|
|
2
|
+
-- BATCH ENRICHMENT: VOLATILITY COLLAPSE SEQUENCE
|
|
3
|
+
-- Symbol: BTCUSDT_PERP_BINANCE
|
|
4
|
+
-- Time range: 2026-02-05T05:44:00Z to 2026-02-05T05:48:00Z
|
|
5
|
+
-- Analyst: Claude 3.5 Sonnet (claude-sonnet-4.5)
|
|
6
|
+
-- ============================================================
|
|
7
|
+
|
|
8
|
+
-- Pattern ID: 119797
|
|
9
|
+
-- Type: Volatility Collapse Post-Spike
|
|
10
|
+
-- Signal: Consolidation après spike de volatilité
|
|
11
|
+
-- Importance: MEDIUM - Point de sortie de volatilité significatif
|
|
12
|
+
INSERT INTO pattern_enrichments (semantic_context_id, narrative, model_version, metadata)
|
|
13
|
+
VALUES (
|
|
14
|
+
119797,
|
|
15
|
+
'Volatility collapse post-spike: transition brutale Vol 0.8→0.2 en 1 minute avec Strength=1. Ce pattern suggère une fin de capture de liquidation suivie d''un retour à un calme structurel. BBPos (0.48) et KeltPos (0.49) indiquent un prix recentré après excursion volatile. Momentum modéré (0.595) avec Slope très faible (0.011) signalent une période de consolidation/indécision après le spike volatil. Conviction maximale (1.00) malgré l''absence de direction claire.',
|
|
16
|
+
'claude-sonnet-4.5',
|
|
17
|
+
'{
|
|
18
|
+
"pattern_type": "volatility_collapse",
|
|
19
|
+
"signal": "consolidation_post_spike",
|
|
20
|
+
"vol_change": "0.8_to_0.2",
|
|
21
|
+
"volatility_transition_duration": "1_minute",
|
|
22
|
+
"sequence_length": 5,
|
|
23
|
+
"prior_volatility": "high",
|
|
24
|
+
"current_regime": "low_vol_consolidation",
|
|
25
|
+
"vector_snapshot": {
|
|
26
|
+
"trend": 0,
|
|
27
|
+
"volatility": 0.2,
|
|
28
|
+
"momentum": 0.595436,
|
|
29
|
+
"bb_position": 0.484309,
|
|
30
|
+
"keltner_position": 0.488997,
|
|
31
|
+
"slope": 0.0109461,
|
|
32
|
+
"high_volatility": 0.25,
|
|
33
|
+
"strength": 1
|
|
34
|
+
},
|
|
35
|
+
"conviction_score": 1.00,
|
|
36
|
+
"importance": "MEDIUM",
|
|
37
|
+
"actionable_insight": "Fin probable d''une séquence de liquidation. Le retour à basse volatilité avec forte conviction suggère une période de consolidation ou accumulation/distribution en range. Attention aux breakouts de range suite à cette compression."
|
|
38
|
+
}'::jsonb
|
|
39
|
+
)
|
|
40
|
+
ON CONFLICT (semantic_context_id)
|
|
41
|
+
DO UPDATE SET
|
|
42
|
+
narrative = EXCLUDED.narrative,
|
|
43
|
+
model_version = EXCLUDED.model_version,
|
|
44
|
+
metadata = EXCLUDED.metadata;
|
|
45
|
+
|
|
46
|
+
-- ============================================================
|
|
47
|
+
-- ANALYSIS SUMMARY
|
|
48
|
+
-- ============================================================
|
|
49
|
+
-- Total patterns analyzed: 5
|
|
50
|
+
-- Enriched patterns: 1 (119797 only)
|
|
51
|
+
-- Noise patterns filtered: 4
|
|
52
|
+
--
|
|
53
|
+
-- SEQUENCE INTERPRETATION:
|
|
54
|
+
-- Movement Health: ANOMALIE SUSPECTE - Spike volatil suivi d'effondrement brutal
|
|
55
|
+
-- Pattern Type: "Squid spike" (volatilité 0.8 pendant 3 min puis effondrement)
|
|
56
|
+
-- Market Microstructure: Probable stop hunt ou capture de liquidation
|
|
57
|
+
--
|
|
58
|
+
-- FILTERING RATIONALE:
|
|
59
|
+
-- - 119793: Conviction 0.00 → ignoré (bruit)
|
|
60
|
+
-- - 119794-119796: Phase de spike volatile sans direction claire → ignorés
|
|
61
|
+
-- - 119797: Point de transition critique (collapse volatilité) → ENRICHI
|
|
62
|
+
--
|
|
63
|
+
-- NEXT EXPECTED MOVE:
|
|
64
|
+
-- Consolidation en range ou reprise de tendance après compression.
|
|
65
|
+
-- Surveillance des breakouts de bande suite à période de calme volatil.
|
|
66
|
+
-- ============================================================
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// BTC Pattern Enrichment Script
|
|
2
|
+
const patterns = [
|
|
3
|
+
{
|
|
4
|
+
semantic_context_id: 119779,
|
|
5
|
+
narrative: 'CRITICAL REVERSAL POINT: Bearish-to-neutral trend transition with strength inversion (0→1). Anomalous Keltner position drop (0.99→0.75) suggests regime shift. High momentum (0.74) with neutral trend indicates potential bull trap or genuine reversal. Needs volume confirmation.',
|
|
6
|
+
model_version: 'v2.1-sequence-analyzer',
|
|
7
|
+
metadata: {
|
|
8
|
+
pattern_type: 'reversal',
|
|
9
|
+
trend_change: 'bearish_to_neutral',
|
|
10
|
+
strength_inversion: true,
|
|
11
|
+
kelner_anomaly: 0.24,
|
|
12
|
+
conviction: 0,
|
|
13
|
+
priority: 'high',
|
|
14
|
+
btc_perp: true
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
semantic_context_id: 119786,
|
|
19
|
+
narrative: 'TREND STABILIZATION: Neutral trend established with strong conviction (1.00). Momentum normalizing (0.36) from elevated levels. Keltner position (0.27) suggests pullback within new regime. Low slope (0.024) indicates consolidation phase. Monitor for breakout direction.',
|
|
20
|
+
model_version: 'v2.1-sequence-analyzer',
|
|
21
|
+
metadata: {
|
|
22
|
+
pattern_type: 'stabilization',
|
|
23
|
+
trend: 'neutral',
|
|
24
|
+
conviction: 1,
|
|
25
|
+
momentum_decay: 0.38,
|
|
26
|
+
kelner_position: 0.27,
|
|
27
|
+
slope: 0.024,
|
|
28
|
+
priority: 'medium',
|
|
29
|
+
btc_perp: true
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
console.log('BTC PATTERN ENRICHMENT RESULTS');
|
|
35
|
+
console.log('='.repeat(50));
|
|
36
|
+
console.log(`Total patterns analyzed: 10`);
|
|
37
|
+
console.log(`Significant patterns identified: 2`);
|
|
38
|
+
console.log(`Patterns filtered as noise: 8`);
|
|
39
|
+
console.log('');
|
|
40
|
+
console.log('ENRICHED PATTERNS:');
|
|
41
|
+
console.log('-'.repeat(50));
|
|
42
|
+
|
|
43
|
+
patterns.forEach((p, i) => {
|
|
44
|
+
console.log(`\n${i + 1}. ID: ${p.semantic_context_id}`);
|
|
45
|
+
console.log(` Type: ${p.metadata.pattern_type.toUpperCase()}`);
|
|
46
|
+
console.log(` Priority: ${p.metadata.priority}`);
|
|
47
|
+
console.log(` Narrative: ${p.narrative.substring(0, 100)}...`);
|
|
48
|
+
console.log(` Metadata: ${JSON.stringify(p.metadata)}`);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
console.log('\n' + '='.repeat(50));
|
|
52
|
+
console.log('SQL QUERIES TO EXECUTE:');
|
|
53
|
+
console.log('-'.repeat(50));
|
|
54
|
+
|
|
55
|
+
patterns.forEach(p => {
|
|
56
|
+
const metadataJson = JSON.stringify(p.metadata).replace(/'/g, "''");
|
|
57
|
+
console.log(`
|
|
58
|
+
INSERT INTO pattern_enrichments (semantic_context_id, narrative, model_version, metadata)
|
|
59
|
+
VALUES (${p.semantic_context_id}, '${p.narrative.replace(/'/g, "''")}', '${p.model_version}', '${metadataJson}'::jsonb)
|
|
60
|
+
ON CONFLICT (semantic_context_id) DO UPDATE SET
|
|
61
|
+
narrative = EXCLUDED.narrative,
|
|
62
|
+
model_version = EXCLUDED.model_version,
|
|
63
|
+
metadata = EXCLUDED.metadata,
|
|
64
|
+
updated_at = NOW();
|
|
65
|
+
`);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
console.log('\n' + '='.repeat(50));
|
|
69
|
+
console.log('EXECUTE THESE QUERIES IN YOUR POSTGRESQL CLIENT');
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import pg from 'pg';
|
|
2
|
+
const { Client } = pg;
|
|
3
|
+
|
|
4
|
+
const enrichments = [
|
|
5
|
+
{
|
|
6
|
+
semantic_context_id: 119780,
|
|
7
|
+
narrative: "BTC distribution reversal confirmed. After extended uptrend (Trend 0.5→0), momentum collapsed (0.739→0.587) with conviction surge (0.00→1.00). Price rejected upper Keltner band (0.987→0.431). Technical distribution pattern with strong bearish confirmation.",
|
|
8
|
+
model_version: "claude-3.5-sonnet-batch-enrichment",
|
|
9
|
+
metadata: {
|
|
10
|
+
pattern_type: "reversal_confirmation",
|
|
11
|
+
symbol: "BTCUSDT_PERP_BINANCE",
|
|
12
|
+
timeframe: "1m",
|
|
13
|
+
conviction_change: "0.00→1.00",
|
|
14
|
+
trend_change: "0.5→0",
|
|
15
|
+
momentum_drop: "20.6%",
|
|
16
|
+
sequence_position: "acceleration_phase",
|
|
17
|
+
confidence: "high"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
semantic_context_id: 119779,
|
|
22
|
+
narrative: "Critical BTC reversal inflection point. Trend shifted from bullish (0.5) to neutral (0) exactly at momentum peak (0.782). Price at upper Bollinger Band (0.752) with zero conviction - typical distribution exhaustion signal. Slope still elevated (0.027) suggesting residual bullish energy.",
|
|
23
|
+
model_version: "claude-3.5-sonnet-batch-enrichment",
|
|
24
|
+
metadata: {
|
|
25
|
+
pattern_type: "reversal_inflection",
|
|
26
|
+
symbol: "BTCUSDT_PERP_BINANCE",
|
|
27
|
+
timeframe: "1m",
|
|
28
|
+
trend_flip: "0.5→0",
|
|
29
|
+
bb_position: "0.752 (upper)",
|
|
30
|
+
conviction: "0.00 (exhaustion)",
|
|
31
|
+
slope_residual: "0.027",
|
|
32
|
+
sequence_position: "pivot_point",
|
|
33
|
+
confidence: "high"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
const client = new Client({
|
|
39
|
+
host: 'localhost',
|
|
40
|
+
database: 'crypto_patterns',
|
|
41
|
+
user: 'postgres',
|
|
42
|
+
password: 'admin'
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
(async () => {
|
|
46
|
+
try {
|
|
47
|
+
await client.connect();
|
|
48
|
+
console.log('✓ Connected to PostgreSQL');
|
|
49
|
+
|
|
50
|
+
const tableCheck = await client.query(`
|
|
51
|
+
SELECT column_name, data_type
|
|
52
|
+
FROM information_schema.columns
|
|
53
|
+
WHERE table_name = 'pattern_enrichments'
|
|
54
|
+
ORDER BY ordinal_position
|
|
55
|
+
`);
|
|
56
|
+
|
|
57
|
+
if (tableCheck.rows.length === 0) {
|
|
58
|
+
console.error('❌ Table pattern_enrichments not found');
|
|
59
|
+
await client.end();
|
|
60
|
+
process.exit(1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
console.log('📋 Table schema:', tableCheck.rows.map(r => `${r.column_name}: ${r.data_type}`).join(', '));
|
|
64
|
+
|
|
65
|
+
for (const enrichment of enrichments) {
|
|
66
|
+
const query = \`
|
|
67
|
+
INSERT INTO pattern_enrichments (semantic_context_id, narrative, model_version, metadata)
|
|
68
|
+
VALUES (\$1, \$2, \$3, \$4)
|
|
69
|
+
ON CONFLICT (semantic_context_id) DO UPDATE
|
|
70
|
+
SET narrative = EXCLUDED.narrative,
|
|
71
|
+
model_version = EXCLUDED.model_version,
|
|
72
|
+
metadata = EXCLUDED.metadata,
|
|
73
|
+
updated_at = NOW()
|
|
74
|
+
\`;
|
|
75
|
+
|
|
76
|
+
await client.query(query, [
|
|
77
|
+
enrichment.semantic_context_id,
|
|
78
|
+
enrichment.narrative,
|
|
79
|
+
enrichment.model_version,
|
|
80
|
+
JSON.stringify(enrichment.metadata)
|
|
81
|
+
]);
|
|
82
|
+
|
|
83
|
+
console.log(\`✓ Enriched pattern ID \${enrichment.semantic_context_id}\`);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
console.log(\`\n✅ Successfully enriched \${enrichments.length} patterns\`);
|
|
87
|
+
|
|
88
|
+
} catch (error) {
|
|
89
|
+
console.error('❌ Error:', error.message);
|
|
90
|
+
process.exit(1);
|
|
91
|
+
} finally {
|
|
92
|
+
await client.end();
|
|
93
|
+
}
|
|
94
|
+
})();
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface ConfigType {
|
|
2
|
+
CLAUDE: {
|
|
3
|
+
CORE: string;
|
|
4
|
+
PERMISSIONS: string;
|
|
5
|
+
PATHS: {
|
|
6
|
+
SETTINGS: string;
|
|
7
|
+
MCP: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
TIMEOUT_MS: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const DEFAULT_CONFIG: ConfigType;
|
|
13
|
+
export declare const CONFIG: {
|
|
14
|
+
CLAUDE: {
|
|
15
|
+
CORE: string;
|
|
16
|
+
PERMISSIONS: string;
|
|
17
|
+
PATHS: {
|
|
18
|
+
SETTINGS: string;
|
|
19
|
+
MCP: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
TIMEOUT_MS: number;
|
|
23
|
+
};
|
|
24
|
+
export declare function resolveConfigPath(configPath: string): string;
|
|
25
|
+
export declare function updateConfig(newSettingsPath?: string, newMcpPath?: string): void;
|
|
26
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE;YACL,QAAQ,EAAE,MAAM,CAAC;YACjB,GAAG,EAAE,MAAM,CAAC;SACb,CAAC;KACH,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,EAAE,UAU5B,CAAC;AAEF,eAAO,MAAM,MAAM;YAvBT;QACN,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE;YACL,QAAQ,EAAE,MAAM,CAAC;YACjB,GAAG,EAAE,MAAM,CAAC;SACb,CAAC;KACH;gBACW,MAAM;CAeuB,CAAC;AAE5C,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAU5D;AAED,wBAAgB,YAAY,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,QAGzE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
3
|
+
export const DEFAULT_CONFIG = {
|
|
4
|
+
TIMEOUT_MS: 300000, // 5 minutes
|
|
5
|
+
CLAUDE: {
|
|
6
|
+
CORE: '-p --output-format json',
|
|
7
|
+
PERMISSIONS: '--dangerously-skip-permissions',
|
|
8
|
+
PATHS: {
|
|
9
|
+
SETTINGS: './.claude/settings.json',
|
|
10
|
+
MCP: './.mcp.json',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
export const CONFIG = { ...DEFAULT_CONFIG };
|
|
15
|
+
export function resolveConfigPath(configPath) {
|
|
16
|
+
if (path.isAbsolute(configPath))
|
|
17
|
+
return configPath;
|
|
18
|
+
// Resolve relative to project root (Workflow/)
|
|
19
|
+
const currentFileUrl = import.meta.url;
|
|
20
|
+
const currentFilePath = fileURLToPath(currentFileUrl);
|
|
21
|
+
// src/lib/config.ts -> src/lib -> src -> Workflow
|
|
22
|
+
const projectRoot = path.resolve(path.dirname(currentFilePath), '../../');
|
|
23
|
+
return path.resolve(projectRoot, configPath);
|
|
24
|
+
}
|
|
25
|
+
export function updateConfig(newSettingsPath, newMcpPath) {
|
|
26
|
+
if (newSettingsPath)
|
|
27
|
+
CONFIG.CLAUDE.PATHS.SETTINGS = newSettingsPath;
|
|
28
|
+
if (newMcpPath)
|
|
29
|
+
CONFIG.CLAUDE.PATHS.MCP = newMcpPath;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAcpC,MAAM,CAAC,MAAM,cAAc,GAAe;IACxC,UAAU,EAAE,MAAM,EAAE,YAAY;IAChC,MAAM,EAAE;QACN,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,gCAAgC;QAC7C,KAAK,EAAE;YACL,QAAQ,EAAE,yBAAyB;YACnC,GAAG,EAAE,aAAa;SACnB;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,GAAG,cAAc,EAAE,CAAC;AAE5C,MAAM,UAAU,iBAAiB,CAAC,UAAkB;IAClD,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;QAAE,OAAO,UAAU,CAAC;IAEnD,+CAA+C;IAC/C,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;IACvC,MAAM,eAAe,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;IACtD,kDAAkD;IAClD,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,QAAQ,CAAC,CAAC;IAE1E,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,eAAwB,EAAE,UAAmB;IACxE,IAAI,eAAe;QAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,eAAe,CAAC;IACpE,IAAI,UAAU;QAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,UAAU,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessions.d.ts","sourceRoot":"","sources":["../../src/lib/sessions.ts"],"names":[],"mappings":"AAYA,wBAAsB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAShF;AAED,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBvF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import fs from 'fs/promises';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
const SESSIONS_FILE = '.claude/sessions.json';
|
|
4
|
+
function getSessionsPath() {
|
|
5
|
+
// Resolve relative to CWD or setup logic similar to config
|
|
6
|
+
// For simplicity, we assume .claude is in CWD or relative to project root
|
|
7
|
+
return path.resolve(process.cwd(), SESSIONS_FILE);
|
|
8
|
+
}
|
|
9
|
+
export async function getLastSessionId(agentName) {
|
|
10
|
+
try {
|
|
11
|
+
const filePath = getSessionsPath();
|
|
12
|
+
const content = await fs.readFile(filePath, 'utf-8');
|
|
13
|
+
const sessions = JSON.parse(content);
|
|
14
|
+
return sessions[agentName] || null;
|
|
15
|
+
}
|
|
16
|
+
catch (_error) {
|
|
17
|
+
return null; // File doesn't exist or error reading
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export async function saveSessionId(agentName, sessionId) {
|
|
21
|
+
const filePath = getSessionsPath();
|
|
22
|
+
const dir = path.dirname(filePath);
|
|
23
|
+
try {
|
|
24
|
+
await fs.mkdir(dir, { recursive: true });
|
|
25
|
+
let sessions = {};
|
|
26
|
+
try {
|
|
27
|
+
const content = await fs.readFile(filePath, 'utf-8');
|
|
28
|
+
sessions = JSON.parse(content);
|
|
29
|
+
}
|
|
30
|
+
catch (_e) {
|
|
31
|
+
// Ignore error (file new)
|
|
32
|
+
}
|
|
33
|
+
sessions[agentName] = sessionId;
|
|
34
|
+
await fs.writeFile(filePath, JSON.stringify(sessions, null, 2), 'utf-8');
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
console.error(`Failed to save session ID for ${agentName}:`, error);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=sessions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessions.js","sourceRoot":"","sources":["../../src/lib/sessions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,MAAM,aAAa,GAAG,uBAAuB,CAAC;AAE9C,SAAS,eAAe;IACtB,2DAA2D;IAC3D,0EAA0E;IAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,aAAa,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,SAAiB;IACtD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,eAAe,EAAE,CAAC;QACnC,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACrD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrC,OAAO,QAAQ,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC;IACrC,CAAC;IAAC,OAAO,MAAM,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC,CAAC,sCAAsC;IACrD,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,SAAiB,EAAE,SAAiB;IACtE,MAAM,QAAQ,GAAG,eAAe,EAAE,CAAC;IACnC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEnC,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAEzC,IAAI,QAAQ,GAA2B,EAAE,CAAC;QAC1C,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YACrD,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,0BAA0B;QAC5B,CAAC;QAED,QAAQ,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;QAChC,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,iCAAiC,SAAS,GAAG,EAAE,KAAK,CAAC,CAAC;IACtE,CAAC;AACH,CAAC"}
|
package/dist/nul
ADDED
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
-- Pattern Enrichment for BTCUSDT_PERP_BINANCE
|
|
2
|
+
-- Pattern ID: 119807
|
|
3
|
+
-- Time: 2026-02-05T05:58:00.000Z
|
|
4
|
+
-- Conviction: 1.00
|
|
5
|
+
|
|
6
|
+
INSERT INTO pattern_enrichments (
|
|
7
|
+
semantic_context_id,
|
|
8
|
+
narrative,
|
|
9
|
+
model_version,
|
|
10
|
+
metadata,
|
|
11
|
+
created_at
|
|
12
|
+
) VALUES (
|
|
13
|
+
119807,
|
|
14
|
+
'BTC divergence beariste sur bandes avec force maintenue. BBPos chute de 0.125 à 0.025, KeltPos bascule en négatif (-0.026) alors que Slope et Strength restent élevés. Signal de pullback potentiel dans tendance haussière.',
|
|
15
|
+
'v1.0-analyste',
|
|
16
|
+
'{
|
|
17
|
+
"symbol": "BTCUSDT_PERP_BINANCE",
|
|
18
|
+
"timestamp": "2026-02-05T05:58:00.000Z",
|
|
19
|
+
"vector": [0, 0.8, 0.269938, 0.0251995, -0.026083, 0.0431022, 1, 1],
|
|
20
|
+
"conviction": 1.0,
|
|
21
|
+
"pattern_type": "divergence_bearish_pullback",
|
|
22
|
+
"key_signals": {
|
|
23
|
+
"bbpos_drop": -0.0799915,
|
|
24
|
+
"keltpos_bearish": true,
|
|
25
|
+
"strength_resilient": true,
|
|
26
|
+
"slope_stable": 0.0431022
|
|
27
|
+
},
|
|
28
|
+
"interpretation": "Recul technique sur bandes avec maintien de la structure - opportunité d''achat sur pullback si support confirmé"
|
|
29
|
+
}'::jsonb,
|
|
30
|
+
NOW()
|
|
31
|
+
) ON CONFLICT (semantic_context_id) DO UPDATE SET
|
|
32
|
+
narrative = EXCLUDED.narrative,
|
|
33
|
+
metadata = EXCLUDED.metadata,
|
|
34
|
+
updated_at = NOW();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
-- Pattern Enrichment: BTCUSDT_PERP_BINANCE Sequence Analysis
|
|
2
|
+
-- Pattern ID: 119811
|
|
3
|
+
-- Time: 2026-02-05T06:02:00.000Z
|
|
4
|
+
-- Conviction: 1.00
|
|
5
|
+
|
|
6
|
+
-- Enrichment narrative: Accumulation with upward pressure in high volatility
|
|
7
|
+
INSERT INTO pattern_enrichments (
|
|
8
|
+
semantic_context_id,
|
|
9
|
+
narrative,
|
|
10
|
+
model_version,
|
|
11
|
+
metadata,
|
|
12
|
+
created_at
|
|
13
|
+
) VALUES (
|
|
14
|
+
119811,
|
|
15
|
+
'Consolidation phase with high volatility (0.8) and neutral trend (0.0). Building upward pressure: momentum 0.41, BB position 0.45, Keltner 0.51 with low slope 0.042. Indicates potential breakout setup with conviction 1.00.',
|
|
16
|
+
'vector-v8-enrichment',
|
|
17
|
+
'{"vector": [0,0.8,0.414356,0.451896,0.506851,0.0417593,1,1], "conviction": 1.0, "pattern_type": "accumulation_pressure", "trend": "neutral", "volatility": "high", "breakout_potential": "bullish", "sequence_id": 119812}'::jsonb,
|
|
18
|
+
NOW()
|
|
19
|
+
) ON CONFLICT (semantic_context_id) DO UPDATE SET
|
|
20
|
+
narrative = EXCLUDED.narrative,
|
|
21
|
+
metadata = EXCLUDED.metadata,
|
|
22
|
+
updated_at = NOW();
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
-- Pattern Enrichment: BTCUSDT_PERP_BINANCE Sequence Analysis
|
|
2
|
+
-- Pattern ID: 119812
|
|
3
|
+
-- Time: 2026-02-05T06:03:00.000Z
|
|
4
|
+
-- Conviction: 1.00
|
|
5
|
+
-- Sequence context: Follows 119811 with upward acceleration
|
|
6
|
+
|
|
7
|
+
-- Enrichment narrative: High-conviction breakout acceleration
|
|
8
|
+
INSERT INTO pattern_enrichments (
|
|
9
|
+
semantic_context_id,
|
|
10
|
+
narrative,
|
|
11
|
+
model_version,
|
|
12
|
+
metadata,
|
|
13
|
+
created_at
|
|
14
|
+
) VALUES (
|
|
15
|
+
119812,
|
|
16
|
+
'Breakout acceleration from consolidation. High volatility (0.8) with strong conviction (1.0). Momentum stalled at 0.36 while price action compressed lower (BB 0.35, Kelt 0.39) with minimal slope (0.034). Sequence 119811→119812 shows upward pressure building (Kelt 0.51→0.39) followed by compression phase. Potential spring-loaded setup.',
|
|
17
|
+
'vector-v8-enrichment',
|
|
18
|
+
'{"vector": [0,0.8,0.361973,0.354699,0.386892,0.0344238,1,1], "conviction": 1.0, "pattern_type": "breakout_acceleration", "trend": "neutral", "volatility": "high", "setup": "spring_loaded_compression", "sequence_prev": 119811, "sequence_type": "accumulation_to_compression"}'::jsonb,
|
|
19
|
+
NOW()
|
|
20
|
+
) ON CONFLICT (semantic_context_id) DO UPDATE SET
|
|
21
|
+
narrative = EXCLUDED.narrative,
|
|
22
|
+
metadata = EXCLUDED.metadata,
|
|
23
|
+
updated_at = NOW();
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
-- Pattern Enrichment: BTCUSDT_PERP_BINANCE Sequence Analysis
|
|
2
|
+
-- Pattern IDs: 119821, 119822 (Trend Exhaustion Sequence)
|
|
3
|
+
-- Time: 2026-02-05T06:12:00.000Z → 06:13:00.000Z
|
|
4
|
+
-- Conviction: 0.00 for both
|
|
5
|
+
--
|
|
6
|
+
-- ANALYSIS SUMMARY:
|
|
7
|
+
-- This is a TREND EXHAUSTION pattern characterized by:
|
|
8
|
+
-- 1. Extreme overbought conditions (BB > 0.85, Keltner > 0.88)
|
|
9
|
+
-- 2. Immediate momentum decay on next period
|
|
10
|
+
-- 3. Weak slope (~0.044) indicating lack of propulsion
|
|
11
|
+
--
|
|
12
|
+
-- Pattern 119821 is the PRIMARY SIGNAL (peak exhaustion)
|
|
13
|
+
-- Pattern 119822 is CONFIRMATION (momentum collapse)
|
|
14
|
+
--
|
|
15
|
+
-- RECOMMENDATION: Enrich 119821 only (119822 is noise derivative)
|
|
16
|
+
|
|
17
|
+
-- Enrichment narrative: Trend exhaustion with extreme overbought collapse
|
|
18
|
+
INSERT INTO pattern_enrichments (
|
|
19
|
+
semantic_context_id,
|
|
20
|
+
narrative,
|
|
21
|
+
model_version,
|
|
22
|
+
metadata,
|
|
23
|
+
created_at
|
|
24
|
+
) VALUES (
|
|
25
|
+
119821,
|
|
26
|
+
'Trend exhaustion signal at extreme overbought levels. Volatility elevated (0.8) with neutral trend (0.5). Pattern shows peak exhaustion: BB position 0.856 (upper extreme), Keltner 0.881 (extreme), momentum 0.748 but slope weak at 0.0436. Next period (119822) confirms decay: momentum drops to 0.728, BB recedes to 0.799, Keltner to 0.808. This is textbook exhaustion: price extended but lacking propulsion energy. High probability of mean reversion or consolidation.',
|
|
27
|
+
'vector-v8-enrichment',
|
|
28
|
+
'{"vector": [0.5,0.8,0.74782,0.85623,0.880647,0.0435457,1,0], "conviction": 0.0, "pattern_type": "trend_exhaustion", "trend": "neutral", "volatility": "high", "setup": "overbought_exhaustion", "sequence_next": 119822, "sequence_type": "exhaustion_to_decay", "signal_strength": "high", "bb_position": "extreme_upper", "keltner_position": "extreme_upper", "momentum_decay_confirmed": true}'::jsonb,
|
|
29
|
+
NOW()
|
|
30
|
+
) ON CONFLICT (semantic_context_id) DO UPDATE SET
|
|
31
|
+
narrative = EXCLUDED.narrative,
|
|
32
|
+
metadata = EXCLUDED.metadata,
|
|
33
|
+
updated_at = NOW();
|
|
34
|
+
|
|
35
|
+
-- Note: Pattern 119822 NOT enriched (derivative noise, confirmation only)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
-- BTC Pattern 119826 - Bearish Breakdown Confirmation
|
|
2
|
+
-- Timestamp: 2026-02-05T06:17:00.000Z
|
|
3
|
+
-- Conviction: 1.00
|
|
4
|
+
|
|
5
|
+
INSERT INTO pattern_enrichments (
|
|
6
|
+
semantic_context_id,
|
|
7
|
+
narrative,
|
|
8
|
+
model_version,
|
|
9
|
+
metadata
|
|
10
|
+
) VALUES (
|
|
11
|
+
119826,
|
|
12
|
+
'BTC breakdown confirmed: high vol distribution with bearish momentum acceleration. BB position collapse (-0.362) signals selling pressure intensification after failed pump attempt at 06:16. Momentum flipped from +0.209 to -0.041 in 1 minute.',
|
|
13
|
+
'claude-sonnet-4.5',
|
|
14
|
+
'{
|
|
15
|
+
"pattern_type": "bearish_breakdown",
|
|
16
|
+
"volatility": 0.8,
|
|
17
|
+
"momentum": -0.0414029,
|
|
18
|
+
"bb_position": -0.362133,
|
|
19
|
+
"keltners": 0.013465,
|
|
20
|
+
"slope": 0.013465,
|
|
21
|
+
"sequence_signal": "reversal",
|
|
22
|
+
"previous_pattern_id": 119825,
|
|
23
|
+
"timeframe": "1m",
|
|
24
|
+
"risk_level": "high",
|
|
25
|
+
"actionable": true,
|
|
26
|
+
"conviction": 1.0
|
|
27
|
+
}'::jsonb
|
|
28
|
+
) ON CONFLICT (semantic_context_id) DO UPDATE SET
|
|
29
|
+
narrative = EXCLUDED.narrative,
|
|
30
|
+
metadata = EXCLUDED.metadata,
|
|
31
|
+
updated_at = NOW();
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
-- Pattern 119847 - 2026-02-05T06:38:00.000Z
|
|
2
|
+
-- Volatilité extrême avec direction neutre = Anomalie de pression
|
|
3
|
+
|
|
4
|
+
INSERT INTO pattern_enrichments (semantic_context_id, narrative, model_version, metadata)
|
|
5
|
+
VALUES (
|
|
6
|
+
119847,
|
|
7
|
+
$$
|
|
8
|
+
🔴 ANOMALY: HIGH-VOLATILITY COMPRESSION
|
|
9
|
+
|
|
10
|
+
**Structure:**
|
|
11
|
+
- Trend = 0.00 (neutre) avec Vol = 0.80 (élevée)
|
|
12
|
+
- Force maximale (1.00) mais pente quasi nulle (0.007)
|
|
13
|
+
- Prix partie haute bandes (BB 0.63, Kelt 0.53)
|
|
14
|
+
|
|
15
|
+
**Interprétation:**
|
|
16
|
+
Marché sous forte tension mais sans direction claire.
|
|
17
|
+
Profil typique de:
|
|
18
|
+
1. Accumulation/distribution avant breakout
|
|
19
|
+
2. Squeeze sur niveaux clés
|
|
20
|
+
3. Indecision entre participants avec volume
|
|
21
|
+
|
|
22
|
+
**Risque:**
|
|
23
|
+
Volatilité élevée non directionnelle = setup potentiel pour mouvement violent dès que contexte clarifie.
|
|
24
|
+
Surveiller cassure de range ou accélération de pente.
|
|
25
|
+
|
|
26
|
+
**Conviction:** 1.00 - Très forte confiance dans l'anomalie
|
|
27
|
+
$$,
|
|
28
|
+
'claude-3.5-sonnet',
|
|
29
|
+
'{
|
|
30
|
+
"pattern_type": "volatility_anomaly",
|
|
31
|
+
"urgency": "high",
|
|
32
|
+
"indicators": {
|
|
33
|
+
"trend": 0.0,
|
|
34
|
+
"volatility": 0.8,
|
|
35
|
+
"momentum": 0.663586,
|
|
36
|
+
"bb_position": 0.634689,
|
|
37
|
+
"keltner_position": 0.530478,
|
|
38
|
+
"slope": 0.00678355,
|
|
39
|
+
"high_vol": 1.0,
|
|
40
|
+
"strength": 1.0
|
|
41
|
+
},
|
|
42
|
+
"signal": "watch_breakout",
|
|
43
|
+
"coherence_score": "low",
|
|
44
|
+
"analysis": {
|
|
45
|
+
"divergence": "volatilité_force vs direction_trend",
|
|
46
|
+
"expected_move": "violent_breakout_pending",
|
|
47
|
+
"trigger_conditions": ["slope_acceleration", "range_break", "volume_confirmation"]
|
|
48
|
+
},
|
|
49
|
+
"timestamp": "2026-02-05T06:38:00.000Z",
|
|
50
|
+
"symbol": "BTCUSDT_PERP_BINANCE"
|
|
51
|
+
}'::jsonb
|
|
52
|
+
)
|
|
53
|
+
ON CONFLICT (semantic_context_id)
|
|
54
|
+
DO UPDATE SET
|
|
55
|
+
narrative = EXCLUDED.narrative,
|
|
56
|
+
model_version = EXCLUDED.model_version,
|
|
57
|
+
metadata = EXCLUDED.metadata,
|
|
58
|
+
created_at = NOW();
|