praisonai 1.7.2 → 1.7.3

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.
@@ -21,7 +21,7 @@
21
21
  export interface AgentOSConfig {
22
22
  /** Name of the application (default: "PraisonAI App") */
23
23
  name?: string;
24
- /** Host address to bind to (default: "0.0.0.0") */
24
+ /** Host address to bind to (default: "127.0.0.1") */
25
25
  host?: string;
26
26
  /** Port number to listen on (default: 8000) */
27
27
  port?: number;
package/dist/os/config.js CHANGED
@@ -22,7 +22,7 @@ exports.mergeConfig = mergeConfig;
22
22
  */
23
23
  exports.DEFAULT_AGENTOS_CONFIG = {
24
24
  name: 'PraisonAI App',
25
- host: '0.0.0.0',
25
+ host: '127.0.0.1',
26
26
  port: 8000,
27
27
  reload: false,
28
28
  corsOrigins: ['*'],
@@ -41,7 +41,7 @@ exports.DEFAULT_AGENTOS_CONFIG = {
41
41
  */
42
42
  function mergeConfig(userConfig) {
43
43
  const apiKey = userConfig?.apiKey ?? process.env.PRAISONAI_AGENTOS_API_KEY ?? '';
44
- return {
44
+ const merged = {
45
45
  ...exports.DEFAULT_AGENTOS_CONFIG,
46
46
  ...userConfig,
47
47
  apiKey,
@@ -50,4 +50,9 @@ function mergeConfig(userConfig) {
50
50
  ...userConfig?.metadata,
51
51
  },
52
52
  };
53
+ const exposedHosts = new Set(['0.0.0.0', '::', '::0']);
54
+ if (exposedHosts.has(merged.host) && !merged.apiKey) {
55
+ throw new Error('AgentOS requires apiKey (or PRAISONAI_AGENTOS_API_KEY) when binding to a network-exposed host');
56
+ }
57
+ return merged;
53
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "praisonai",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "PraisonAI TypeScript AI Agents Framework - Node.js, npm, and Javascript AI Agents Framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -114,4 +114,4 @@
114
114
  "README.md",
115
115
  "LICENSE"
116
116
  ]
117
- }
117
+ }