@conto_finance/create-conto-agent 0.1.1 → 0.3.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/dist/chunk-ICDSTI2Z.js +1209 -0
- package/dist/{chunk-6TRDZ4JG.js → chunk-K4LBO234.js} +1 -1
- package/dist/{chunk-NK52PCTE.js → chunk-OS5PZNRM.js} +14 -5
- package/dist/cli.js +336 -62
- package/dist/{config-CFVDT6M4.js → config-EKAEJVZR.js} +1 -1
- package/dist/index.js +75 -26
- package/dist/{output-VT23PY74.js → output-IN47X4NU.js} +1 -1
- package/package.json +9 -5
- package/dist/chunk-AWKUQSTP.js +0 -777
package/dist/index.js
CHANGED
|
@@ -1,33 +1,82 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runInit
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import
|
|
5
|
-
|
|
3
|
+
} from "./chunk-ICDSTI2Z.js";
|
|
4
|
+
import {
|
|
5
|
+
setJsonMode
|
|
6
|
+
} from "./chunk-K4LBO234.js";
|
|
7
|
+
import "./chunk-OS5PZNRM.js";
|
|
6
8
|
|
|
7
9
|
// src/index.ts
|
|
10
|
+
var CLI_COMMANDS = /* @__PURE__ */ new Set([
|
|
11
|
+
"status",
|
|
12
|
+
"doctor",
|
|
13
|
+
"balance",
|
|
14
|
+
"pay",
|
|
15
|
+
"transactions",
|
|
16
|
+
"wallets",
|
|
17
|
+
"fund",
|
|
18
|
+
"policies",
|
|
19
|
+
"limits",
|
|
20
|
+
"alerts",
|
|
21
|
+
"config",
|
|
22
|
+
"login",
|
|
23
|
+
"logout",
|
|
24
|
+
"mcp",
|
|
25
|
+
"docs",
|
|
26
|
+
"init",
|
|
27
|
+
"help",
|
|
28
|
+
"--help",
|
|
29
|
+
"-h",
|
|
30
|
+
"--version",
|
|
31
|
+
"-V"
|
|
32
|
+
]);
|
|
8
33
|
var args = process.argv.slice(2);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
34
|
+
if (args.length > 0 && CLI_COMMANDS.has(args[0])) {
|
|
35
|
+
await import("./cli.js");
|
|
36
|
+
} else {
|
|
37
|
+
const options = {};
|
|
38
|
+
for (let i = 0; i < args.length; i++) {
|
|
39
|
+
const arg = args[i];
|
|
40
|
+
if (arg === "--chain" && args[i + 1]) {
|
|
41
|
+
options.chain = args[++i];
|
|
42
|
+
} else if (arg === "--name" && args[i + 1]) {
|
|
43
|
+
options.name = args[++i];
|
|
44
|
+
} else if (arg === "--type" && args[i + 1]) {
|
|
45
|
+
options.type = args[++i];
|
|
46
|
+
} else if (arg === "--limit" && args[i + 1]) {
|
|
47
|
+
options.limit = args[++i];
|
|
48
|
+
} else if (arg === "--base-url" && args[i + 1]) {
|
|
49
|
+
options.baseUrl = args[++i];
|
|
50
|
+
} else if (arg === "--api-key" && args[i + 1]) {
|
|
51
|
+
options.apiKey = args[++i];
|
|
52
|
+
} else if (arg === "--sandbox") {
|
|
53
|
+
options.sandbox = true;
|
|
54
|
+
} else if (arg === "--no-browser") {
|
|
55
|
+
options.noBrowser = true;
|
|
56
|
+
} else if (arg === "--json") {
|
|
57
|
+
options.json = true;
|
|
58
|
+
} else if (arg === "--no-install") {
|
|
59
|
+
options.noInstall = true;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (options.json) {
|
|
63
|
+
setJsonMode(true);
|
|
64
|
+
}
|
|
65
|
+
if (options.noBrowser && !options.sandbox && !options.apiKey) {
|
|
66
|
+
console.error("--no-browser requires either --sandbox or --api-key <org-api-key>.");
|
|
67
|
+
process.exit(1);
|
|
22
68
|
}
|
|
69
|
+
runInit({
|
|
70
|
+
chain: options.chain,
|
|
71
|
+
name: options.name,
|
|
72
|
+
type: options.type,
|
|
73
|
+
limit: options.limit ? Number(options.limit) : void 0,
|
|
74
|
+
baseUrl: options.baseUrl,
|
|
75
|
+
install: options.noInstall ? false : void 0,
|
|
76
|
+
sandbox: options.sandbox === true,
|
|
77
|
+
apiKey: options.apiKey
|
|
78
|
+
}).catch((err) => {
|
|
79
|
+
console.error("Fatal error:", err.message || err);
|
|
80
|
+
process.exit(1);
|
|
81
|
+
});
|
|
23
82
|
}
|
|
24
|
-
runInit({
|
|
25
|
-
chain: options.chain,
|
|
26
|
-
name: options.name,
|
|
27
|
-
type: options.type,
|
|
28
|
-
limit: options.limit ? Number(options.limit) : void 0,
|
|
29
|
-
baseUrl: options.baseUrl
|
|
30
|
-
}).catch((err) => {
|
|
31
|
-
console.error("Fatal error:", err.message || err);
|
|
32
|
-
process.exit(1);
|
|
33
|
-
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conto_finance/create-conto-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "CLI quickstart for Conto — Agentic Payments Control Center",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-conto-agent": "bin/create-conto-agent.js",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "tsup src/index.ts src/cli.ts --format esm --dts --clean",
|
|
17
17
|
"dev": "tsup src/index.ts src/cli.ts --format esm --dts --watch",
|
|
18
|
-
"lint": "tsc --noEmit"
|
|
18
|
+
"lint": "tsc --noEmit",
|
|
19
|
+
"test": "npm run build && node --test test/*.test.mjs"
|
|
19
20
|
},
|
|
20
21
|
"engines": {
|
|
21
22
|
"node": ">=18"
|
|
@@ -48,9 +49,12 @@
|
|
|
48
49
|
"commander": "^13.1.0",
|
|
49
50
|
"open": "^10.1.0"
|
|
50
51
|
},
|
|
52
|
+
"overrides": {
|
|
53
|
+
"esbuild": "0.28.1"
|
|
54
|
+
},
|
|
51
55
|
"devDependencies": {
|
|
52
|
-
"@types/node": "^
|
|
53
|
-
"tsup": "^8.
|
|
54
|
-
"typescript": "^5.
|
|
56
|
+
"@types/node": "^22.19.18",
|
|
57
|
+
"tsup": "^8.5.1",
|
|
58
|
+
"typescript": "^5.9.3"
|
|
55
59
|
}
|
|
56
60
|
}
|