@dennisdamenace/clawtell 0.1.0 → 0.1.2

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/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/cli.js ADDED
@@ -0,0 +1,209 @@
1
+ #!/usr/bin/env node
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+
25
+ // src/cli.ts
26
+ var fs = __toESM(require("fs"));
27
+ var path = __toESM(require("path"));
28
+ var WEBHOOK_HANDLER_TS = `import express from 'express';
29
+ import { ClawTell } from '@dennisdamenace/clawtell';
30
+
31
+ const app = express();
32
+ app.use(express.json());
33
+
34
+ const client = new ClawTell(process.env.CLAWTELL_API_KEY!);
35
+
36
+ // Webhook endpoint to receive messages from other agents
37
+ app.post('/webhook', async (req, res) => {
38
+ const { from, body, subject, metadata } = req.body;
39
+
40
+ console.log(\`\u{1F4E8} Message from \${from}: \${body}\`);
41
+
42
+ // TODO: Process the incoming message
43
+ // Example: Echo back
44
+ // await client.send(from, \`Echo: \${body}\`);
45
+
46
+ res.json({ ok: true });
47
+ });
48
+
49
+ // Health check
50
+ app.get('/health', (req, res) => {
51
+ res.json({ status: 'ok', agent: 'my-agent' });
52
+ });
53
+
54
+ const PORT = process.env.PORT || 3000;
55
+ app.listen(PORT, () => {
56
+ console.log(\`\u{1F43E} ClawTell agent listening on port \${PORT}\`);
57
+ console.log(\` Webhook URL: http://localhost:\${PORT}/webhook\`);
58
+ });
59
+ `;
60
+ var WEBHOOK_HANDLER_JS = `const express = require('express');
61
+ const { ClawTell } = require('@dennisdamenace/clawtell');
62
+
63
+ const app = express();
64
+ app.use(express.json());
65
+
66
+ const client = new ClawTell(process.env.CLAWTELL_API_KEY);
67
+
68
+ // Webhook endpoint to receive messages from other agents
69
+ app.post('/webhook', async (req, res) => {
70
+ const { from, body, subject, metadata } = req.body;
71
+
72
+ console.log(\`\u{1F4E8} Message from \${from}: \${body}\`);
73
+
74
+ // TODO: Process the incoming message
75
+ // Example: Echo back
76
+ // await client.send(from, \`Echo: \${body}\`);
77
+
78
+ res.json({ ok: true });
79
+ });
80
+
81
+ // Health check
82
+ app.get('/health', (req, res) => {
83
+ res.json({ status: 'ok', agent: 'my-agent' });
84
+ });
85
+
86
+ const PORT = process.env.PORT || 3000;
87
+ app.listen(PORT, () => {
88
+ console.log(\`\u{1F43E} ClawTell agent listening on port \${PORT}\`);
89
+ console.log(\` Webhook URL: http://localhost:\${PORT}/webhook\`);
90
+ });
91
+ `;
92
+ var ENV_EXAMPLE = `# ClawTell Configuration
93
+ CLAWTELL_API_KEY=claw_xxx_yyy
94
+
95
+ # Server
96
+ PORT=3000
97
+ `;
98
+ var PACKAGE_JSON_TEMPLATE = (name, useTs) => JSON.stringify({
99
+ name,
100
+ version: "1.0.0",
101
+ description: "ClawTell agent",
102
+ main: useTs ? "dist/index.js" : "index.js",
103
+ scripts: {
104
+ start: useTs ? "ts-node webhook_handler.ts" : "node webhook_handler.js",
105
+ dev: useTs ? "ts-node-dev webhook_handler.ts" : "node webhook_handler.js",
106
+ ...useTs ? { build: "tsc" } : {}
107
+ },
108
+ dependencies: {
109
+ "@dennisdamenace/clawtell": "^0.1.0",
110
+ "express": "^4.18.0",
111
+ ...useTs ? { "ts-node": "^10.9.0", "ts-node-dev": "^2.0.0" } : {}
112
+ },
113
+ devDependencies: useTs ? {
114
+ "@types/express": "^4.17.0",
115
+ "@types/node": "^20.0.0",
116
+ "typescript": "^5.0.0"
117
+ } : {}
118
+ }, null, 2);
119
+ var TSCONFIG = JSON.stringify({
120
+ compilerOptions: {
121
+ target: "ES2020",
122
+ module: "commonjs",
123
+ lib: ["ES2020"],
124
+ outDir: "./dist",
125
+ rootDir: ".",
126
+ strict: true,
127
+ esModuleInterop: true,
128
+ skipLibCheck: true,
129
+ forceConsistentCasingInFileNames: true,
130
+ resolveJsonModule: true
131
+ },
132
+ include: ["./**/*.ts"],
133
+ exclude: ["node_modules", "dist"]
134
+ }, null, 2);
135
+ function printUsage() {
136
+ console.log(`
137
+ \u{1F43E} ClawTell CLI
138
+
139
+ Usage:
140
+ clawtell init <directory> [options]
141
+
142
+ Options:
143
+ --js Use JavaScript instead of TypeScript (default: TypeScript)
144
+ --help, -h Show this help message
145
+
146
+ Examples:
147
+ clawtell init my-agent # Create TypeScript project
148
+ clawtell init my-agent --js # Create JavaScript project
149
+ npx @dennisdamenace/clawtell init my-agent
150
+ `);
151
+ }
152
+ function init(targetDir, useJs) {
153
+ const fullPath = path.resolve(targetDir);
154
+ const dirName = path.basename(fullPath);
155
+ if (!fs.existsSync(fullPath)) {
156
+ fs.mkdirSync(fullPath, { recursive: true });
157
+ }
158
+ const useTs = !useJs;
159
+ const handlerFile = useTs ? "webhook_handler.ts" : "webhook_handler.js";
160
+ const handlerContent = useTs ? WEBHOOK_HANDLER_TS : WEBHOOK_HANDLER_JS;
161
+ fs.writeFileSync(path.join(fullPath, handlerFile), handlerContent);
162
+ fs.writeFileSync(path.join(fullPath, ".env.example"), ENV_EXAMPLE);
163
+ fs.writeFileSync(path.join(fullPath, "package.json"), PACKAGE_JSON_TEMPLATE(dirName, useTs));
164
+ if (useTs) {
165
+ fs.writeFileSync(path.join(fullPath, "tsconfig.json"), TSCONFIG);
166
+ }
167
+ fs.writeFileSync(path.join(fullPath, ".gitignore"), `node_modules/
168
+ .env
169
+ dist/
170
+ `);
171
+ console.log(`
172
+ \u{1F43E} ClawTell project created at ${fullPath}
173
+
174
+ Files created:
175
+ ${handlerFile} Webhook handler ready to receive messages
176
+ .env.example Environment template
177
+ package.json Dependencies
178
+ .gitignore Git ignore file${useTs ? "\n tsconfig.json TypeScript config" : ""}
179
+
180
+ Next steps:
181
+ cd ${targetDir}
182
+ cp .env.example .env
183
+ # Add your CLAWTELL_API_KEY to .env
184
+ npm install
185
+ npm run dev
186
+
187
+ Your agent will be listening at http://localhost:3000/webhook
188
+ `);
189
+ }
190
+ var args = process.argv.slice(2);
191
+ if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
192
+ printUsage();
193
+ process.exit(0);
194
+ }
195
+ var command = args[0];
196
+ if (command === "init") {
197
+ const targetDir = args[1];
198
+ if (!targetDir) {
199
+ console.error("Error: Please specify a directory name");
200
+ console.error("Usage: clawtell init <directory>");
201
+ process.exit(1);
202
+ }
203
+ const useJs = args.includes("--js");
204
+ init(targetDir, useJs);
205
+ } else {
206
+ console.error(`Unknown command: ${command}`);
207
+ printUsage();
208
+ process.exit(1);
209
+ }
package/dist/cli.mjs ADDED
@@ -0,0 +1,187 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/cli.ts
4
+ import * as fs from "fs";
5
+ import * as path from "path";
6
+ var WEBHOOK_HANDLER_TS = `import express from 'express';
7
+ import { ClawTell } from '@dennisdamenace/clawtell';
8
+
9
+ const app = express();
10
+ app.use(express.json());
11
+
12
+ const client = new ClawTell(process.env.CLAWTELL_API_KEY!);
13
+
14
+ // Webhook endpoint to receive messages from other agents
15
+ app.post('/webhook', async (req, res) => {
16
+ const { from, body, subject, metadata } = req.body;
17
+
18
+ console.log(\`\u{1F4E8} Message from \${from}: \${body}\`);
19
+
20
+ // TODO: Process the incoming message
21
+ // Example: Echo back
22
+ // await client.send(from, \`Echo: \${body}\`);
23
+
24
+ res.json({ ok: true });
25
+ });
26
+
27
+ // Health check
28
+ app.get('/health', (req, res) => {
29
+ res.json({ status: 'ok', agent: 'my-agent' });
30
+ });
31
+
32
+ const PORT = process.env.PORT || 3000;
33
+ app.listen(PORT, () => {
34
+ console.log(\`\u{1F43E} ClawTell agent listening on port \${PORT}\`);
35
+ console.log(\` Webhook URL: http://localhost:\${PORT}/webhook\`);
36
+ });
37
+ `;
38
+ var WEBHOOK_HANDLER_JS = `const express = require('express');
39
+ const { ClawTell } = require('@dennisdamenace/clawtell');
40
+
41
+ const app = express();
42
+ app.use(express.json());
43
+
44
+ const client = new ClawTell(process.env.CLAWTELL_API_KEY);
45
+
46
+ // Webhook endpoint to receive messages from other agents
47
+ app.post('/webhook', async (req, res) => {
48
+ const { from, body, subject, metadata } = req.body;
49
+
50
+ console.log(\`\u{1F4E8} Message from \${from}: \${body}\`);
51
+
52
+ // TODO: Process the incoming message
53
+ // Example: Echo back
54
+ // await client.send(from, \`Echo: \${body}\`);
55
+
56
+ res.json({ ok: true });
57
+ });
58
+
59
+ // Health check
60
+ app.get('/health', (req, res) => {
61
+ res.json({ status: 'ok', agent: 'my-agent' });
62
+ });
63
+
64
+ const PORT = process.env.PORT || 3000;
65
+ app.listen(PORT, () => {
66
+ console.log(\`\u{1F43E} ClawTell agent listening on port \${PORT}\`);
67
+ console.log(\` Webhook URL: http://localhost:\${PORT}/webhook\`);
68
+ });
69
+ `;
70
+ var ENV_EXAMPLE = `# ClawTell Configuration
71
+ CLAWTELL_API_KEY=claw_xxx_yyy
72
+
73
+ # Server
74
+ PORT=3000
75
+ `;
76
+ var PACKAGE_JSON_TEMPLATE = (name, useTs) => JSON.stringify({
77
+ name,
78
+ version: "1.0.0",
79
+ description: "ClawTell agent",
80
+ main: useTs ? "dist/index.js" : "index.js",
81
+ scripts: {
82
+ start: useTs ? "ts-node webhook_handler.ts" : "node webhook_handler.js",
83
+ dev: useTs ? "ts-node-dev webhook_handler.ts" : "node webhook_handler.js",
84
+ ...useTs ? { build: "tsc" } : {}
85
+ },
86
+ dependencies: {
87
+ "@dennisdamenace/clawtell": "^0.1.0",
88
+ "express": "^4.18.0",
89
+ ...useTs ? { "ts-node": "^10.9.0", "ts-node-dev": "^2.0.0" } : {}
90
+ },
91
+ devDependencies: useTs ? {
92
+ "@types/express": "^4.17.0",
93
+ "@types/node": "^20.0.0",
94
+ "typescript": "^5.0.0"
95
+ } : {}
96
+ }, null, 2);
97
+ var TSCONFIG = JSON.stringify({
98
+ compilerOptions: {
99
+ target: "ES2020",
100
+ module: "commonjs",
101
+ lib: ["ES2020"],
102
+ outDir: "./dist",
103
+ rootDir: ".",
104
+ strict: true,
105
+ esModuleInterop: true,
106
+ skipLibCheck: true,
107
+ forceConsistentCasingInFileNames: true,
108
+ resolveJsonModule: true
109
+ },
110
+ include: ["./**/*.ts"],
111
+ exclude: ["node_modules", "dist"]
112
+ }, null, 2);
113
+ function printUsage() {
114
+ console.log(`
115
+ \u{1F43E} ClawTell CLI
116
+
117
+ Usage:
118
+ clawtell init <directory> [options]
119
+
120
+ Options:
121
+ --js Use JavaScript instead of TypeScript (default: TypeScript)
122
+ --help, -h Show this help message
123
+
124
+ Examples:
125
+ clawtell init my-agent # Create TypeScript project
126
+ clawtell init my-agent --js # Create JavaScript project
127
+ npx @dennisdamenace/clawtell init my-agent
128
+ `);
129
+ }
130
+ function init(targetDir, useJs) {
131
+ const fullPath = path.resolve(targetDir);
132
+ const dirName = path.basename(fullPath);
133
+ if (!fs.existsSync(fullPath)) {
134
+ fs.mkdirSync(fullPath, { recursive: true });
135
+ }
136
+ const useTs = !useJs;
137
+ const handlerFile = useTs ? "webhook_handler.ts" : "webhook_handler.js";
138
+ const handlerContent = useTs ? WEBHOOK_HANDLER_TS : WEBHOOK_HANDLER_JS;
139
+ fs.writeFileSync(path.join(fullPath, handlerFile), handlerContent);
140
+ fs.writeFileSync(path.join(fullPath, ".env.example"), ENV_EXAMPLE);
141
+ fs.writeFileSync(path.join(fullPath, "package.json"), PACKAGE_JSON_TEMPLATE(dirName, useTs));
142
+ if (useTs) {
143
+ fs.writeFileSync(path.join(fullPath, "tsconfig.json"), TSCONFIG);
144
+ }
145
+ fs.writeFileSync(path.join(fullPath, ".gitignore"), `node_modules/
146
+ .env
147
+ dist/
148
+ `);
149
+ console.log(`
150
+ \u{1F43E} ClawTell project created at ${fullPath}
151
+
152
+ Files created:
153
+ ${handlerFile} Webhook handler ready to receive messages
154
+ .env.example Environment template
155
+ package.json Dependencies
156
+ .gitignore Git ignore file${useTs ? "\n tsconfig.json TypeScript config" : ""}
157
+
158
+ Next steps:
159
+ cd ${targetDir}
160
+ cp .env.example .env
161
+ # Add your CLAWTELL_API_KEY to .env
162
+ npm install
163
+ npm run dev
164
+
165
+ Your agent will be listening at http://localhost:3000/webhook
166
+ `);
167
+ }
168
+ var args = process.argv.slice(2);
169
+ if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
170
+ printUsage();
171
+ process.exit(0);
172
+ }
173
+ var command = args[0];
174
+ if (command === "init") {
175
+ const targetDir = args[1];
176
+ if (!targetDir) {
177
+ console.error("Error: Please specify a directory name");
178
+ console.error("Usage: clawtell init <directory>");
179
+ process.exit(1);
180
+ }
181
+ const useJs = args.includes("--js");
182
+ init(targetDir, useJs);
183
+ } else {
184
+ console.error(`Unknown command: ${command}`);
185
+ printUsage();
186
+ process.exit(1);
187
+ }
package/dist/index.d.mts CHANGED
@@ -209,6 +209,56 @@ declare class ClawTell {
209
209
  savings: number;
210
210
  };
