@minded-ai/mindedjs 1.0.21 → 1.0.22

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.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ const fs = __importStar(require("fs"));
38
+ const path = __importStar(require("path"));
39
+ const TOKEN_FILE = '.minded-token';
40
+ function getTokenFilePath() {
41
+ return path.join(process.cwd(), TOKEN_FILE);
42
+ }
43
+ function setToken(token) {
44
+ const tokenPath = getTokenFilePath();
45
+ fs.writeFileSync(tokenPath, token);
46
+ console.log(`Token saved to ${tokenPath}`);
47
+ }
48
+ function main() {
49
+ const args = process.argv.slice(2);
50
+ const command = args[0];
51
+ if (command === 'token') {
52
+ const token = args[1];
53
+ if (!token) {
54
+ console.error('Please provide a token');
55
+ process.exit(1);
56
+ }
57
+ setToken(token);
58
+ }
59
+ else {
60
+ console.error('Unknown command. Available commands: token');
61
+ process.exit(1);
62
+ }
63
+ }
64
+ main();
65
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uCAAyB;AACzB,2CAA6B;AAG7B,MAAM,UAAU,GAAG,eAAe,CAAC;AAEnC,SAAS,gBAAgB;IACvB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;AAC9C,CAAC;AAED,SAAS,QAAQ,CAAC,KAAa;IAC7B,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACnC,OAAO,CAAC,GAAG,CAAC,kBAAkB,SAAS,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,IAAI;IACX,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAExB,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;YACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;QAC5D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@minded-ai/mindedjs",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "MindedJS is a TypeScript library for building agents.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "minded": "./dist/cli/index.js"
9
+ },
7
10
  "scripts": {
8
11
  "build": "tsc",
9
12
  "watch": "tsc -w",
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env node
2
+
3
+ import * as fs from 'fs';
4
+ import * as path from 'path';
5
+ import * as os from 'os';
6
+
7
+ const TOKEN_FILE = '.minded-token';
8
+
9
+ function getTokenFilePath(): string {
10
+ return path.join(process.cwd(), TOKEN_FILE);
11
+ }
12
+
13
+ function setToken(token: string): void {
14
+ const tokenPath = getTokenFilePath();
15
+ fs.writeFileSync(tokenPath, token);
16
+ console.log(`Token saved to ${tokenPath}`);
17
+ }
18
+
19
+ function main() {
20
+ const args = process.argv.slice(2);
21
+ const command = args[0];
22
+
23
+ if (command === 'token') {
24
+ const token = args[1];
25
+ if (!token) {
26
+ console.error('Please provide a token');
27
+ process.exit(1);
28
+ }
29
+ setToken(token);
30
+ } else {
31
+ console.error('Unknown command. Available commands: token');
32
+ process.exit(1);
33
+ }
34
+ }
35
+
36
+ main();