giliarde-dsh-bots 0.0.0-stage → 1.2.0

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/AUTHORS.md ADDED
@@ -0,0 +1,6 @@
1
+ # Autoria
2
+
3
+ - **Giliarde** — criador e mantenedor do DSH Bots.
4
+
5
+ Pacote: `giliarde-dsh-bots` (build público) / `@local/dsh-bots` (instalação local).
6
+ Licença MIT.
package/INSTALACAO.md ADDED
@@ -0,0 +1,49 @@
1
+ # Instalação
2
+
3
+ Criado por **Giliarde**.
4
+
5
+ ## Requisitos
6
+
7
+ - DSH `>= 0.2.1-rc.2`
8
+ - Node.js 22.19+ ou 24+
9
+ - Linux com X11 apenas se for usar computador: `Xtigervnc`, XFCE, `xdotool`, `xwd`, ImageMagick e Chrome/Chromium.
10
+
11
+ ## Instalar via npm
12
+
13
+ ```sh
14
+ dsh plugin --profile web add giliarde-dsh-bots
15
+ ```
16
+
17
+ Reinicie o DSH, abra **Plugins** e ative `include:bots` se necessário.
18
+
19
+ ## Instalar via tarball
20
+
21
+ ```sh
22
+ dsh plugin --profile web add /caminho/giliarde-dsh-bots-1.2.0.tgz
23
+ ```
24
+
25
+ Ou use o Plugin Manager → instalar bundle → selecionar o `.tgz`.
26
+
27
+ ## Configuração
28
+
29
+ O padrão grava em `~/.dsh/bots`. Para mudar, no patch do perfil:
30
+
31
+ ```yaml
32
+ - id: bots
33
+ config:
34
+ dataRoot: /caminho/dados
35
+ display: ":99" # opcional
36
+ browserCommand: "google-chrome --no-sandbox"
37
+ ```
38
+
39
+ ## Remover
40
+
41
+ ```sh
42
+ dsh plugin --profile web remove giliarde-dsh-bots
43
+ ```
44
+
45
+ Dados em `~/.dsh/bots` não são removidos automaticamente.
46
+
47
+ ## Segurança
48
+
49
+ Bots executam shell e podem controlar o X11. Instale apenas em máquina confiável.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Giliarde
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,83 @@
1
- # Temporary Holding Version
1
+ # DSH Bots
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Criado por **Giliarde**.
4
+
5
+ Painel **Bots** na sidebar do DSH (acessível em qualquer sessão, inclusive Creator
6
+ Mode). Cada bot é um agente próprio do plugin
7
+ (loop de tool-calling sobre `ctx.llm`), com personalidade, memória, ferramentas,
8
+ workspace compartilhado e, opcionalmente, controle do desktop X11 real servido
9
+ por `Xtigervnc + XFCE`.
10
+
11
+ Guia de instalação: [INSTALACAO.md](INSTALACAO.md).
12
+
13
+ Recursos principais:
14
+
15
+ - chat 1:1 e grupos com `@Nome` (menu ao clicar em `@`); no 1:1 o bot principal consulta o mencionado e relata a resposta; anexos de arquivos/imagens, botão de parar resposta por bot e exclusão de grupo;
16
+ - **rede de bots**: mensagens diretas entre bots fora de grupos (`send_bot_message`),
17
+ com aba **Rede** para acompanhar;
18
+ - **bot gestor**: pode criar novos bots (`create_bot`) e conversar com eles;
19
+ - **rotinas**: tarefas agendadas por bot (todo dia, dias da semana, intervalo ou data única);
20
+ - **desktop sob demanda**: o X11 só liga quando um bot usa o computador e desliga sozinho
21
+ após 2 minutos ocioso (ou pelo botão **Ligar desktop**);
22
+ - UI escura estilo estúdio, inspirada no Grok, mantendo o painel na sidebar;
23
+ - copiar/responder mensagem, badge de duração e **Rastreamento** com timeline de modelo/ferramentas;
24
+ - medidor discreto de **janela de contexto** por bot;
25
+ - botão **+** no composer para trocar **modelo**, **esforço de raciocínio** e **acessos** (computador, gestor, acesso total) sem sair do chat.
26
+
27
+ ## Instalação
28
+
29
+ Instale este diretório como bundle no perfil atual pelo Plugin Manager. O patch
30
+ `cordis.patch.yml` insere a linha Host `bots`; o `dsh.client` do `package.json`
31
+ carrega a UI.
32
+
33
+ ### Para outras pessoas
34
+
35
+ Pré-requisitos: DSH `>= 0.2.1-rc.2`, Linux com X11, `Xtigervnc`, XFCE,
36
+ `xdotool`, `xwd`, ImageMagick `convert` e um Chrome/Chromium. O desktop é
37
+ opcional: sem ele o painel, chats, grupos, rede e rotinas funcionam.
38
+
39
+ Opção A — tarball (sem registry):
40
+
41
+ 1. Gere o pacote com `npm run build:public` (cria `dist/giliarde-dsh-bots-1.2.0.tgz`).
42
+ 2. Envie o `.tgz`.
43
+ 3. No DSH da outra pessoa: `dsh plugin --profile web add /caminho/giliarde-dsh-bots-1.2.0.tgz`
44
+ ou Plugin Manager → instalar bundle → caminho do `.tgz`.
45
+ 4. Configurar `browserCommand`/`display` só se o desktop for usado.
46
+
47
+ Opção B — npm público (sem escopo):
48
+
49
+ 1. Crie conta em npmjs.com e rode `npm login`.
50
+ 2. `npm publish ./dist/giliarde-dsh-bots-1.2.0.tgz --access public`.
51
+ 3. Outra pessoa instala com `dsh plugin --profile web add giliarde-dsh-bots`.
52
+
53
+ O pacote não contém dados de bots, prints ou credenciais; tudo fica em
54
+ `~/.dsh/bots` na máquina que roda o DSH. Não instale em máquina não confiável:
55
+ bots podem executar shell e controlar o X11.
56
+
57
+ ## Autor
58
+
59
+ **Giliarde** — criador e mantenedor. O nome está em `package.json`, `LICENSE`,
60
+ `AUTHORS.md` e no README do pacote.
61
+
62
+ ## Dados
63
+
64
+ Tudo fica em `~/.dsh/bots`:
65
+
66
+ - `state.json` — bots, grupos, mensagens, rotinas, rede inter-bot, auditoria, ações;
67
+ - `artifacts/` — prints antes/depois para replay;
68
+ - `workspaces/shared` — diretório compartilhado por todos os bots (para colaboração).
69
+
70
+ ## Desktop
71
+
72
+ O desktop é **sob demanda**: abre quando um bot adquire o lock do computador e
73
+ fecha após 120 s sem uso. Também pode ser ligado manualmente na aba **Desktop**.
74
+ O plugin usa um X11 gerenciado (`Xtigervnc` + `startxfce4` + D-Bus da sessão).
75
+ Se `display` estiver configurado, ele se anexa a esse `DISPLAY`. O mouse/teclado
76
+ são enviados por `xdotool`; a tela é capturada por `xwd` + ImageMagick. O Chrome
77
+ é `browserCommand`, depois `DSH_BOTS_BROWSER`/`CHROME_PATH`, o Chrome do OpenClaw
78
+ em `~/.openclaw/...` quando existir, ou `google-chrome`.
79
+
80
+ ## API
81
+
82
+ Rotas autenticadas pelo cookie do DSH em `/bots-api`; eventos em
83
+ `/bots-api/events` (SSE) e `/bots-api/desktop/stream` (SSE de frames).