-
Notifications
You must be signed in to change notification settings - Fork 54
Add chatbot CLI/web server and analista-processual squad #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
felippepestana
wants to merge
22
commits into
SynkraAI:feat/add-deep-research-squad
Choose a base branch
from
felippepestana:claude/analista-processual-9YFif
base: feat/add-deep-research-squad
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
0f468d2
Merge pull request #6 from SynkraAI/feat/add-deep-research-squad
oalanicolas 019235f
feat: add Apex Squad — frontend ultra-premium (15 agents, 84 tasks, 7…
gamagab-code f1258d1
docs: add demo app + session log as real use case for Apex Squad
gamagab-code ced7100
Merge pull request #7 from gamagab-code/feat/add-apex-squad
oalanicolas 2247fc7
feat: add local-deploy (dl) setup script and documentation
claude 1014a78
feat: add AIOX chatbot CLI com streaming, Files API e 73 agentes
claude 34286a8
feat(chatbot): add mobile-first web UI with SSE streaming chat
claude efafa9f
Merge pull request #1 from felippepestana/claude/setup-local-deploy-e…
felippepestana 9ec5ff9
Add initial devcontainer configuration
felippepestana 4218693
Merge pull request #2 from felippepestana/patch-1
felippepestana 3ce7fb1
feat: add Analista Processual Squad — análise de processos judiciais …
claude ce16591
feat(analista-processual): add file system, knowledge library and min…
claude 1d87160
fix(analista-processual): clarify CNJ format as identifier only — all…
claude 2a70993
feat: add aiox-master — meta-orchestrator + validate analista-process…
claude d5f883e
feat(analista-processual): adiciona pacote para uso no Perplexity
claude 6cdeb7d
feat(analista-processual): completar squad v1.2.0 — templates, tasks,…
claude 4a80f3a
feat(minds): enriquecer Voice DNA de Cássio Scarpinella Bueno
claude 5b719fd
feat(chatbot): redesenhar UI para layout 3 colunas
claude 0b801f9
feat(deploy): infraestrutura de produção para VPS Hostinger KVM2
claude 22335f7
chore: adicionar deploy/.env ao .gitignore
claude 685acb3
feat(deploy): setup interativo e guia visual detalhado para Hostinger
claude 7f0299c
fix(deploy): corrigir gaps que bloqueavam o deploy de produção
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "image": "mcr.microsoft.com/devcontainers/universal:2", | ||
| "features": {} | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| .DS_Store | ||
| __pycache__/ | ||
| *.pyc | ||
| chatbot/node_modules/ | ||
| chatbot/dist/ | ||
| .env |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| FROM node:22-alpine | ||
|
|
||
| # O build context deve ser a raiz do repositório (aiox-squads-FelippePestana/) | ||
| # docker build -f chatbot/Dockerfile -t aiox-chatbot . | ||
|
|
||
| WORKDIR /app/chatbot | ||
|
|
||
| # Copia package files | ||
| COPY chatbot/package*.json ./ | ||
|
|
||
| # Instala todas as dependências (incluindo devDeps para build) | ||
| RUN npm install | ||
|
|
||
| # Copia source TypeScript e configs | ||
| COPY chatbot/tsconfig.json ./ | ||
| COPY chatbot/src/ ./src/ | ||
|
|
||
| # Compila TypeScript | ||
| RUN npx tsc && npm prune --omit=dev | ||
|
|
||
| # Copia squads para o path correto (../../squads a partir de dist/) | ||
| COPY squads/ /app/squads/ | ||
|
|
||
| EXPOSE 3000 | ||
|
|
||
| HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ | ||
| CMD wget -qO- http://localhost:3000/health || exit 1 | ||
|
|
||
| ENV NODE_ENV=production | ||
|
|
||
| CMD ["node", "dist/server.js"] | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # AIOX Squads — Chatbot CLI | ||
|
|
||
| Ambiente de conversação com os agentes do repositório **aiox-squads**. | ||
| Suporta streaming, upload de arquivos (Files API), troca de agente em tempo real e histórico de sessão. | ||
|
|
||
| ## Pré-requisitos | ||
|
|
||
| - Node.js 18+ | ||
| - Chave de API Anthropic (`ANTHROPIC_API_KEY`) | ||
| - Squads instalados em `../squads/` | ||
|
|
||
| ## Início rápido | ||
|
|
||
| ```bash | ||
| # 1. Defina sua API key | ||
| export ANTHROPIC_API_KEY=sk-ant-... | ||
|
|
||
| # 2. Inicie o chatbot | ||
| bash start.sh | ||
| ``` | ||
|
|
||
| Ou manualmente: | ||
|
|
||
| ```bash | ||
| cd chatbot | ||
| npm install | ||
| npm run build | ||
| node dist/index.js | ||
| ``` | ||
|
|
||
| ## Comandos disponíveis | ||
|
|
||
| | Comando | Descrição | | ||
| |---------|-----------| | ||
| | `/help` | Exibe ajuda | | ||
| | `/agent` | Troca de agente (mantém histórico) | | ||
| | `/upload <caminho>` | Envia um arquivo para análise | | ||
| | `/files` | Lista arquivos enviados na sessão | | ||
| | `/reset` | Limpa o histórico da conversa | | ||
| | `/status` | Exibe agente ativo e estatísticas | | ||
| | `/exit` | Encerra o chatbot | | ||
|
|
||
| ## Formatos de arquivo suportados | ||
|
|
||
| `pdf`, `txt`, `md`, `json`, `csv`, `png`, `jpg`, `jpeg`, `webp`, `gif` | ||
|
|
||
| ## Agentes disponíveis | ||
|
|
||
| O chatbot carrega automaticamente todos os agentes encontrados em `../squads/*/agents/*.md`: | ||
|
|
||
| | Squad | Agentes | | ||
| |-------|---------| | ||
| | **apex** | Especialistas em frontend premium (14 agentes) | | ||
| | **curator** | Curadoria e edição de conteúdo (12 agentes) | | ||
| | **deep-research** | Pesquisa acadêmica e investigativa (11 agentes) | | ||
| | **dispatch** | Orquestração e roteamento de tarefas (4 agentes) | | ||
| | **education** | Design instrucional e currículo (16 agentes) | | ||
| | **kaizen** | Melhoria contínua e análise de processos (7 agentes) | | ||
| | **seo** | Otimização para motores de busca (8 agentes) | | ||
| | **squad-creator** | Criação de novos squads (1 agente) | | ||
|
|
||
| ## Exemplo de sessão | ||
|
|
||
| ``` | ||
| AIOX Squads — Agentes disponíveis | ||
| Squad: education | ||
| [9] Education Chief (education-chief) | ||
| [10] Robert Bjork (bjork-engineer) | ||
| ... | ||
|
|
||
| Escolha um agente (número): 9 | ||
|
|
||
| Education Chief ▶ | ||
| Olá! Sou o Education Chief. Posso criar curriculo para qualquer domínio. | ||
| Use *create-course {domínio} para iniciar. | ||
|
|
||
| Você > /upload ./meu-plano.pdf | ||
| ✓ Arquivo enviado: meu-plano.pdf (42.3 KB) | ||
|
|
||
| Você > Analise este plano de curso e sugira melhorias | ||
| Education Chief ▶ | ||
| Com base no PDF enviado, identifiquei... | ||
| ``` | ||
|
|
||
| ## Arquitetura | ||
|
|
||
| ``` | ||
| chatbot/ | ||
| ├── src/ | ||
| │ ├── index.ts — CLI principal (menus, loop de chat, comandos) | ||
| │ ├── agents.ts — Carregador de agentes dos arquivos .md | ||
| │ ├── chat.ts — Sessão de chat com streaming (claude-opus-4-6) | ||
| │ └── files.ts — Upload/download de arquivos via Files API | ||
| ├── dist/ — JavaScript compilado | ||
| ├── start.sh — Script de inicialização | ||
| └── package.json | ||
| ``` | ||
|
|
||
| ## Modelo utilizado | ||
|
|
||
| `claude-opus-4-6` com adaptive thinking (`thinking: {type: "adaptive"}`). |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security: Container runs as root user.
The container runs as root by default, which is a security concern flagged by Trivy. Consider adding a non-root user for production deployments.
🔒 Proposed fix to run as non-root user
📝 Committable suggestion
🧰 Tools
🪛 Trivy (0.69.3)
[error] 1-1: Image user should not be 'root'
Specify at least 1 USER command in Dockerfile with non-root user as argument
Rule: DS-0002
Learn more
(IaC/Dockerfile)
🤖 Prompt for AI Agents