Este projeto não aceita código que apenas "rode". Ele deve ser explicável, testável, observável, versionável e antifrágil.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title": "Pipeline de Jobs Assíncronos de Áudio com Supabase (Jobs Table + Edge Functions + EvolutionAPI + Webhook de Status)", | |
| "goal": "Implementar um sistema de filas assíncronas para processamento de áudio (transcrição e TTS) usando apenas recursos do Supabase (tabela de jobs, triggers, pg_net, pg_cron, Edge Functions) + integração com EvolutionAPI e webhook externo para status do job.", | |
| "context": { | |
| "environment": { | |
| "platform": "Supabase (Postgres + pg_net + pg_cron + Edge Functions)", | |
| "language": "TypeScript / Deno", | |
| "backend": "Node.js/TypeScript com EvolutionAPI", | |
| "storage": "Supabase Storage" | |
| }, |
Contexto
Você é um agente de codificação encarregado de inferir tipos semânticos atômicos a partir de código TypeScript existente que hoje usa apenas primitivos (boolean, number, string, Date). Não assuma bibliotecas externas instaladas. Seu objetivo é:
- detectar candidatos a tipos semânticos;
- propor nomes canônicos no padrão
dominio.entidade.nome(com ponto); - sugerir regras e validações mínimas;
- gerar artefatos auto-contidos (sem dependências externas);
- listar até 5 novos tipos que ainda não existem no repositório e que valem a pena padronizar.
- listar até 5 novos tipos que ainda não existem no repositório e que valem a pena padronizar, que sejam os mais específicos daquele domínio e/ou entidade.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Verifica se foram passados dois argumentos | |
| if [ "$#" -ne 2 ]; then | |
| echo "Uso: $0 subdominio.com.br porta_servidor" | |
| exit 1 | |
| fi | |
| SUBDOMAIN=$1 | |
| PORT=$2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { MeterProvider, PeriodicExportingMetricReader } from '@opentelemetry/sdk-metrics'; | |
| import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-websocket'; | |
| import WebSocket, { WebSocketServer } from 'ws'; | |
| const metricExporter = new OTLPMetricExporter({ | |
| url: 'ws://localhost:4318/v1/metrics', | |
| }); | |
| const meterProvider = new MeterProvider({ | |
| readers: [new PeriodicExportingMetricReader({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| import requests | |
| import sys | |
| def get_binance_data(symbol, interval): | |
| url = f"https://api.binance.com/api/v1/klines?symbol={symbol}&interval={interval}" | |
| try: | |
| response = requests.get(url) | |
| response.raise_for_status() | |
| data = response.json() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "math" | |
| "net/http" | |
| "strconv" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -export([uptime/0, uptime/1, uptime_string/0]). | |
| %% @doc uptime in native time units | |
| uptime() -> | |
| erlang:monotonic_time() - erlang:system_info(start_time). | |
| %% @doc uptime in specified time units | |
| uptime(Unit) -> | |
| erlang:convert_time_unit(uptime(), native, Unit). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Closure | |
| (function() { | |
| /** | |
| * Decimal adjustment of a number. | |
| * | |
| * @param {String} type The type of adjustment. | |
| * @param {Number} value The number. | |
| * @param {Integer} exp The exponent (the 10 logarithm of the adjustment base). | |
| * @returns {Number} The adjusted value. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function trampoline(f) { | |
| return function trampolined(...args) { | |
| let result = f.bind(null, ...args); | |
| while (typeof result === 'function') result = result(); | |
| return result; | |
| }; | |
| } |
NewerOlder