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,424 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AI Studio Image — Motor de Humanizacao de Prompts (v2 — Enhanced)
|
|
3
|
+
|
|
4
|
+
Transforma qualquer prompt em uma foto genuinamente humana usando 5 camadas
|
|
5
|
+
de realismo + tecnicas avancadas da documentacao oficial do Google AI Studio.
|
|
6
|
+
|
|
7
|
+
Principio-chave da Google: "Describe the scene, don't just list keywords."
|
|
8
|
+
Paragrafos narrativos e descritivos superam listas desconectadas de palavras
|
|
9
|
+
porque aproveitam a compreensao profunda de linguagem do modelo.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import argparse
|
|
13
|
+
import json
|
|
14
|
+
import sys
|
|
15
|
+
from datetime import datetime
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
|
|
18
|
+
sys.path.insert(0, str(Path(__file__).parent))
|
|
19
|
+
from config import (
|
|
20
|
+
HUMANIZATION_LEVELS,
|
|
21
|
+
LIGHTING_OPTIONS,
|
|
22
|
+
MODES,
|
|
23
|
+
SHOT_TYPES,
|
|
24
|
+
PROMPT_TEMPLATES,
|
|
25
|
+
IMAGE_FORMATS,
|
|
26
|
+
FORMAT_ALIASES,
|
|
27
|
+
DEFAULT_HUMANIZATION,
|
|
28
|
+
DEFAULT_MODE,
|
|
29
|
+
DEFAULT_LIGHTING,
|
|
30
|
+
RATE_LIMITS,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# =============================================================================
|
|
35
|
+
# CAMADAS DE HUMANIZACAO — Sistema de 5 camadas
|
|
36
|
+
# =============================================================================
|
|
37
|
+
|
|
38
|
+
LAYER_DEVICE = {
|
|
39
|
+
"core": [
|
|
40
|
+
"photograph taken with a smartphone camera, not a professional DSLR",
|
|
41
|
+
"natural depth of field characteristic of a small phone camera lens",
|
|
42
|
+
"no professional flash or external lighting — only ambient light",
|
|
43
|
+
],
|
|
44
|
+
"enhanced": [
|
|
45
|
+
"subtle lens distortion at the edges typical of wide-angle phone cameras",
|
|
46
|
+
"natural image sensor noise that adds organic texture to the photograph",
|
|
47
|
+
"phone auto-focus creating natural bokeh blur in the background",
|
|
48
|
+
"slight chromatic aberration visible at high-contrast edges",
|
|
49
|
+
],
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
LAYER_LIGHTING = {
|
|
53
|
+
"core": [
|
|
54
|
+
"illuminated only by natural available light sources in the environment",
|
|
55
|
+
"organic soft shadows with gradual transitions, no sharp artificial shadows",
|
|
56
|
+
"no ring lights, studio softboxes, or professional lighting equipment visible",
|
|
57
|
+
],
|
|
58
|
+
"enhanced": [
|
|
59
|
+
"subtle light reflections on natural surfaces like skin, glass, and metal",
|
|
60
|
+
"color temperature naturally varying across the scene from mixed light sources",
|
|
61
|
+
"gentle light falloff creating natural depth and three-dimensionality",
|
|
62
|
+
],
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
LAYER_IMPERFECTION = {
|
|
66
|
+
"core": [
|
|
67
|
+
"composition is slightly imperfect — not mathematically centered or perfectly aligned",
|
|
68
|
+
"natural selective focus where some elements are slightly soft in the background",
|
|
69
|
+
],
|
|
70
|
+
"enhanced": [
|
|
71
|
+
"micro hand tremor resulting in sharpness that is natural, not pixel-perfect",
|
|
72
|
+
"random real-world elements in the environment that weren't intentionally placed",
|
|
73
|
+
"the scene looks lived-in and genuine, not a carefully curated set",
|
|
74
|
+
"horizon line may be very slightly tilted as happens with handheld phone shots",
|
|
75
|
+
],
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
LAYER_AUTHENTICITY = {
|
|
79
|
+
"core": [
|
|
80
|
+
"genuine natural facial expression — relaxed, candid, and human, not a stock photo pose",
|
|
81
|
+
"wearing everyday clothing appropriate for the setting, not styled for a photoshoot",
|
|
82
|
+
"real human skin texture — visible pores, subtle natural blemishes, organic color variation",
|
|
83
|
+
"realistic natural body proportions without any exaggeration or idealization",
|
|
84
|
+
],
|
|
85
|
+
"enhanced": [
|
|
86
|
+
"captured in a candid moment, either unaware of the camera or casually self-aware",
|
|
87
|
+
"hair has natural texture and movement, not perfectly salon-styled",
|
|
88
|
+
"subtle imperfections that make the person immediately feel real and relatable",
|
|
89
|
+
"eyes have natural moisture and light reflections, not digitally perfect catchlights",
|
|
90
|
+
"hands and fingers look natural with visible knuckle creases and subtle veins",
|
|
91
|
+
],
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
LAYER_ENVIRONMENT = {
|
|
95
|
+
"core": [
|
|
96
|
+
"set in a real-world environment, not a generic studio backdrop or green screen",
|
|
97
|
+
"everyday objects naturally present in the scene adding authenticity",
|
|
98
|
+
"lighting is consistent with the physical location and time of day",
|
|
99
|
+
],
|
|
100
|
+
"enhanced": [
|
|
101
|
+
"time of day is coherent with the activity being performed in the scene",
|
|
102
|
+
"background tells a story — a lived-in space with personality and history",
|
|
103
|
+
"environmental details that anchor the scene firmly in reality",
|
|
104
|
+
"natural depth with foreground, midground, and background layers",
|
|
105
|
+
"subtle atmospheric elements like dust motes in light, steam, or air movement",
|
|
106
|
+
],
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def _get_layers_for_level(level: str) -> list[str]:
|
|
111
|
+
"""Seleciona modificadores de camada baseado no nivel de humanizacao."""
|
|
112
|
+
all_layers = [LAYER_DEVICE, LAYER_LIGHTING, LAYER_IMPERFECTION,
|
|
113
|
+
LAYER_AUTHENTICITY, LAYER_ENVIRONMENT]
|
|
114
|
+
|
|
115
|
+
modifiers = []
|
|
116
|
+
for layer in all_layers:
|
|
117
|
+
modifiers.extend(layer["core"])
|
|
118
|
+
if level in ("ultra", "natural"):
|
|
119
|
+
modifiers.extend(layer["enhanced"])
|
|
120
|
+
|
|
121
|
+
return modifiers
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def _detect_shot_type(prompt: str) -> str | None:
|
|
125
|
+
"""Detecta o tipo de enquadramento ideal baseado no prompt."""
|
|
126
|
+
prompt_lower = prompt.lower()
|
|
127
|
+
|
|
128
|
+
shot_hints = {
|
|
129
|
+
"close-up": ["rosto", "face", "retrato", "portrait", "close-up", "detalhe",
|
|
130
|
+
"macro", "olhos", "eyes", "labios"],
|
|
131
|
+
"medium": ["sentado", "sitting", "mesa", "table", "cadeira", "chair",
|
|
132
|
+
"cafe", "coffee", "trabalhando", "working"],
|
|
133
|
+
"wide": ["paisagem", "landscape", "praia", "beach", "montanha", "mountain",
|
|
134
|
+
"cidade", "city", "parque", "park", "rua", "street"],
|
|
135
|
+
"top-down": ["flat lay", "comida", "food", "mesa vista de cima", "overhead",
|
|
136
|
+
"ingredients", "ingredientes"],
|
|
137
|
+
"medium-close": ["selfie", "busto", "conversando", "talking", "explicando"],
|
|
138
|
+
"over-shoulder": ["tela", "screen", "computador", "computer", "notebook",
|
|
139
|
+
"livro", "book", "reading"],
|
|
140
|
+
"pov": ["minha visao", "my view", "perspectiva", "primeira pessoa"],
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
for shot_type, keywords in shot_hints.items():
|
|
144
|
+
if any(kw in prompt_lower for kw in keywords):
|
|
145
|
+
return shot_type
|
|
146
|
+
|
|
147
|
+
return "medium" # default equilibrado
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
# =============================================================================
|
|
151
|
+
# FUNCAO PRINCIPAL DE HUMANIZACAO
|
|
152
|
+
# =============================================================================
|
|
153
|
+
|
|
154
|
+
def humanize_prompt(
|
|
155
|
+
user_prompt: str,
|
|
156
|
+
mode: str = DEFAULT_MODE,
|
|
157
|
+
humanization: str = DEFAULT_HUMANIZATION,
|
|
158
|
+
lighting: str | None = DEFAULT_LIGHTING,
|
|
159
|
+
template_context: str | None = None,
|
|
160
|
+
shot_type: str | None = None,
|
|
161
|
+
resolution: str | None = None,
|
|
162
|
+
) -> str:
|
|
163
|
+
"""
|
|
164
|
+
Transforma o prompt do usuario em um prompt humanizado completo.
|
|
165
|
+
|
|
166
|
+
Usa a abordagem narrativa recomendada pela Google:
|
|
167
|
+
paragrafos descritivos > listas de keywords.
|
|
168
|
+
"""
|
|
169
|
+
# Auto-detectar shot type se nao fornecido
|
|
170
|
+
if not shot_type:
|
|
171
|
+
shot_type = _detect_shot_type(user_prompt)
|
|
172
|
+
|
|
173
|
+
# ---- Construir prompt narrativo em paragrafos ----
|
|
174
|
+
sections = []
|
|
175
|
+
|
|
176
|
+
# 1. Abertura narrativa principal
|
|
177
|
+
sections.append(
|
|
178
|
+
f"A realistic {shot_type} photograph: {user_prompt}. "
|
|
179
|
+
f"This is an authentic moment captured with a smartphone, "
|
|
180
|
+
f"not a professional studio photograph."
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
# 2. Estilo do modo (influencer/educacional)
|
|
184
|
+
mode_config = MODES.get(mode, MODES[DEFAULT_MODE])
|
|
185
|
+
style_narrative = " ".join(mode_config["base_style"])
|
|
186
|
+
sections.append(style_narrative)
|
|
187
|
+
|
|
188
|
+
# 3. Camadas de humanizacao como narrativa coesa
|
|
189
|
+
layer_mods = _get_layers_for_level(humanization)
|
|
190
|
+
# Agrupar em frases fluidas em vez de lista
|
|
191
|
+
if len(layer_mods) > 6:
|
|
192
|
+
# Dividir em dois paragrafos
|
|
193
|
+
mid = len(layer_mods) // 2
|
|
194
|
+
sections.append(". ".join(layer_mods[:mid]))
|
|
195
|
+
sections.append(". ".join(layer_mods[mid:]))
|
|
196
|
+
else:
|
|
197
|
+
sections.append(". ".join(layer_mods))
|
|
198
|
+
|
|
199
|
+
# 4. Modificadores do nivel de humanizacao
|
|
200
|
+
level_config = HUMANIZATION_LEVELS.get(humanization, HUMANIZATION_LEVELS[DEFAULT_HUMANIZATION])
|
|
201
|
+
sections.append(". ".join(level_config["modifiers"]))
|
|
202
|
+
|
|
203
|
+
# 5. Iluminacao
|
|
204
|
+
if lighting and lighting in LIGHTING_OPTIONS:
|
|
205
|
+
light_mods = LIGHTING_OPTIONS[lighting]["modifiers"]
|
|
206
|
+
sections.append(". ".join(light_mods))
|
|
207
|
+
|
|
208
|
+
# 6. Contexto de template
|
|
209
|
+
if template_context:
|
|
210
|
+
sections.append(template_context)
|
|
211
|
+
|
|
212
|
+
# 7. Restricoes (o que evitar) — importante para guiar o modelo
|
|
213
|
+
avoid_narrative = ". ".join(mode_config["avoid"])
|
|
214
|
+
sections.append(avoid_narrative)
|
|
215
|
+
|
|
216
|
+
# 8. Ancora final de realismo
|
|
217
|
+
sections.append(
|
|
218
|
+
"The final image must be completely indistinguishable from a real photograph "
|
|
219
|
+
"taken by a real person with their smartphone in their everyday life. "
|
|
220
|
+
"It should radiate genuine human warmth and authenticity — "
|
|
221
|
+
"never looking artificial, sterile, AI-generated, or like stock photography."
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
# Montar prompt final com paragrafos separados (narrativo, nao lista)
|
|
225
|
+
prompt = "\n\n".join(s.rstrip(".") + "." for s in sections)
|
|
226
|
+
|
|
227
|
+
# Respeitar limite de tokens (480 tokens ~ 1800 chars conservador)
|
|
228
|
+
max_chars = RATE_LIMITS["max_prompt_tokens"] * 4 # ~4 chars por token
|
|
229
|
+
if len(prompt) > max_chars:
|
|
230
|
+
# Versao compacta mantendo o essencial
|
|
231
|
+
compact = [
|
|
232
|
+
f"A realistic {shot_type} photograph: {user_prompt}.",
|
|
233
|
+
" ".join(mode_config["base_style"][:3]) + ".",
|
|
234
|
+
". ".join(layer_mods[:6]) + ".",
|
|
235
|
+
". ".join(level_config["modifiers"][:4]) + ".",
|
|
236
|
+
". ".join(mode_config["avoid"][:3]) + ".",
|
|
237
|
+
"Must look like a real phone photo, genuinely human and authentic.",
|
|
238
|
+
]
|
|
239
|
+
prompt = " ".join(compact)
|
|
240
|
+
|
|
241
|
+
return prompt
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
# =============================================================================
|
|
245
|
+
# ANALISADOR INTELIGENTE DE PROMPT
|
|
246
|
+
# =============================================================================
|
|
247
|
+
|
|
248
|
+
def analyze_prompt(user_prompt: str) -> dict:
|
|
249
|
+
"""
|
|
250
|
+
Analisa o prompt do usuario e sugere configuracoes ideais para cada parametro.
|
|
251
|
+
Retorna um dict completo com todas as sugestoes.
|
|
252
|
+
"""
|
|
253
|
+
prompt_lower = user_prompt.lower()
|
|
254
|
+
|
|
255
|
+
# ---- Detectar modo ----
|
|
256
|
+
edu_keywords = [
|
|
257
|
+
"aula", "curso", "tutorial", "ensino", "treino", "explicar",
|
|
258
|
+
"demonstrar", "passo", "step", "educacao", "teach", "learn",
|
|
259
|
+
"lesson", "workshop", "apresentacao", "presentation", "slide",
|
|
260
|
+
"infografico", "diagram", "how-to", "how to", "como fazer",
|
|
261
|
+
"aprenda", "aprender", "classe", "class", "professor", "teacher",
|
|
262
|
+
"aluno", "student", "quadro", "whiteboard", "lousa",
|
|
263
|
+
]
|
|
264
|
+
mode = "educacional" if any(kw in prompt_lower for kw in edu_keywords) else "influencer"
|
|
265
|
+
|
|
266
|
+
# ---- Detectar formato ----
|
|
267
|
+
format_hints = {
|
|
268
|
+
"stories": ["stories", "story", "reels", "reel", "tiktok", "vertical", "shorts"],
|
|
269
|
+
"widescreen": ["banner", "thumbnail", "youtube", "desktop", "panorama",
|
|
270
|
+
"landscape", "wide", "widescreen", "tv", "cinematico"],
|
|
271
|
+
"ultrawide": ["ultrawide", "panoramico", "cinematico ultra", "21:9"],
|
|
272
|
+
"portrait-45": ["retrato", "portrait", "instagram portrait", "vertical photo"],
|
|
273
|
+
"portrait-23": ["pinterest", "pin", "poster", "cartaz"],
|
|
274
|
+
"portrait-34": ["3:4", "card", "cartao"],
|
|
275
|
+
"square": ["feed", "post", "quadrado", "square", "instagram", "perfil", "profile"],
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
detected_format = "square"
|
|
279
|
+
for fmt, keywords in format_hints.items():
|
|
280
|
+
if any(kw in prompt_lower for kw in keywords):
|
|
281
|
+
detected_format = fmt
|
|
282
|
+
break
|
|
283
|
+
|
|
284
|
+
# ---- Detectar iluminacao ----
|
|
285
|
+
lighting_hints = {
|
|
286
|
+
"morning": ["manha", "morning", "amanhecer", "sunrise", "cafe da manha",
|
|
287
|
+
"breakfast", "early morning"],
|
|
288
|
+
"golden-hour": ["por do sol", "sunset", "golden hour", "entardecer",
|
|
289
|
+
"dourado", "golden", "magic hour"],
|
|
290
|
+
"night": ["noite", "night", "balada", "bar", "restaurante a noite",
|
|
291
|
+
"neon", "club", "evening"],
|
|
292
|
+
"overcast": ["nublado", "overcast", "cloudy", "chuva", "rain", "dia cinza"],
|
|
293
|
+
"indoor": ["escritorio", "office", "casa", "home", "indoor", "sala",
|
|
294
|
+
"quarto", "cozinha", "kitchen", "bedroom", "living room"],
|
|
295
|
+
"midday": ["meio dia", "midday", "noon", "sol forte", "praia", "beach"],
|
|
296
|
+
"blue-hour": ["hora azul", "blue hour", "twilight", "crepusculo"],
|
|
297
|
+
"shade": ["sombra", "shade", "under tree", "debaixo", "coberto"],
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
detected_lighting = None
|
|
301
|
+
for light, keywords in lighting_hints.items():
|
|
302
|
+
if any(kw in prompt_lower for kw in keywords):
|
|
303
|
+
detected_lighting = light
|
|
304
|
+
break
|
|
305
|
+
|
|
306
|
+
# ---- Detectar humanizacao ----
|
|
307
|
+
humanization = "natural"
|
|
308
|
+
if any(kw in prompt_lower for kw in ["ultra real", "super real", "celular velho",
|
|
309
|
+
"raw", "sem filtro", "amateur", "amador"]):
|
|
310
|
+
humanization = "ultra"
|
|
311
|
+
elif any(kw in prompt_lower for kw in ["editorial", "revista", "magazine", "vogue"]):
|
|
312
|
+
humanization = "editorial"
|
|
313
|
+
elif any(kw in prompt_lower for kw in ["polido", "polished", "limpo", "clean",
|
|
314
|
+
"profissional", "professional"]):
|
|
315
|
+
humanization = "polished"
|
|
316
|
+
|
|
317
|
+
# ---- Detectar shot type ----
|
|
318
|
+
shot_type = _detect_shot_type(user_prompt)
|
|
319
|
+
|
|
320
|
+
# ---- Detectar modelo ideal ----
|
|
321
|
+
model = "imagen-4" # default
|
|
322
|
+
if any(kw in prompt_lower for kw in ["texto", "text", "logo", "titulo", "title",
|
|
323
|
+
"4k", "ultra qualidade", "referencia"]):
|
|
324
|
+
model = "gemini-pro-image"
|
|
325
|
+
elif any(kw in prompt_lower for kw in ["rapido", "fast", "batch", "lote", "volume"]):
|
|
326
|
+
model = "imagen-4-fast"
|
|
327
|
+
|
|
328
|
+
# ---- Detectar resolucao ideal ----
|
|
329
|
+
resolution = "1K"
|
|
330
|
+
if any(kw in prompt_lower for kw in ["4k", "ultra hd", "altissima qualidade"]):
|
|
331
|
+
resolution = "4K"
|
|
332
|
+
elif any(kw in prompt_lower for kw in ["2k", "alta qualidade", "hd", "impressao", "print"]):
|
|
333
|
+
resolution = "2K"
|
|
334
|
+
|
|
335
|
+
return {
|
|
336
|
+
"mode": mode,
|
|
337
|
+
"format": detected_format,
|
|
338
|
+
"humanization": humanization,
|
|
339
|
+
"lighting": detected_lighting,
|
|
340
|
+
"shot_type": shot_type,
|
|
341
|
+
"model": model,
|
|
342
|
+
"resolution": resolution,
|
|
343
|
+
"analysis": {
|
|
344
|
+
"is_educational": mode == "educacional",
|
|
345
|
+
"format_reason": f"Detected '{detected_format}' from keywords",
|
|
346
|
+
"lighting_reason": f"{'Auto' if not detected_lighting else detected_lighting}",
|
|
347
|
+
"model_reason": f"{'Default balanced' if model == 'imagen-4' else model}",
|
|
348
|
+
},
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
# =============================================================================
|
|
353
|
+
# HELPER: Resolver aliases de formato
|
|
354
|
+
# =============================================================================
|
|
355
|
+
|
|
356
|
+
def resolve_format(user_input: str) -> str:
|
|
357
|
+
"""Resolve alias de formato para o nome canonico."""
|
|
358
|
+
return FORMAT_ALIASES.get(user_input.lower().strip(), user_input)
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
# =============================================================================
|
|
362
|
+
# CLI
|
|
363
|
+
# =============================================================================
|
|
364
|
+
|
|
365
|
+
def main():
|
|
366
|
+
parser = argparse.ArgumentParser(description="Motor de humanizacao de prompts para imagens")
|
|
367
|
+
parser.add_argument("--prompt", required=True, help="Prompt do usuario")
|
|
368
|
+
parser.add_argument("--mode", default=DEFAULT_MODE, choices=list(MODES.keys()))
|
|
369
|
+
parser.add_argument("--humanization", default=DEFAULT_HUMANIZATION,
|
|
370
|
+
choices=list(HUMANIZATION_LEVELS.keys()))
|
|
371
|
+
parser.add_argument("--lighting", default=None,
|
|
372
|
+
choices=list(LIGHTING_OPTIONS.keys()))
|
|
373
|
+
parser.add_argument("--shot-type", default=None,
|
|
374
|
+
choices=list(SHOT_TYPES.keys()))
|
|
375
|
+
parser.add_argument("--analyze", action="store_true",
|
|
376
|
+
help="Analisa prompt e sugere configuracoes")
|
|
377
|
+
parser.add_argument("--json", action="store_true")
|
|
378
|
+
|
|
379
|
+
args = parser.parse_args()
|
|
380
|
+
|
|
381
|
+
if args.analyze:
|
|
382
|
+
analysis = analyze_prompt(args.prompt)
|
|
383
|
+
if args.json:
|
|
384
|
+
print(json.dumps(analysis, indent=2, ensure_ascii=False))
|
|
385
|
+
else:
|
|
386
|
+
print(f"Modo sugerido: {analysis['mode']}")
|
|
387
|
+
print(f"Formato sugerido: {analysis['format']}")
|
|
388
|
+
print(f"Humanizacao sugerida: {analysis['humanization']}")
|
|
389
|
+
print(f"Iluminacao sugerida: {analysis['lighting'] or 'auto'}")
|
|
390
|
+
print(f"Enquadramento: {analysis['shot_type']}")
|
|
391
|
+
print(f"Modelo sugerido: {analysis['model']}")
|
|
392
|
+
print(f"Resolucao sugerida: {analysis['resolution']}")
|
|
393
|
+
return
|
|
394
|
+
|
|
395
|
+
humanized = humanize_prompt(
|
|
396
|
+
user_prompt=args.prompt,
|
|
397
|
+
mode=args.mode,
|
|
398
|
+
humanization=args.humanization,
|
|
399
|
+
lighting=args.lighting,
|
|
400
|
+
shot_type=args.shot_type,
|
|
401
|
+
)
|
|
402
|
+
|
|
403
|
+
if args.json:
|
|
404
|
+
result = {
|
|
405
|
+
"original_prompt": args.prompt,
|
|
406
|
+
"humanized_prompt": humanized,
|
|
407
|
+
"char_count": len(humanized),
|
|
408
|
+
"estimated_tokens": len(humanized) // 4,
|
|
409
|
+
"settings": {
|
|
410
|
+
"mode": args.mode,
|
|
411
|
+
"humanization": args.humanization,
|
|
412
|
+
"lighting": args.lighting,
|
|
413
|
+
"shot_type": args.shot_type,
|
|
414
|
+
},
|
|
415
|
+
"timestamp": datetime.now().isoformat(),
|
|
416
|
+
}
|
|
417
|
+
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
418
|
+
else:
|
|
419
|
+
print(humanized)
|
|
420
|
+
print(f"\n--- {len(humanized)} chars | ~{len(humanized)//4} tokens ---")
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
if __name__ == "__main__":
|
|
424
|
+
main()
|