211
211
  }>;
212
+ /**
213
+ * Check for SDK and skill updates.
214
+ *
215
+ * @example
216
+ * ```typescript
217
+ * const updates = await client.checkUpdates();
218
+ * if (updates.hasUpdates) {
219
+ * for (const update of updates.updates) {
220
+ * console.log(`Update available: ${update.sdk} ${update.latest}`);
221
+ * console.log(` Upgrade: ${update.upgradeCommand}`);
222
+ * }
223
+ * }
224
+ * ```
225
+ */
226
+ checkUpdates(): Promise<{
227
+ hasUpdates: boolean;
228
+ updates: Array<{
229
+ type: string;
230
+ sdk?: string;
231
+ current: string;
232
+ latest: string;
233
+ upgradeCommand: string;
234
+ changelogUrl?: string;
235
+ }>;
236
+ latestVersions: {
237
+ python: string;
238
+ javascript: string;
239
+ skill: string;
240
+ };
241
+ }>;
242
+ /**
243
+ * Register your SDK version with ClawTell for update notifications.
244
+ * Call this on agent startup to get notified of important updates.
245
+ *
246
+ * @param notifyOnUpdates - Whether to receive webhook notifications for updates
247
+ */
248
+ registerVersion(notifyOnUpdates?: boolean): Promise<{
249
+ registered: boolean;
250
+ agent: string;
251
+ hasUpdates: boolean;
252
+ updates: Array<{
253
+ type: string;
254
+ sdk?: string;
255
+ current: string;
256
+ latest: string;
257
+ upgradeCommand: string;
258
+ }>;
259
+ message: string;
260
+ }>;
212
261
  }
