@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.
- package/apps/agents-server/src/database/ensureAutomaticDatabaseMigrations.ts +8 -1
- package/apps/agents-server/src/database/runDatabaseMigrations.ts +31 -1
- package/apps/agents-server/src/database/sqlite/$provideLocalSqliteSupabase.ts +2 -2
- package/apps/agents-server/src/middleware/createMiddlewareRequestContext.ts +1 -1
- package/apps/agents-server/src/tools/$provideServer.ts +27 -0
- package/apps/agents-server/src/utils/serverRegistry.ts +117 -3
- package/esm/apps/agents-server/src/utils/serverRegistry.d.ts +6 -0
- package/esm/index.es.js +100 -3
- package/esm/index.es.js.map +1 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/cli/cli-commands/agents-server/startAgentsServer.ts +19 -9
- package/src/other/templates/getTemplatesPipelineCollection.ts +779 -980
- package/src/version.ts +2 -2
- package/src/versions.txt +2 -0
- package/umd/apps/agents-server/src/utils/serverRegistry.d.ts +6 -0
- package/umd/index.umd.js +100 -3
- package/umd/index.umd.js.map +1 -1
- package/umd/src/version.d.ts +1 -1
package/esm/src/version.d.ts
CHANGED
|
@@ -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-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-90`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
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',
|