@promptbook/cli 0.112.0-111 → 0.112.0-112
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/app/admin/servers/CreateServerDialog.tsx +16 -0
- package/apps/agents-server/src/app/admin/servers/useCreateServerWizard.ts +31 -5
- package/apps/agents-server/src/app/api/admin/servers/route.ts +5 -0
- package/apps/agents-server/src/app/api/metadata/route.ts +4 -0
- package/apps/agents-server/src/database/customJavascript.ts +62 -1
- package/apps/agents-server/src/database/customStylesheet.ts +60 -1
- package/apps/agents-server/src/database/getMetadata.ts +84 -3
- package/apps/agents-server/src/instrumentation.ts +3 -0
- package/apps/agents-server/src/utils/errorReporting/registerServerErrorSentryLogging.ts +331 -0
- package/apps/agents-server/src/utils/errorReporting/sendApplicationErrorReportToSentry.ts +8 -153
- package/apps/agents-server/src/utils/errorReporting/sentryStore.ts +177 -0
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/bootstrapManagedServer.ts +3 -1
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/normalizeCreateServerInput.ts +6 -0
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerDefaultAgents.ts +7 -3
- package/apps/agents-server/src/utils/serverManagement/createManagedServer.ts +5 -0
- package/apps/agents-server/src/utils/userChat/listUserChats.ts +109 -0
- package/esm/index.es.js +23 -4
- package/esm/index.es.js.map +1 -1
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +2 -1
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer.test.d.ts +1 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/cli/cli-commands/agents-server/startAgentsServer.ts +17 -1
- package/src/other/templates/getTemplatesPipelineCollection.ts +724 -878
- package/src/version.ts +2 -2
- package/src/versions.txt +1 -0
- package/umd/index.umd.js +23 -4
- package/umd/index.umd.js.map +1 -1
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +2 -1
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer.test.d.ts +1 -0
- package/umd/src/version.d.ts +1 -1
|
@@ -29,7 +29,8 @@ export type StartAgentsServerOptions = {
|
|
|
29
29
|
*/
|
|
30
30
|
export declare function startAgentsServer(options: StartAgentsServerOptions): Promise<void>;
|
|
31
31
|
/**
|
|
32
|
-
* Loads
|
|
32
|
+
* Loads Agents Server runtime environment from the installed `.env` file when explicitly configured and falls back
|
|
33
|
+
* to the launch-directory `.env`.
|
|
33
34
|
*
|
|
34
35
|
* @private internal utility of `ptbk agents-server`
|
|
35
36
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
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-111`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -107,6 +107,13 @@ const PTBK_AGENTS_SERVER_SQLITE_PATH_ENV = 'PTBK_AGENTS_SERVER_SQLITE_PATH';
|
|
|
107
107
|
*/
|
|
108
108
|
const PTBK_HOSTNAME_ENV = 'PTBK_HOSTNAME';
|
|
109
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Explicit installed `.env` file passed by standalone VPS pm2/runtime launchers.
|
|
112
|
+
*
|
|
113
|
+
* @private internal constant of `ptbk agents-server`
|
|
114
|
+
*/
|
|
115
|
+
const PTBK_AGENTS_SERVER_ENV_FILE_ENV = 'PTBK_AGENTS_SERVER_ENV_FILE';
|
|
116
|
+
|
|
110
117
|
/**
|
|
111
118
|
* Entropy size for the local-only token shared by the CLI pump and the Next app.
|
|
112
119
|
*
|
|
@@ -355,11 +362,20 @@ async function prepareAgentsServerDevelopmentRuntime(
|
|
|
355
362
|
}
|
|
356
363
|
|
|
357
364
|
/**
|
|
358
|
-
* Loads
|
|
365
|
+
* Loads Agents Server runtime environment from the installed `.env` file when explicitly configured and falls back
|
|
366
|
+
* to the launch-directory `.env`.
|
|
359
367
|
*
|
|
360
368
|
* @private internal utility of `ptbk agents-server`
|
|
361
369
|
*/
|
|
362
370
|
export function loadAgentsServerProjectEnvironment(launchWorkingDirectory: string): void {
|
|
371
|
+
const explicitEnvFilePath = process.env[PTBK_AGENTS_SERVER_ENV_FILE_ENV]?.trim();
|
|
372
|
+
if (explicitEnvFilePath) {
|
|
373
|
+
const explicitLoadResult = dotenv.config({ path: explicitEnvFilePath, override: true });
|
|
374
|
+
if (!explicitLoadResult.error) {
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
363
379
|
dotenv.config({ path: join(launchWorkingDirectory, AGENTS_SERVER_PROJECT_ENV_FILE_NAME) });
|
|
364
380
|
}
|
|
365
381
|
|