Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
359 commits
Select commit Hold shift + click to select a range
f791124
Merge pull request #55 from neuro-publico/url-image-from
oscarcitoz May 14, 2025
1b4ffaf
Merge pull request #56 from neuro-publico/develop
oscarcitoz May 15, 2025
500fc92
fix version
oscarcitoz May 15, 2025
602cb1b
Merge pull request #57 from neuro-publico/url-image-from
oscarcitoz May 15, 2025
1526700
Merge pull request #58 from neuro-publico/develop
oscarcitoz May 15, 2025
b611b64
add history in memory
oscarcitoz May 31, 2025
f9f0c3d
Merge pull request #59 from neuro-publico/url-image-from
oscarcitoz May 31, 2025
2f577ad
add logic direct scrapper
oscarcitoz Jul 1, 2025
1e8f1fd
Merge pull request #60 from neuro-publico/url-image-from
oscarcitoz Jul 1, 2025
7b9c9b4
add scrapper dropi
oscarcitoz Jul 1, 2025
8ab5f7c
eliminate comment
oscarcitoz Jul 1, 2025
6f5ca07
eliminate fields innecesaries
oscarcitoz Jul 1, 2025
0e93a2e
Merge pull request #61 from neuro-publico/url-image-from
oscarcitoz Jul 1, 2025
fd6ab67
change api
oscarcitoz Jul 2, 2025
1d2a52b
Merge pull request #62 from neuro-publico/url-image-from
oscarcitoz Jul 2, 2025
8c76b62
add new services dropi
oscarcitoz Jul 2, 2025
56c825c
Merge pull request #63 from neuro-publico/url-image-from
oscarcitoz Jul 2, 2025
b26f577
Merge pull request #64 from neuro-publico/develop
oscarcitoz Jul 16, 2025
b7a4718
add logic for create context and brand for store
oscarcitoz Jul 17, 2025
9c4d821
revert controller
oscarcitoz Jul 17, 2025
6c18651
Merge pull request #65 from neuro-publico/url-image-from
oscarcitoz Jul 17, 2025
3dddc90
comment variants.
oscarcitoz Jul 23, 2025
8681ee6
Merge pull request #66 from neuro-publico/url-image-from
oscarcitoz Jul 23, 2025
49e7827
Merge pull request #67 from neuro-publico/develop
oscarcitoz Jul 23, 2025
f1ac12b
new logic for alibaba and price
oscarcitoz Jul 24, 2025
0bf3bd3
Merge pull request #68 from neuro-publico/url-image-from
oscarcitoz Jul 24, 2025
fb6a817
Merge pull request #69 from neuro-publico/develop
oscarcitoz Jul 24, 2025
bba40f3
revert
oscarcitoz Jul 24, 2025
b16489e
Merge pull request #70 from neuro-publico/url-image-from
oscarcitoz Jul 24, 2025
1cf544e
Merge pull request #71 from neuro-publico/develop
oscarcitoz Jul 24, 2025
c2ac91b
again
oscarcitoz Jul 24, 2025
e85afb0
Merge pull request #72 from neuro-publico/url-image-from
oscarcitoz Jul 24, 2025
4605d38
Merge pull request #73 from neuro-publico/develop
oscarcitoz Jul 24, 2025
09682a9
elminate render
oscarcitoz Jul 24, 2025
b10a7d0
Merge pull request #74 from neuro-publico/url-image-from
oscarcitoz Jul 24, 2025
6393d04
Merge pull request #75 from neuro-publico/develop
oscarcitoz Jul 24, 2025
94cbbb1
add logic resolution.
oscarcitoz Aug 1, 2025
e241956
Merge pull request #76 from neuro-publico/url-image-from
oscarcitoz Aug 1, 2025
4f4ca2a
add logic from agent.
oscarcitoz Aug 1, 2025
316b258
Merge pull request #77 from neuro-publico/url-image-from
oscarcitoz Aug 1, 2025
ae6062b
Merge pull request #78 from neuro-publico/develop
oscarcitoz Aug 21, 2025
31ebf40
fal ai integrado con eleven labs, omnihuman y kling
StephanSrz Aug 28, 2025
1036dab
Merge pull request #80 from neuro-publico/feature/ads-fal-ai
StephanSuarez Aug 29, 2025
c591f44
add logic image flash 2.5
oscarcitoz Sep 1, 2025
005c4f4
Merge pull request #81 from neuro-publico/url-image-from
oscarcitoz Sep 1, 2025
64809c8
add logic provider
oscarcitoz Sep 5, 2025
854a491
Merge pull request #83 from neuro-publico/url-image-from
oscarcitoz Sep 5, 2025
019b148
add logic pdf generator
oscarcitoz Sep 8, 2025
fd0fb4c
Merge pull request #84 from neuro-publico/url-image-from
oscarcitoz Sep 8, 2025
05ca8c0
fix generator.
oscarcitoz Sep 8, 2025
34ef986
Merge pull request #85 from neuro-publico/url-image-from
oscarcitoz Sep 8, 2025
ff3fc4d
Merge pull request #86 from neuro-publico/url-image-from
oscarcitoz Sep 9, 2025
76386d6
add force in request
oscarcitoz Sep 10, 2025
77b810f
Merge pull request #87 from neuro-publico/url-image-from
oscarcitoz Sep 10, 2025
909d7c3
change s3 direct
oscarcitoz Sep 11, 2025
fb2bc55
Merge pull request #88 from neuro-publico/url-image-from
oscarcitoz Sep 11, 2025
49a644a
replace s3 url
oscarcitoz Sep 11, 2025
e85be3a
Merge pull request #89 from neuro-publico/url-image-from
oscarcitoz Sep 11, 2025
1f50d65
add nw logic
oscarcitoz Sep 11, 2025
6192c8b
Merge pull request #90 from neuro-publico/url-image-from
oscarcitoz Sep 11, 2025
3788af7
Merge pull request #91 from neuro-publico/url-image-from
oscarcitoz Sep 16, 2025
51ad8a7
add langsmith
oscarcitoz Oct 11, 2025
00ea8af
add req
oscarcitoz Oct 11, 2025
2b881d3
Merge pull request #92 from neuro-publico/url-image-from
oscarcitoz Oct 11, 2025
b847f69
Merge branch 'master' into develop
oscarcitoz Oct 11, 2025
f3daebe
Merge pull request #93 from neuro-publico/develop
oscarcitoz Oct 11, 2025
26ada67
add logic for get variants dropi
oscarcitoz Oct 27, 2025
e13d664
Merge pull request #94 from neuro-publico/url-image-from
oscarcitoz Oct 27, 2025
14df09a
Merge pull request #95 from neuro-publico/develop
oscarcitoz Nov 4, 2025
4b09add
add new logic for gemini
oscarcitoz Nov 21, 2025
8dc6343
Merge pull request #96 from neuro-publico/url-image-from
oscarcitoz Nov 21, 2025
508ecd8
Merge pull request #97 from neuro-publico/develop
oscarcitoz Nov 24, 2025
4298aec
add language
oscarcitoz Dec 15, 2025
01f7050
Merge pull request #98 from neuro-publico/url-image-from
oscarcitoz Dec 15, 2025
431fac7
add translate manual
oscarcitoz Dec 15, 2025
10bdd02
Merge pull request #99 from neuro-publico/url-image-from
oscarcitoz Dec 15, 2025
af760d2
add language generate image
oscarcitoz Dec 17, 2025
86801e1
Merge pull request #100 from neuro-publico/feature/dropi-variants-ima…
oscarcitoz Dec 17, 2025
560d2ed
Merge pull request #101 from neuro-publico/develop
oscarcitoz Dec 19, 2025
4318d04
add logic dropi multiple country
oscarcitoz Dec 27, 2025
2045f82
Merge develop into feature branch - resolve conflicts
oscarcitoz Dec 27, 2025
6fbb386
Merge pull request #102 from neuro-publico/feature/dropi-variants-ima…
oscarcitoz Dec 27, 2025
823f13c
add ec
oscarcitoz Jan 5, 2026
b0c9085
Merge pull request #103 from neuro-publico/feature/dropi-variants-ima…
oscarcitoz Jan 5, 2026
18bec33
Merge pull request #104 from neuro-publico/develop
oscarcitoz Jan 5, 2026
f42fa47
add docs, ci, format
oscarcitoz Jan 15, 2026
5b882f0
fix test
oscarcitoz Jan 15, 2026
7254936
Merge pull request #105 from neuro-publico/feature/dropi-variants-ima…
oscarcitoz Jan 15, 2026
776ea98
Merge pull request #106 from neuro-publico/develop
oscarcitoz Jan 15, 2026
ec14c5c
fix timeout in amazon api
StephanSrz Feb 10, 2026
361a2aa
time out 30 segs
StephanSrz Feb 10, 2026
98900cf
Merge pull request #107 from neuro-publico/hotfix/timeout-amazon-api
StephanSuarez Feb 10, 2026
dc6a0a7
Merge pull request #108 from neuro-publico/hotfix/timeout-amazon-api
StephanSuarez Feb 10, 2026
4df68a4
fix image urls new format
oscarcitoz Feb 11, 2026
41ba1b0
Merge pull request #109 from neuro-publico/fix-images
oscarcitoz Feb 11, 2026
1316501
format file
oscarcitoz Feb 11, 2026
1ff1bca
fix without mandatory response url
oscarcitoz Feb 11, 2026
05eb1ca
Merge pull request #110 from neuro-publico/fix-images
oscarcitoz Feb 11, 2026
f49ffde
Merge pull request #111 from neuro-publico/develop
oscarcitoz Feb 11, 2026
841e8fc
feat: add image_format field to generate-images-from endpoint
JulioMarquezH Feb 27, 2026
f5c59fe
Merge pull request #112 from neuro-publico/feature/add-format-image
JulioMarquezH Feb 27, 2026
47eed18
add configurable fallback + fix hardcoded image models
Mar 4, 2026
dd4a542
merge conflict resolution: add FORMAT_TO_OPENAI_SIZE from develop
Mar 4, 2026
d972ce6
merge develop: resolve conflict in image_service.py
Mar 4, 2026
65e3064
fix: black formatting for conversation_manager.py
Mar 4, 2026
f17e890
Merge pull request #113 from neuro-publico/feature/restructure-ai-models
neuropublico Mar 4, 2026
7b91bd1
feat: bind Google Search Grounding for Gemini agents via extra_parame…
Mar 4, 2026
704e2ca
Merge pull request #114 from neuro-publico/feature/native-tools-googl…
neuropublico Mar 5, 2026
af2bf56
Deploy to production: fallback system + image model fix + native tools
neuropublico Mar 5, 2026
d65f1fd
AgentPreferences add more max_token and json repair
StephanSrz Mar 9, 2026
3dbbb31
Revert "AgentPreferences add more max_token and json repair"
StephanSrz Mar 9, 2026
0282f9c
fix 500 when no can coplete ads
StephanSrz Mar 9, 2026
eacd97e
fix test
StephanSrz Mar 9, 2026
289f888
fix
StephanSrz Mar 9, 2026
79705d1
fix requirements
StephanSrz Mar 9, 2026
dd7b27b
Merge pull request #116 from neuro-publico/fix/max-tokens
StephanSuarez Mar 9, 2026
cc61bd8
Merge pull request #117 from neuro-publico/develop
StephanSuarez Mar 9, 2026
989e0f9
fix scrapper 500 error
StephanSrz Mar 10, 2026
b15a3ea
create alibaba scraper rapid api instead scraper api
StephanSrz Mar 11, 2026
dbef758
Merge pull request #118 from neuro-publico/hotfix/alibaba-scrapper
StephanSuarez Mar 11, 2026
70017b2
Merge pull request #119 from neuro-publico/hotfix/alibaba-scrapper
StephanSuarez Mar 11, 2026
d570873
fis dropy url paraguy
StephanSrz Mar 11, 2026
57a610c
Merge pull request #120 from neuro-publico/hotfix/alibaba-scrapper
StephanSuarez Mar 11, 2026
cb80873
fix test
StephanSrz Mar 11, 2026
da29d37
Merge pull request #122 from neuro-publico/hotfix/alibaba-scrapper
StephanSuarez Mar 11, 2026
9fe5022
Merge pull request #121 from neuro-publico/hotfix/alibaba-scrapper
StephanSuarez Mar 11, 2026
2f9e233
fix: add content extraction and truncation for IAScraper to prevent L…
StephanSrz Mar 17, 2026
d99e292
feat: add MercadoLibre scraper with OAuth2 authentication
StephanSrz Mar 18, 2026
0d19f5d
style: fix black formatting in escape_helper.py
StephanSrz Mar 18, 2026
2b09441
test: add unit tests for MercadoLibreScraper
StephanSrz Mar 18, 2026
49dd46a
Merge pull request #123 from neuro-publico/feature/mercado-libre-scra…
StephanSuarez Mar 18, 2026
4a24443
Merge pull request #124 from neuro-publico/develop
StephanSuarez Mar 18, 2026
e5e21b6
feat: add section image generation endpoint (replaces N8N)
Mar 21, 2026
5317d5c
fix: add detailed Gemini error logging to google_image_with_text
Mar 24, 2026
f105695
perf: resize section images to 1080px and lower target to 150KB
Mar 24, 2026
10f8ca1
perf: switch section images to gemini-3.1-flash-image-preview with th…
Mar 24, 2026
e19c6d5
fix: unblock event loop for concurrent image generation
Mar 24, 2026
6f2f9ed
perf: parallel image downloads + shared session for S3 fetches
Mar 24, 2026
1d6ddf3
fix: log exception type name when message is empty
Mar 24, 2026
ad6b884
Merge pull request #125 from neuro-publico/feature/section-image-gene…
neuropublico Mar 24, 2026
caf2579
Add CLAUDE.md with project conventions and rules
JulioMarquezH Mar 24, 2026
c6f783f
Fix black formatting on 3 pre-existing files
JulioMarquezH Mar 24, 2026
cca1fe3
Add unit tests for alibaba and mercadolibre clients
JulioMarquezH Mar 24, 2026
2bc8262
Fix black formatting on test_mercadolibre_client.py
JulioMarquezH Mar 24, 2026
77ffe98
Remove failing error-handling tests from alibaba and mercadolibre cli…
JulioMarquezH Mar 24, 2026
ed11b63
Merge pull request #126 from neuro-publico/docs/add-claude-md
JulioMarquezH Mar 24, 2026
40a20c3
feat: add sales angle and formatted price to section image generation
Mar 24, 2026
7c2f330
debug: add memory and concurrency logging to section image service
Mar 24, 2026
db92754
debug: add memory logging to BOTH image generation paths
Mar 24, 2026
3dc348b
debug: unified memory+timing tracker across both image paths
Mar 24, 2026
b1fc885
debug: use print instead of logger.info for memory tracking
Mar 24, 2026
618bdd7
feat: add rate limit fallback and message_service to AliexpressScraper
StephanSrz Mar 24, 2026
a6da819
feat: prevent OOM with semaphore, jemalloc, and memory cleanup
Mar 24, 2026
db90fca
fix: raise semaphore from 15 to 50 to prevent event loop starvation
Mar 25, 2026
28d6cac
fix: remove semaphore — it starved event loop causing pod kills
Mar 25, 2026
46ef7f7
fix: add timeout to agent-config client to prevent ConnectTimeout
Mar 25, 2026
410db21
debug: log full prompt sent to Gemini for section images
Mar 25, 2026
229ffb9
feat: improve prompt to distinguish template products from real product
Mar 25, 2026
4e97cbc
Merge pull request #127 from neuro-publico/feature/add-sales-angle-an…
neuropublico Mar 25, 2026
eace0ee
fix: strip trailing ,00 decimals from prices in image prompts
Mar 25, 2026
0c72178
debug: log design_structure_selector agent responses
Mar 25, 2026
5230b19
fix: _clean_price was destroying COP prices (140.000 → 1400)
Mar 25, 2026
00bcd34
feat: add brand_colors support to section image generation
Mar 25, 2026
4f0b0e7
feat: stronger prompt instructions for colors, text, and design quality
Mar 26, 2026
5efab58
debug: log ALL agent requests and responses (full debug)
Mar 26, 2026
a592ef2
feat: permanent AI prompt audit logging to PostgreSQL
Mar 26, 2026
448d7ca
fix: default AUDIT_DB_NAME to analytics (not prompt_logs)
Mar 26, 2026
b7d4629
feat: section image edit mode — high-quality editing via specialized …
Mar 26, 2026
bfaa839
fix: remove debug prints leaking API keys and prompts to stdout
Mar 26, 2026
3ff914f
Merge pull request #128 from neuro-publico/updates/2026-03-25
neuropublico Mar 26, 2026
1e35b52
fix: resolve lint and format CI failures
StephanSrz Mar 27, 2026
831cd61
Merge pull request #130 from neuro-publico/fix/lint-format-checks
StephanSuarez Mar 27, 2026
b12e666
Merge pull request #129 from neuro-publico/develop
StephanSuarez Mar 27, 2026
1d6c93d
feat: add async webhook endpoint for section image generation
JulioMarquezH Mar 27, 2026
f7282ab
style: fix black formatting on callback_client.py
JulioMarquezH Mar 27, 2026
5eefe20
test: add unit tests for callback_client
JulioMarquezH Mar 27, 2026
2d8303e
Merge pull request #131 from neuro-publico/feature/custom-image-async…
JulioMarquezH Mar 27, 2026
24a55fa
fix: apply concurrency semaphore to section image generation
JulioMarquezH Mar 27, 2026
a65dc80
Merge pull request #132 from neuro-publico/feature/custom-image-async…
JulioMarquezH Mar 27, 2026
0e70c29
fix: log callback results to analytics DB for debugging
JulioMarquezH Mar 27, 2026
e106d3a
fix: update test to expect RuntimeError on callback failure
JulioMarquezH Mar 27, 2026
4d4185f
Merge pull request #133 from neuro-publico/feature/custom-image-async…
JulioMarquezH Mar 27, 2026
f9be2de
Merge pull request #134 from neuro-publico/develop
StephanSuarez Mar 27, 2026
e34c4ff
logs for error dropi
StephanSrz Mar 30, 2026
adb2474
feat(video-studio): Director Creative pipeline foundation (Phase 1)
julioparodineuropublico-lgtm Apr 7, 2026
eb9dd3f
fix(video-studio): prompt rendering, action verbs regex, error context
julioparodineuropublico-lgtm Apr 7, 2026
4f02062
feat(video_studio): Phase 4 — eval harness para el Director Creativo
julioparodineuropublico-lgtm Apr 7, 2026
0c22021
style: black format test_video_studio_service
julioparodineuropublico-lgtm Apr 7, 2026
608ec6c
fix(test): validators metadata are list[str], not list[dict]
julioparodineuropublico-lgtm Apr 7, 2026
78a13f6
test(video_studio): cover run_and_callback paths to lift coverage
julioparodineuropublico-lgtm Apr 7, 2026
99eb3c7
fix(test): drop validators that the canonical good payload doesn't sa…
julioparodineuropublico-lgtm Apr 7, 2026
60cd34e
Merge pull request #135 from neuro-publico/feature/newadssistem
julioparodineuropublico-lgtm Apr 7, 2026
7dde301
Merge pull request #136 from neuro-publico/feature/phase4
julioparodineuropublico-lgtm Apr 7, 2026
a151224
feat(video-studio): emit cinematic_beats_a/b for Kling V3 Pro multi_p…
julioparodineuropublico-lgtm Apr 8, 2026
d45a5b3
Merge pull request #137 from neuro-publico/feature/director-cinematic…
julioparodineuropublico-lgtm Apr 8, 2026
7f72c7a
feat(video-studio): UGC director schema for Seedance 2.0 (Phase 6.0 f…
julioparodineuropublico-lgtm Apr 8, 2026
15fad56
Merge pull request #138 from neuro-publico/feature/director-ugc-found…
julioparodineuropublico-lgtm Apr 8, 2026
4ede83c
feat(video_studio): UGC director emits 3 visual briefs (Phase 6 v2)
julioparodineuropublico-lgtm Apr 8, 2026
951f9f7
docs(agents): mirror video_director_ugc_v1 prompt + metadata in git
julioparodineuropublico-lgtm Apr 8, 2026
11bb545
Merge pull request #139 from neuro-publico/feature/ugc-multi-shot-vis…
julioparodineuropublico-lgtm Apr 8, 2026
59d0701
Merge pull request #140 from neuro-publico/chore/docs-mirror-ugc-dire…
julioparodineuropublico-lgtm Apr 8, 2026
d5d9b87
docs(agents): mirror animated + sassy director prompts in git
julioparodineuropublico-lgtm Apr 9, 2026
68052bd
Merge pull request #142 from neuro-publico/docs/agents-mirror-animate…
julioparodineuropublico-lgtm Apr 9, 2026
69b0eb9
Merge pull request #143 from neuro-publico/develop
StephanSuarez Apr 9, 2026
6e677f5
docs(agents): sync video_director_animated_v1 to V2 (surface anchor +…
julioparodineuropublico-lgtm Apr 9, 2026
02fdd8a
Merge pull request #144 from neuro-publico/docs/agents-animated-v2
julioparodineuropublico-lgtm Apr 9, 2026
c7b33b7
Merge pull request #145 from neuro-publico/develop
StephanSuarez Apr 9, 2026
1e26fc1
docs(agents): sync video_director_animated_v1 to V3 (ad-driven copywr…
julioparodineuropublico-lgtm Apr 9, 2026
72048ed
docs(agents): update sassy director mirror to V3
julioparodineuropublico-lgtm Apr 9, 2026
1145ccf
Merge pull request #146 from neuro-publico/docs/agents-animated-v3
julioparodineuropublico-lgtm Apr 9, 2026
3a0d2aa
Merge pull request #147 from neuro-publico/docs/agents-sassy-v3
julioparodineuropublico-lgtm Apr 9, 2026
89ab224
fix(agents): add ESPAÑOL NEUTRO rule to animated + sassy directors
julioparodineuropublico-lgtm Apr 10, 2026
055f3f4
Merge pull request #148 from neuro-publico/fix/neutral-spanish-directors
julioparodineuropublico-lgtm Apr 10, 2026
4da9377
feat(video-studio): Phase 5.6 — concept_visual_brief_b schema + valid…
julioparodineuropublico-lgtm Apr 10, 2026
f89aaf2
docs(agents): update animated director to V4 with concept_visual_brief_b
julioparodineuropublico-lgtm Apr 10, 2026
f0f01d8
Merge pull request #149 from neuro-publico/feature/phase-5.6-second-b…
julioparodineuropublico-lgtm Apr 10, 2026
5e08b56
fix(video-studio): make ends_with_product_name case-insensitive
julioparodineuropublico-lgtm Apr 10, 2026
3e9961f
Merge pull request #150 from neuro-publico/fix/ends-with-product-name…
julioparodineuropublico-lgtm Apr 10, 2026
733d1e9
fix(video-studio): convert ends_with_product_name to warning only
julioparodineuropublico-lgtm Apr 10, 2026
297215f
Merge pull request #151 from neuro-publico/fix/ends-with-product-name…
julioparodineuropublico-lgtm Apr 10, 2026
84e63c7
Merge pull request #152 from neuro-publico/develop
StephanSuarez Apr 14, 2026
3ed115e
feat(video-studio): product-modeling schema + validators
julioparodineuropublico-lgtm Apr 16, 2026
2a87bdd
Merge pull request #153 from neuro-publico/feature/product-modeling-s…
julioparodineuropublico-lgtm Apr 16, 2026
6265532
feat(section-image): load SYSTEM_PROMPT + CTA_DETECTION from agent-co…
yultrox Apr 17, 2026
2293ddb
Merge pull request #155 from neuro-publico/hotfix/ai-prompts-dynamic
yultrox Apr 18, 2026
8fb8d33
feat(section-image): load SYSTEM_PROMPT + CTA_DETECTION from agent-co…
yultrox Apr 17, 2026
101f7d7
Merge pull request #156 from neuro-publico/hotfix/ai-prompts-dynamic-…
yultrox Apr 18, 2026
f3f434a
feat(section-html): SDK migration + image pipeline + dynamic prompts
Apr 18, 2026
95b0367
style: apply black + isort formatting
Apr 18, 2026
a38afb8
fix(sub-image): replace del image_bytes with None reassignment to sat…
Apr 18, 2026
1e6ddff
Merge pull request #157 from neuro-publico/feat/html-sections-sdk-str…
yultrox Apr 18, 2026
6187256
feat(logs): persist AI raw response + log each failed retry attempt
Apr 20, 2026
a89ee1a
Merge pull request #158 from neuro-publico/hotfix/ai-logs-visibility
neuropublico Apr 20, 2026
111d3dc
feat(logs): persist AI raw response + log each failed retry attempt
Apr 20, 2026
dcbfea7
Merge pull request #159 from neuro-publico/hotfix/ai-logs-visibility-…
neuropublico Apr 20, 2026
d3dca5d
feat: add funnel analysis AI agent ("Cerebro Estratégico")
Apr 20, 2026
08e3d1a
chore: remove unused List import from analyze_funnel_request
Apr 21, 2026
e61699a
Merge pull request #160 from neuro-publico/feature/funnel-analysis-agent
eduardofluxi Apr 21, 2026
2fb8134
refactor: remove today_checklist from funnel analysis agent
Apr 22, 2026
69a9d52
Merge pull request #161 from neuro-publico/feature/remove-today-check…
eduardofluxi Apr 22, 2026
c32a27b
Merge remote-tracking branch 'origin/master' into develop
StephanSrz Apr 23, 2026
a26f56b
add dropy gt key
StephanSrz Apr 23, 2026
6958a0e
fix dropi scrappers
StephanSrz Apr 23, 2026
5dca93b
add fix gt
StephanSrz Apr 23, 2026
6de1d96
Merge pull request #164 from neuro-publico/add-dropi-gt-key
StephanSuarez Apr 23, 2026
5193fe8
feat: add UGC voiceover director schemas
julioparodineuropublico-lgtm May 1, 2026
6b8db71
style: format voiceover schema services
julioparodineuropublico-lgtm May 1, 2026
5968d70
Merge pull request #167 from neuro-publico/feature/video-voiceover-sc…
julioparodineuropublico-lgtm May 1, 2026
0037ac3
refactor: add voiceover service interfaces
julioparodineuropublico-lgtm May 1, 2026
5291c48
Merge pull request #168 from neuro-publico/feature/voiceover-architec…
julioparodineuropublico-lgtm May 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/worktrees/peaceful-maxwell
Submodule peaceful-maxwell added at e39318
42 changes: 41 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,46 @@ HOST_AGENT_CONFIG=https://services.fluxi.com
OPENAI_API_KEY=dasdasdasdasdas
ANTHROPIC_API_KEY=dasdasdasdas
HOST_DEEP_SEEK=https://55.188.190.83:11434/v1
RAPIDAPI_HOST=https://aliexpress-datahub.p.rapidapi.com
AGENT_RECOMMEND_PRODUCTS_ID=recommend_agent
AGENT_RECOMMEND_SIMILAR_PRODUCTS_ID=recommend_agent_similar
RAPIDAPI_KEY=dsadasdasdasda
RAPIDAPI_HOST=https://aliexpress-datahub.p.rapidapi.com
S3_UPLOAD_API=http://lambdahost

API_KEY=tu_clave_api_secreta_aqui
AUTH_SERVICE_URL=https://develop.api.fluxi.com.co/api/v1/users/user-info
GOOGLE_VISION_API_KEY=dsadadasda
REPLICATE_API_KEY=dsadadasda
SCRAPERAPI_KEY=dsadsadsadasdsadas
URL_SCRAPER_LAMBDA=https://localhost:8000/
GOOGLE_GEMINI_API_KEY=sadasadasdasd
ENVIRONMENT=dev

DROPI_HOST=https://test-api.dropi.co
DROPI_S3_BASE_URL=https://d39ru7awumhhs2.cloudfront.net/
DROPI_API_KEY=dasdsadadasdas

# Dropi - API Keys por País (opcional, si no se especifica usa DROPI_API_KEY)
DROPI_API_KEY_CO=your_dropi_api_key_colombia
DROPI_API_KEY_MX=your_dropi_api_key_mexico
DROPI_API_KEY_AR=your_dropi_api_key_argentina
DROPI_API_KEY_CL=your_dropi_api_key_chile
DROPI_API_KEY_PE=your_dropi_api_key_peru
DROPI_API_KEY_PY=your_dropi_api_key_paraguay
DROPI_API_KEY_EC=your_dropi_api_key_ecuador
DROPI_API_KEY_GT=your_dropi_api_key_guatemala
# Cookie AWSALB/AWSALBCORS requerida por Dropi GT (ALB con sticky sessions).
# Formato: "AWSALB=xxx; AWSALBCORS=yyy" (cópialo del navegador o de una request exitosa).
DROPI_COOKIE_GT=

LANGCHAIN_TRACING_V2=true
LANGCHAIN_ENDPOINT=https://api.smith.langchain.com
LANGCHAIN_API_KEY=tu_api_key_aqui
LANGCHAIN_PROJECT=develop

# Fallback for TEXT agents (agent metadata.fallback_config overrides these)
FALLBACK_MAX_RETRIES=1
FALLBACK_PRIMARY_PROVIDER=gemini
FALLBACK_PRIMARY_MODEL=gemini-flash-latest
FALLBACK_SECONDARY_PROVIDER=claude
FALLBACK_SECONDARY_MODEL=claude-sonnet-4-6
17 changes: 17 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[flake8]
max-line-length = 120
max-complexity = 10
extend-ignore = E501,W503,E203,E266,E402
exclude =
.git,
__pycache__,
.venv,
venv,
build,
dist,
*.egg-info,
.eggs,
.tox,
per-file-ignores =
__init__.py:F401
tests/*:F401,F811
142 changes: 142 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: CI Pipeline

on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]

jobs:
lint:
name: Lint & Format Check
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-lint-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-lint-

- name: Install linting tools
run: |
python -m pip install --upgrade pip
pip install black flake8 isort

- name: Check formatting with Black
run: |
black --check --line-length 120 app/ tests/

- name: Check import sorting with isort
run: |
isort --check-only --profile black --line-length 120 app/ tests/

- name: Lint with flake8
run: |
# Stop build if there are Python syntax errors or undefined names
flake8 app/ --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings. Line length set to 120
flake8 app/ --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics --ignore=E501,W503,E203

test:
name: Run Tests
runs-on: ubuntu-latest
needs: lint

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run tests with pytest
run: |
pytest tests/ -v --tb=short --junitxml=test-results.xml
env:
# Variables de entorno necesarias para tests
HOST_AGENT_CONFIG: http://localhost:8000
DEEP_SEEK_HOST: http://localhost:11434
API_KEY: test-api-key
AUTH_SERVICE_URL: http://localhost:8001/auth

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: test-results.xml

test-coverage:
name: Test Coverage
runs-on: ubuntu-latest
needs: lint

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run tests with coverage
run: |
pytest tests/ --cov=app --cov-report=xml --cov-report=html --cov-fail-under=60
env:
HOST_AGENT_CONFIG: http://localhost:8000
DEEP_SEEK_HOST: http://localhost:11434
API_KEY: test-api-key
AUTH_SERVICE_URL: http://localhost:8001/auth

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
fail_ci_if_error: false
continue-on-error: true
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ logs/

# Environment variables file
.env
.venv

# Pinecone-related cache
pinecone.cache
pinecone.cachevenv39_backup/
121 changes: 121 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Conversation Engine

Microservicio de agentes conversacionales multi-proveedor de IA para la plataforma Fluxi. Procesa mensajes, genera imágenes/video/audio, y hace scraping de productos e-commerce.

## Tech Stack

- **Python 3.10** con **FastAPI** (async-first)
- **LangChain + LangGraph** para orquestación de LLMs
- **Proveedores de IA**: OpenAI, Anthropic, Gemini, DeepSeek (via Factory pattern)
- **httpx** para HTTP async, **requests** para sync
- **Pydantic 2** para validación de datos
- **pytest + pytest-asyncio** para testing
- **black + isort + flake8** para code quality

## Commands

```bash
make run # uvicorn en puerto 8000 con reload
make install # pip install -r requirements.txt
make test # pytest completo
make test-unit # Solo unit tests
make test-integration # Solo integration tests
make test-cov # Tests con coverage (HTML en htmlcov/)
make format # Auto-format con black + isort
make lint # Verificar con black, isort, flake8
make clean # Limpiar cache y .pyc
```

## Project Structure

```
app/
├── controllers/ # Endpoints FastAPI (handle_controller.py)
├── services/ # Lógica de negocio (message, image, video, audio, scraping)
├── processors/ # Procesadores LLM (simple, agent, mcp)
├── providers/ # Implementaciones de AI providers (openai, anthropic, gemini, deepseek)
├── factories/ # Factory pattern (ai_provider, scraping)
├── scrapers/ # Scrapers de e-commerce (amazon, aliexpress, dropi, cj, ia)
├── externals/ # Clientes de APIs externas (agent_config, s3, fal, google_vision)
├── managers/ # Estado en memoria (conversation history)
├── middlewares/ # Auth middleware (API key + JWT)
├── requests/ # DTOs de request (Pydantic models)
├── responses/ # DTOs de response
├── tools/ # Generación dinámica de tools para LangChain
├── pdf/ # Generación de PDFs
├── helpers/ # Utilidades (escape, image compression)
├── configurations/ # Config y constantes
└── requestors/ # HTTP request executors para tools
tests/
├── conftest.py # Fixtures compartidos
├── unit/ # Tests unitarios por módulo
└── integration/ # Tests de integración
```

## Conventions

- Archivos: `{dominio}_service.py`, `{plataforma}_scraper.py`, `{provider}_provider.py`
- Clases: **PascalCase** — `MessageService`, `AmazonScraper`
- Interfaces: sufijo `Interface` — `ServiceInterface`, `ScraperInterface`
- Tests: `test_{modulo}.py` con clases `Test{Componente}`
- Funciones async: `async def handle_message()`, privadas con `_prefijo()`
- Tests marcados con `@pytest.mark.unit`, `@pytest.mark.integration`, `@pytest.mark.slow`
- Line length: **120 caracteres** (black/flake8)
- Type hints explícitos en todas las funciones
- Pydantic models para todo request/response

## Design Patterns

- **Factory**: `AIProviderFactory` y `ScrapingFactory` para seleccionar implementaciones
- **Strategy**: `ConversationProcessor` → `SimpleProcessor`, `AgentProcessor`, `MCPProcessor`
- **Interface Segregation**: toda service/scraper/provider tiene su `*Interface`
- **Dependency Injection**: FastAPI `Depends()` en todo el proyecto
- **Tool Generation**: tools dinámicos desde config → Pydantic model → LangChain `StructuredTool`

## Authentication

- `@require_api_key`: header `x-api-key`, compara contra env `API_KEY`
- `@require_auth`: header `authorization` Bearer, valida JWT contra `AUTH_SERVICE_URL`
- User info disponible en `request.state.user_info` post-auth

## Key Environment Variables

```
HOST_AGENT_CONFIG # URL del servicio de config de agentes
OPENAI_API_KEY # API key de OpenAI
ANTHROPIC_API_KEY # API key de Anthropic
GOOGLE_GEMINI_API_KEY # API key de Gemini
API_KEY # API key para auth de endpoints
AUTH_SERVICE_URL # URL del servicio de auth (JWT)
S3_UPLOAD_API # URL del servicio de upload a S3
ENVIRONMENT # dev | prod
FAL_AI_API_KEY # FAL AI para video/audio
DROPI_API_KEY # Dropi (+ sufijos por país: _CO, _MX, _AR, etc.)
LANGCHAIN_API_KEY # LangSmith monitoring
```

## Testing

- Coverage mínimo: **60%** (enforced en CI)
- Fixtures extensos en `conftest.py` (mocks de httpx, LLM, services)
- CI: GitHub Actions → lint → test → coverage → Codecov

## Git Rules

- Nunca hacer commits directos a `main`, `master` o `develop` — siempre crear una rama y abrir un PR
- Siempre correr los tests antes de hacer commit. Si los tests no pasan, no hacer el commit
- **`develop` SIEMPRE debe estar deployable** — solo mergear features completos y probados en local. NUNCA dejar trabajo incompleto en develop.
- **Probar en local primero** — levantar servicios locales, hacer pruebas end-to-end en localhost. Solo mergear cuando el feature funciona completo.
- **1 PR completo por feature** — no PRs incrementales que dejan el feature a medio hacer en dev.
- **Si algo se mergeó y falló**: arreglar inmediatamente o revertir. Dev siempre limpio.

## Rules

- Siempre correr `make format` antes de commitear
- Toda función nueva debe tener type hints completos
- Todo service/provider/scraper nuevo debe implementar su interface correspondiente
- No agregar estado persistente — el servicio es stateless (conversation history es in-memory)
- Para nuevo AI provider: crear en `providers/`, registrar en `AIProviderFactory`
- Para nuevo scraper: crear en `scrapers/`, registrar en `ScrapingFactory`
- No modificar el Dockerfile sin coordinar con DevOps
- Mantener coverage ≥ 60% — todo código nuevo debe tener tests
15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Usar una imagen base de Python
FROM python:3.9-slim
FROM python:3.10-slim

# jemalloc: returns freed memory to OS (glibc doesn't)
RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc2 \
&& rm -rf /var/lib/apt/lists/* \
&& find /usr/lib -name "libjemalloc.so.2" -print -quit > /etc/jemalloc_path

ENV PYTHONUNBUFFERED=1

# Establecer el directorio de trabajo
WORKDIR /app
Expand All @@ -13,8 +20,8 @@ RUN pip install --no-cache-dir -r requirements.txt
# Copiar el código fuente
COPY . .

# Exponer el puerto 9000
# Exponer el puerto
EXPOSE 8000

# Comando para ejecutar la aplicación
CMD ["python", "main.py"]
# Comando para ejecutar la aplicación con jemalloc
CMD ["sh", "-c", "export LD_PRELOAD=$(cat /etc/jemalloc_path) && export MALLOC_CONF='background_thread:true,metadata_thp:auto,dirty_decay_ms:3000,muzzy_decay_ms:3000' && exec python main.py"]
Loading