bps-kit 1.0.1 → 1.0.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/package.json +1 -1
- package/templates/.agents/agents/backend-specialist.md +263 -0
- package/templates/.agents/agents/code-archaeologist.md +106 -0
- package/templates/.agents/agents/database-architect.md +226 -0
- package/templates/.agents/agents/debugger.md +225 -0
- package/templates/.agents/agents/devops-engineer.md +242 -0
- package/templates/.agents/agents/documentation-writer.md +104 -0
- package/templates/.agents/agents/explorer-agent.md +73 -0
- package/templates/.agents/agents/frontend-specialist.md +593 -0
- package/templates/.agents/agents/game-developer.md +162 -0
- package/templates/.agents/agents/mobile-developer.md +377 -0
- package/templates/.agents/agents/orchestrator.md +416 -0
- package/templates/.agents/agents/penetration-tester.md +188 -0
- package/templates/.agents/agents/performance-optimizer.md +187 -0
- package/templates/.agents/agents/product-manager.md +112 -0
- package/templates/.agents/agents/product-owner.md +95 -0
- package/templates/.agents/agents/project-planner.md +406 -0
- package/templates/.agents/agents/qa-automation-engineer.md +103 -0
- package/templates/.agents/agents/security-auditor.md +170 -0
- package/templates/.agents/agents/seo-specialist.md +111 -0
- package/templates/.agents/agents/test-engineer.md +158 -0
- package/templates/.agents/rules/GEMINI.md +219 -0
- package/templates/.agents/scripts/auto_preview.py +148 -0
- package/templates/.agents/scripts/checklist.py +217 -0
- package/templates/.agents/scripts/session_manager.py +120 -0
- package/templates/.agents/scripts/verify_all.py +327 -0
- package/templates/.agents/workflows/brainstorm.md +113 -0
- package/templates/.agents/workflows/create.md +59 -0
- package/templates/.agents/workflows/debug.md +103 -0
- package/templates/.agents/workflows/deploy.md +176 -0
- package/templates/.agents/workflows/enhance.md +63 -0
- package/templates/.agents/workflows/orchestrate.md +237 -0
- package/templates/.agents/workflows/plan.md +89 -0
- package/templates/.agents/workflows/preview.md +81 -0
- package/templates/.agents/workflows/setup-brain.md +39 -0
- package/templates/.agents/workflows/status.md +86 -0
- package/templates/.agents/workflows/test.md +144 -0
- package/templates/.agents/workflows/ui-ux-pro-max.md +296 -0
- package/templates/skills_normal/api-patterns/scripts/api_validator.py +211 -0
- package/templates/skills_normal/database-design/scripts/schema_validator.py +172 -0
- package/templates/skills_normal/frontend-design/scripts/accessibility_checker.py +183 -0
- package/templates/skills_normal/frontend-design/scripts/ux_audit.py +722 -0
- package/templates/skills_normal/git-pushing/scripts/smart_commit.sh +19 -0
- package/templates/skills_normal/lint-and-validate/scripts/lint_runner.py +184 -0
- package/templates/skills_normal/lint-and-validate/scripts/type_coverage.py +173 -0
- package/templates/skills_normal/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/templates/skills_normal/senior-fullstack/scripts/code_quality_analyzer.py +114 -0
- package/templates/skills_normal/senior-fullstack/scripts/fullstack_scaffolder.py +114 -0
- package/templates/skills_normal/senior-fullstack/scripts/project_scaffolder.py +114 -0
- package/templates/skills_normal/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/templates/skills_normal/testing-patterns/scripts/test_runner.py +219 -0
- package/templates/skills_normal/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/templates/vault/007/scripts/config.py +472 -0
- package/templates/vault/007/scripts/full_audit.py +1306 -0
- package/templates/vault/007/scripts/quick_scan.py +481 -0
- package/templates/vault/007/scripts/requirements.txt +26 -0
- package/templates/vault/007/scripts/scanners/__init__.py +0 -0
- package/templates/vault/007/scripts/scanners/dependency_scanner.py +1305 -0
- package/templates/vault/007/scripts/scanners/injection_scanner.py +1104 -0
- package/templates/vault/007/scripts/scanners/secrets_scanner.py +1008 -0
- package/templates/vault/007/scripts/score_calculator.py +693 -0
- package/templates/vault/agent-orchestrator/scripts/match_skills.py +329 -0
- package/templates/vault/agent-orchestrator/scripts/orchestrate.py +304 -0
- package/templates/vault/agent-orchestrator/scripts/requirements.txt +1 -0
- package/templates/vault/agent-orchestrator/scripts/scan_registry.py +508 -0
- package/templates/vault/ai-studio-image/scripts/config.py +613 -0
- package/templates/vault/ai-studio-image/scripts/generate.py +630 -0
- package/templates/vault/ai-studio-image/scripts/prompt_engine.py +424 -0
- package/templates/vault/ai-studio-image/scripts/requirements.txt +4 -0
- package/templates/vault/ai-studio-image/scripts/templates.py +349 -0
- package/templates/vault/android_ui_verification/scripts/verify_ui.sh +32 -0
- package/templates/vault/apify-audience-analysis/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-brand-reputation-monitoring/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-competitor-intelligence/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-content-analytics/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-ecommerce/reference/scripts/package.json +3 -0
- package/templates/vault/apify-ecommerce/reference/scripts/run_actor.js +369 -0
- package/templates/vault/apify-influencer-discovery/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-lead-generation/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-market-research/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-trend-analysis/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-ultimate-scraper/reference/scripts/run_actor.js +363 -0
- package/templates/vault/audio-transcriber/scripts/install-requirements.sh +190 -0
- package/templates/vault/audio-transcriber/scripts/transcribe.py +486 -0
- package/templates/vault/claude-monitor/scripts/api_bench.py +240 -0
- package/templates/vault/claude-monitor/scripts/config.py +69 -0
- package/templates/vault/claude-monitor/scripts/health_check.py +362 -0
- package/templates/vault/claude-monitor/scripts/monitor.py +296 -0
- package/templates/vault/content-creator/scripts/brand_voice_analyzer.py +185 -0
- package/templates/vault/content-creator/scripts/seo_optimizer.py +419 -0
- package/templates/vault/context-agent/scripts/active_context.py +227 -0
- package/templates/vault/context-agent/scripts/compressor.py +149 -0
- package/templates/vault/context-agent/scripts/config.py +69 -0
- package/templates/vault/context-agent/scripts/context_loader.py +155 -0
- package/templates/vault/context-agent/scripts/context_manager.py +302 -0
- package/templates/vault/context-agent/scripts/models.py +103 -0
- package/templates/vault/context-agent/scripts/project_registry.py +132 -0
- package/templates/vault/context-agent/scripts/requirements.txt +6 -0
- package/templates/vault/context-agent/scripts/search.py +115 -0
- package/templates/vault/context-agent/scripts/session_parser.py +206 -0
- package/templates/vault/context-agent/scripts/session_summary.py +319 -0
- package/templates/vault/context-guardian/scripts/context_snapshot.py +229 -0
- package/templates/vault/docx/ooxml/scripts/pack.py +159 -0
- package/templates/vault/docx/ooxml/scripts/unpack.py +29 -0
- package/templates/vault/docx/ooxml/scripts/validate.py +69 -0
- package/templates/vault/docx/ooxml/scripts/validation/__init__.py +15 -0
- package/templates/vault/docx/ooxml/scripts/validation/base.py +951 -0
- package/templates/vault/docx/ooxml/scripts/validation/docx.py +274 -0
- package/templates/vault/docx/ooxml/scripts/validation/pptx.py +315 -0
- package/templates/vault/docx/ooxml/scripts/validation/redlining.py +279 -0
- package/templates/vault/docx/scripts/__init__.py +1 -0
- package/templates/vault/docx/scripts/document.py +1276 -0
- package/templates/vault/docx/scripts/templates/comments.xml +3 -0
- package/templates/vault/docx/scripts/templates/commentsExtended.xml +3 -0
- package/templates/vault/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/templates/vault/docx/scripts/templates/commentsIds.xml +3 -0
- package/templates/vault/docx/scripts/templates/people.xml +3 -0
- package/templates/vault/docx/scripts/utilities.py +374 -0
- package/templates/vault/docx-official/ooxml/scripts/pack.py +159 -0
- package/templates/vault/docx-official/ooxml/scripts/unpack.py +29 -0
- package/templates/vault/docx-official/ooxml/scripts/validate.py +69 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/__init__.py +15 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/base.py +951 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/docx.py +274 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/pptx.py +315 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/redlining.py +279 -0
- package/templates/vault/docx-official/scripts/__init__.py +1 -0
- package/templates/vault/docx-official/scripts/document.py +1276 -0
- package/templates/vault/docx-official/scripts/templates/comments.xml +3 -0
- package/templates/vault/docx-official/scripts/templates/commentsExtended.xml +3 -0
- package/templates/vault/docx-official/scripts/templates/commentsExtensible.xml +3 -0
- package/templates/vault/docx-official/scripts/templates/commentsIds.xml +3 -0
- package/templates/vault/docx-official/scripts/templates/people.xml +3 -0
- package/templates/vault/docx-official/scripts/utilities.py +374 -0
- package/templates/vault/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/templates/vault/helm-chart-scaffolding/scripts/validate-chart.sh +244 -0
- package/templates/vault/i18n-localization/scripts/i18n_checker.py +241 -0
- package/templates/vault/instagram/scripts/account_setup.py +233 -0
- package/templates/vault/instagram/scripts/analyze.py +221 -0
- package/templates/vault/instagram/scripts/api_client.py +444 -0
- package/templates/vault/instagram/scripts/auth.py +411 -0
- package/templates/vault/instagram/scripts/comments.py +160 -0
- package/templates/vault/instagram/scripts/config.py +111 -0
- package/templates/vault/instagram/scripts/db.py +467 -0
- package/templates/vault/instagram/scripts/export.py +138 -0
- package/templates/vault/instagram/scripts/governance.py +233 -0
- package/templates/vault/instagram/scripts/hashtags.py +114 -0
- package/templates/vault/instagram/scripts/insights.py +170 -0
- package/templates/vault/instagram/scripts/media.py +65 -0
- package/templates/vault/instagram/scripts/messages.py +103 -0
- package/templates/vault/instagram/scripts/profile.py +58 -0
- package/templates/vault/instagram/scripts/publish.py +449 -0
- package/templates/vault/instagram/scripts/requirements.txt +5 -0
- package/templates/vault/instagram/scripts/run_all.py +189 -0
- package/templates/vault/instagram/scripts/schedule.py +189 -0
- package/templates/vault/instagram/scripts/serve_api.py +234 -0
- package/templates/vault/instagram/scripts/templates.py +155 -0
- package/templates/vault/junta-leiloeiros/scripts/db.py +216 -0
- package/templates/vault/junta-leiloeiros/scripts/export.py +137 -0
- package/templates/vault/junta-leiloeiros/scripts/requirements.txt +15 -0
- package/templates/vault/junta-leiloeiros/scripts/run_all.py +190 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/__init__.py +4 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/base_scraper.py +209 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/generic_scraper.py +110 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucap.py +110 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/juceac.py +72 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/juceal.py +72 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/juceb.py +68 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucec.py +63 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucema.py +211 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucemg.py +218 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucep.py +70 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucepa.py +74 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucepar.py +80 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucepe.py +78 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucepi.py +69 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucer.py +256 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucerja.py +170 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucern.py +71 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucesc.py +89 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucesp.py +233 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucetins.py +134 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucis_df.py +63 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucisrs.py +299 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/states.py +99 -0
- package/templates/vault/junta-leiloeiros/scripts/serve_api.py +164 -0
- package/templates/vault/junta-leiloeiros/scripts/web_scraper_fallback.py +233 -0
- package/templates/vault/last30days/scripts/last30days.py +521 -0
- package/templates/vault/last30days/scripts/lib/__init__.py +1 -0
- package/templates/vault/last30days/scripts/lib/cache.py +152 -0
- package/templates/vault/last30days/scripts/lib/dates.py +124 -0
- package/templates/vault/last30days/scripts/lib/dedupe.py +120 -0
- package/templates/vault/last30days/scripts/lib/env.py +149 -0
- package/templates/vault/last30days/scripts/lib/http.py +152 -0
- package/templates/vault/last30days/scripts/lib/models.py +175 -0
- package/templates/vault/last30days/scripts/lib/normalize.py +160 -0
- package/templates/vault/last30days/scripts/lib/openai_reddit.py +230 -0
- package/templates/vault/last30days/scripts/lib/reddit_enrich.py +232 -0
- package/templates/vault/last30days/scripts/lib/render.py +383 -0
- package/templates/vault/last30days/scripts/lib/schema.py +336 -0
- package/templates/vault/last30days/scripts/lib/score.py +311 -0
- package/templates/vault/last30days/scripts/lib/ui.py +324 -0
- package/templates/vault/last30days/scripts/lib/websearch.py +401 -0
- package/templates/vault/last30days/scripts/lib/xai_x.py +217 -0
- package/templates/vault/leiloeiro-avaliacao/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-avaliacao/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-edital/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-edital/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-ia/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-ia/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-juridico/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-juridico/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-mercado/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-mercado/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-risco/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-risco/scripts/requirements.txt +1 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/database.ts +24 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/db.ts +35 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/index.ts +2 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/migrations.ts +31 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/schema.sql +8 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/index.ts +44 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/routes/todos.ts +155 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/types/index.ts +35 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/App.css +384 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/App.tsx +81 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/api/todos.ts +57 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/ConfirmDialog.tsx +26 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/EmptyState.tsx +8 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/TodoForm.tsx +43 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/TodoItem.tsx +36 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/TodoList.tsx +27 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/hooks/useTodos.ts +81 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/index.css +48 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/main.tsx +10 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/vite-env.d.ts +1 -0
- package/templates/vault/loki-mode/scripts/export-to-vibe-kanban.sh +178 -0
- package/templates/vault/loki-mode/scripts/loki-wrapper.sh +281 -0
- package/templates/vault/loki-mode/scripts/take-screenshots.js +55 -0
- package/templates/vault/matematico-tao/scripts/complexity_analyzer.py +544 -0
- package/templates/vault/matematico-tao/scripts/dependency_graph.py +538 -0
- package/templates/vault/mcp-builder/scripts/connections.py +151 -0
- package/templates/vault/mcp-builder/scripts/evaluation.py +373 -0
- package/templates/vault/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/templates/vault/mcp-builder/scripts/requirements.txt +2 -0
- package/templates/vault/mobile-design/scripts/mobile_audit.py +670 -0
- package/templates/vault/notebooklm/scripts/__init__.py +81 -0
- package/templates/vault/notebooklm/scripts/ask_question.py +256 -0
- package/templates/vault/notebooklm/scripts/auth_manager.py +358 -0
- package/templates/vault/notebooklm/scripts/browser_session.py +255 -0
- package/templates/vault/notebooklm/scripts/browser_utils.py +107 -0
- package/templates/vault/notebooklm/scripts/cleanup_manager.py +302 -0
- package/templates/vault/notebooklm/scripts/config.py +44 -0
- package/templates/vault/notebooklm/scripts/notebook_manager.py +410 -0
- package/templates/vault/notebooklm/scripts/run.py +102 -0
- package/templates/vault/notebooklm/scripts/setup_environment.py +204 -0
- package/templates/vault/pdf/scripts/check_bounding_boxes.py +70 -0
- package/templates/vault/pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/templates/vault/pdf/scripts/check_fillable_fields.py +12 -0
- package/templates/vault/pdf/scripts/convert_pdf_to_images.py +35 -0
- package/templates/vault/pdf/scripts/create_validation_image.py +41 -0
- package/templates/vault/pdf/scripts/extract_form_field_info.py +152 -0
- package/templates/vault/pdf/scripts/fill_fillable_fields.py +114 -0
- package/templates/vault/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/templates/vault/pdf-official/scripts/check_bounding_boxes.py +70 -0
- package/templates/vault/pdf-official/scripts/check_bounding_boxes_test.py +226 -0
- package/templates/vault/pdf-official/scripts/check_fillable_fields.py +12 -0
- package/templates/vault/pdf-official/scripts/convert_pdf_to_images.py +35 -0
- package/templates/vault/pdf-official/scripts/create_validation_image.py +41 -0
- package/templates/vault/pdf-official/scripts/extract_form_field_info.py +152 -0
- package/templates/vault/pdf-official/scripts/fill_fillable_fields.py +114 -0
- package/templates/vault/pdf-official/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/templates/vault/planning-with-files/scripts/check-complete.sh +44 -0
- package/templates/vault/planning-with-files/scripts/init-session.sh +120 -0
- package/templates/vault/pptx/ooxml/scripts/pack.py +159 -0
- package/templates/vault/pptx/ooxml/scripts/unpack.py +29 -0
- package/templates/vault/pptx/ooxml/scripts/validate.py +69 -0
- package/templates/vault/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/templates/vault/pptx/ooxml/scripts/validation/base.py +951 -0
- package/templates/vault/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/templates/vault/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/templates/vault/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/templates/vault/pptx/scripts/html2pptx.js +979 -0
- package/templates/vault/pptx/scripts/inventory.py +1020 -0
- package/templates/vault/pptx/scripts/rearrange.py +231 -0
- package/templates/vault/pptx/scripts/replace.py +385 -0
- package/templates/vault/pptx/scripts/thumbnail.py +450 -0
- package/templates/vault/pptx-official/ooxml/scripts/pack.py +159 -0
- package/templates/vault/pptx-official/ooxml/scripts/unpack.py +29 -0
- package/templates/vault/pptx-official/ooxml/scripts/validate.py +69 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/__init__.py +15 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/base.py +951 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/docx.py +274 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/pptx.py +315 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/redlining.py +279 -0
- package/templates/vault/pptx-official/scripts/html2pptx.js +979 -0
- package/templates/vault/pptx-official/scripts/inventory.py +1020 -0
- package/templates/vault/pptx-official/scripts/rearrange.py +231 -0
- package/templates/vault/pptx-official/scripts/replace.py +385 -0
- package/templates/vault/pptx-official/scripts/thumbnail.py +450 -0
- package/templates/vault/product-manager-toolkit/scripts/customer_interview_analyzer.py +441 -0
- package/templates/vault/product-manager-toolkit/scripts/rice_prioritizer.py +296 -0
- package/templates/vault/prompt-engineering-patterns/scripts/optimize-prompt.py +279 -0
- package/templates/vault/scripts/.skill_cache.json +7538 -0
- package/templates/vault/scripts/skill_search.py +228 -0
- package/templates/vault/senior-architect/scripts/architecture_diagram_generator.py +114 -0
- package/templates/vault/senior-architect/scripts/dependency_analyzer.py +114 -0
- package/templates/vault/senior-architect/scripts/project_architect.py +114 -0
- package/templates/vault/shopify-development/scripts/requirements.txt +19 -0
- package/templates/vault/shopify-development/scripts/shopify_graphql.py +428 -0
- package/templates/vault/shopify-development/scripts/shopify_init.py +441 -0
- package/templates/vault/shopify-development/scripts/tests/test_shopify_init.py +379 -0
- package/templates/vault/skill-creator/scripts/init_skill.py +303 -0
- package/templates/vault/skill-creator/scripts/package_skill.py +110 -0
- package/templates/vault/skill-creator/scripts/quick_validate.py +95 -0
- package/templates/vault/skill-installer/scripts/detect_skills.py +318 -0
- package/templates/vault/skill-installer/scripts/install_skill.py +1708 -0
- package/templates/vault/skill-installer/scripts/package_skill.py +417 -0
- package/templates/vault/skill-installer/scripts/requirements.txt +1 -0
- package/templates/vault/skill-installer/scripts/validate_skill.py +430 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/__init__.py +13 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/code_quality.py +247 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/cross_skill.py +134 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/dependencies.py +121 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/documentation.py +189 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/governance_audit.py +153 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/performance.py +164 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/security.py +189 -0
- package/templates/vault/skill-sentinel/scripts/config.py +158 -0
- package/templates/vault/skill-sentinel/scripts/cost_optimizer.py +146 -0
- package/templates/vault/skill-sentinel/scripts/db.py +354 -0
- package/templates/vault/skill-sentinel/scripts/governance.py +58 -0
- package/templates/vault/skill-sentinel/scripts/recommender.py +228 -0
- package/templates/vault/skill-sentinel/scripts/report_generator.py +224 -0
- package/templates/vault/skill-sentinel/scripts/requirements.txt +1 -0
- package/templates/vault/skill-sentinel/scripts/run_audit.py +290 -0
- package/templates/vault/skill-sentinel/scripts/scanner.py +271 -0
- package/templates/vault/stability-ai/scripts/config.py +266 -0
- package/templates/vault/stability-ai/scripts/generate.py +687 -0
- package/templates/vault/stability-ai/scripts/requirements.txt +4 -0
- package/templates/vault/stability-ai/scripts/styles.py +174 -0
- package/templates/vault/telegram/assets/boilerplate/nodejs/src/bot-client.ts +86 -0
- package/templates/vault/telegram/assets/boilerplate/nodejs/src/handlers.ts +79 -0
- package/templates/vault/telegram/assets/boilerplate/nodejs/src/index.ts +32 -0
- package/templates/vault/telegram/scripts/send_message.py +143 -0
- package/templates/vault/telegram/scripts/setup_project.py +103 -0
- package/templates/vault/telegram/scripts/test_bot.py +144 -0
- package/templates/vault/typescript-expert/scripts/ts_diagnostic.py +203 -0
- package/templates/vault/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
- package/templates/vault/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
- package/templates/vault/ui-ux-pro-max/scripts/core.py +257 -0
- package/templates/vault/ui-ux-pro-max/scripts/design_system.py +487 -0
- package/templates/vault/ui-ux-pro-max/scripts/search.py +76 -0
- package/templates/vault/videodb/scripts/ws_listener.py +204 -0
- package/templates/vault/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/templates/vault/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/templates/vault/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/templates/vault/webapp-testing/scripts/with_server.py +106 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/index.ts +125 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/template-manager.ts +67 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/types.ts +216 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/webhook-handler.ts +173 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/whatsapp-client.ts +193 -0
- package/templates/vault/whatsapp-cloud-api/scripts/send_test_message.py +137 -0
- package/templates/vault/whatsapp-cloud-api/scripts/setup_project.py +118 -0
- package/templates/vault/whatsapp-cloud-api/scripts/validate_config.py +190 -0
- package/templates/vault/youtube-summarizer/scripts/extract-transcript.py +65 -0
- package/templates/vault/youtube-summarizer/scripts/install-dependencies.sh +28 -0
|
@@ -0,0 +1,613 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AI Studio Image — Configuracao Central (v2 — Enhanced with Official Docs)
|
|
3
|
+
|
|
4
|
+
Todas as constantes, paths, modelos, formatos, tecnicas e configuracoes
|
|
5
|
+
baseadas na documentacao oficial do Google AI Studio (Fev 2026).
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
import os
|
|
10
|
+
|
|
11
|
+
# =============================================================================
|
|
12
|
+
# PATHS
|
|
13
|
+
# =============================================================================
|
|
14
|
+
|
|
15
|
+
ROOT_DIR = Path(__file__).resolve().parent.parent
|
|
16
|
+
SCRIPTS_DIR = ROOT_DIR / "scripts"
|
|
17
|
+
DATA_DIR = ROOT_DIR / "data"
|
|
18
|
+
OUTPUTS_DIR = DATA_DIR / "outputs"
|
|
19
|
+
REFERENCES_DIR = ROOT_DIR / "references"
|
|
20
|
+
ASSETS_DIR = ROOT_DIR / "assets"
|
|
21
|
+
|
|
22
|
+
OUTPUTS_DIR.mkdir(parents=True, exist_ok=True)
|
|
23
|
+
|
|
24
|
+
# =============================================================================
|
|
25
|
+
# API KEY MANAGEMENT (com fallback para backup keys)
|
|
26
|
+
# =============================================================================
|
|
27
|
+
|
|
28
|
+
def get_api_key(try_backup: bool = True) -> str | None:
|
|
29
|
+
"""
|
|
30
|
+
Busca API key com fallback automatico:
|
|
31
|
+
1. GEMINI_API_KEY env var
|
|
32
|
+
2. .env GEMINI_API_KEY
|
|
33
|
+
3. .env GEMINI_API_KEY_BACKUP_1
|
|
34
|
+
4. .env GEMINI_API_KEY_BACKUP_2
|
|
35
|
+
"""
|
|
36
|
+
# 1. Variavel de ambiente
|
|
37
|
+
key = os.environ.get("GEMINI_API_KEY")
|
|
38
|
+
if key:
|
|
39
|
+
return key
|
|
40
|
+
|
|
41
|
+
# 2. Arquivo .env
|
|
42
|
+
env_file = ROOT_DIR / ".env"
|
|
43
|
+
if env_file.exists():
|
|
44
|
+
keys_found = {}
|
|
45
|
+
for line in env_file.read_text(encoding="utf-8").splitlines():
|
|
46
|
+
line = line.strip()
|
|
47
|
+
if line and not line.startswith("#") and "=" in line:
|
|
48
|
+
k, v = line.split("=", 1)
|
|
49
|
+
keys_found[k.strip()] = v.strip().strip('"').strip("'")
|
|
50
|
+
|
|
51
|
+
# Primaria
|
|
52
|
+
if "GEMINI_API_KEY" in keys_found:
|
|
53
|
+
return keys_found["GEMINI_API_KEY"]
|
|
54
|
+
|
|
55
|
+
# Backups
|
|
56
|
+
if try_backup:
|
|
57
|
+
for backup_key in ["GEMINI_API_KEY_BACKUP_1", "GEMINI_API_KEY_BACKUP_2"]:
|
|
58
|
+
if backup_key in keys_found:
|
|
59
|
+
return keys_found[backup_key]
|
|
60
|
+
|
|
61
|
+
return None
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def get_all_api_keys() -> list[str]:
|
|
65
|
+
"""Retorna todas as API keys disponiveis para fallback."""
|
|
66
|
+
keys = []
|
|
67
|
+
env_file = ROOT_DIR / ".env"
|
|
68
|
+
if env_file.exists():
|
|
69
|
+
for line in env_file.read_text(encoding="utf-8").splitlines():
|
|
70
|
+
line = line.strip()
|
|
71
|
+
if line and not line.startswith("#") and "GEMINI_API_KEY" in line and "=" in line:
|
|
72
|
+
_, v = line.split("=", 1)
|
|
73
|
+
v = v.strip().strip('"').strip("'")
|
|
74
|
+
if v:
|
|
75
|
+
keys.append(v)
|
|
76
|
+
|
|
77
|
+
env_key = os.environ.get("GEMINI_API_KEY")
|
|
78
|
+
if env_key and env_key not in keys:
|
|
79
|
+
keys.insert(0, env_key)
|
|
80
|
+
|
|
81
|
+
return keys
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# =============================================================================
|
|
85
|
+
# MODELOS — Todos os modelos oficiais (Fev 2026)
|
|
86
|
+
# =============================================================================
|
|
87
|
+
|
|
88
|
+
MODELS = {
|
|
89
|
+
# ---- Imagen 4 (Standalone Image Generation) ----
|
|
90
|
+
"imagen-4": {
|
|
91
|
+
"id": "imagen-4.0-generate-001",
|
|
92
|
+
"type": "imagen",
|
|
93
|
+
"description": "Imagen 4 Standard — Alta qualidade, balanco ideal velocidade/qualidade",
|
|
94
|
+
"max_images": 4,
|
|
95
|
+
"max_resolution": "2K",
|
|
96
|
+
"supports_aspect_ratio": True,
|
|
97
|
+
"supports_reference_images": False,
|
|
98
|
+
"supports_text_rendering": True,
|
|
99
|
+
"text_limit": 25, # caracteres max para texto na imagem
|
|
100
|
+
"cost_per_image": 0.03,
|
|
101
|
+
},
|
|
102
|
+
"imagen-4-ultra": {
|
|
103
|
+
"id": "imagen-4.0-ultra-generate-001",
|
|
104
|
+
"type": "imagen",
|
|
105
|
+
"description": "Imagen 4 Ultra — Maxima qualidade, resolucao 2K, detalhes superiores",
|
|
106
|
+
"max_images": 4,
|
|
107
|
+
"max_resolution": "2K",
|
|
108
|
+
"supports_aspect_ratio": True,
|
|
109
|
+
"supports_reference_images": False,
|
|
110
|
+
"supports_text_rendering": True,
|
|
111
|
+
"text_limit": 25,
|
|
112
|
+
"cost_per_image": 0.06,
|
|
113
|
+
},
|
|
114
|
+
"imagen-4-fast": {
|
|
115
|
+
"id": "imagen-4.0-fast-generate-001",
|
|
116
|
+
"type": "imagen",
|
|
117
|
+
"description": "Imagen 4 Fast — Geracao rapida, ideal para volume alto",
|
|
118
|
+
"max_images": 4,
|
|
119
|
+
"max_resolution": "1K",
|
|
120
|
+
"supports_aspect_ratio": True,
|
|
121
|
+
"supports_reference_images": False,
|
|
122
|
+
"supports_text_rendering": True,
|
|
123
|
+
"text_limit": 25,
|
|
124
|
+
"cost_per_image": 0.02,
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
# ---- Gemini com geracao de imagem nativa (Nano Banana) ----
|
|
128
|
+
"gemini-flash-image": {
|
|
129
|
+
"id": "gemini-2.5-flash-image",
|
|
130
|
+
"type": "gemini",
|
|
131
|
+
"description": "Nano Banana (Gemini 2.5 Flash Image) — Rapido, eficiente, edicao de imagem",
|
|
132
|
+
"max_images": 1,
|
|
133
|
+
"max_resolution": "1K",
|
|
134
|
+
"supports_aspect_ratio": True,
|
|
135
|
+
"supports_reference_images": False,
|
|
136
|
+
"supports_text_rendering": True,
|
|
137
|
+
"supports_image_editing": True,
|
|
138
|
+
"supports_multi_turn": True,
|
|
139
|
+
"cost_per_image": 0.039,
|
|
140
|
+
},
|
|
141
|
+
"gemini-2-flash-exp": {
|
|
142
|
+
"id": "gemini-2.0-flash-exp-image-generation",
|
|
143
|
+
"type": "gemini",
|
|
144
|
+
"description": "Gemini 2.0 Flash Experimental — GRATUITO, geracao experimental",
|
|
145
|
+
"max_images": 1,
|
|
146
|
+
"max_resolution": "1K",
|
|
147
|
+
"supports_aspect_ratio": False,
|
|
148
|
+
"supports_reference_images": False,
|
|
149
|
+
"supports_text_rendering": True,
|
|
150
|
+
"supports_image_editing": True,
|
|
151
|
+
"supports_multi_turn": True,
|
|
152
|
+
"cost_per_image": 0,
|
|
153
|
+
},
|
|
154
|
+
"gemini-pro-image": {
|
|
155
|
+
"id": "gemini-3-pro-image-preview",
|
|
156
|
+
"type": "gemini",
|
|
157
|
+
"description": "Gemini 3 Pro Image — Maximo controle, 4K, ate 14 imagens referencia, thinking mode",
|
|
158
|
+
"max_images": 1,
|
|
159
|
+
"max_resolution": "4K",
|
|
160
|
+
"supports_aspect_ratio": True,
|
|
161
|
+
"supports_reference_images": True,
|
|
162
|
+
"max_reference_objects": 6,
|
|
163
|
+
"max_reference_humans": 5,
|
|
164
|
+
"max_reference_total": 14,
|
|
165
|
+
"supports_text_rendering": True,
|
|
166
|
+
"supports_thinking_mode": True,
|
|
167
|
+
"supports_search_grounding": True,
|
|
168
|
+
"supports_image_editing": True,
|
|
169
|
+
"supports_image_restoration": True,
|
|
170
|
+
"supports_multi_turn": True,
|
|
171
|
+
"cost_per_image": 0.134,
|
|
172
|
+
},
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
# Modelo padrao — gemini-2-flash-exp e GRATUITO mesmo no nivel pago
|
|
176
|
+
DEFAULT_MODEL = os.environ.get("GEMINI_DEFAULT_MODEL", "gemini-2-flash-exp")
|
|
177
|
+
|
|
178
|
+
# =============================================================================
|
|
179
|
+
# FORMATOS DE IMAGEM — Todos os aspect ratios oficiais
|
|
180
|
+
# =============================================================================
|
|
181
|
+
|
|
182
|
+
IMAGE_FORMATS = {
|
|
183
|
+
"square": {
|
|
184
|
+
"aspect_ratio": "1:1",
|
|
185
|
+
"description": "Feed Instagram, Facebook, perfis, produtos",
|
|
186
|
+
"use_cases": ["instagram feed", "facebook post", "profile", "product"],
|
|
187
|
+
},
|
|
188
|
+
"portrait-34": {
|
|
189
|
+
"aspect_ratio": "3:4",
|
|
190
|
+
"description": "Instagram portrait, Pinterest pins",
|
|
191
|
+
"use_cases": ["instagram portrait", "pinterest", "card"],
|
|
192
|
+
},
|
|
193
|
+
"portrait-45": {
|
|
194
|
+
"aspect_ratio": "4:5",
|
|
195
|
+
"description": "Instagram optimal portrait (mais area visivel no feed)",
|
|
196
|
+
"use_cases": ["instagram optimal", "social media portrait"],
|
|
197
|
+
},
|
|
198
|
+
"portrait-23": {
|
|
199
|
+
"aspect_ratio": "2:3",
|
|
200
|
+
"description": "Retrato classico, posters, A4-like",
|
|
201
|
+
"use_cases": ["poster", "print", "classic portrait"],
|
|
202
|
+
},
|
|
203
|
+
"landscape-43": {
|
|
204
|
+
"aspect_ratio": "4:3",
|
|
205
|
+
"description": "Formato classico fullscreen, apresentacoes",
|
|
206
|
+
"use_cases": ["presentation", "fullscreen", "classic"],
|
|
207
|
+
},
|
|
208
|
+
"landscape-32": {
|
|
209
|
+
"aspect_ratio": "3:2",
|
|
210
|
+
"description": "Formato fotografico classico (35mm)",
|
|
211
|
+
"use_cases": ["photography", "35mm", "classic landscape"],
|
|
212
|
+
},
|
|
213
|
+
"landscape-54": {
|
|
214
|
+
"aspect_ratio": "5:4",
|
|
215
|
+
"description": "Quase quadrado, formato 8x10",
|
|
216
|
+
"use_cases": ["near-square", "8x10", "medium format"],
|
|
217
|
+
},
|
|
218
|
+
"widescreen": {
|
|
219
|
+
"aspect_ratio": "16:9",
|
|
220
|
+
"description": "YouTube thumbnails, banners, desktop, TV",
|
|
221
|
+
"use_cases": ["youtube", "banner", "desktop", "tv", "thumbnail"],
|
|
222
|
+
},
|
|
223
|
+
"ultrawide": {
|
|
224
|
+
"aspect_ratio": "21:9",
|
|
225
|
+
"description": "Ultrawide cinematico, banners panoramicos",
|
|
226
|
+
"use_cases": ["cinematic", "ultrawide", "panoramic banner"],
|
|
227
|
+
},
|
|
228
|
+
"stories": {
|
|
229
|
+
"aspect_ratio": "9:16",
|
|
230
|
+
"description": "Stories, Reels, TikTok, Shorts (vertical)",
|
|
231
|
+
"use_cases": ["stories", "reels", "tiktok", "shorts", "vertical"],
|
|
232
|
+
},
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
# Aliases para facilitar uso
|
|
236
|
+
FORMAT_ALIASES = {
|
|
237
|
+
"square": "square",
|
|
238
|
+
"1:1": "square",
|
|
239
|
+
"portrait": "portrait-45", # Instagram optimal como padrao
|
|
240
|
+
"3:4": "portrait-34",
|
|
241
|
+
"4:5": "portrait-45",
|
|
242
|
+
"2:3": "portrait-23",
|
|
243
|
+
"landscape": "widescreen",
|
|
244
|
+
"16:9": "widescreen",
|
|
245
|
+
"4:3": "landscape-43",
|
|
246
|
+
"3:2": "landscape-32",
|
|
247
|
+
"5:4": "landscape-54",
|
|
248
|
+
"21:9": "ultrawide",
|
|
249
|
+
"stories": "stories",
|
|
250
|
+
"9:16": "stories",
|
|
251
|
+
"reels": "stories",
|
|
252
|
+
"tiktok": "stories",
|
|
253
|
+
"youtube": "widescreen",
|
|
254
|
+
"thumbnail": "widescreen",
|
|
255
|
+
"banner": "widescreen",
|
|
256
|
+
"pinterest": "portrait-23",
|
|
257
|
+
"instagram": "square",
|
|
258
|
+
"instagram-portrait": "portrait-45",
|
|
259
|
+
"feed": "square",
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
DEFAULT_FORMAT = "square"
|
|
263
|
+
|
|
264
|
+
# =============================================================================
|
|
265
|
+
# NIVEIS DE HUMANIZACAO
|
|
266
|
+
# =============================================================================
|
|
267
|
+
|
|
268
|
+
HUMANIZATION_LEVELS = {
|
|
269
|
+
"ultra": {
|
|
270
|
+
"description": "Maximo realismo — parece 100% foto de celular amador",
|
|
271
|
+
"modifiers": [
|
|
272
|
+
"taken with an older model smartphone camera, slight quality reduction",
|
|
273
|
+
"visible image sensor noise and grain, especially in shadows",
|
|
274
|
+
"imperfect framing, noticeably off-center, slightly tilted",
|
|
275
|
+
"natural motion blur from slight hand tremor while taking the photo",
|
|
276
|
+
"visible lens distortion at edges typical of wide phone cameras",
|
|
277
|
+
"unedited, straight from camera roll, no filters applied",
|
|
278
|
+
"candid unposed moment, subject not aware of camera or casually posing",
|
|
279
|
+
"fingerprint smudge slightly visible on lens edge",
|
|
280
|
+
"auto-exposure not quite perfect, slightly over or underexposed areas",
|
|
281
|
+
],
|
|
282
|
+
},
|
|
283
|
+
"natural": {
|
|
284
|
+
"description": "Equilibrio perfeito — foto casual de celular moderno",
|
|
285
|
+
"modifiers": [
|
|
286
|
+
"taken with a modern smartphone camera, natural quality",
|
|
287
|
+
"subtle ambient light only, no professional flash or ring light",
|
|
288
|
+
"casual framing, not perfectly composed but intentional",
|
|
289
|
+
"real skin texture with visible pores, subtle blemishes, natural color variation",
|
|
290
|
+
"genuine facial expression, natural and relaxed, not a stock photo pose",
|
|
291
|
+
"everyday real-world setting with authentic environmental details",
|
|
292
|
+
"shallow depth of field from phone lens, background naturally blurred",
|
|
293
|
+
"natural color grading, not heavily filtered or processed",
|
|
294
|
+
],
|
|
295
|
+
},
|
|
296
|
+
"polished": {
|
|
297
|
+
"description": "Natural mas cuidado — celular bom com boa luz",
|
|
298
|
+
"modifiers": [
|
|
299
|
+
"high quality smartphone photography, latest model phone camera",
|
|
300
|
+
"well-lit natural lighting, photographer chose good conditions",
|
|
301
|
+
"thoughtful but casual composition, follows rule of thirds loosely",
|
|
302
|
+
"natural skin appearance, minimal retouching, healthy and real",
|
|
303
|
+
"clean real environment with intentional but not staged background",
|
|
304
|
+
"colors are vibrant but not oversaturated, true to life",
|
|
305
|
+
],
|
|
306
|
+
},
|
|
307
|
+
"editorial": {
|
|
308
|
+
"description": "Estilo revista — natural com producao sutil",
|
|
309
|
+
"modifiers": [
|
|
310
|
+
"editorial photography style, natural but with subtle production quality",
|
|
311
|
+
"professional natural lighting, no obvious artificial light sources",
|
|
312
|
+
"magazine-worthy composition that still feels candid and genuine",
|
|
313
|
+
"skin looks healthy and natural with very gentle soft-focus diffusion",
|
|
314
|
+
"curated environment that feels aspirational yet authentically real",
|
|
315
|
+
"color palette is cohesive and intentional, like a lifestyle brand",
|
|
316
|
+
],
|
|
317
|
+
},
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
DEFAULT_HUMANIZATION = "natural"
|
|
321
|
+
|
|
322
|
+
# =============================================================================
|
|
323
|
+
# ILUMINACAO — Opcoes detalhadas de hora do dia
|
|
324
|
+
# =============================================================================
|
|
325
|
+
|
|
326
|
+
LIGHTING_OPTIONS = {
|
|
327
|
+
"morning": {
|
|
328
|
+
"description": "Luz matinal suave, tons frios-quentes em transicao",
|
|
329
|
+
"modifiers": [
|
|
330
|
+
"soft early morning light streaming through windows or filtering through trees",
|
|
331
|
+
"cool-warm transitional color temperature, fresh atmospheric quality",
|
|
332
|
+
"gentle long shadows from low sun angle, peaceful morning atmosphere",
|
|
333
|
+
],
|
|
334
|
+
},
|
|
335
|
+
"golden-hour": {
|
|
336
|
+
"description": "Por do sol/nascer — luz dourada cinematica",
|
|
337
|
+
"modifiers": [
|
|
338
|
+
"golden hour sunlight creating warm amber and honey tones across the scene",
|
|
339
|
+
"long soft dramatic shadows adding depth and dimension",
|
|
340
|
+
"beautiful backlighting with natural lens flare",
|
|
341
|
+
"skin and surfaces glowing warmly in the directional light",
|
|
342
|
+
],
|
|
343
|
+
},
|
|
344
|
+
"midday": {
|
|
345
|
+
"description": "Sol do meio-dia — luz forte e direta",
|
|
346
|
+
"modifiers": [
|
|
347
|
+
"bright midday sunlight with strong overhead illumination",
|
|
348
|
+
"well-defined shadows directly below subjects",
|
|
349
|
+
"vibrant saturated colors under direct sun exposure",
|
|
350
|
+
"high contrast between lit areas and shadow",
|
|
351
|
+
],
|
|
352
|
+
},
|
|
353
|
+
"overcast": {
|
|
354
|
+
"description": "Dia nublado — luz difusa e uniforme",
|
|
355
|
+
"modifiers": [
|
|
356
|
+
"overcast sky providing soft even diffused illumination",
|
|
357
|
+
"no harsh shadows, smooth lighting transitions",
|
|
358
|
+
"slightly muted tones with subtle atmospheric quality",
|
|
359
|
+
"flattering portrait light from the cloud-diffused sky",
|
|
360
|
+
],
|
|
361
|
+
},
|
|
362
|
+
"night": {
|
|
363
|
+
"description": "Noturno — luzes artificiais quentes",
|
|
364
|
+
"modifiers": [
|
|
365
|
+
"nighttime scene with warm artificial lighting sources",
|
|
366
|
+
"street lamps, neon signs, restaurant glow, or indoor warm lights",
|
|
367
|
+
"higher ISO grain visible, adding to the nighttime atmosphere",
|
|
368
|
+
"warm color temperature from tungsten and LED light sources",
|
|
369
|
+
],
|
|
370
|
+
},
|
|
371
|
+
"indoor": {
|
|
372
|
+
"description": "Interiores — mix de luz natural e artificial",
|
|
373
|
+
"modifiers": [
|
|
374
|
+
"indoor mixed lighting from windows and artificial sources",
|
|
375
|
+
"warm tungsten light combined with cool natural daylight",
|
|
376
|
+
"soft ambient shadows typical of interior spaces",
|
|
377
|
+
"natural light gradients from window to room depth",
|
|
378
|
+
],
|
|
379
|
+
},
|
|
380
|
+
"blue-hour": {
|
|
381
|
+
"description": "Hora azul — pos-por-do-sol, tons azulados",
|
|
382
|
+
"modifiers": [
|
|
383
|
+
"blue hour twilight creating cool blue atmospheric tones",
|
|
384
|
+
"city lights beginning to turn on against deep blue sky",
|
|
385
|
+
"beautiful contrast between warm artificial lights and cool ambient",
|
|
386
|
+
"magical transitional quality between day and night",
|
|
387
|
+
],
|
|
388
|
+
},
|
|
389
|
+
"shade": {
|
|
390
|
+
"description": "Sombra aberta — luz refletida suave",
|
|
391
|
+
"modifiers": [
|
|
392
|
+
"open shade lighting with soft reflected light",
|
|
393
|
+
"even illumination without direct sunlight",
|
|
394
|
+
"very flattering for portraits with no squinting",
|
|
395
|
+
"cool-neutral color temperature from reflected sky light",
|
|
396
|
+
],
|
|
397
|
+
},
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
DEFAULT_LIGHTING = None
|
|
401
|
+
|
|
402
|
+
# =============================================================================
|
|
403
|
+
# MODOS DE OPERACAO
|
|
404
|
+
# =============================================================================
|
|
405
|
+
|
|
406
|
+
MODES = {
|
|
407
|
+
"influencer": {
|
|
408
|
+
"description": "Posts para redes sociais com estetica natural e atraente",
|
|
409
|
+
"base_style": [
|
|
410
|
+
"authentic social media photo that could appear on a real person's Instagram or TikTok",
|
|
411
|
+
"visually appealing but genuine and relatable, not commercial or staged",
|
|
412
|
+
"the kind of photo that earns organic engagement because it feels real",
|
|
413
|
+
"lifestyle photography aesthetic with natural warmth and personality",
|
|
414
|
+
"inviting color palette that is attractive without being oversaturated",
|
|
415
|
+
],
|
|
416
|
+
"avoid": [
|
|
417
|
+
"do NOT create a studio photoshoot look with professional lighting setups",
|
|
418
|
+
"do NOT use perfect mathematical symmetry in composition",
|
|
419
|
+
"do NOT make skin look airbrushed, plastic, or unnaturally smooth",
|
|
420
|
+
"do NOT use dramatic studio lighting, rim lights, or beauty dish lighting",
|
|
421
|
+
"do NOT create anything that looks like advertising or commercial photography",
|
|
422
|
+
"avoid oversaturated or heavily filtered color grading",
|
|
423
|
+
"avoid uncanny valley faces, impossible body proportions, or AI artifacts",
|
|
424
|
+
"avoid generic stock photo compositions or poses",
|
|
425
|
+
],
|
|
426
|
+
},
|
|
427
|
+
"educacional": {
|
|
428
|
+
"description": "Material tecnico de ensino com visual profissional e acessivel",
|
|
429
|
+
"base_style": [
|
|
430
|
+
"clean professional educational photography that builds trust and credibility",
|
|
431
|
+
"clear focus on the subject being taught, nothing distracting from the lesson",
|
|
432
|
+
"well-organized visual elements that guide the eye to important information",
|
|
433
|
+
"approachable and inviting learning atmosphere, not intimidating or sterile",
|
|
434
|
+
"natural trustworthy appearance that makes the viewer want to learn",
|
|
435
|
+
],
|
|
436
|
+
"avoid": [
|
|
437
|
+
"do NOT create clip art or generic stock photo appearance",
|
|
438
|
+
"do NOT overcrowd the frame with too many competing elements",
|
|
439
|
+
"do NOT use distracting busy backgrounds that compete with the subject",
|
|
440
|
+
"do NOT make text or important demonstration elements too small to read",
|
|
441
|
+
"avoid overly corporate, sterile, or cold atmosphere",
|
|
442
|
+
"avoid artificial-looking scenarios that break trust with the viewer",
|
|
443
|
+
"avoid excessive visual complexity that overwhelms the learning content",
|
|
444
|
+
],
|
|
445
|
+
},
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
DEFAULT_MODE = "influencer"
|
|
449
|
+
|
|
450
|
+
# =============================================================================
|
|
451
|
+
# PROMPT TEMPLATES OFICIAIS (da documentacao Google)
|
|
452
|
+
# =============================================================================
|
|
453
|
+
|
|
454
|
+
PROMPT_TEMPLATES = {
|
|
455
|
+
"photorealistic": {
|
|
456
|
+
"pattern": "A photorealistic {shot_type} of {subject}, {action}, set in {environment}. The scene is illuminated by {lighting}, creating a {mood} atmosphere. Captured with a {camera}, emphasizing {details}.",
|
|
457
|
+
"description": "Template oficial para cenas fotorrealistas",
|
|
458
|
+
},
|
|
459
|
+
"product_mockup": {
|
|
460
|
+
"pattern": "A high-resolution, studio-lit product photograph of {product} on a {surface}. The lighting is a {lighting_setup} to {purpose}. The camera angle is {angle} to showcase {feature}. Ultra-realistic, with sharp focus on {detail}.",
|
|
461
|
+
"description": "Template oficial para fotos de produto",
|
|
462
|
+
},
|
|
463
|
+
"stylized_illustration": {
|
|
464
|
+
"pattern": "A {style} sticker of a {subject}, featuring {characteristics} and a {color_palette}. The design should have {line_style} and {shading}. The background must be {background}.",
|
|
465
|
+
"description": "Template oficial para ilustracoes estilizadas",
|
|
466
|
+
},
|
|
467
|
+
"text_in_image": {
|
|
468
|
+
"pattern": "Create a {image_type} for {brand} with the text \"{text}\" in a {font_style}. The design should be {style}, with a {color_scheme}.",
|
|
469
|
+
"description": "Template oficial para texto em imagens",
|
|
470
|
+
},
|
|
471
|
+
"infographic": {
|
|
472
|
+
"pattern": "Create a {visual_type} explaining {concept} styled as {reference_style}. Show {key_elements} and {result}. Design resembles {example}, suitable for {audience}.",
|
|
473
|
+
"description": "Template oficial para infograficos",
|
|
474
|
+
},
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
# =============================================================================
|
|
478
|
+
# SHOT TYPES (Tipos de enquadramento fotografico)
|
|
479
|
+
# =============================================================================
|
|
480
|
+
|
|
481
|
+
SHOT_TYPES = {
|
|
482
|
+
"extreme-close-up": "Extreme close-up showing fine details of a specific feature",
|
|
483
|
+
"close-up": "Close-up portrait showing face/subject with blurred background",
|
|
484
|
+
"medium-close": "Medium close-up from chest up, conversational distance",
|
|
485
|
+
"medium": "Medium shot from waist up, showing body language and context",
|
|
486
|
+
"medium-wide": "Medium wide shot showing full body with some environment",
|
|
487
|
+
"wide": "Wide shot with subject in environment, establishing context",
|
|
488
|
+
"extreme-wide": "Extreme wide shot, subject small in vast landscape",
|
|
489
|
+
"over-shoulder": "Over-the-shoulder perspective, intimate conversational view",
|
|
490
|
+
"top-down": "Bird's eye view looking directly down, flat lay perspective",
|
|
491
|
+
"low-angle": "Low angle looking up at subject, empowering perspective",
|
|
492
|
+
"high-angle": "High angle looking down, showing layout and spatial relationships",
|
|
493
|
+
"dutch-angle": "Slightly tilted frame adding dynamic energy and tension",
|
|
494
|
+
"pov": "Point-of-view perspective, as seen through someone's eyes",
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
# =============================================================================
|
|
498
|
+
# RESOLUTIONS
|
|
499
|
+
# =============================================================================
|
|
500
|
+
|
|
501
|
+
RESOLUTIONS = {
|
|
502
|
+
"1K": "1024px — Padrao, rapido, bom para web",
|
|
503
|
+
"2K": "2048px — Alta qualidade, ideal para impressao e detalhes",
|
|
504
|
+
"4K": "4096px — Maxima qualidade, apenas Gemini 3 Pro Image",
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
DEFAULT_RESOLUTION = "1K"
|
|
508
|
+
|
|
509
|
+
# =============================================================================
|
|
510
|
+
# PERSON GENERATION SETTINGS
|
|
511
|
+
# =============================================================================
|
|
512
|
+
|
|
513
|
+
PERSON_GENERATION = {
|
|
514
|
+
"dont_allow": "Bloqueia geracao de pessoas",
|
|
515
|
+
"allow_adult": "Permite apenas adultos (padrao)",
|
|
516
|
+
"allow_all": "Permite adultos e criancas (indisponivel em EU/UK/CH/MENA)",
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
DEFAULT_PERSON_GENERATION = "allow_adult"
|
|
520
|
+
|
|
521
|
+
# =============================================================================
|
|
522
|
+
# RATE LIMITS E GOVERNANCA
|
|
523
|
+
# =============================================================================
|
|
524
|
+
|
|
525
|
+
RATE_LIMITS = {
|
|
526
|
+
"requests_per_minute": 10,
|
|
527
|
+
"images_per_day": 500,
|
|
528
|
+
"max_prompt_tokens": 480,
|
|
529
|
+
"max_text_in_image_chars": 25, # para Imagen
|
|
530
|
+
"max_text_phrases": 3, # ate 3 frases distintas
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
# =============================================================================
|
|
534
|
+
# OUTPUT SETTINGS
|
|
535
|
+
# =============================================================================
|
|
536
|
+
|
|
537
|
+
OUTPUT_SETTINGS = {
|
|
538
|
+
"default_mime_type": "image/png",
|
|
539
|
+
"filename_pattern": "{mode}_{template}_{timestamp}_{index}.{ext}",
|
|
540
|
+
"save_metadata": True,
|
|
541
|
+
"save_prompt": True,
|
|
542
|
+
"save_original_prompt": True,
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
# =============================================================================
|
|
546
|
+
# CONTROLADOR DE SEGURANCA — Previne gastos acidentais
|
|
547
|
+
# =============================================================================
|
|
548
|
+
|
|
549
|
+
# Modelos com custo real (nao usar sem intencao explicita)
|
|
550
|
+
# imagen-4: $0.03/img | imagen-4-ultra: $0.06/img | imagen-4-fast: $0.02/img
|
|
551
|
+
# gemini-flash-image: $0.039/img | gemini-pro-image: $0.134/img
|
|
552
|
+
PAID_MODELS = {"imagen-4", "imagen-4-ultra", "imagen-4-fast", "gemini-flash-image", "gemini-pro-image"}
|
|
553
|
+
|
|
554
|
+
# Unico modelo GRATUITO para geracao de imagem (experimental)
|
|
555
|
+
FREE_MODELS = {"gemini-2-flash-exp"}
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
def safety_check_model(model_key: str, force: bool = False) -> tuple[bool, str]:
|
|
559
|
+
"""
|
|
560
|
+
Verifica se o modelo e seguro para usar sem gerar custo.
|
|
561
|
+
|
|
562
|
+
Returns:
|
|
563
|
+
(allowed, message) — se permitido e mensagem explicativa
|
|
564
|
+
"""
|
|
565
|
+
block_paid = os.environ.get("SAFETY_BLOCK_PAID_MODELS", "true").lower() == "true"
|
|
566
|
+
|
|
567
|
+
if model_key in PAID_MODELS:
|
|
568
|
+
cost = MODELS.get(model_key, {}).get("cost_per_image", "?")
|
|
569
|
+
if block_paid and not force:
|
|
570
|
+
return False, (
|
|
571
|
+
f"BLOQUEADO: '{model_key}' cobra ${cost}/imagem. "
|
|
572
|
+
f"Use --model gemini-2-flash-exp (gratis) ou --force-paid para confirmar."
|
|
573
|
+
)
|
|
574
|
+
return True, f"AVISO: '{model_key}' cobra ${cost}/imagem. Prosseguindo com --force-paid."
|
|
575
|
+
|
|
576
|
+
return True, f"OK: '{model_key}' e gratuito."
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
def get_daily_usage_count() -> int:
|
|
580
|
+
"""Retorna quantas imagens foram geradas hoje (via metadados salvos)."""
|
|
581
|
+
import json
|
|
582
|
+
from datetime import date
|
|
583
|
+
today = date.today().isoformat()
|
|
584
|
+
count = 0
|
|
585
|
+
if OUTPUTS_DIR.exists():
|
|
586
|
+
for meta_file in OUTPUTS_DIR.glob("*.meta.json"):
|
|
587
|
+
try:
|
|
588
|
+
data = json.loads(meta_file.read_text(encoding="utf-8"))
|
|
589
|
+
generated_at = data.get("generated_at", "")
|
|
590
|
+
if generated_at.startswith(today):
|
|
591
|
+
count += 1
|
|
592
|
+
except Exception:
|
|
593
|
+
pass
|
|
594
|
+
return count
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
def safety_check_daily_limit(num_images: int = 1) -> tuple[bool, str]:
|
|
598
|
+
"""
|
|
599
|
+
Verifica se o limite diario de imagens sera excedido.
|
|
600
|
+
|
|
601
|
+
Returns:
|
|
602
|
+
(allowed, message)
|
|
603
|
+
"""
|
|
604
|
+
max_per_day = int(os.environ.get("SAFETY_MAX_IMAGES_PER_DAY", "50"))
|
|
605
|
+
current = get_daily_usage_count()
|
|
606
|
+
after = current + num_images
|
|
607
|
+
|
|
608
|
+
if after > max_per_day:
|
|
609
|
+
return False, (
|
|
610
|
+
f"LIMITE DIARIO: {current}/{max_per_day} imagens hoje. "
|
|
611
|
+
f"Ajuste SAFETY_MAX_IMAGES_PER_DAY no .env para aumentar."
|
|
612
|
+
)
|
|
613
|
+
return True, f"OK: {current}/{max_per_day} imagens hoje ({num_images} a gerar)."
|