giliarde-dsh-bots 0.0.0-stage → 1.3.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 +6 -0
- package/INSTALACAO.md +49 -0
- package/LICENSE +21 -0
- package/README.md +89 -2
- package/client.js +2315 -0
- package/cordis.patch.yml +14 -0
- package/icon.svg +16 -0
- package/index.js +188 -0
- package/locale/en.json +6 -0
- package/package.json +60 -4
- package/src/agent-runner.js +633 -0
- package/src/api.js +932 -0
- package/src/builtin-tools.js +304 -0
- package/src/desktop.js +773 -0
- package/src/group-runner.js +382 -0
- package/src/policies.js +124 -0
- package/src/routines.js +126 -0
- package/src/store.js +422 -0
- package/src/tools.js +241 -0
- package/src/util.js +179 -0
package/AUTHORS.md
ADDED
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.3.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,90 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DSH Bots
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Criado por **Giliarde**.
|
|
4
|
+
|
|
5
|
+
## Instalação rápida
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
dsh plugin --profile web add giliarde-dsh-bots
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Painel **Bots** na sidebar do DSH (acessível em qualquer sessão, inclusive Creator
|
|
12
|
+
Mode). Cada bot é um agente próprio do plugin
|
|
13
|
+
(loop de tool-calling sobre `ctx.llm`), com personalidade, memória, ferramentas,
|
|
14
|
+
workspace compartilhado e, opcionalmente, controle do desktop X11 real servido
|
|
15
|
+
por `Xtigervnc + XFCE`.
|
|
16
|
+
|
|
17
|
+
Instalação e requisitos estão na seção **Instalação** abaixo.
|
|
18
|
+
|
|
19
|
+
Recursos principais:
|
|
20
|
+
|
|
21
|
+
- 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;
|
|
22
|
+
- **rede de bots**: mensagens diretas entre bots fora de grupos (`send_bot_message`),
|
|
23
|
+
com aba **Rede** para acompanhar;
|
|
24
|
+
- **bot gestor**: pode criar novos bots (`create_bot`) e conversar com eles;
|
|
25
|
+
- **rotinas**: tarefas agendadas por bot (todo dia, dias da semana, intervalo ou data única);
|
|
26
|
+
- **desktop sob demanda**: o X11 só liga quando um bot usa o computador e desliga sozinho
|
|
27
|
+
após 2 minutos ocioso (ou pelo botão **Ligar desktop**);
|
|
28
|
+
- UI escura estilo estúdio, inspirada no Grok, mantendo o painel na sidebar;
|
|
29
|
+
- copiar/responder mensagem, badge de duração e **Rastreamento** com timeline de modelo/ferramentas;
|
|
30
|
+
- **Biblioteca por chat**: imagens, textos e arquivos com filtro, busca, preview ao clicar e download direto;
|
|
31
|
+
- medidor discreto de **janela de contexto** por bot;
|
|
32
|
+
- botão **+** no composer para trocar **modelo**, **esforço de raciocínio** e **acessos** (computador, gestor, acesso total) sem sair do chat.
|
|
33
|
+
|
|
34
|
+
## Instalação
|
|
35
|
+
|
|
36
|
+
Instale este diretório como bundle no perfil atual pelo Plugin Manager. O patch
|
|
37
|
+
`cordis.patch.yml` insere a linha Host `bots`; o `dsh.client` do `package.json`
|
|
38
|
+
carrega a UI.
|
|
39
|
+
|
|
40
|
+
### Para outras pessoas
|
|
41
|
+
|
|
42
|
+
Pré-requisitos: DSH `>= 0.2.1-rc.2`, Linux com X11, `Xtigervnc`, XFCE,
|
|
43
|
+
`xdotool`, `xwd`, ImageMagick `convert` e um Chrome/Chromium. O desktop é
|
|
44
|
+
opcional: sem ele o painel, chats, grupos, rede e rotinas funcionam.
|
|
45
|
+
|
|
46
|
+
Opção A — tarball (sem registry):
|
|
47
|
+
|
|
48
|
+
1. Gere o pacote com `npm run build:public` (cria `dist/giliarde-dsh-bots-1.3.0.tgz`).
|
|
49
|
+
2. Envie o `.tgz`.
|
|
50
|
+
3. No DSH da outra pessoa: `dsh plugin --profile web add /caminho/giliarde-dsh-bots-1.3.0.tgz`
|
|
51
|
+
ou Plugin Manager → instalar bundle → caminho do `.tgz`.
|
|
52
|
+
4. Configurar `browserCommand`/`display` só se o desktop for usado.
|
|
53
|
+
|
|
54
|
+
Opção B — npm público (sem escopo):
|
|
55
|
+
|
|
56
|
+
1. Crie conta em npmjs.com e rode `npm login`.
|
|
57
|
+
2. `npm publish ./dist/giliarde-dsh-bots-1.3.0.tgz --access public`.
|
|
58
|
+
3. Outra pessoa instala com `dsh plugin --profile web add giliarde-dsh-bots`.
|
|
59
|
+
|
|
60
|
+
O pacote não contém dados de bots, prints ou credenciais; tudo fica em
|
|
61
|
+
`~/.dsh/bots` na máquina que roda o DSH. Não instale em máquina não confiável:
|
|
62
|
+
bots podem executar shell e controlar o X11.
|
|
63
|
+
|
|
64
|
+
## Autor
|
|
65
|
+
|
|
66
|
+
**Giliarde** — criador e mantenedor. O nome está em `package.json`, `LICENSE`,
|
|
67
|
+
`AUTHORS.md` e no README do pacote.
|
|
68
|
+
|
|
69
|
+
## Dados
|
|
70
|
+
|
|
71
|
+
Tudo fica em `~/.dsh/bots`:
|
|
72
|
+
|
|
73
|
+
- `state.json` — bots, grupos, mensagens, rotinas, rede inter-bot, auditoria, ações;
|
|
74
|
+
- `artifacts/` — prints antes/depois para replay;
|
|
75
|
+
- `workspaces/shared` — diretório compartilhado por todos os bots (para colaboração).
|
|
76
|
+
|
|
77
|
+
## Desktop
|
|
78
|
+
|
|
79
|
+
O desktop é **sob demanda**: abre quando um bot adquire o lock do computador e
|
|
80
|
+
fecha após 120 s sem uso. Também pode ser ligado manualmente na aba **Desktop**.
|
|
81
|
+
O plugin usa um X11 gerenciado (`Xtigervnc` + `startxfce4` + D-Bus da sessão).
|
|
82
|
+
Se `display` estiver configurado, ele se anexa a esse `DISPLAY`. O mouse/teclado
|
|
83
|
+
são enviados por `xdotool`; a tela é capturada por `xwd` + ImageMagick. O Chrome
|
|
84
|
+
é `browserCommand`, depois `DSH_BOTS_BROWSER`/`CHROME_PATH`, o Chrome do OpenClaw
|
|
85
|
+
em `~/.openclaw/...` quando existir, ou `google-chrome`.
|
|
86
|
+
|
|
87
|
+
## API
|
|
88
|
+
|
|
89
|
+
Rotas autenticadas pelo cookie do DSH em `/bots-api`; eventos em
|
|
90
|
+
`/bots-api/events` (SSE) e `/bots-api/desktop/stream` (SSE de frames).
|