fraim-framework 2.0.164 → 2.0.165

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.
@@ -1,4 +1,37 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
37
  };
@@ -9,7 +42,6 @@ const chalk_1 = __importDefault(require("chalk"));
9
42
  const child_process_1 = require("child_process");
10
43
  const server_1 = require("../../first-run/server");
11
44
  const session_service_1 = require("../../first-run/session-service");
12
- const server_2 = require("../../ai-hub/server");
13
45
  function openBrowser(url) {
14
46
  try {
15
47
  if (process.platform === 'win32') {
@@ -45,7 +77,10 @@ const runFirstRun = async (options) => {
45
77
  projectRoot: options.projectRoot,
46
78
  });
47
79
  const server = new server_1.FirstRunServer({ sessionService });
48
- const port = await (0, server_2.findAvailablePort)(43120);
80
+ // Lazy import: ai-hub/server pulls server-only code not shipped in the client
81
+ // package; keep it out of the CLI startup graph so the packed client loads (#422).
82
+ const { findAvailablePort } = await Promise.resolve().then(() => __importStar(require('../../ai-hub/server')));
83
+ const port = await findAvailablePort(43120);
49
84
  const url = `http://127.0.0.1:${port}/first-run/`;
50
85
  await server.start(port);
51
86
  console.log(chalk_1.default.blue('Starting FRAIM first-run...'));
@@ -1,11 +1,46 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
37
  };
5
38
  Object.defineProperty(exports, "__esModule", { value: true });
6
39
  exports.hubCommand = void 0;
7
40
  const commander_1 = require("commander");
8
- const server_1 = require("../../ai-hub/server");
41
+ // ai-hub/server pulls in server-only code (persona-hiring etc.) that is not
42
+ // shipped in the client package; it is imported lazily inside the action below
43
+ // to keep it out of the CLI startup graph so the packed client loads (issue #422).
9
44
  const git_utils_1 = require("../../core/utils/git-utils");
10
45
  const path_1 = __importDefault(require("path"));
11
46
  const child_process_1 = require("child_process");
@@ -69,13 +104,14 @@ exports.hubCommand = new commander_1.Command('hub')
69
104
  .option('--no-open', 'Do not open the hub after startup')
70
105
  .option('--browser', 'Open in the default browser instead of the desktop shell')
71
106
  .action(async (options) => {
107
+ const { AiHubServer, findAvailablePort } = await Promise.resolve().then(() => __importStar(require('../../ai-hub/server')));
72
108
  const preferredPort = options.port || (0, git_utils_1.getPort)() + 100;
73
109
  const projectPath = path_1.default.resolve(options.projectPath || process.cwd());
74
110
  if (options.open) {
75
111
  const openedDesktop = !options.browser && openDesktopWindow(projectPath, preferredPort);
76
112
  if (!openedDesktop) {
77
- const port = await (0, server_1.findAvailablePort)(preferredPort);
78
- const server = new server_1.AiHubServer({ projectPath });
113
+ const port = await findAvailablePort(preferredPort);
114
+ const server = new AiHubServer({ projectPath });
79
115
  await server.start(port);
80
116
  const url = `http://127.0.0.1:${port}/ai-hub/`;
81
117
  console.log(`AI Hub running at ${url}`);
@@ -87,8 +123,8 @@ exports.hubCommand = new commander_1.Command('hub')
87
123
  console.log(`Project path: ${projectPath}`);
88
124
  return;
89
125
  }
90
- const port = await (0, server_1.findAvailablePort)(preferredPort);
91
- const server = new server_1.AiHubServer({ projectPath });
126
+ const port = await findAvailablePort(preferredPort);
127
+ const server = new AiHubServer({ projectPath });
92
128
  await server.start(port);
93
129
  const url = `http://127.0.0.1:${port}/ai-hub/`;
94
130
  console.log(`AI Hub running at ${url}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fraim-framework",
3
- "version": "2.0.164",
3
+ "version": "2.0.165",
4
4
  "description": "FRAIM: AI Workforce Infrastructure — the organizational capability that turns AI agents into an accountable workforce, their operators into capable AI managers, and executives into leaders with clear optics on AI proficiency.",
5
5
  "main": "index.js",
6
6
  "bin": {