262
+ declare const SDK_VERSION = "0.1.2";
213
263
 
214
- export { type AllowlistEntry, AuthenticationError, ClawTell, type ClawTellConfig, ClawTellError, type InboxResult, type LookupResult, type Message, NotFoundError, type Profile, RateLimitError, type SendResult, ClawTell as default };
264
+ export { type AllowlistEntry, AuthenticationError, ClawTell, type ClawTellConfig, ClawTellError, type InboxResult, type LookupResult, type Message, NotFoundError, type Profile, RateLimitError, SDK_VERSION, type SendResult, ClawTell as default };
package/dist/index.d.ts CHANGED
@@ -209,6 +209,56 @@ declare class ClawTell {
209
209
  savings: number;
210
210
  };
211
211
  }>;
212
+ /**
213
+ * Check for SDK and skill updates.
214
+ *
215
+ * @example
216
+ * ```typescript
217
+ * const updates = await client.checkUpdates();
218
+ * if (updates.hasUpdates) {
219
+ * for (const update of updates.updates) {
220
+ * console.log(`Update available: ${update.sdk} ${update.latest}`);
221
+ * console.log(` Upgrade: ${update.upgradeCommand}`);
222
+ * }
223
+ * }
224
+ * ```
225
+ */
226
+ checkUpdates(): Promise<{
227
+ hasUpdates: boolean;
228
+ updates: Array<{
229
+ type: string;
230
+ sdk?: string;
231
+ current: string;
232
+ latest: string;
233
+ upgradeCommand: string;
234
+ changelogUrl?: string;
235
+ }>;
236
+ latestVersions: {
237
+ python: string;
238
+ javascript: string;
239
+ skill: string;
240
+ };
241
+ }>;
242
+ /**
243
+ * Register your SDK version with ClawTell for update notifications.
244
+ * Call this on agent startup to get notified of important updates.
245
+ *
246
+ * @param notifyOnUpdates - Whether to receive webhook notifications for updates
247
+ */
248
+ registerVersion(notifyOnUpdates?: boolean): Promise<{
249
+ registered: boolean;
250
+ agent: string;
251
+ hasUpdates: boolean;
252
+ updates: Array<{
253
+ type: string;
254
+ sdk?: string;
255
+ current: string;
256
+ latest: string;
257
+ upgradeCommand: string;
258
+ }>;
259
+ message: string;
260
+ }>;
212
261
  }
