@gaud_erp/paperclip-github-manager 0.4.0 → 1.1.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/README.md +133 -61
- package/dist/manifest.js +159 -68
- package/dist/manifest.js.map +3 -3
- package/dist/ui/index.js +671 -542
- package/dist/ui/index.js.map +4 -4
- package/dist/worker.js +998 -829
- package/dist/worker.js.map +4 -4
- package/package.json +28 -40
- package/src/db/migrations/001_initial.sql +70 -0
package/README.md
CHANGED
|
@@ -1,92 +1,164 @@
|
|
|
1
|
-
#
|
|
1
|
+
# GitHub Manager v2 — Paperclip Plugin
|
|
2
2
|
|
|
3
|
-
Paperclip
|
|
3
|
+
Plugin para o Paperclip que integra repositórios GitHub com sincronização local, PRs vinculados a cards, revisão de código por agentes IA, e knowledge graphs.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Funcionalidades
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
- **
|
|
7
|
+
- **Sync 3 camadas**: webhooks (tempo real), cron 5min (safety net), sync manual completo
|
|
8
|
+
- **PR ↔ Card**: detecção automática de links via branch/título (CARD-123, #456)
|
|
9
|
+
- **Review por agentes**: ferramentas para agentes IA revisarem PRs (diff, comentários inline, veredito)
|
|
10
|
+
- **Quick check**: checklist automático (descrição, testes, arquivos sensíveis)
|
|
11
|
+
- **Graphify**: knowledge graphs de alto nível e por repositório
|
|
12
|
+
- **DB local**: zero chamadas à API GitHub ao renderizar UI — tudo lido do banco
|
|
12
13
|
|
|
13
|
-
##
|
|
14
|
+
## Arquitetura
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
```
|
|
17
|
+
src/
|
|
18
|
+
manifest.ts — declaração de capabilities, slots, tools, agents
|
|
19
|
+
worker.ts — entry point: registra jobs, data/action handlers, webhook
|
|
20
|
+
types.ts — tipos compartilhados
|
|
21
|
+
db/
|
|
22
|
+
migrations/001.sql — tabelas: repos, PRs, issues, links, sync_log
|
|
23
|
+
queries.ts — camada de queries tipada
|
|
24
|
+
sync/
|
|
25
|
+
webhook-handler.ts — processa eventos GitHub (PR, issues)
|
|
26
|
+
incremental-sync.ts — cron 5min: busca atualizações desde último sync
|
|
27
|
+
full-sync.ts — sync manual completo
|
|
28
|
+
link-detector.ts — regex matching para vincular PRs a cards
|
|
29
|
+
github/
|
|
30
|
+
api-client.ts — fetch autenticado com rate-limit awareness
|
|
31
|
+
config.ts — resolução de token (PAT → secret → env)
|
|
32
|
+
review/
|
|
33
|
+
review-tools.ts — 6 ferramentas para agentes: diff, read, comment, submit, list, search
|
|
34
|
+
quick-check.ts — checklist automático de PR
|
|
35
|
+
graphify/
|
|
36
|
+
graph-generator.ts — gera grafos de repositórios e código
|
|
37
|
+
ui/
|
|
38
|
+
index.tsx — re-exports de todos os componentes
|
|
39
|
+
components/ — Settings, Repos, PRs, Graphs, DetailTab, Dashboard, Sidebar
|
|
40
|
+
```
|
|
24
41
|
|
|
25
|
-
|
|
42
|
+
## UI Slots
|
|
43
|
+
|
|
44
|
+
| Slot | Componente | Descrição |
|
|
45
|
+
|------|-----------|-----------|
|
|
46
|
+
| sidebar | GitHubSidebarLink | Link na sidebar principal |
|
|
47
|
+
| sidebarPanel | GitHubSidebarPanel | Painel rápido com contadores |
|
|
48
|
+
| routeSidebar | GitHubRouteSidebar | Navegação entre páginas GitHub |
|
|
49
|
+
| page | GitHubSettingsPage | Token, repos, sync |
|
|
50
|
+
| page | GitHubReposPage | Lista de repositórios |
|
|
51
|
+
| page | GitHubPullRequestsPage | PRs com filtros |
|
|
52
|
+
| page | GitHubGraphsPage | Knowledge graphs |
|
|
53
|
+
| dashboardWidget | GitHubDashboardWidget | Status no dashboard |
|
|
54
|
+
| detailTab | GitHubDetailTab | Tab GitHub dentro de cards |
|
|
55
|
+
| contextMenuItem | GitHubContextMenu | Ação no menu de contexto |
|
|
56
|
+
|
|
57
|
+
## Agent Tools
|
|
58
|
+
|
|
59
|
+
| Tool | Descrição |
|
|
60
|
+
|------|-----------|
|
|
61
|
+
| `github_get_pull_request_diff` | Diff unificado de um PR |
|
|
62
|
+
| `github_read_file_content` | Lê arquivo do repositório |
|
|
63
|
+
| `github_create_review_comment` | Comentário inline no PR |
|
|
64
|
+
| `github_submit_pr_review` | Submete review (approve/request_changes/comment) |
|
|
65
|
+
| `github_list_repositories` | Lista repos rastreados |
|
|
66
|
+
| `github_search_issues` | Busca issues/PRs via GitHub search |
|
|
67
|
+
|
|
68
|
+
## Desenvolvimento
|
|
26
69
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
70
|
+
```bash
|
|
71
|
+
npm install
|
|
72
|
+
npm run dev # watch mode
|
|
73
|
+
npm run build # build de produção
|
|
74
|
+
npm run typecheck # verificação de tipos
|
|
75
|
+
npm test # testes (vitest)
|
|
76
|
+
```
|
|
32
77
|
|
|
33
|
-
|
|
78
|
+
## Release
|
|
34
79
|
|
|
35
|
-
|
|
80
|
+
```bash
|
|
81
|
+
npm run build
|
|
82
|
+
npm pack # gera .tgz
|
|
83
|
+
```
|
|
36
84
|
|
|
37
|
-
|
|
38
|
-
- GitHub PAT saved in **GitHub → Configurações** (or company secret UUID when secret refs are re-enabled)
|
|
39
|
-
- For webhook registration: token scope `admin:repo_hook` on target repos
|
|
85
|
+
## Instalação
|
|
40
86
|
|
|
41
|
-
|
|
87
|
+
### Via UI do Paperclip (recomendado)
|
|
42
88
|
|
|
43
|
-
|
|
89
|
+
1. Acesse sua instância Paperclip (ex: `https://paperclip.gaud.app`)
|
|
90
|
+
2. No menu lateral, clique em **Settings** (ícone de engrenagem)
|
|
91
|
+
3. Navegue até a seção **Plugins**
|
|
92
|
+
4. Clique em **Install Plugin**
|
|
93
|
+
5. Informe o nome do pacote npm: `@gaud_erp/paperclip-github-manager`
|
|
94
|
+
6. Aguarde a instalação — o status mudará para **Ready**
|
|
95
|
+
7. O plugin aparecerá na lista com as 6 tools e o job de sync registrados
|
|
44
96
|
|
|
45
|
-
|
|
97
|
+
### Via CLI
|
|
46
98
|
|
|
47
99
|
```bash
|
|
48
|
-
npm
|
|
49
|
-
|
|
50
|
-
|
|
100
|
+
# pelo nome do pacote npm
|
|
101
|
+
paperclipai plugin install @gaud_erp/paperclip-github-manager
|
|
102
|
+
|
|
103
|
+
# ou pelo arquivo .tgz local
|
|
104
|
+
paperclipai plugin install ./gaud_erp-paperclip-github-manager-1.0.0.tgz
|
|
51
105
|
```
|
|
52
106
|
|
|
53
|
-
|
|
107
|
+
### Via Dockerfile (deploy automatizado)
|
|
108
|
+
|
|
109
|
+
Para instalar automaticamente durante o deploy (ex: Fly.io), adicione o `.tgz` ao Dockerfile e use o entrypoint para instalar via API após o servidor iniciar:
|
|
54
110
|
|
|
55
|
-
|
|
111
|
+
```dockerfile
|
|
112
|
+
COPY gaud_erp-paperclip-github-manager-1.0.0.tgz /app/plugins/github-manager.tgz
|
|
113
|
+
```
|
|
56
114
|
|
|
57
|
-
|
|
115
|
+
No `entrypoint.sh`, o plugin é extraído e instalado via `POST /api/plugins/install` após o Paperclip estar pronto. Veja o `entrypoint.sh` deste repositório como referência.
|
|
58
116
|
|
|
59
|
-
|
|
60
|
-
2. Criar release no GitHub: tag `v0.3.0` apontando para `main`.
|
|
61
|
-
3. Confirmar: `npm view @gaud_erp/paperclip-github-manager version`
|
|
117
|
+
## Configuração
|
|
62
118
|
|
|
63
|
-
|
|
119
|
+
1. Acesse **GitHub > Configurações** no Paperclip
|
|
120
|
+
2. Configure o Personal Access Token (PAT) ou secret reference
|
|
121
|
+
3. Teste a conexão
|
|
122
|
+
4. Adicione repositórios (formato `owner/repo`)
|
|
123
|
+
5. O sync automático inicia a cada 5 minutos
|
|
64
124
|
|
|
65
|
-
|
|
66
|
-
2. Commit, push `main`
|
|
67
|
-
3. GitHub → **Create release** com tag `vX.Y.Z`
|
|
125
|
+
### Permissões GitHub necessárias (PAT)
|
|
68
126
|
|
|
69
|
-
|
|
127
|
+
- `repo` (acesso completo a repos privados)
|
|
128
|
+
- `read:org` (listar repos da org)
|
|
70
129
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
130
|
+
### Webhook (opcional)
|
|
131
|
+
|
|
132
|
+
Configure um webhook no GitHub apontando para:
|
|
133
|
+
```
|
|
134
|
+
https://<paperclip-host>/plugins/cus.github-manager/webhooks/github-events
|
|
74
135
|
```
|
|
136
|
+
Eventos: `pull_request`, `issues`
|
|
75
137
|
|
|
76
|
-
|
|
138
|
+
## Uso
|
|
77
139
|
|
|
78
|
-
|
|
140
|
+
### Repositórios
|
|
79
141
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
142
|
+
Após configurar o token, acesse **GitHub > Repositórios** para ver a lista de repos rastreados. Use o botão **Sync** para forçar uma sincronização completa. O sync incremental roda automaticamente a cada 5 minutos.
|
|
143
|
+
|
|
144
|
+
### Pull Requests
|
|
145
|
+
|
|
146
|
+
A página **GitHub > Pull Requests** lista todos os PRs sincronizados com filtros por repositório, estado e autor. PRs são vinculados automaticamente a cards do Paperclip quando o branch ou título contém padrões como `CARD-123` ou `#456`.
|
|
147
|
+
|
|
148
|
+
### Review por Agentes
|
|
149
|
+
|
|
150
|
+
O agente **GitHub Code Reviewer** pode revisar PRs usando as 6 tools registradas:
|
|
151
|
+
|
|
152
|
+
1. Atribua um PR a um agente no Paperclip
|
|
153
|
+
2. O agente usa `github_get_pull_request_diff` para obter o diff
|
|
154
|
+
3. Lê arquivos com `github_read_file_content` quando precisa de contexto
|
|
155
|
+
4. Posta comentários inline com `github_create_review_comment`
|
|
156
|
+
5. Finaliza com `github_submit_pr_review` (approve, request changes ou comment)
|
|
157
|
+
|
|
158
|
+
### Dashboard
|
|
85
159
|
|
|
86
|
-
|
|
160
|
+
O widget **GitHub Status** no dashboard mostra contadores de PRs abertos, issues e último sync.
|
|
87
161
|
|
|
88
|
-
|
|
162
|
+
### Detail Tab
|
|
89
163
|
|
|
90
|
-
|
|
91
|
-
- Webhook endpoint: `github-events`
|
|
92
|
-
- Scheduled job: `sync-github` (every 6 hours)
|
|
164
|
+
Dentro de qualquer card do Paperclip, a aba **GitHub** mostra PRs vinculados àquele card com status e links diretos para o GitHub.
|
package/dist/manifest.js
CHANGED
|
@@ -1,113 +1,204 @@
|
|
|
1
|
-
// src/constants.ts
|
|
2
|
-
var ROUTES = {
|
|
3
|
-
repos: "github",
|
|
4
|
-
settings: "github-settings",
|
|
5
|
-
pullRequests: "github-pull-requests"
|
|
6
|
-
};
|
|
7
|
-
|
|
8
1
|
// src/manifest.ts
|
|
9
2
|
var manifest = {
|
|
10
3
|
id: "cus.github-manager",
|
|
4
|
+
version: "1.1.0",
|
|
11
5
|
apiVersion: 1,
|
|
12
|
-
version: "0.4.0",
|
|
13
6
|
displayName: "GitHub Manager",
|
|
14
|
-
description: "
|
|
15
|
-
author: "
|
|
16
|
-
categories: ["connector"],
|
|
7
|
+
description: "Manage GitHub repos, PRs, issues, agent code reviews, and knowledge graphs \u2014 all from Paperclip",
|
|
8
|
+
author: "Gaud ERP",
|
|
9
|
+
categories: ["connector", "automation"],
|
|
17
10
|
capabilities: [
|
|
18
11
|
"events.subscribe",
|
|
12
|
+
"events.emit",
|
|
19
13
|
"http.outbound",
|
|
20
14
|
"secrets.read-ref",
|
|
21
15
|
"plugin.state.read",
|
|
22
16
|
"plugin.state.write",
|
|
23
|
-
"
|
|
17
|
+
"database.namespace.read",
|
|
18
|
+
"database.namespace.write",
|
|
19
|
+
"database.namespace.migrate",
|
|
24
20
|
"jobs.schedule",
|
|
25
21
|
"webhooks.receive",
|
|
26
|
-
"
|
|
22
|
+
"agent.tools.register",
|
|
23
|
+
"agents.managed",
|
|
24
|
+
"agents.invoke",
|
|
25
|
+
"agents.read",
|
|
26
|
+
"issues.read",
|
|
27
|
+
"companies.read",
|
|
28
|
+
"ui.page.register",
|
|
27
29
|
"ui.dashboardWidget.register",
|
|
28
|
-
"ui.
|
|
30
|
+
"ui.sidebar.register",
|
|
31
|
+
"ui.detailTab.register",
|
|
32
|
+
"ui.action.register"
|
|
29
33
|
],
|
|
34
|
+
entrypoints: {
|
|
35
|
+
worker: "./dist/worker.js",
|
|
36
|
+
ui: "./dist/ui"
|
|
37
|
+
},
|
|
38
|
+
database: {
|
|
39
|
+
migrationsDir: "src/db/migrations"
|
|
40
|
+
},
|
|
30
41
|
jobs: [
|
|
31
42
|
{
|
|
32
43
|
jobKey: "sync-github",
|
|
33
|
-
displayName: "Sync GitHub PRs and
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
displayName: "Sync GitHub PRs and Issues",
|
|
45
|
+
schedule: "*/5 * * * *",
|
|
46
|
+
description: "Incremental sync of open PRs and issues for tracked repositories"
|
|
36
47
|
}
|
|
37
48
|
],
|
|
38
49
|
webhooks: [
|
|
39
50
|
{
|
|
40
51
|
endpointKey: "github-events",
|
|
41
|
-
displayName: "GitHub
|
|
42
|
-
description: "Receives
|
|
52
|
+
displayName: "GitHub Events",
|
|
53
|
+
description: "Receives GitHub webhook events (pull_request, issues)"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
tools: [
|
|
57
|
+
{
|
|
58
|
+
name: "github_get_pull_request_diff",
|
|
59
|
+
displayName: "Get PR Diff",
|
|
60
|
+
description: "Retrieve the unified diff of a GitHub pull request",
|
|
61
|
+
parametersSchema: {
|
|
62
|
+
type: "object",
|
|
63
|
+
properties: {
|
|
64
|
+
owner: { type: "string" },
|
|
65
|
+
repo: { type: "string" },
|
|
66
|
+
pull_number: { type: "number" }
|
|
67
|
+
},
|
|
68
|
+
required: ["owner", "repo", "pull_number"]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "github_read_file_content",
|
|
73
|
+
displayName: "Read File",
|
|
74
|
+
description: "Read a file from a GitHub repository",
|
|
75
|
+
parametersSchema: {
|
|
76
|
+
type: "object",
|
|
77
|
+
properties: {
|
|
78
|
+
owner: { type: "string" },
|
|
79
|
+
repo: { type: "string" },
|
|
80
|
+
path: { type: "string" },
|
|
81
|
+
ref: { type: "string" }
|
|
82
|
+
},
|
|
83
|
+
required: ["owner", "repo", "path"]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "github_create_review_comment",
|
|
88
|
+
displayName: "Add Review Comment",
|
|
89
|
+
description: "Post an inline review comment on a pull request",
|
|
90
|
+
parametersSchema: {
|
|
91
|
+
type: "object",
|
|
92
|
+
properties: {
|
|
93
|
+
owner: { type: "string" },
|
|
94
|
+
repo: { type: "string" },
|
|
95
|
+
pull_number: { type: "number" },
|
|
96
|
+
commit_id: { type: "string" },
|
|
97
|
+
path: { type: "string" },
|
|
98
|
+
line: { type: "number" },
|
|
99
|
+
body: { type: "string" }
|
|
100
|
+
},
|
|
101
|
+
required: ["owner", "repo", "pull_number", "commit_id", "path", "line", "body"]
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "github_submit_pr_review",
|
|
106
|
+
displayName: "Submit PR Review",
|
|
107
|
+
description: "Submit a review verdict (approve, request changes, comment)",
|
|
108
|
+
parametersSchema: {
|
|
109
|
+
type: "object",
|
|
110
|
+
properties: {
|
|
111
|
+
owner: { type: "string" },
|
|
112
|
+
repo: { type: "string" },
|
|
113
|
+
pull_number: { type: "number" },
|
|
114
|
+
event: { type: "string", enum: ["APPROVE", "REQUEST_CHANGES", "COMMENT"] },
|
|
115
|
+
body: { type: "string" }
|
|
116
|
+
},
|
|
117
|
+
required: ["owner", "repo", "pull_number", "event", "body"]
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: "github_list_repositories",
|
|
122
|
+
displayName: "List Repositories",
|
|
123
|
+
description: "List all tracked GitHub repositories",
|
|
124
|
+
parametersSchema: { type: "object", properties: {} }
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: "github_search_issues",
|
|
128
|
+
displayName: "Search Issues",
|
|
129
|
+
description: "Search GitHub issues and PRs using search syntax",
|
|
130
|
+
parametersSchema: {
|
|
131
|
+
type: "object",
|
|
132
|
+
properties: {
|
|
133
|
+
query: { type: "string" }
|
|
134
|
+
},
|
|
135
|
+
required: ["query"]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
agents: [
|
|
140
|
+
{
|
|
141
|
+
agentKey: "github-reviewer",
|
|
142
|
+
displayName: "GitHub Code Reviewer",
|
|
143
|
+
role: "code-review",
|
|
144
|
+
title: "Senior Code Reviewer"
|
|
43
145
|
}
|
|
44
146
|
],
|
|
45
|
-
entrypoints: {
|
|
46
|
-
worker: "./dist/worker.js",
|
|
47
|
-
ui: "./dist/ui"
|
|
48
|
-
},
|
|
49
147
|
ui: {
|
|
50
148
|
slots: [
|
|
51
149
|
{
|
|
52
|
-
type: "
|
|
53
|
-
id: "github-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
order: 45
|
|
150
|
+
type: "sidebar",
|
|
151
|
+
id: "github-sidebar",
|
|
152
|
+
exportName: "GitHubSidebarLink",
|
|
153
|
+
displayName: "GitHub"
|
|
57
154
|
},
|
|
58
155
|
{
|
|
59
|
-
type: "
|
|
60
|
-
id: "github-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
order: 45
|
|
156
|
+
type: "page",
|
|
157
|
+
id: "github-settings",
|
|
158
|
+
exportName: "GitHubSettingsPage",
|
|
159
|
+
displayName: "Configura\xE7\xF5es GitHub",
|
|
160
|
+
routePath: "github-settings"
|
|
65
161
|
},
|
|
66
162
|
{
|
|
67
|
-
type: "
|
|
68
|
-
id: "github-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
order: 45
|
|
163
|
+
type: "page",
|
|
164
|
+
id: "github-repos",
|
|
165
|
+
exportName: "GitHubReposPage",
|
|
166
|
+
displayName: "Reposit\xF3rios",
|
|
167
|
+
routePath: "github-repos"
|
|
73
168
|
},
|
|
74
169
|
{
|
|
75
|
-
type: "
|
|
76
|
-
id: "github-prs
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
order: 45
|
|
170
|
+
type: "page",
|
|
171
|
+
id: "github-prs",
|
|
172
|
+
exportName: "GitHubPullRequestsPage",
|
|
173
|
+
displayName: "Pull Requests",
|
|
174
|
+
routePath: "github-prs"
|
|
81
175
|
},
|
|
82
176
|
{
|
|
83
|
-
type: "
|
|
84
|
-
id: "github-
|
|
85
|
-
|
|
86
|
-
|
|
177
|
+
type: "page",
|
|
178
|
+
id: "github-graphs",
|
|
179
|
+
exportName: "GitHubGraphsPage",
|
|
180
|
+
displayName: "Knowledge Graphs",
|
|
181
|
+
routePath: "github-graphs"
|
|
87
182
|
},
|
|
88
183
|
{
|
|
89
|
-
type: "
|
|
90
|
-
id: "github-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
exportName: "GitHubSettingsPage",
|
|
94
|
-
order: 45
|
|
184
|
+
type: "dashboardWidget",
|
|
185
|
+
id: "github-dashboard",
|
|
186
|
+
exportName: "GitHubDashboardWidget",
|
|
187
|
+
displayName: "GitHub Status"
|
|
95
188
|
},
|
|
96
189
|
{
|
|
97
|
-
type: "
|
|
98
|
-
id: "github-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
order: 45
|
|
190
|
+
type: "detailTab",
|
|
191
|
+
id: "github-detail",
|
|
192
|
+
exportName: "GitHubDetailTab",
|
|
193
|
+
displayName: "GitHub",
|
|
194
|
+
entityTypes: ["issue"]
|
|
103
195
|
},
|
|
104
196
|
{
|
|
105
|
-
type: "
|
|
106
|
-
id: "github-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
order: 45
|
|
197
|
+
type: "contextMenuItem",
|
|
198
|
+
id: "github-context-menu",
|
|
199
|
+
exportName: "GitHubContextMenu",
|
|
200
|
+
displayName: "GitHub Actions",
|
|
201
|
+
entityTypes: ["issue"]
|
|
111
202
|
}
|
|
112
203
|
]
|
|
113
204
|
}
|
package/dist/manifest.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";
|
|
3
|
+
"sources": ["../src/manifest.ts"],
|
|
4
|
+
"sourcesContent": ["import type { PaperclipPluginManifestV1 } from \"@paperclipai/plugin-sdk\";\n\nconst manifest: PaperclipPluginManifestV1 = {\n id: \"cus.github-manager\",\n version: \"1.1.0\",\n apiVersion: 1,\n displayName: \"GitHub Manager\",\n description: \"Manage GitHub repos, PRs, issues, agent code reviews, and knowledge graphs \u2014 all from Paperclip\",\n author: \"Gaud ERP\",\n categories: [\"connector\", \"automation\"],\n\n capabilities: [\n \"events.subscribe\",\n \"events.emit\",\n \"http.outbound\",\n \"secrets.read-ref\",\n \"plugin.state.read\",\n \"plugin.state.write\",\n \"database.namespace.read\",\n \"database.namespace.write\",\n \"database.namespace.migrate\",\n \"jobs.schedule\",\n \"webhooks.receive\",\n \"agent.tools.register\",\n \"agents.managed\",\n \"agents.invoke\",\n \"agents.read\",\n \"issues.read\",\n \"companies.read\",\n \"ui.page.register\",\n \"ui.dashboardWidget.register\",\n \"ui.sidebar.register\",\n \"ui.detailTab.register\",\n \"ui.action.register\",\n ],\n\n entrypoints: {\n worker: \"./dist/worker.js\",\n ui: \"./dist/ui\",\n },\n\n database: {\n migrationsDir: \"src/db/migrations\",\n },\n\n jobs: [\n {\n jobKey: \"sync-github\",\n displayName: \"Sync GitHub PRs and Issues\",\n schedule: \"*/5 * * * *\",\n description: \"Incremental sync of open PRs and issues for tracked repositories\",\n },\n ],\n\n webhooks: [\n {\n endpointKey: \"github-events\",\n displayName: \"GitHub Events\",\n description: \"Receives GitHub webhook events (pull_request, issues)\",\n },\n ],\n\n tools: [\n {\n name: \"github_get_pull_request_diff\",\n displayName: \"Get PR Diff\",\n description: \"Retrieve the unified diff of a GitHub pull request\",\n parametersSchema: {\n type: \"object\",\n properties: {\n owner: { type: \"string\" },\n repo: { type: \"string\" },\n pull_number: { type: \"number\" },\n },\n required: [\"owner\", \"repo\", \"pull_number\"],\n },\n },\n {\n name: \"github_read_file_content\",\n displayName: \"Read File\",\n description: \"Read a file from a GitHub repository\",\n parametersSchema: {\n type: \"object\",\n properties: {\n owner: { type: \"string\" },\n repo: { type: \"string\" },\n path: { type: \"string\" },\n ref: { type: \"string\" },\n },\n required: [\"owner\", \"repo\", \"path\"],\n },\n },\n {\n name: \"github_create_review_comment\",\n displayName: \"Add Review Comment\",\n description: \"Post an inline review comment on a pull request\",\n parametersSchema: {\n type: \"object\",\n properties: {\n owner: { type: \"string\" },\n repo: { type: \"string\" },\n pull_number: { type: \"number\" },\n commit_id: { type: \"string\" },\n path: { type: \"string\" },\n line: { type: \"number\" },\n body: { type: \"string\" },\n },\n required: [\"owner\", \"repo\", \"pull_number\", \"commit_id\", \"path\", \"line\", \"body\"],\n },\n },\n {\n name: \"github_submit_pr_review\",\n displayName: \"Submit PR Review\",\n description: \"Submit a review verdict (approve, request changes, comment)\",\n parametersSchema: {\n type: \"object\",\n properties: {\n owner: { type: \"string\" },\n repo: { type: \"string\" },\n pull_number: { type: \"number\" },\n event: { type: \"string\", enum: [\"APPROVE\", \"REQUEST_CHANGES\", \"COMMENT\"] },\n body: { type: \"string\" },\n },\n required: [\"owner\", \"repo\", \"pull_number\", \"event\", \"body\"],\n },\n },\n {\n name: \"github_list_repositories\",\n displayName: \"List Repositories\",\n description: \"List all tracked GitHub repositories\",\n parametersSchema: { type: \"object\", properties: {} },\n },\n {\n name: \"github_search_issues\",\n displayName: \"Search Issues\",\n description: \"Search GitHub issues and PRs using search syntax\",\n parametersSchema: {\n type: \"object\",\n properties: {\n query: { type: \"string\" },\n },\n required: [\"query\"],\n },\n },\n ],\n\n agents: [\n {\n agentKey: \"github-reviewer\",\n displayName: \"GitHub Code Reviewer\",\n role: \"code-review\",\n title: \"Senior Code Reviewer\",\n },\n ],\n\n ui: {\n slots: [\n {\n type: \"sidebar\",\n id: \"github-sidebar\",\n exportName: \"GitHubSidebarLink\",\n displayName: \"GitHub\",\n },\n {\n type: \"page\",\n id: \"github-settings\",\n exportName: \"GitHubSettingsPage\",\n displayName: \"Configura\u00E7\u00F5es GitHub\",\n routePath: \"github-settings\",\n },\n {\n type: \"page\",\n id: \"github-repos\",\n exportName: \"GitHubReposPage\",\n displayName: \"Reposit\u00F3rios\",\n routePath: \"github-repos\",\n },\n {\n type: \"page\",\n id: \"github-prs\",\n exportName: \"GitHubPullRequestsPage\",\n displayName: \"Pull Requests\",\n routePath: \"github-prs\",\n },\n {\n type: \"page\",\n id: \"github-graphs\",\n exportName: \"GitHubGraphsPage\",\n displayName: \"Knowledge Graphs\",\n routePath: \"github-graphs\",\n },\n {\n type: \"dashboardWidget\",\n id: \"github-dashboard\",\n exportName: \"GitHubDashboardWidget\",\n displayName: \"GitHub Status\",\n },\n {\n type: \"detailTab\",\n id: \"github-detail\",\n exportName: \"GitHubDetailTab\",\n displayName: \"GitHub\",\n entityTypes: [\"issue\"],\n },\n {\n type: \"contextMenuItem\",\n id: \"github-context-menu\",\n exportName: \"GitHubContextMenu\",\n displayName: \"GitHub Actions\",\n entityTypes: [\"issue\"],\n },\n ],\n },\n};\n\nexport default manifest;\n"],
|
|
5
|
+
"mappings": ";AAEA,IAAM,WAAsC;AAAA,EAC1C,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,YAAY,CAAC,aAAa,YAAY;AAAA,EAEtC,cAAc;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA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