funifier-mcp 0.2.26 → 0.2.27
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/.cursor/rules/funifier.mdc +38 -41
- package/.github/copilot-instructions.md +38 -41
- package/AGENTS.md +56 -49
- package/README.md +40 -22
- package/datasource-funifier-docs/.coverage.json +326 -0
- package/datasource-funifier-docs/.validation.json +593 -0
- package/datasource-funifier-docs/knowledge/guides/aggregates.md +182 -70
- package/datasource-funifier-docs/knowledge/guides/database-access.md +174 -88
- package/datasource-funifier-docs/knowledge/guides/java-entities.md +294 -204
- package/datasource-funifier-docs/knowledge/guides/java-libraries.md +202 -226
- package/datasource-funifier-docs/knowledge/guides/java-managers.md +343 -265
- package/datasource-funifier-docs/knowledge/guides/trigger-examples.md +180 -236
- package/datasource-funifier-docs/knowledge/guides/triggers-guide.md +273 -191
- package/datasource-funifier-docs/knowledge/index.md +4 -1
- package/datasource-funifier-docs/knowledge/modules/achievement.md +1126 -28
- package/datasource-funifier-docs/knowledge/modules/action-log.md +469 -62
- package/datasource-funifier-docs/knowledge/modules/action.md +522 -70
- package/datasource-funifier-docs/knowledge/modules/auth.md +718 -69
- package/datasource-funifier-docs/knowledge/modules/avatar.md +483 -18
- package/datasource-funifier-docs/knowledge/modules/backup.md +603 -25
- package/datasource-funifier-docs/knowledge/modules/challenge.md +1048 -220
- package/datasource-funifier-docs/knowledge/modules/compact.md +469 -26
- package/datasource-funifier-docs/knowledge/modules/competition.md +811 -109
- package/datasource-funifier-docs/knowledge/modules/crossword.md +504 -28
- package/datasource-funifier-docs/knowledge/modules/csv-data.md +645 -20
- package/datasource-funifier-docs/knowledge/modules/custom-object.md +701 -36
- package/datasource-funifier-docs/knowledge/modules/database.md +730 -164
- package/datasource-funifier-docs/knowledge/modules/folder.md +935 -280
- package/datasource-funifier-docs/knowledge/modules/kpi-formulas.md +410 -15
- package/datasource-funifier-docs/knowledge/modules/lastmile.md +568 -29
- package/datasource-funifier-docs/knowledge/modules/leaderboard.md +595 -126
- package/datasource-funifier-docs/knowledge/modules/level.md +536 -54
- package/datasource-funifier-docs/knowledge/modules/lottery.md +809 -76
- package/datasource-funifier-docs/knowledge/modules/marketplace.md +688 -17
- package/datasource-funifier-docs/knowledge/modules/mystery.md +662 -52
- package/datasource-funifier-docs/knowledge/modules/notification.md +564 -26
- package/datasource-funifier-docs/knowledge/modules/patterns.md +519 -814
- package/datasource-funifier-docs/knowledge/modules/player.md +773 -73
- package/datasource-funifier-docs/knowledge/modules/point.md +380 -83
- package/datasource-funifier-docs/knowledge/modules/public.md +508 -178
- package/datasource-funifier-docs/knowledge/modules/question.md +619 -99
- package/datasource-funifier-docs/knowledge/modules/quiz.md +565 -120
- package/datasource-funifier-docs/knowledge/modules/scheduler.md +1092 -39
- package/datasource-funifier-docs/knowledge/modules/security.md +674 -112
- package/datasource-funifier-docs/knowledge/modules/staging.md +742 -19
- package/datasource-funifier-docs/knowledge/modules/story.md +565 -29
- package/datasource-funifier-docs/knowledge/modules/studio-page.md +470 -144
- package/datasource-funifier-docs/knowledge/modules/swap.md +552 -84
- package/datasource-funifier-docs/knowledge/modules/team.md +563 -45
- package/datasource-funifier-docs/knowledge/modules/trigger.md +876 -134
- package/datasource-funifier-docs/knowledge/modules/upload.md +468 -95
- package/datasource-funifier-docs/knowledge/modules/virtual-good.md +510 -63
- package/datasource-funifier-docs/knowledge/modules/webhook.md +375 -28
- package/datasource-funifier-docs/knowledge/modules/websocket.md +459 -26
- package/datasource-funifier-docs/knowledge/modules/widget.md +613 -27
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +42 -1
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/init.test.js +74 -3
- package/dist/cli/init.test.js.map +1 -1
- package/dist/cli/persona.d.ts +3 -0
- package/dist/cli/persona.d.ts.map +1 -0
- package/dist/cli/persona.js +25 -0
- package/dist/cli/persona.js.map +1 -0
- package/dist/mcp/bundle.js +119 -93
- package/dist/mcp/index.js +2 -2
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/resources/documentation.d.ts +1 -1
- package/dist/mcp/resources/documentation.d.ts.map +1 -1
- package/dist/mcp/resources/documentation.js +39 -3
- package/dist/mcp/resources/documentation.js.map +1 -1
- package/dist/mcp/tools/connect.d.ts.map +1 -1
- package/dist/mcp/tools/connect.js +18 -8
- package/dist/mcp/tools/connect.js.map +1 -1
- package/dist/mcp/tools/database.d.ts.map +1 -1
- package/dist/mcp/tools/database.js +59 -47
- package/dist/mcp/tools/database.js.map +1 -1
- package/dist/mcp/tools/database.test.js +2 -2
- package/dist/mcp/tools/database.test.js.map +1 -1
- package/dist/mcp/tools/delete.d.ts.map +1 -1
- package/dist/mcp/tools/delete.js +13 -3
- package/dist/mcp/tools/delete.js.map +1 -1
- package/dist/mcp/tools/execute.d.ts.map +1 -1
- package/dist/mcp/tools/execute.js +20 -9
- package/dist/mcp/tools/execute.js.map +1 -1
- package/dist/mcp/tools/folder.d.ts.map +1 -1
- package/dist/mcp/tools/folder.js +22 -12
- package/dist/mcp/tools/folder.js.map +1 -1
- package/dist/mcp/tools/get.d.ts.map +1 -1
- package/dist/mcp/tools/get.js +16 -6
- package/dist/mcp/tools/get.js.map +1 -1
- package/dist/mcp/tools/index.d.ts +1 -1
- package/dist/mcp/tools/index.d.ts.map +1 -1
- package/dist/mcp/tools/index.js +3 -1
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/mcp/tools/list.d.ts.map +1 -1
- package/dist/mcp/tools/list.js +38 -14
- package/dist/mcp/tools/list.js.map +1 -1
- package/dist/mcp/tools/logs.d.ts.map +1 -1
- package/dist/mcp/tools/logs.js +15 -5
- package/dist/mcp/tools/logs.js.map +1 -1
- package/dist/mcp/tools/save.d.ts.map +1 -1
- package/dist/mcp/tools/save.js +14 -4
- package/dist/mcp/tools/save.js.map +1 -1
- package/dist/mcp/tools/save.test.js +3 -3
- package/dist/mcp/tools/save.test.js.map +1 -1
- package/dist/mcp/tools/search-docs.d.ts +3 -0
- package/dist/mcp/tools/search-docs.d.ts.map +1 -0
- package/dist/mcp/tools/search-docs.js +102 -0
- package/dist/mcp/tools/search-docs.js.map +1 -0
- package/package.json +6 -2
- package/skills/acquire-funifier-knowledge/SKILL.md +132 -0
- package/skills/acquire-funifier-knowledge/assets/templates/CONCERNS.md +25 -0
- package/skills/acquire-funifier-knowledge/assets/templates/CUSTOM_ENDPOINTS.md +24 -0
- package/skills/acquire-funifier-knowledge/assets/templates/CUSTOM_PAGES.md +24 -0
- package/skills/acquire-funifier-knowledge/assets/templates/GAME_MECHANICS.md +35 -0
- package/skills/acquire-funifier-knowledge/assets/templates/INTEGRATIONS.md +35 -0
- package/skills/acquire-funifier-knowledge/assets/templates/LEADERBOARDS.md +24 -0
- package/skills/acquire-funifier-knowledge/assets/templates/OVERVIEW.md +47 -0
- package/skills/acquire-funifier-knowledge/assets/templates/PLAYER_MODEL.md +31 -0
- package/skills/acquire-funifier-knowledge/assets/templates/SCHEDULERS.md +25 -0
- package/skills/acquire-funifier-knowledge/assets/templates/TECHNIQUES_AND_PATTERNS.md +26 -0
- package/skills/acquire-funifier-knowledge/assets/templates/TRIGGERS.md +27 -0
- package/skills/acquire-funifier-knowledge/references/funifier-inventory-checklist.md +81 -0
- package/skills/acquire-funifier-knowledge/references/game-techniques-taxonomy.md +62 -0
- package/skills/acquire-funifier-knowledge/references/mcp-call-patterns.md +118 -0
- package/skills/funifier/SKILL.md +88 -0
- package/skills/funifier/references/configure-security.md +96 -0
- package/skills/{funifier-create-action/SKILL.md → funifier/references/create-action.md} +0 -33
- package/skills/funifier/references/create-aggregate.md +144 -0
- package/skills/funifier/references/create-challenge.md +116 -0
- package/skills/funifier/references/create-competition.md +98 -0
- package/skills/funifier/references/create-crossword.md +574 -0
- package/skills/funifier/references/create-custom-object.md +91 -0
- package/skills/funifier/references/create-custom-page.md +135 -0
- package/skills/funifier/references/create-folder.md +104 -0
- package/skills/funifier/references/create-lastmile.md +643 -0
- package/skills/{funifier-create-leaderboard/SKILL.md → funifier/references/create-leaderboard.md} +0 -33
- package/skills/funifier/references/create-level.md +94 -0
- package/skills/funifier/references/create-lottery.md +913 -0
- package/skills/funifier/references/create-mystery.md +769 -0
- package/skills/funifier/references/create-notification.md +75 -0
- package/skills/{funifier-create-point/SKILL.md → funifier/references/create-point.md} +0 -33
- package/skills/funifier/references/create-quiz.md +98 -0
- package/skills/funifier/references/create-scheduler.md +141 -0
- package/skills/funifier/references/create-story.md +636 -0
- package/skills/funifier/references/create-swap.md +95 -0
- package/skills/{funifier-create-trigger/SKILL.md → funifier/references/create-trigger.md} +0 -33
- package/skills/funifier/references/create-virtual-good.md +96 -0
- package/skills/funifier/references/create-webhook.md +72 -0
- package/skills/funifier/references/create-websocket.md +71 -0
- package/skills/funifier/references/create-widget.md +76 -0
- package/skills/funifier/references/debug.md +87 -0
- package/skills/funifier/references/help.md +81 -0
- package/skills/funifier/references/implement-frontend.md +106 -0
- package/skills/funifier/references/import-csv.md +75 -0
- package/skills/funifier/references/manage-player.md +82 -0
- package/skills/funifier/references/manage-team.md +76 -0
- package/skills/funifier/references/upload-file.md +91 -0
- package/skills/funifier-create-aggregate/SKILL.md +0 -127
- package/skills/funifier-create-challenge/SKILL.md +0 -88
- package/skills/funifier-create-custom-page/SKILL.md +0 -127
- package/skills/funifier-create-level/SKILL.md +0 -87
- package/skills/funifier-create-quiz/SKILL.md +0 -87
- package/skills/funifier-create-scheduler/SKILL.md +0 -127
- package/skills/funifier-create-virtual-good/SKILL.md +0 -87
- package/skills/funifier-debug/SKILL.md +0 -92
- package/skills/funifier-help/SKILL.md +0 -86
- package/skills/funifier-implement-frontend/SKILL.md +0 -90
- package/skills/funifier-index/SKILL.md +0 -58
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# funifier-create-swap
|
|
2
|
+
|
|
3
|
+
Create a Funifier swap — player-to-player trade offers for items or points with counter-proposal support; use when enabling peer trading or social exchange mechanics, not when a standard virtual good store purchase is sufficient
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Before starting — find relevant docs
|
|
8
|
+
|
|
9
|
+
Run lexical search to load only what you need:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx funifier-mcp search "swap trade exchange offer counter-offer peer social marketplace" --skill funifier-create-swap
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Read only files returned with score > 0.5 (this threshold is printed in the search output).
|
|
16
|
+
|
|
17
|
+
## Primary docs for this skill
|
|
18
|
+
|
|
19
|
+
If search returns insufficient results, read directly:
|
|
20
|
+
|
|
21
|
+
- `datasource-funifier-docs/knowledge/modules/swap.md`
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
### Swap flow
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
Seller creates offer (POST /v3/swap)
|
|
29
|
+
↓
|
|
30
|
+
Buyer acquires (POST /v3/swap/acquire)
|
|
31
|
+
↓
|
|
32
|
+
Seller receives (POST /v3/swap/receive)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Counter-offer flow:**
|
|
36
|
+
```
|
|
37
|
+
Buyer creates counter-offer (POST /v3/swap/counter/offer)
|
|
38
|
+
↓
|
|
39
|
+
Seller accepts (POST /v3/swap/counter/offer/accept)
|
|
40
|
+
↓
|
|
41
|
+
Buyer receives (POST /v3/swap/counter/offer/receive)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Dependências:** items (`type: 2`) e pontos (`type: 0`) devem existir.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Steps
|
|
49
|
+
|
|
50
|
+
### 1. Confirmar dependências
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
funifier_list type=virtual-good search=<item>
|
|
54
|
+
funifier_list type=point search=<coin>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 2. Criar oferta de troca (seller)
|
|
58
|
+
|
|
59
|
+
Seller oferece 1 item em troca de 2 coins:
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"seller": "tom",
|
|
63
|
+
"rewards": [{ "total": 1, "type": 2, "item": "<item_id>" }],
|
|
64
|
+
"requires": [{ "total": 2, "type": 0, "item": "coin" }]
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
POST /v3/swap
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 3. Listar ofertas disponíveis
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
GET /v3/database/swap
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 4. Buyer adquire a oferta
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
POST /v3/swap/acquire { "buyer": "jerry", "swap": "<swap_id>" }
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 5. Seller recebe pagamento
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
POST /v3/swap/receive { "swap": "<swap_id>" }
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 6. (Opcional) Counter-offer
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
POST /v3/swap/counter/offer { "swap": "<swap_id>", "buyer": "jerry", "offer": [{ "total": 1, "type": 0, "item": "coin" }] }
|
|
94
|
+
POST /v3/swap/counter/offer/accept { "offer": "<offer_id>" }
|
|
95
|
+
```
|
|
@@ -1,32 +1,7 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: funifier-create-trigger
|
|
3
|
-
description: Create a Funifier trigger — guided workflow from entity/event selection to Groovy code generation
|
|
4
|
-
---
|
|
5
|
-
|
|
6
1
|
# funifier-create-trigger
|
|
7
2
|
|
|
8
3
|
Create a Funifier trigger — guided workflow from entity/event selection to Groovy code generation
|
|
9
4
|
|
|
10
|
-
## Persona e Qualidade de Código
|
|
11
|
-
|
|
12
|
-
A partir de agora, atue como um **desenvolvedor de software sênior altamente experiente**, especializado em **geração de código limpo, legível e de fácil manutenção**. Suas soluções devem seguir rigorosamente as **boas práticas da indústria**, **padrões de projeto** e **arquiteturas modernas**, sempre **evitando overengineering**.
|
|
13
|
-
|
|
14
|
-
### Ao lidar com qualquer código — seja refatorando ou criando do zero — siga este processo:
|
|
15
|
-
|
|
16
|
-
1. **Analise cuidadosamente o problema ou o código existente.**
|
|
17
|
-
2. **Raciocine passo a passo** antes de escrever qualquer linha de código.
|
|
18
|
-
3. **Identifique problemas (em caso de refatoração) ou requisitos (em caso de código novo).**
|
|
19
|
-
4. **Defina prioridades e estratégias com base em princípios sólidos de engenharia.**
|
|
20
|
-
5. **Justifique tecnicamente cada decisão**, com base em fundamentos como:
|
|
21
|
-
- **SOLID**
|
|
22
|
-
- **DRY (Don't Repeat Yourself)**
|
|
23
|
-
- **KISS (Keep It Simple, Stupid)**
|
|
24
|
-
- **YAGNI (You Aren't Gonna Need It)**
|
|
25
|
-
|
|
26
|
-
Só então prossiga com a implementação.
|
|
27
|
-
|
|
28
|
-
> **Nota:** Os exemplos de código na documentação Funifier são ilustrativos — podem usar nomes de variáveis genéricos ou scripts monolíticos. Sempre melhore-os: use nomes descritivos, extraia métodos especializados para lógicas complexas e mantenha cada função com responsabilidade única.
|
|
29
|
-
|
|
30
5
|
---
|
|
31
6
|
|
|
32
7
|
## Formato do payload (obrigatório)
|
|
@@ -208,11 +183,3 @@ funifier_logs type=trigger id=<_id>
|
|
|
208
183
|
```
|
|
209
184
|
|
|
210
185
|
Confirme que não há erros de compilação ou execução. Se houver, leia o stack trace e corrija o script.
|
|
211
|
-
|
|
212
|
-
## MCP
|
|
213
|
-
|
|
214
|
-
If Funifier MCP tools are available (`funifier_list`, `funifier_save`, `funifier_get`, `funifier_logs`):
|
|
215
|
-
- Use MCP for live server data
|
|
216
|
-
- Use docs for correct patterns and syntax
|
|
217
|
-
- Never learn patterns from existing live resources — docs are authoritative
|
|
218
|
-
- **For any new Funifier task, check `/funifier-index` first** — there may be a skill with the correct enums, examples, and workflow already defined
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# funifier-create-virtual-good
|
|
2
|
+
|
|
3
|
+
Create a Funifier virtual good — catalog items players can purchase with points
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Before starting — find relevant docs
|
|
8
|
+
|
|
9
|
+
Run lexical search to load only what you need:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx funifier-mcp search "virtual good item catalog store purchase marketplace shop" --skill funifier-create-virtual-good
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Read only files returned with score > 0.5 (this threshold is printed in the search output).
|
|
16
|
+
|
|
17
|
+
## Primary docs for this skill
|
|
18
|
+
|
|
19
|
+
If search returns insufficient results, read directly:
|
|
20
|
+
|
|
21
|
+
- `datasource-funifier-docs/knowledge/modules/virtual-good.md`
|
|
22
|
+
- `datasource-funifier-docs/knowledge/modules/point.md`
|
|
23
|
+
|
|
24
|
+
## Steps
|
|
25
|
+
|
|
26
|
+
### Regras críticas
|
|
27
|
+
|
|
28
|
+
- Estrutura em dois níveis: **Catalog** (agrupa itens) → **Item** (produto individual)
|
|
29
|
+
- `requires` define o preço: tipo de ponto (`type: 0`) + quantidade (`total`)
|
|
30
|
+
- `amount: -1` = estoque ilimitado
|
|
31
|
+
- Técnica obrigatória nos itens: `["GT08"]`
|
|
32
|
+
- A moeda de compra (`requires[].item`) deve ser um ponto com técnica GT75 (trocável)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Steps
|
|
37
|
+
|
|
38
|
+
### 1. Confirmar que o ponto (moeda) existe
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
funifier_list type=point search=<coin_category>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Verificar se catálogo/item já existe
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
funifier_list type=virtual-good search=<nome>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 3. Criar o Catálogo (se não existe)
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"_id": "gifts",
|
|
55
|
+
"catalog": "Gifts",
|
|
56
|
+
"extra": {},
|
|
57
|
+
"i18n": {}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
POST /v3/virtualgoods/catalog
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 4. Criar o Item
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"catalogId": "gifts",
|
|
70
|
+
"name": "Electric Bike",
|
|
71
|
+
"description": "A great electric bike",
|
|
72
|
+
"amount": -1,
|
|
73
|
+
"active": true,
|
|
74
|
+
"techniques": ["GT08"],
|
|
75
|
+
"requires": [{ "total": 500, "type": 0, "item": "coin", "operation": 1 }],
|
|
76
|
+
"rewards": [],
|
|
77
|
+
"notifications": [],
|
|
78
|
+
"extra": {},
|
|
79
|
+
"i18n": {}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
funifier_save type=virtual-good payload=<json>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 5. Validar
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
GET /v3/virtualgoods/item
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Para testar uma compra:
|
|
94
|
+
```
|
|
95
|
+
POST /v3/virtualgoods/purchase { "player": "<id>", "item": "<item_id>", "total": 1 }
|
|
96
|
+
```
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# funifier-create-webhook
|
|
2
|
+
|
|
3
|
+
Create a Funifier webhook — push real-time event payloads to external endpoints (BI, CRM, Slack, Teams); use when external systems need event-driven data from Funifier, not when in-app live updates are needed (use websocket)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Before starting — find relevant docs
|
|
8
|
+
|
|
9
|
+
Run lexical search to load only what you need:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx funifier-mcp search "webhook integration external push event outbound realtime" --skill funifier-create-webhook
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Read only files returned with score > 0.5 (this threshold is printed in the search output).
|
|
16
|
+
|
|
17
|
+
## Primary docs for this skill
|
|
18
|
+
|
|
19
|
+
If search returns insufficient results, read directly:
|
|
20
|
+
|
|
21
|
+
- `datasource-funifier-docs/knowledge/modules/webhook.md`
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
### Sobre Webhooks
|
|
26
|
+
|
|
27
|
+
Webhooks enviam payloads HTTP para endpoints externos sempre que eventos ocorrem na gamificação (challenge completado, ponto creditado, etc.). Sem polling — push em tempo real.
|
|
28
|
+
|
|
29
|
+
**Campos principais:**
|
|
30
|
+
- `url`: endpoint externo que receberá o payload
|
|
31
|
+
- `events`: lista dos eventos que disparam o webhook
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Steps
|
|
36
|
+
|
|
37
|
+
### 1. Verificar se já existe
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
funifier_list type=webhook search=<descricao>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 2. Ler a documentação do módulo
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
datasource-funifier-docs/knowledge/modules/webhook.md
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 3. Criar o webhook
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"url": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXX",
|
|
54
|
+
"active": true,
|
|
55
|
+
"events": ["achievement"],
|
|
56
|
+
"extra": {}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
funifier_save type=webhook payload=<json>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 4. Verificar configuração
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
funifier_list type=webhook
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 5. Testar
|
|
71
|
+
|
|
72
|
+
Dispare um evento (ex: log uma ação que gera conquista) e verifique se o endpoint externo recebeu o payload.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# funifier-create-websocket
|
|
2
|
+
|
|
3
|
+
Create a Funifier websocket configuration — real-time bidirectional communication for live competitions, instant player feedback, and chat; use for in-app live updates, not for pushing to external systems (use webhook)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Before starting — find relevant docs
|
|
8
|
+
|
|
9
|
+
Run lexical search to load only what you need:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx funifier-mcp search "websocket realtime live chat competition feedback socket bidirectional" --skill funifier-create-websocket
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Read only files returned with score > 0.5 (this threshold is printed in the search output).
|
|
16
|
+
|
|
17
|
+
## Primary docs for this skill
|
|
18
|
+
|
|
19
|
+
If search returns insufficient results, read directly:
|
|
20
|
+
|
|
21
|
+
- `datasource-funifier-docs/knowledge/modules/websocket.md`
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
### Sobre WebSockets
|
|
26
|
+
|
|
27
|
+
WebSockets permitem comunicação bidirecional em tempo real entre o frontend e o Funifier — sem recarregar a página. Útil para: atualizações de ranking ao vivo, chat durante competições, feedback instantâneo ao completar desafios.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Steps
|
|
32
|
+
|
|
33
|
+
### 1. Verificar se já existe uma configuração
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
funifier_list type=websocket
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 2. Ler a documentação do módulo
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
datasource-funifier-docs/knowledge/modules/websocket.md
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 3. Criar a configuração de WebSocket
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"title": "Live Competition Feed",
|
|
50
|
+
"description": "Real-time updates for active competition",
|
|
51
|
+
"active": true,
|
|
52
|
+
"events": ["achievement", "challenge"],
|
|
53
|
+
"extra": {}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
funifier_save type=websocket payload=<json>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 4. Integrar no frontend
|
|
62
|
+
|
|
63
|
+
Para consumir via JavaScript, use a URL de WebSocket do Funifier e autentique com o Bearer token do jogador. Consulte `datasource-funifier-docs/knowledge/modules/websocket.md` para o protocolo de conexão específico da sua versão.
|
|
64
|
+
|
|
65
|
+
### 5. Validar
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
funifier_list type=websocket
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Conecte um cliente WebSocket e dispare um evento para confirmar que as mensagens chegam em tempo real.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# funifier-create-widget
|
|
2
|
+
|
|
3
|
+
Create a Funifier widget — embeddable visual components (rankings, challenge lists, player status, virtual stores) for integrating gamification displays into existing web systems like intranets, CRMs, or LMS platforms
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Before starting — find relevant docs
|
|
8
|
+
|
|
9
|
+
Run lexical search to load only what you need:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx funifier-mcp search "widget embed visual ranking leaderboard component intranet integration display" --skill funifier-create-widget
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Read only files returned with score > 0.5 (this threshold is printed in the search output).
|
|
16
|
+
|
|
17
|
+
## Primary docs for this skill
|
|
18
|
+
|
|
19
|
+
If search returns insufficient results, read directly:
|
|
20
|
+
|
|
21
|
+
- `datasource-funifier-docs/knowledge/modules/widget.md`
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
### Sobre Widgets
|
|
26
|
+
|
|
27
|
+
Widgets são componentes visuais embutíveis que exibem dados de gamificação em sistemas externos (intranets, CRMs, LMS). Tipos comuns: ranking, lista de desafios, status do jogador, loja virtual.
|
|
28
|
+
|
|
29
|
+
O Studio (`/studio/widget`) fornece um editor visual com preview e gera o código de embed.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Steps
|
|
34
|
+
|
|
35
|
+
### 1. Verificar se já existe
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
funifier_list type=widget search=<nome>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 2. Ler a documentação do módulo
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
datasource-funifier-docs/knowledge/modules/widget.md
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 3. Criar o widget no Studio
|
|
48
|
+
|
|
49
|
+
Use `/studio/widget` para:
|
|
50
|
+
- Selecionar o tipo de widget (ranking, challenge list, player status, store)
|
|
51
|
+
- Configurar os dados a exibir (qual leaderboard, quais challenges, etc.)
|
|
52
|
+
- Personalizar estilo visual (cores, fontes, dimensões)
|
|
53
|
+
- Obter o código de embed (`iframe` ou snippet JS)
|
|
54
|
+
|
|
55
|
+
### 4. Criar via API
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"title": "Top Players Widget",
|
|
60
|
+
"active": true,
|
|
61
|
+
"extra": {}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
funifier_save type=widget payload=<json>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### 5. Embed e validar
|
|
70
|
+
|
|
71
|
+
Cole o código de embed na página destino (intranet, LMS, etc.) e verifique que o widget exibe os dados corretos.
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
funifier_list type=widget
|
|
75
|
+
GET /v3/widget/<_id>
|
|
76
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# funifier-debug
|
|
2
|
+
|
|
3
|
+
Debug a Funifier resource — systematic diagnosis of triggers, schedulers, aggregates, and other Funifier components
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Before starting — find relevant docs
|
|
8
|
+
|
|
9
|
+
Run lexical search to load only what you need:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx funifier-mcp search "debug error log exception timeout groovy stack trace fix" --skill funifier-debug
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Read only files returned with score > 0.5 (this threshold is printed in the search output).
|
|
16
|
+
|
|
17
|
+
## Primary docs for this skill
|
|
18
|
+
|
|
19
|
+
If search returns insufficient results, read directly:
|
|
20
|
+
|
|
21
|
+
- `datasource-funifier-docs/knowledge/guides/java-libraries.md`
|
|
22
|
+
- `datasource-funifier-docs/knowledge/modules/trigger.md`
|
|
23
|
+
- `datasource-funifier-docs/knowledge/guides/triggers-guide.md`
|
|
24
|
+
- `datasource-funifier-docs/knowledge/guides/trigger-examples.md`
|
|
25
|
+
- `datasource-funifier-docs/knowledge/modules/scheduler.md`
|
|
26
|
+
- `datasource-funifier-docs/knowledge/guides/aggregates.md`
|
|
27
|
+
- `datasource-funifier-docs/knowledge/modules/public.md`
|
|
28
|
+
|
|
29
|
+
## Steps
|
|
30
|
+
|
|
31
|
+
### Onde encontrar erros
|
|
32
|
+
|
|
33
|
+
| Tipo de recurso | Ferramenta |
|
|
34
|
+
|---|---|
|
|
35
|
+
| Trigger, Scheduler | `funifier_logs type=trigger id=<_id>` / `funifier_logs type=scheduler id=<_id>` |
|
|
36
|
+
| Challenge, Level, Action | `funifier_get type=<type> id=<_id>` — verificar campos |
|
|
37
|
+
| Aggregate | Testar via `POST /v3/database/<collection>/aggregate` |
|
|
38
|
+
| Frontend auth | Verificar role scope inclui `database` se usar `/v3/database` |
|
|
39
|
+
|
|
40
|
+
### Problemas comuns
|
|
41
|
+
|
|
42
|
+
| Sintoma | Causa provável | Fix |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| Trigger não executa | `active: false` ou entidade/evento errado | Verificar campos com `funifier_get` |
|
|
45
|
+
| Script compila mas não faz nada | Condição de guarda nunca satisfeita | Adicionar `println` para rastrear |
|
|
46
|
+
| `$` em GString não funciona | Groovy interpreta como variável | Use `String.valueOf((char)0x24)` |
|
|
47
|
+
| Challenge não avança | Action não existe ou operator/total errado | `funifier_list type=action search=<id>` |
|
|
48
|
+
| Compra falha sem erro | Saldo insuficiente ou `requires` errado | Checar ponto do jogador: `GET /v3/player/<id>/status` |
|
|
49
|
+
| `/v3/database` retorna vazio | Scope `database` ausente na role | Adicionar `database` ao scope via Security |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Steps
|
|
54
|
+
|
|
55
|
+
### 1. Identificar o tipo de recurso com problema
|
|
56
|
+
|
|
57
|
+
Perguntar: trigger? scheduler? challenge? aggregate? frontend?
|
|
58
|
+
|
|
59
|
+
### 2. Ler os logs (triggers/schedulers)
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
funifier_logs type=trigger id=<_id>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Procure: exception name, stack trace, linha do erro.
|
|
66
|
+
|
|
67
|
+
### 3. Verificar a configuração atual
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
funifier_get type=<type> id=<_id>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Compare com o que a documentação exige.
|
|
74
|
+
|
|
75
|
+
### 4. Isolar o problema
|
|
76
|
+
|
|
77
|
+
- Para scripts Groovy: reduza ao mínimo que reproduz o erro
|
|
78
|
+
- Para challenges: verifique se action e point existem
|
|
79
|
+
- Para frontend: verifique token, scope, e headers
|
|
80
|
+
|
|
81
|
+
### 5. Ler a documentação primária do módulo
|
|
82
|
+
|
|
83
|
+
Leia o arquivo de doc específico para o módulo com problema:
|
|
84
|
+
- Trigger → `datasource-funifier-docs/knowledge/modules/trigger.md` + guides
|
|
85
|
+
- Scheduler → `datasource-funifier-docs/knowledge/modules/scheduler.md`
|
|
86
|
+
- Aggregate → `datasource-funifier-docs/knowledge/guides/aggregates.md`
|
|
87
|
+
- Security/Auth → `datasource-funifier-docs/knowledge/modules/security.md`
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# funifier-help
|
|
2
|
+
|
|
3
|
+
Get help with Funifier — routes to the right documentation or skill based on your question
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Before starting — find relevant docs
|
|
8
|
+
|
|
9
|
+
Run lexical search to load only what you need:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx funifier-mcp search "help documentation guide module question how what funifier" --skill funifier-help
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Read only files returned with score > 0.5 (this threshold is printed in the search output).
|
|
16
|
+
|
|
17
|
+
## Primary docs for this skill
|
|
18
|
+
|
|
19
|
+
If search returns insufficient results, read directly:
|
|
20
|
+
|
|
21
|
+
- `datasource-funifier-docs/knowledge/index.md`
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
### Mapa de skills por objetivo
|
|
26
|
+
|
|
27
|
+
| Quero... | Leia o arquivo |
|
|
28
|
+
|---|---|
|
|
29
|
+
| Criar trigger com Groovy | `references/create-trigger.md` |
|
|
30
|
+
| Criar scheduler/cron job | `references/create-scheduler.md` |
|
|
31
|
+
| Criar aggregate/relatório | `references/create-aggregate.md` |
|
|
32
|
+
| Criar desafio/missão | `references/create-challenge.md` |
|
|
33
|
+
| Criar ação rastreável | `references/create-action.md` |
|
|
34
|
+
| Criar sistema de pontos | `references/create-point.md` |
|
|
35
|
+
| Criar ranking | `references/create-leaderboard.md` |
|
|
36
|
+
| Criar níveis de progressão | `references/create-level.md` |
|
|
37
|
+
| Criar quiz/avaliação | `references/create-quiz.md` |
|
|
38
|
+
| Criar loja virtual | `references/create-virtual-good.md` |
|
|
39
|
+
| Criar página no Studio | `references/create-custom-page.md` |
|
|
40
|
+
| Integrar frontend | `references/implement-frontend.md` |
|
|
41
|
+
| Depurar erro | `references/debug.md` |
|
|
42
|
+
| Cadastrar jogador | `references/manage-player.md` |
|
|
43
|
+
| Criar equipe | `references/manage-team.md` |
|
|
44
|
+
| Criar competição temporária | `references/create-competition.md` |
|
|
45
|
+
| Criar trilha de aprendizagem | `references/create-folder.md` |
|
|
46
|
+
| Criar sorteio | `references/create-lottery.md` |
|
|
47
|
+
| Criar caixa surpresa/roda | `references/create-mystery.md` |
|
|
48
|
+
| Criar história interativa | `references/create-story.md` |
|
|
49
|
+
| Criar palavra cruzada | `references/create-crossword.md` |
|
|
50
|
+
| Configurar notificação | `references/create-notification.md` |
|
|
51
|
+
| Configurar última milha | `references/create-lastmile.md` |
|
|
52
|
+
| Integrar webhook externo | `references/create-webhook.md` |
|
|
53
|
+
| Comunicação em tempo real | `references/create-websocket.md` |
|
|
54
|
+
| Criar widget embutível | `references/create-widget.md` |
|
|
55
|
+
| Trocar itens entre jogadores | `references/create-swap.md` |
|
|
56
|
+
| Criar coleção customizada | `references/create-custom-object.md` |
|
|
57
|
+
| Configurar segurança/tokens | `references/configure-security.md` |
|
|
58
|
+
| Importar/exportar CSV | `references/import-csv.md` |
|
|
59
|
+
| Fazer upload de arquivo | `references/upload-file.md` |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Steps
|
|
64
|
+
|
|
65
|
+
### 1. Entender o objetivo do usuário
|
|
66
|
+
|
|
67
|
+
Perguntar: o que você está tentando fazer na gamificação?
|
|
68
|
+
|
|
69
|
+
### 2. Consultar a documentação de índice
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
datasource-funifier-docs/knowledge/index.md
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 3. Redirecionar para a skill correta
|
|
76
|
+
|
|
77
|
+
Baseado na tabela acima, instrua o usuário a usar a skill específica.
|
|
78
|
+
|
|
79
|
+
### 4. Se não encontrar skill específica
|
|
80
|
+
|
|
81
|
+
Consulte `datasource-funifier-docs/knowledge/index.md` e leia o módulo relevante diretamente.
|