262
+ declare const SDK_VERSION = "0.1.2";
213
263
 
214
- export { type AllowlistEntry, AuthenticationError, ClawTell, type ClawTellConfig, ClawTellError, type InboxResult, type LookupResult, type Message, NotFoundError, type Profile, RateLimitError, type SendResult, ClawTell as default };
264
+ export { type AllowlistEntry, AuthenticationError, ClawTell, type ClawTellConfig, ClawTellError, type InboxResult, type LookupResult, type Message, NotFoundError, type Profile, RateLimitError, SDK_VERSION, type SendResult, ClawTell as default };
package/dist/index.js CHANGED
@@ -24,6 +24,7 @@ __export(index_exports, {
24
24
  ClawTellError: () => ClawTellError,
25
25
  NotFoundError: () => NotFoundError,
26
26
  RateLimitError: () => RateLimitError,
27
+ SDK_VERSION: () => SDK_VERSION,
27
28
  default: () => index_default
28
29
  });
29
30
  module.exports = __toCommonJS(index_exports);
@@ -296,7 +297,43 @@ var ClawTell = class {
296
297
  async renew(years = 1) {
297
298
  return this.request("POST", "/renew", { body: { years } });
298
299
  }
300
+ // ─────────────────────────────────────────────────────────────
301
+ // Updates
302
+ // ─────────────────────────────────────────────────────────────
303
+ /**
304
+ * Check for SDK and skill updates.
305
+ *
306
+ * @example
307
+ * ```typescript
308
+ * const updates = await client.checkUpdates();
309
+ * if (updates.hasUpdates) {
310
+ * for (const update of updates.updates) {
311
+ * console.log(`Update available: ${update.sdk} ${update.latest}`);
312
+ * console.log(` Upgrade: ${update.upgradeCommand}`);
313
+ * }
314
+ * }
315
+ * ```
316
+ */
317
+ async checkUpdates() {
318
+ return this.request("GET", "/updates");
319
+ }
320
+ /**
321
+ * Register your SDK version with ClawTell for update notifications.
322
+ * Call this on agent startup to get notified of important updates.
323
+ *
324
+ * @param notifyOnUpdates - Whether to receive webhook notifications for updates
325
+ */
326
+ async registerVersion(notifyOnUpdates = true) {
327
+ return this.request("POST", "/updates", {
328
+ body: {
329
+ sdk: "javascript",
330
+ sdkVersion: SDK_VERSION,
331
+ notifyOnUpdates
332
+ }
333
+ });
334
+ }
299
335
  };
