@promptbook/cli 0.112.0-89 → 0.112.0-91

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.
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.112.0-88`).
18
+ * It follows semantic versioning (e.g., `0.112.0-90`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/cli",
3
- "version": "0.112.0-89",
3
+ "version": "0.112.0-91",
4
4
  "description": "Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -83,6 +83,13 @@ const PTBK_AGENTS_SERVER_DATABASE_ENV = 'PTBK_AGENTS_SERVER_DATABASE';
83
83
  */
84
84
  const PTBK_AGENTS_SERVER_SQLITE_PATH_ENV = 'PTBK_AGENTS_SERVER_SQLITE_PATH';
85
85
 
86
+ /**
87
+ * Optional hostname used by the internal Next server.
88
+ *
89
+ * @private internal constant of `ptbk agents-server`
90
+ */
91
+ const PTBK_HOSTNAME_ENV = 'PTBK_HOSTNAME';
92
+
86
93
  /**
87
94
  * Entropy size for the local-only token shared by the CLI pump and the Next app.
88
95
  *
@@ -292,16 +299,19 @@ function startNextServer(options: {
292
299
  readonly state: AgentsServerSupervisorState;
293
300
  }): ChildProcess {
294
301
  logRunnerEvent(options.logStreams.runner, 'Starting the Agents Server Next process.');
302
+ const nextArguments = [options.nextCliPath, 'start', '--port', String(options.options.port)];
303
+ const hostname = options.childEnvironment[PTBK_HOSTNAME_ENV]?.trim();
295
304
 
296
- const commandProcess = spawn(
297
- process.execPath,
298
- [options.nextCliPath, 'start', '--port', String(options.options.port)],
299
- {
300
- cwd: options.runtimePaths.appPath,
301
- env: options.childEnvironment,
302
- stdio: ['ignore', 'pipe', 'pipe'],
303
- },
304
- );
305
+ if (hostname) {
306
+ nextArguments.push('--hostname', hostname);
307
+ logRunnerEvent(options.logStreams.runner, `Binding Agents Server Next process to ${hostname}.`);
308
+ }
309
+
310
+ const commandProcess = spawn(process.execPath, nextArguments, {
311
+ cwd: options.runtimePaths.appPath,
312
+ env: options.childEnvironment,
313
+ stdio: ['ignore', 'pipe', 'pipe'],
314
+ });
305
315
 
306
316
  bindChildOutput(commandProcess, {
307
317
  label: 'next',