@relazio/plugin-sdk 0.1.0 โ 0.1.1
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 +96 -199
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -1,84 +1,30 @@
|
|
|
1
|
-
# Relazio
|
|
1
|
+
# Relazio Plugin SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Official SDK for building external plugins for the Relazio OSINT platform.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@relazio/plugin-sdk)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
**Platform Version**: 2.0.0
|
|
10
|
-
**SDK Status**: ๐ Documentation Phase
|
|
11
|
-
**Target Release**: Q1 2026
|
|
8
|
+
## Overview
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
The Relazio Plugin SDK enables developers to create external plugins that extend the Relazio platform's capabilities. The SDK provides a complete framework for building secure, multi-tenant plugins with minimal boilerplate code.
|
|
14
11
|
|
|
15
|
-
##
|
|
12
|
+
## Features
|
|
16
13
|
|
|
17
|
-
|
|
14
|
+
- **Multi-Tenant Support**: Automatic organization management with isolated configurations
|
|
15
|
+
- **Sync & Async Transforms**: Support for both immediate and long-running operations
|
|
16
|
+
- **Automatic Endpoints**: Built-in `/register`, `/unregister`, and `/manifest.json` endpoints
|
|
17
|
+
- **Security**: HMAC-SHA256 signature generation and validation
|
|
18
|
+
- **Job Management**: Progress tracking and webhook notifications for async operations
|
|
19
|
+
- **TypeScript**: Full type safety and IntelliSense support
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Il sistema plugin esterni della piattaforma รจ **PRODUCTION READY** (Dicembre 2025):
|
|
22
|
-
|
|
23
|
-
- โ
Manifest validation (HTTPS, TLS, Zod)
|
|
24
|
-
- โ
Installation flow completo
|
|
25
|
-
- โ
Webhook system con HMAC-SHA256
|
|
26
|
-
- โ
Job queue con 7 stati
|
|
27
|
-
- โ
Rate limiting (30/min, 500/hour, 2000/day)
|
|
28
|
-
- โ
Timeout enforcement (30 min max)
|
|
29
|
-
- โ
Security completa
|
|
30
|
-
- โ
E2E testing (44 test, 91% pass)
|
|
31
|
-
|
|
32
|
-
### SDK Packages Status
|
|
33
|
-
|
|
34
|
-
- โ
`@relazio/plugin-sdk` - NPM package (TypeScript/JavaScript) - **COMPLETO** โญ
|
|
35
|
-
- โ
Core plugin system
|
|
36
|
-
- โ
Sync & async transforms
|
|
37
|
-
- โ
HMAC signature utilities
|
|
38
|
-
- โ
Job progress tracking
|
|
39
|
-
- โ
Express server integration
|
|
40
|
-
- โ
**Multi-tenant support** (NEW!)
|
|
41
|
-
- [ ] `relazio-plugin-sdk` - PyPI package (Python) - Q1 2026
|
|
42
|
-
- [ ] CLI tool per scaffold plugin - Q1 2026
|
|
43
|
-
- [ ] Mock platform per testing locale - Q2 2026
|
|
44
|
-
- โ
Repository esempi plugin - **4 esempi disponibili**
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## ๐ Documentazione
|
|
49
|
-
|
|
50
|
-
Tutta la documentazione รจ disponibile nella cartella `docs/`:
|
|
51
|
-
|
|
52
|
-
### Per Utenti
|
|
53
|
-
|
|
54
|
-
- **[EXTERNAL_PLUGINS_README.md](docs/EXTERNAL_PLUGINS_README.md)** - Quick start guide per installare e usare plugin esterni
|
|
55
|
-
|
|
56
|
-
### Per Sviluppatori
|
|
57
|
-
|
|
58
|
-
- **[QUICKSTART.md](QUICKSTART.md)** - โญ Quick start per creare plugin (3 righe di codice!)
|
|
59
|
-
- **[SDK.md](docs/SDK.md)** - โญ SDK API reference completa (TypeScript/Python)
|
|
60
|
-
- **[MULTI_TENANT.md](docs/MULTI_TENANT.md)** - Guida multi-tenancy (architettura standard)
|
|
61
|
-
- **[CONFIGURATION.md](docs/CONFIGURATION.md)** - Guida configurazione (string, number, boolean, select)
|
|
62
|
-
- **[EXTERNAL_PLUGINS.md](docs/EXTERNAL_PLUGINS.md)** - Architettura sistema plugin esterni
|
|
63
|
-
- **[EXTERNAL_PLUGINS_FLOW.md](docs/EXTERNAL_PLUGINS_FLOW.md)** - Flussi dettagliati step-by-step
|
|
64
|
-
- **[IMPLEMENTATION_EXTERNAL_PLUGINS.md](docs/IMPLEMENTATION_EXTERNAL_PLUGINS.md)** - Piano implementazione (reference)
|
|
65
|
-
|
|
66
|
-
### Reference
|
|
67
|
-
|
|
68
|
-
- **[EXTERNAL_PLUGINS_COMPLETE.md](docs/EXTERNAL_PLUGINS_COMPLETE.md)** - Riepilogo completo dell'implementazione platform
|
|
69
|
-
- **[PLUGIN_SYSTEM.md](docs/PLUGIN_SYSTEM.md)** - Plugin built-in (reference)
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## ๐ Quick Start
|
|
74
|
-
|
|
75
|
-
### Installazione
|
|
21
|
+
## Installation
|
|
76
22
|
|
|
77
23
|
```bash
|
|
78
24
|
npm install @relazio/plugin-sdk
|
|
79
25
|
```
|
|
80
26
|
|
|
81
|
-
|
|
27
|
+
## Quick Start
|
|
82
28
|
|
|
83
29
|
```typescript
|
|
84
30
|
import { RelazioPlugin } from '@relazio/plugin-sdk';
|
|
@@ -88,11 +34,10 @@ const plugin = new RelazioPlugin({
|
|
|
88
34
|
name: 'My Plugin',
|
|
89
35
|
version: '1.0.0',
|
|
90
36
|
author: 'Your Name',
|
|
91
|
-
description: '
|
|
37
|
+
description: 'Plugin description',
|
|
92
38
|
category: 'network'
|
|
93
39
|
});
|
|
94
40
|
|
|
95
|
-
// Registra transform
|
|
96
41
|
plugin.transform({
|
|
97
42
|
id: 'my-transform',
|
|
98
43
|
name: 'My Transform',
|
|
@@ -100,156 +45,108 @@ plugin.transform({
|
|
|
100
45
|
inputType: 'domain',
|
|
101
46
|
outputTypes: ['ip'],
|
|
102
47
|
|
|
103
|
-
|
|
104
|
-
// input.organizationId contiene l'ID dell'organizzazione
|
|
105
|
-
console.log(`Processing for org: ${input.organizationId}`);
|
|
106
|
-
|
|
48
|
+
async handler(input, config) {
|
|
107
49
|
return {
|
|
108
|
-
entities: [
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
],
|
|
50
|
+
entities: [{
|
|
51
|
+
type: 'ip',
|
|
52
|
+
value: '8.8.8.8',
|
|
53
|
+
label: 'Google DNS'
|
|
54
|
+
}],
|
|
115
55
|
edges: []
|
|
116
56
|
};
|
|
117
57
|
}
|
|
118
58
|
});
|
|
119
59
|
|
|
120
|
-
|
|
121
|
-
plugin.start({
|
|
60
|
+
await plugin.start({
|
|
122
61
|
port: 3000,
|
|
123
|
-
multiTenant: true
|
|
62
|
+
multiTenant: true
|
|
124
63
|
});
|
|
125
64
|
```
|
|
126
65
|
|
|
127
|
-
|
|
128
|
-
- โ
Endpoint `/register` per nuove organizzazioni
|
|
129
|
-
- โ
Generazione automatica webhook secrets
|
|
130
|
-
- โ
Gestione separata per ogni organization
|
|
131
|
-
- โ
Zero configurazione manuale necessaria!
|
|
132
|
-
|
|
133
|
-
### Esempi Completi
|
|
134
|
-
|
|
135
|
-
Vedi la cartella `examples/` per esempi funzionanti:
|
|
136
|
-
- **Email Parser** - Transform sincrona semplice
|
|
137
|
-
- **DNS Toolkit** - Multiple transforms sincrone
|
|
138
|
-
- **Multi-Tenant Plugin** - Transform asincrona con multi-organization
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## ๐ฏ Roadmap
|
|
143
|
-
|
|
144
|
-
### Phase 1: Documentation โ
(Completata - Dicembre 2025)
|
|
145
|
-
- [x] Architecture design
|
|
146
|
-
- [x] SDK API design
|
|
147
|
-
- [x] Flow documentation
|
|
148
|
-
- [x] Security requirements
|
|
149
|
-
- [x] Platform implementation
|
|
150
|
-
|
|
151
|
-
### Phase 2: TypeScript SDK โ
(Completata - Dicembre 2025)
|
|
152
|
-
- [x] Core SDK implementation
|
|
153
|
-
- [x] Manifest generator
|
|
154
|
-
- [x] HMAC signing utilities
|
|
155
|
-
- [x] Webhook handler
|
|
156
|
-
- [x] Job progress tracking
|
|
157
|
-
- [x] Testing utilities
|
|
158
|
-
- [x] Esempi funzionanti
|
|
159
|
-
- [ ] NPM package publication (Q1 2026)
|
|
160
|
-
- [ ] CLI tool (Q1 2026)
|
|
161
|
-
|
|
162
|
-
### Phase 3: Python SDK (Q1 2026)
|
|
163
|
-
- [ ] Core SDK implementation
|
|
164
|
-
- [ ] Manifest generator
|
|
165
|
-
- [ ] HMAC signing utilities
|
|
166
|
-
- [ ] Webhook handler (Flask/FastAPI)
|
|
167
|
-
- [ ] Job progress tracking
|
|
168
|
-
- [ ] Testing utilities
|
|
169
|
-
- [ ] CLI tool
|
|
170
|
-
- [ ] PyPI package publication
|
|
171
|
-
|
|
172
|
-
### Phase 4: Developer Experience (Q2 2026)
|
|
173
|
-
- [ ] Developer portal
|
|
174
|
-
- [ ] Plugin examples repository
|
|
175
|
-
- [ ] Video tutorials
|
|
176
|
-
- [ ] Plugin templates (starter kits)
|
|
177
|
-
- [ ] Testing playground
|
|
178
|
-
- [ ] Plugin marketplace submission
|
|
179
|
-
|
|
180
|
-
---
|
|
181
|
-
|
|
182
|
-
## ๐ Security Requirements
|
|
183
|
-
|
|
184
|
-
### Mandatory (Enforced by Platform)
|
|
185
|
-
|
|
186
|
-
- โ
**HTTPS**: All endpoints must use HTTPS (HTTP rejected)
|
|
187
|
-
- โ
**TLS Valid**: Valid SSL certificate required
|
|
188
|
-
- โ
**HMAC Signature**: All webhooks must be signed with HMAC-SHA256
|
|
189
|
-
- โ
**Rate Limiting**: 30 req/min, 500 req/hour, 2000 req/day
|
|
190
|
-
- โ
**Timeouts**: 30s sync, 5s async response, 30 min job max
|
|
191
|
-
|
|
192
|
-
### SDK Handles
|
|
193
|
-
|
|
194
|
-
- HMAC signature generation
|
|
195
|
-
- Webhook endpoint setup
|
|
196
|
-
- Job progress tracking
|
|
197
|
-
- Error handling
|
|
198
|
-
- Timeout awareness
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
## ๐ฆ Package Structure (Future)
|
|
66
|
+
## Documentation
|
|
203
67
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
68
|
+
- [Examples](./examples/) - Working plugin examples
|
|
69
|
+
- [Changelog](./CHANGELOG.md) - Version history
|
|
70
|
+
|
|
71
|
+
## Multi-Tenant Architecture
|
|
72
|
+
|
|
73
|
+
The SDK automatically handles organization registration and management:
|
|
74
|
+
|
|
75
|
+
1. Platform requests `/register` with organization details
|
|
76
|
+
2. SDK generates unique webhook secret
|
|
77
|
+
3. SDK stores organization configuration
|
|
78
|
+
4. Platform receives webhook secret
|
|
79
|
+
5. Plugin processes requests with organization isolation
|
|
80
|
+
|
|
81
|
+
## Security
|
|
82
|
+
|
|
83
|
+
All plugins must implement the following security requirements:
|
|
84
|
+
|
|
85
|
+
- **HTTPS**: Production endpoints must use HTTPS
|
|
86
|
+
- **HMAC Signatures**: All webhooks are signed with HMAC-SHA256
|
|
87
|
+
- **Rate Limiting**: Enforced by the platform (30 req/min, 500 req/hour)
|
|
88
|
+
- **Timeouts**: 30s for sync transforms, 30 minutes maximum for async jobs
|
|
89
|
+
|
|
90
|
+
## API Reference
|
|
227
91
|
|
|
228
|
-
|
|
92
|
+
### Core Classes
|
|
229
93
|
|
|
230
|
-
|
|
94
|
+
#### RelazioPlugin
|
|
231
95
|
|
|
232
|
-
|
|
96
|
+
Main plugin class that manages transforms and server lifecycle.
|
|
233
97
|
|
|
234
|
-
|
|
98
|
+
```typescript
|
|
99
|
+
const plugin = new RelazioPlugin(config: PluginConfig)
|
|
100
|
+
```
|
|
235
101
|
|
|
236
|
-
|
|
102
|
+
#### Transform Registration
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
// Synchronous transform
|
|
106
|
+
plugin.transform({
|
|
107
|
+
id: string,
|
|
108
|
+
name: string,
|
|
109
|
+
description: string,
|
|
110
|
+
inputType: EntityType,
|
|
111
|
+
outputTypes: EntityType[],
|
|
112
|
+
handler: async (input, config) => TransformResult
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
// Asynchronous transform
|
|
116
|
+
plugin.asyncTransform({
|
|
117
|
+
id: string,
|
|
118
|
+
name: string,
|
|
119
|
+
description: string,
|
|
120
|
+
inputType: EntityType,
|
|
121
|
+
outputTypes: EntityType[],
|
|
122
|
+
handler: async (input, config, job) => TransformResult
|
|
123
|
+
})
|
|
124
|
+
```
|
|
237
125
|
|
|
238
|
-
|
|
126
|
+
#### Server Management
|
|
239
127
|
|
|
240
|
-
|
|
128
|
+
```typescript
|
|
129
|
+
await plugin.start({
|
|
130
|
+
port: number,
|
|
131
|
+
host?: string,
|
|
132
|
+
multiTenant?: boolean,
|
|
133
|
+
https?: { key: string, cert: string }
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
await plugin.stop()
|
|
137
|
+
```
|
|
241
138
|
|
|
242
|
-
##
|
|
139
|
+
## Requirements
|
|
243
140
|
|
|
244
|
-
-
|
|
245
|
-
-
|
|
246
|
-
- **Website**: Coming soon
|
|
247
|
-
- **Discord**: Coming soon
|
|
141
|
+
- Node.js >= 18.0.0
|
|
142
|
+
- TypeScript >= 5.0.0 (for development)
|
|
248
143
|
|
|
249
|
-
|
|
144
|
+
## License
|
|
250
145
|
|
|
251
|
-
|
|
252
|
-
**Platform**: โ
Production Ready (Dicembre 2025)
|
|
253
|
-
**SDK**: ๐ง In Development (Q1 2026)
|
|
146
|
+
MIT License - see [LICENSE](./LICENSE) file for details.
|
|
254
147
|
|
|
148
|
+
## Links
|
|
255
149
|
|
|
150
|
+
- [npm Package](https://www.npmjs.com/package/@relazio/plugin-sdk)
|
|
151
|
+
- [GitHub Repository](https://github.com/relazio/plugin-sdk)
|
|
152
|
+
- [Issue Tracker](https://github.com/relazio/plugin-sdk/issues)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@relazio/plugin-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Official SDK for building external plugins for Relazio",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "https://github.com/relazio/plugin-sdk.git"
|
|
25
|
+
"url": "git+https://github.com/relazio/plugin-sdk.git"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
"dist",
|
|
@@ -49,4 +49,3 @@
|
|
|
49
49
|
"node": ">=18.0.0"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
|