336
+ var SDK_VERSION = "0.1.2";
300
337
  var index_default = ClawTell;
301
338
  // Annotate the CommonJS export names for ESM import in node:
302
339
  0 && (module.exports = {
@@ -304,5 +341,6 @@ var index_default = ClawTell;
304
341
  ClawTell,
305
342
  ClawTellError,
306
343
  NotFoundError,
307
- RateLimitError
344
+ RateLimitError,
345
+ SDK_VERSION
308
346
  });
package/dist/index.mjs CHANGED
@@ -268,7 +268,43 @@ var ClawTell = class {
268
268
  async renew(years = 1) {
269
269
  return this.request("POST", "/renew", { body: { years } });
270
270
  }
271
+ // ─────────────────────────────────────────────────────────────
272
+ // Updates
273
+ // ─────────────────────────────────────────────────────────────
274
+ /**
275
+ * Check for SDK and skill updates.
276
+ *
277
+ * @example
278
+ * ```typescript
279
+ * const updates = await client.checkUpdates();
280
+ * if (updates.hasUpdates) {
281
+ * for (const update of updates.updates) {
282
+ * console.log(`Update available: ${update.sdk} ${update.latest}`);
283
+ * console.log(` Upgrade: ${update.upgradeCommand}`);
284
+ * }
285
+ * }
286
+ * ```
287
+ */
288
+ async checkUpdates() {
289
+ return this.request("GET", "/updates");
290
+ }
291
+ /**
292
+ * Register your SDK version with ClawTell for update notifications.
293
+ * Call this on agent startup to get notified of important updates.
294
+ *
295
+ * @param notifyOnUpdates - Whether to receive webhook notifications for updates
296
+ */
297
+ async registerVersion(notifyOnUpdates = true) {
298
+ return this.request("POST", "/updates", {
299
+ body: {
300
+ sdk: "javascript",
301
+ sdkVersion: SDK_VERSION,
302
+ notifyOnUpdates
303
+ }
304
+ });
305
+ }
271
306
  };
307
+ var SDK_VERSION = "0.1.2";
272
308
  var index_default = ClawTell;
273
309
  export {
274
310
  AuthenticationError,
@@ -276,5 +312,6 @@ export {
276
312
  ClawTellError,
277
313
  NotFoundError,
278
314
  RateLimitError,
315
+ SDK_VERSION,
279
316
  index_default as default
280
317
  };
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@dennisdamenace/clawtell",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Universal messaging SDK for AI agents",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "clawtell": "./dist/cli.js"
10
+ },
8
11
  "exports": {
9
12
  ".": {
10
13
  "require": "./dist/index.js",
@@ -16,7 +19,7 @@
16
19
  "dist"
17
20
  ],
18
21
  "scripts": {
19
- "build": "tsup src/index.ts --format cjs,esm --dts",
22
+ "build": "tsup src/index.ts src/cli.ts --format cjs,esm --dts",
20
23
  "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
21
24
  "test": "vitest",
22
25
  "lint": "eslint src",