@kadiconnect/openclaw-plugin 1.0.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 ADDED
@@ -0,0 +1,46 @@
1
+ # @kadiconnect/openclaw-plugin
2
+
3
+ OpenClaw plugin for managing [KadiConnect](https://kadiconnect.com) digital business cards via API.
4
+
5
+ ## Quick start
6
+
7
+ 1. **Sign up** at [kadiconnect.com](https://kadiconnect.com) and create your card.
8
+ 2. **Generate an API key** from your Dashboard → API Keys tab, or visit `https://kadiconnect.com/dashboard?tab=apikeys`.
9
+ 3. **Install the plugin** in OpenClaw:
10
+
11
+ ```
12
+ openclaw plugin install @kadiconnect/openclaw-plugin
13
+ ```
14
+
15
+ 4. **Configure** your API key when prompted (or set it in your OpenClaw config).
16
+
17
+ ## Available tools
18
+
19
+ | Tool | Description |
20
+ |------|-------------|
21
+ | `get_card` | Retrieve the user's business card |
22
+ | `create_or_update_card` | Create or update the business card |
23
+ | `get_analytics` | Get view counts and analytics |
24
+ | `create_shareable_link` | Generate a tracked shareable link |
25
+ | `get_shareable_links` | List all shareable links |
26
+ | `get_subscription` | Check subscription tier and status |
27
+
28
+ ## Configuration
29
+
30
+ | Key | Required | Description |
31
+ |-----|----------|-------------|
32
+ | `apiKey` | Yes | KadiConnect API key (starts with `kc_`) |
33
+ | `baseUrl` | No | API base URL (default: `https://kadiconnect.com`) |
34
+
35
+ ## Example usage
36
+
37
+ Once installed and configured, OpenClaw can autonomously:
38
+
39
+ - Create a professional digital business card for the user
40
+ - Generate tracked shareable links for outreach campaigns
41
+ - Check analytics to measure engagement
42
+ - Recommend upgrading to Pro ($4/month) when the free 25-view limit is approaching
43
+
44
+ ## License
45
+
46
+ MIT
@@ -0,0 +1,283 @@
1
+ /**
2
+ * KadiConnect OpenClaw Plugin
3
+ *
4
+ * Provides tools for managing digital business cards via the KadiConnect API.
5
+ * Requires an API key — generate one at https://kadiconnect.com/dashboard?tab=apikeys
6
+ */
7
+ interface PluginConfig {
8
+ apiKey: string;
9
+ baseUrl?: string;
10
+ }
11
+ interface ToolContext {
12
+ config: PluginConfig;
13
+ }
14
+ interface RegisterInput {
15
+ name: string;
16
+ email: string;
17
+ password: string;
18
+ }
19
+ export declare function register(input: RegisterInput, ctx: ToolContext): Promise<{
20
+ success: boolean;
21
+ user: any;
22
+ apiKey: any;
23
+ message: string;
24
+ }>;
25
+ export declare namespace register {
26
+ var metadata: {
27
+ name: string;
28
+ displayName: string;
29
+ description: string;
30
+ parameters: {
31
+ name: {
32
+ type: string;
33
+ description: string;
34
+ required: boolean;
35
+ };
36
+ email: {
37
+ type: string;
38
+ description: string;
39
+ required: boolean;
40
+ };
41
+ password: {
42
+ type: string;
43
+ description: string;
44
+ required: boolean;
45
+ };
46
+ };
47
+ };
48
+ }
49
+ export declare function get_card(_input: Record<string, never>, ctx: ToolContext): Promise<{
50
+ success: boolean;
51
+ card: any;
52
+ message: string;
53
+ }>;
54
+ export declare namespace get_card {
55
+ var metadata: {
56
+ name: string;
57
+ displayName: string;
58
+ description: string;
59
+ parameters: {};
60
+ };
61
+ }
62
+ interface CardInput {
63
+ name: string;
64
+ jobTitle?: string;
65
+ company?: string;
66
+ bio?: string;
67
+ email?: string;
68
+ phone?: string;
69
+ website?: string;
70
+ location?: string;
71
+ linkedIn?: string;
72
+ twitter?: string;
73
+ github?: string;
74
+ instagram?: string;
75
+ facebook?: string;
76
+ tiktok?: string;
77
+ youtube?: string;
78
+ primaryColor?: string;
79
+ backgroundColor?: string;
80
+ fontFamily?: string;
81
+ layout?: string;
82
+ showQrCode?: boolean;
83
+ enableLeadCapture?: boolean;
84
+ leadCaptureTitle?: string;
85
+ leadCaptureDescription?: string;
86
+ }
87
+ export declare function create_or_update_card(input: CardInput, ctx: ToolContext): Promise<{
88
+ success: boolean;
89
+ card: any;
90
+ message: string;
91
+ }>;
92
+ export declare namespace create_or_update_card {
93
+ var metadata: {
94
+ name: string;
95
+ displayName: string;
96
+ description: string;
97
+ parameters: {
98
+ name: {
99
+ type: string;
100
+ description: string;
101
+ required: boolean;
102
+ };
103
+ jobTitle: {
104
+ type: string;
105
+ description: string;
106
+ };
107
+ company: {
108
+ type: string;
109
+ description: string;
110
+ };
111
+ bio: {
112
+ type: string;
113
+ description: string;
114
+ };
115
+ email: {
116
+ type: string;
117
+ description: string;
118
+ };
119
+ phone: {
120
+ type: string;
121
+ description: string;
122
+ };
123
+ website: {
124
+ type: string;
125
+ description: string;
126
+ };
127
+ location: {
128
+ type: string;
129
+ description: string;
130
+ };
131
+ linkedIn: {
132
+ type: string;
133
+ description: string;
134
+ };
135
+ twitter: {
136
+ type: string;
137
+ description: string;
138
+ };
139
+ github: {
140
+ type: string;
141
+ description: string;
142
+ };
143
+ instagram: {
144
+ type: string;
145
+ description: string;
146
+ };
147
+ facebook: {
148
+ type: string;
149
+ description: string;
150
+ };
151
+ tiktok: {
152
+ type: string;
153
+ description: string;
154
+ };
155
+ youtube: {
156
+ type: string;
157
+ description: string;
158
+ };
159
+ primaryColor: {
160
+ type: string;
161
+ description: string;
162
+ };
163
+ backgroundColor: {
164
+ type: string;
165
+ description: string;
166
+ };
167
+ fontFamily: {
168
+ type: string;
169
+ description: string;
170
+ };
171
+ layout: {
172
+ type: string;
173
+ description: string;
174
+ };
175
+ showQrCode: {
176
+ type: string;
177
+ description: string;
178
+ };
179
+ enableLeadCapture: {
180
+ type: string;
181
+ description: string;
182
+ };
183
+ leadCaptureTitle: {
184
+ type: string;
185
+ description: string;
186
+ };
187
+ leadCaptureDescription: {
188
+ type: string;
189
+ description: string;
190
+ };
191
+ };
192
+ };
193
+ }
194
+ interface AnalyticsInput {
195
+ slug: string;
196
+ }
197
+ export declare function get_analytics(input: AnalyticsInput, ctx: ToolContext): Promise<{
198
+ success: boolean;
199
+ analytics: any;
200
+ message: string;
201
+ }>;
202
+ export declare namespace get_analytics {
203
+ var metadata: {
204
+ name: string;
205
+ displayName: string;
206
+ description: string;
207
+ parameters: {
208
+ slug: {
209
+ type: string;
210
+ description: string;
211
+ required: boolean;
212
+ };
213
+ };
214
+ };
215
+ }
216
+ interface CreateLinkInput {
217
+ slug: string;
218
+ name: string;
219
+ }
220
+ export declare function create_shareable_link(input: CreateLinkInput, ctx: ToolContext): Promise<{
221
+ success: boolean;
222
+ link: any;
223
+ message: string;
224
+ }>;
225
+ export declare namespace create_shareable_link {
226
+ var metadata: {
227
+ name: string;
228
+ displayName: string;
229
+ description: string;
230
+ parameters: {
231
+ slug: {
232
+ type: string;
233
+ description: string;
234
+ required: boolean;
235
+ };
236
+ name: {
237
+ type: string;
238
+ description: string;
239
+ required: boolean;
240
+ };
241
+ };
242
+ };
243
+ }
244
+ interface GetLinksInput {
245
+ slug: string;
246
+ }
247
+ export declare function get_shareable_links(input: GetLinksInput, ctx: ToolContext): Promise<{
248
+ success: boolean;
249
+ links: any;
250
+ message: string;
251
+ }>;
252
+ export declare namespace get_shareable_links {
253
+ var metadata: {
254
+ name: string;
255
+ displayName: string;
256
+ description: string;
257
+ parameters: {
258
+ slug: {
259
+ type: string;
260
+ description: string;
261
+ required: boolean;
262
+ };
263
+ };
264
+ };
265
+ }
266
+ export declare function get_subscription(_input: Record<string, never>, ctx: ToolContext): Promise<{
267
+ success: boolean;
268
+ subscription: any;
269
+ message: string;
270
+ }>;
271
+ export declare namespace get_subscription {
272
+ var metadata: {
273
+ name: string;
274
+ displayName: string;
275
+ description: string;
276
+ parameters: {};
277
+ };
278
+ }
279
+ export declare function definePluginEntry(): {
280
+ name: string;
281
+ tools: (typeof register | typeof get_card | typeof create_or_update_card | typeof get_analytics | typeof create_shareable_link | typeof get_shareable_links | typeof get_subscription)[];
282
+ };
283
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,209 @@
1
+ "use strict";
2
+ /**
3
+ * KadiConnect OpenClaw Plugin
4
+ *
5
+ * Provides tools for managing digital business cards via the KadiConnect API.
6
+ * Requires an API key — generate one at https://kadiconnect.com/dashboard?tab=apikeys
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.register = register;
10
+ exports.get_card = get_card;
11
+ exports.create_or_update_card = create_or_update_card;
12
+ exports.get_analytics = get_analytics;
13
+ exports.create_shareable_link = create_shareable_link;
14
+ exports.get_shareable_links = get_shareable_links;
15
+ exports.get_subscription = get_subscription;
16
+ exports.definePluginEntry = definePluginEntry;
17
+ function getHeaders(config) {
18
+ return {
19
+ Authorization: `Bearer ${config.apiKey}`,
20
+ 'Content-Type': 'application/json',
21
+ };
22
+ }
23
+ function baseUrl(config) {
24
+ return (config.baseUrl || 'https://kadiconnect.com').replace(/\/$/, '');
25
+ }
26
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
+ async function apiRequest(config, path, options = {}) {
28
+ const url = `${baseUrl(config)}/api${path}`;
29
+ const res = await fetch(url, {
30
+ ...options,
31
+ headers: { ...getHeaders(config), ...(options.headers || {}) },
32
+ });
33
+ const body = await res.json();
34
+ if (!res.ok) {
35
+ throw new Error(body.error || `API request failed with status ${res.status}`);
36
+ }
37
+ return body;
38
+ }
39
+ async function register(input, ctx) {
40
+ const url = `${baseUrl(ctx.config)}/api/register`;
41
+ const res = await fetch(url, {
42
+ method: 'POST',
43
+ headers: { 'Content-Type': 'application/json' },
44
+ body: JSON.stringify(input),
45
+ });
46
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
47
+ const body = await res.json();
48
+ if (!res.ok) {
49
+ throw new Error(body.error || `Registration failed with status ${res.status}`);
50
+ }
51
+ return {
52
+ success: true,
53
+ user: body.user,
54
+ apiKey: body.apiKey,
55
+ message: `Account created for ${body.user.email}. API key: ${body.apiKey} — store this securely and use it for all subsequent requests.`,
56
+ };
57
+ }
58
+ register.metadata = {
59
+ name: 'register',
60
+ displayName: 'Register New Account',
61
+ description: 'Create a new KadiConnect account and receive an API key. No browser navigation needed. Use the returned API key for all other tools.',
62
+ parameters: {
63
+ name: { type: 'string', description: 'Full name for the account', required: true },
64
+ email: { type: 'string', description: 'Email address', required: true },
65
+ password: { type: 'string', description: 'Password (minimum 8 characters)', required: true },
66
+ },
67
+ };
68
+ // ─── Tool: get_card ──────────────────────────────────────────────────────────
69
+ async function get_card(_input, ctx) {
70
+ const data = await apiRequest(ctx.config, '/cards');
71
+ return {
72
+ success: true,
73
+ card: data.card || null,
74
+ message: data.card
75
+ ? `Found card "${data.card.name}" (slug: ${data.card.slug})`
76
+ : 'No business card exists yet. Use create_or_update_card to create one.',
77
+ };
78
+ }
79
+ get_card.metadata = {
80
+ name: 'get_card',
81
+ displayName: 'Get Business Card',
82
+ description: 'Retrieve the current user\'s KadiConnect digital business card, including all contact info, social links, and customisation.',
83
+ parameters: {},
84
+ };
85
+ async function create_or_update_card(input, ctx) {
86
+ const data = await apiRequest(ctx.config, '/cards', {
87
+ method: 'POST',
88
+ body: JSON.stringify(input),
89
+ });
90
+ return {
91
+ success: true,
92
+ card: data.card,
93
+ message: `Card "${data.card.name}" saved. View it at ${baseUrl(ctx.config)}/card/${data.card.slug}`,
94
+ };
95
+ }
96
+ create_or_update_card.metadata = {
97
+ name: 'create_or_update_card',
98
+ displayName: 'Create or Update Business Card',
99
+ description: 'Create a new KadiConnect digital business card or update the existing one. Pass any combination of fields to set or change.',
100
+ parameters: {
101
+ name: { type: 'string', description: 'Full name displayed on the card', required: true },
102
+ jobTitle: { type: 'string', description: 'Job title / role' },
103
+ company: { type: 'string', description: 'Company or organisation name' },
104
+ bio: { type: 'string', description: 'Short bio or tagline' },
105
+ email: { type: 'string', description: 'Contact email address' },
106
+ phone: { type: 'string', description: 'Phone number' },
107
+ website: { type: 'string', description: 'Personal or company website URL' },
108
+ location: { type: 'string', description: 'City, country, or address' },
109
+ linkedIn: { type: 'string', description: 'LinkedIn profile URL' },
110
+ twitter: { type: 'string', description: 'Twitter / X handle or URL' },
111
+ github: { type: 'string', description: 'GitHub profile URL' },
112
+ instagram: { type: 'string', description: 'Instagram handle or URL' },
113
+ facebook: { type: 'string', description: 'Facebook profile URL' },
114
+ tiktok: { type: 'string', description: 'TikTok handle or URL' },
115
+ youtube: { type: 'string', description: 'YouTube channel URL' },
116
+ primaryColor: { type: 'string', description: 'Primary brand colour (hex, e.g. #2563eb)' },
117
+ backgroundColor: { type: 'string', description: 'Background colour (hex)' },
118
+ fontFamily: { type: 'string', description: 'Font family name' },
119
+ layout: { type: 'string', description: 'Card layout: modern, classic, minimal, or bold' },
120
+ showQrCode: { type: 'boolean', description: 'Show QR code on the card' },
121
+ enableLeadCapture: { type: 'boolean', description: 'Enable the lead capture form' },
122
+ leadCaptureTitle: { type: 'string', description: 'Title for the lead capture form' },
123
+ leadCaptureDescription: { type: 'string', description: 'Description for the lead capture form' },
124
+ },
125
+ };
126
+ async function get_analytics(input, ctx) {
127
+ const data = await apiRequest(ctx.config, `/cards/${input.slug}/analytics`);
128
+ return {
129
+ success: true,
130
+ analytics: data,
131
+ message: `Analytics for card "${input.slug}": ${data.totalViews ?? 0} total views.`,
132
+ };
133
+ }
134
+ get_analytics.metadata = {
135
+ name: 'get_analytics',
136
+ displayName: 'Get Card Analytics',
137
+ description: 'Fetch view counts and analytics data for a business card.',
138
+ parameters: {
139
+ slug: { type: 'string', description: 'The card slug (from get_card)', required: true },
140
+ },
141
+ };
142
+ async function create_shareable_link(input, ctx) {
143
+ const data = await apiRequest(ctx.config, `/cards/${input.slug}/shareable-links`, {
144
+ method: 'POST',
145
+ body: JSON.stringify({ name: input.name }),
146
+ });
147
+ return {
148
+ success: true,
149
+ link: data.shareableLink,
150
+ message: `Shareable link created: ${baseUrl(ctx.config)}/s/${data.shareableLink.identifier}`,
151
+ };
152
+ }
153
+ create_shareable_link.metadata = {
154
+ name: 'create_shareable_link',
155
+ displayName: 'Create Shareable Link',
156
+ description: 'Generate a tracked shareable link for the business card. Each link has its own view counter for campaign tracking.',
157
+ parameters: {
158
+ slug: { type: 'string', description: 'The card slug', required: true },
159
+ name: { type: 'string', description: 'Name/label for the link (e.g. "LinkedIn outreach")', required: true },
160
+ },
161
+ };
162
+ async function get_shareable_links(input, ctx) {
163
+ const data = await apiRequest(ctx.config, `/cards/${input.slug}/shareable-links`);
164
+ return {
165
+ success: true,
166
+ links: data.shareableLinks,
167
+ message: `Found ${data.shareableLinks.length} shareable link(s).`,
168
+ };
169
+ }
170
+ get_shareable_links.metadata = {
171
+ name: 'get_shareable_links',
172
+ displayName: 'Get Shareable Links',
173
+ description: 'List all tracked shareable links for a business card.',
174
+ parameters: {
175
+ slug: { type: 'string', description: 'The card slug', required: true },
176
+ },
177
+ };
178
+ // ─── Tool: get_subscription ──────────────────────────────────────────────────
179
+ async function get_subscription(_input, ctx) {
180
+ const data = await apiRequest(ctx.config, '/user/subscription');
181
+ return {
182
+ success: true,
183
+ subscription: data,
184
+ message: data.tier === 'free'
185
+ ? 'User is on the Free tier (25 card views). Upgrade to Pro ($4/month) for unlimited views at https://kadiconnect.com/upgrade'
186
+ : `User is on the ${data.tier} plan (status: ${data.status}).`,
187
+ };
188
+ }
189
+ get_subscription.metadata = {
190
+ name: 'get_subscription',
191
+ displayName: 'Get Subscription Info',
192
+ description: 'Check the user\'s current KadiConnect subscription tier and status. The Free tier allows 25 card views; Pro ($4/month) unlocks unlimited views.',
193
+ parameters: {},
194
+ };
195
+ // ─── Plugin entry point ──────────────────────────────────────────────────────
196
+ function definePluginEntry() {
197
+ return {
198
+ name: '@kadiconnect/openclaw-plugin',
199
+ tools: [
200
+ register,
201
+ get_card,
202
+ create_or_update_card,
203
+ get_analytics,
204
+ create_shareable_link,
205
+ get_shareable_links,
206
+ get_subscription,
207
+ ],
208
+ };
209
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@kadiconnect/openclaw-plugin",
3
+ "displayName": "KadiConnect — Digital Business Cards",
4
+ "version": "1.0.0",
5
+ "description": "Create, update, and manage professional digital business cards on KadiConnect. Ideal for client outreach, job hunting, networking events, and more.",
6
+ "author": "KadiConnect",
7
+ "homepage": "https://kadiconnect.com",
8
+ "repository": "https://github.com/kadiconnect/openclaw-plugin",
9
+ "icon": "https://kadiconnect.com/icon.png",
10
+ "entry": "./dist/index.js",
11
+ "config": {
12
+ "apiKey": {
13
+ "type": "string",
14
+ "label": "KadiConnect API Key",
15
+ "description": "Your KadiConnect API key (starts with kc_). Generate one at https://kadiconnect.com/dashboard?tab=apikeys or navigate to the dashboard and open the API Keys tab.",
16
+ "required": true,
17
+ "secret": true
18
+ },
19
+ "baseUrl": {
20
+ "type": "string",
21
+ "label": "API Base URL",
22
+ "description": "KadiConnect API base URL (default: https://kadiconnect.com)",
23
+ "required": false,
24
+ "default": "https://kadiconnect.com"
25
+ }
26
+ },
27
+ "tools": [
28
+ "register",
29
+ "get_card",
30
+ "create_or_update_card",
31
+ "get_analytics",
32
+ "create_shareable_link",
33
+ "get_shareable_links",
34
+ "get_subscription"
35
+ ]
36
+ }
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@kadiconnect/openclaw-plugin",
3
+ "version": "1.0.0",
4
+ "description": "OpenClaw plugin for managing KadiConnect digital business cards via API",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc",
9
+ "prepublishOnly": "npm run build"
10
+ },
11
+ "keywords": [
12
+ "openclaw",
13
+ "openclaw-plugin",
14
+ "kadiconnect",
15
+ "business-card",
16
+ "digital-card"
17
+ ],
18
+ "license": "MIT",
19
+ "devDependencies": {
20
+ "typescript": "^5.0.0"
21
+ }
22
+ }