@promptbook/cli 0.112.0-96 → 0.112.0-97
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/README.md +3 -3
- package/apps/agents-server/playwright.config.ts +2 -1
- package/apps/agents-server/src/app/admin/code-runners/CodeRunnersClient.tsx +358 -19
- package/apps/agents-server/src/app/admin/database/page.tsx +2 -1
- package/apps/agents-server/src/app/admin/servers/CreateServerDialog.tsx +46 -505
- package/apps/agents-server/src/app/admin/servers/ServersClient.tsx +23 -11
- package/apps/agents-server/src/app/admin/servers/ServersRegistryApi.ts +5 -0
- package/apps/agents-server/src/app/admin/servers/ServersRegistryDnsTypes.ts +87 -0
- package/apps/agents-server/src/app/admin/servers/ServersRegistryTable.tsx +258 -128
- package/apps/agents-server/src/app/admin/servers/useCreateServerWizard.ts +46 -334
- package/apps/agents-server/src/app/admin/servers/useServersRegistryState.ts +26 -2
- package/apps/agents-server/src/app/admin/update/UpdateClient.tsx +435 -0
- package/apps/agents-server/src/app/admin/update/page.tsx +14 -0
- package/apps/agents-server/src/app/api/admin/code-runners/authentication/route.ts +197 -0
- package/apps/agents-server/src/app/api/admin/code-runners/route.ts +4 -35
- package/apps/agents-server/src/app/api/admin/servers/[serverId]/route.ts +10 -5
- package/apps/agents-server/src/app/api/admin/servers/route.ts +97 -6
- package/apps/agents-server/src/app/api/admin/update/route.ts +52 -0
- package/apps/agents-server/src/app/api/auth/login/route.ts +8 -0
- package/apps/agents-server/src/app/api/auth/logout/route.ts +10 -2
- package/apps/agents-server/src/app/page.tsx +10 -0
- package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +6 -0
- package/apps/agents-server/src/database/$provideClientSql.ts +4 -17
- package/apps/agents-server/src/database/$provideDatabaseAdminExecutor.ts +3 -24
- package/apps/agents-server/src/database/$providePostgresPool.ts +27 -0
- package/apps/agents-server/src/database/$provideSupabaseForServer.ts +11 -1
- package/apps/agents-server/src/database/agentsServerDatabaseMode.ts +20 -1
- package/apps/agents-server/src/database/postgres/$provideLocalPostgresSupabase.ts +1261 -0
- package/apps/agents-server/src/languages/ServerTranslationKeys.ts +1 -0
- package/apps/agents-server/src/languages/translations/czech.yaml +1 -0
- package/apps/agents-server/src/languages/translations/english.yaml +1 -0
- package/apps/agents-server/src/middleware.ts +32 -0
- package/apps/agents-server/src/tools/$provideServer.ts +2 -2
- package/apps/agents-server/src/utils/codeRunnerAuthentication.ts +394 -0
- package/apps/agents-server/src/utils/codeRunnerConfiguration.ts +67 -0
- package/apps/agents-server/src/utils/serverManagement/standaloneVpsServerMetadata.ts +145 -0
- package/apps/agents-server/src/utils/serverRegistry.ts +7 -6
- package/apps/agents-server/src/utils/session.ts +37 -9
- package/apps/agents-server/src/utils/shibboleth/createShibbolethAuthenticationLogPayload.ts +173 -0
- package/apps/agents-server/src/utils/shibboleth/writeShibbolethAuthenticationLog.ts +27 -0
- package/apps/agents-server/src/utils/standaloneVpsDnsDiagnostics.ts +258 -0
- package/apps/agents-server/src/utils/standaloneVpsRawIpBootstrap.ts +87 -0
- package/apps/agents-server/src/utils/vpsConfiguration.ts +87 -15
- package/apps/agents-server/src/utils/vpsSelfUpdate.ts +664 -0
- package/esm/apps/agents-server/src/database/agentsServerDatabaseMode.d.ts +9 -1
- package/esm/apps/agents-server/src/utils/serverRegistry.d.ts +1 -1
- package/esm/index.es.js +8 -6
- package/esm/index.es.js.map +1 -1
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/book-components/Chat/utils/renderMarkdown.ts +1 -3
- package/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.ts +1 -1
- package/src/other/templates/getTemplatesPipelineCollection.ts +698 -755
- package/src/scrapers/document/DocumentScraper.ts +1 -1
- package/src/scrapers/document-legacy/LegacyDocumentScraper.ts +1 -1
- package/src/version.ts +2 -2
- package/src/versions.txt +1 -0
- package/umd/apps/agents-server/src/database/agentsServerDatabaseMode.d.ts +9 -1
- package/umd/apps/agents-server/src/utils/serverRegistry.d.ts +1 -1
- package/umd/index.umd.js +8 -6
- package/umd/index.umd.js.map +1 -1
- package/umd/src/version.d.ts +1 -1
|
@@ -150,7 +150,7 @@ export class DocumentScraper implements Converter, Scraper {
|
|
|
150
150
|
*/
|
|
151
151
|
} satisfies ScraperSourceHandler;
|
|
152
152
|
|
|
153
|
-
const knowledge = this.markdownScraper.scrape(markdownSource);
|
|
153
|
+
const knowledge = await this.markdownScraper.scrape(markdownSource);
|
|
154
154
|
|
|
155
155
|
await cacheFilehandler.destroy();
|
|
156
156
|
|
|
@@ -190,7 +190,7 @@ export class LegacyDocumentScraper implements Converter, Scraper {
|
|
|
190
190
|
*/
|
|
191
191
|
} satisfies ScraperSourceHandler;
|
|
192
192
|
|
|
193
|
-
const knowledge = this.documentScraper.scrape(markdownSource);
|
|
193
|
+
const knowledge = await this.documentScraper.scrape(markdownSource);
|
|
194
194
|
|
|
195
195
|
await cacheFilehandler.destroy();
|
|
196
196
|
|
package/src/version.ts
CHANGED
|
@@ -16,11 +16,11 @@ export const BOOK_LANGUAGE_VERSION: string_semantic_version = '2.0.0';
|
|
|
16
16
|
* @generated
|
|
17
17
|
* @see https://github.com/webgptorg/promptbook
|
|
18
18
|
*/
|
|
19
|
-
export const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version = '0.112.0-
|
|
19
|
+
export const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version = '0.112.0-97';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Represents the version string of the Promptbook engine.
|
|
23
|
-
* It follows semantic versioning (e.g., `0.112.0-
|
|
23
|
+
* It follows semantic versioning (e.g., `0.112.0-96`).
|
|
24
24
|
*
|
|
25
25
|
* @generated
|
|
26
26
|
*/
|
package/src/versions.txt
CHANGED
|
@@ -9,7 +9,7 @@ export declare const AGENTS_SERVER_SQLITE_PATH_ENV_NAME = "PTBK_AGENTS_SERVER_SQ
|
|
|
9
9
|
/**
|
|
10
10
|
* Supported Agents Server database backends.
|
|
11
11
|
*/
|
|
12
|
-
export type AgentsServerDatabaseMode = 'supabase' | 'sqlite';
|
|
12
|
+
export type AgentsServerDatabaseMode = 'supabase' | 'sqlite' | 'postgres';
|
|
13
13
|
/**
|
|
14
14
|
* Resolves the configured Agents Server database backend.
|
|
15
15
|
*/
|
|
@@ -18,3 +18,11 @@ export declare function resolveAgentsServerDatabaseMode(): AgentsServerDatabaseM
|
|
|
18
18
|
* Returns whether the Agents Server is using the local SQLite backend.
|
|
19
19
|
*/
|
|
20
20
|
export declare function isAgentsServerSqliteMode(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Returns whether the Agents Server is using the standalone PostgreSQL backend.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isAgentsServerPostgresMode(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Returns whether the Agents Server is using a standalone local database backend.
|
|
27
|
+
*/
|
|
28
|
+
export declare function isAgentsServerStandaloneMode(): boolean;
|
|
@@ -68,7 +68,7 @@ export declare function listRegisteredServersUsingServiceRole(options?: {
|
|
|
68
68
|
/**
|
|
69
69
|
* Loads virtual server records from the comma-separated `SERVERS` environment variable.
|
|
70
70
|
*
|
|
71
|
-
* @returns Server records with deterministic table prefixes
|
|
71
|
+
* @returns Server records with deterministic table prefixes from the configured server prefix or normalized domains.
|
|
72
72
|
*/
|
|
73
73
|
export declare function listEnvironmentRegisteredServers(): Array<ServerRecord>;
|
|
74
74
|
/**
|
package/umd/index.umd.js
CHANGED
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
* @generated
|
|
61
61
|
* @see https://github.com/webgptorg/promptbook
|
|
62
62
|
*/
|
|
63
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
63
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-97';
|
|
64
64
|
/**
|
|
65
65
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
66
66
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -2471,7 +2471,7 @@
|
|
|
2471
2471
|
*/
|
|
2472
2472
|
const AGENTS_SERVER_ENV_CREATED_COMMENT = '# Created by `ptbk agents-server init` command';
|
|
2473
2473
|
/**
|
|
2474
|
-
* Variables required for a local Agents Server backed by Supabase or standalone SQLite.
|
|
2474
|
+
* Variables required for a local Agents Server backed by Supabase, standalone PostgreSQL, or standalone SQLite.
|
|
2475
2475
|
*/
|
|
2476
2476
|
const REQUIRED_AGENTS_SERVER_ENV_VARIABLES = [
|
|
2477
2477
|
createAgentsServerEnvVariable('PTBK_AGENTS_SERVER_DATABASE', 'supabase'),
|
|
@@ -57754,7 +57754,7 @@
|
|
|
57754
57754
|
> },
|
|
57755
57755
|
*/
|
|
57756
57756
|
};
|
|
57757
|
-
const knowledge = this.markdownScraper.scrape(markdownSource);
|
|
57757
|
+
const knowledge = await this.markdownScraper.scrape(markdownSource);
|
|
57758
57758
|
await cacheFilehandler.destroy();
|
|
57759
57759
|
return knowledge;
|
|
57760
57760
|
}
|
|
@@ -57918,7 +57918,7 @@
|
|
|
57918
57918
|
> },
|
|
57919
57919
|
*/
|
|
57920
57920
|
};
|
|
57921
|
-
const knowledge = this.documentScraper.scrape(markdownSource);
|
|
57921
|
+
const knowledge = await this.documentScraper.scrape(markdownSource);
|
|
57922
57922
|
await cacheFilehandler.destroy();
|
|
57923
57923
|
return knowledge;
|
|
57924
57924
|
}
|
|
@@ -67616,13 +67616,15 @@
|
|
|
67616
67616
|
/**
|
|
67617
67617
|
* Loads virtual server records from the comma-separated `SERVERS` environment variable.
|
|
67618
67618
|
*
|
|
67619
|
-
* @returns Server records with deterministic table prefixes
|
|
67619
|
+
* @returns Server records with deterministic table prefixes from the configured server prefix or normalized domains.
|
|
67620
67620
|
*/
|
|
67621
67621
|
function listEnvironmentRegisteredServers() {
|
|
67622
|
+
var _a;
|
|
67622
67623
|
const rawServers = process.env[SERVERS_ENV_NAME];
|
|
67623
67624
|
if (!rawServers) {
|
|
67624
67625
|
return [];
|
|
67625
67626
|
}
|
|
67627
|
+
const configuredTablePrefix = ((_a = process.env.SUPABASE_TABLE_PREFIX) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
67626
67628
|
const normalizedDomains = uniqueStrings$1(rawServers
|
|
67627
67629
|
.split(',')
|
|
67628
67630
|
.map((server) => normalizeServerDomain(server))
|
|
@@ -67632,7 +67634,7 @@
|
|
|
67632
67634
|
name: domain,
|
|
67633
67635
|
environment: SERVER_ENVIRONMENT.PRODUCTION,
|
|
67634
67636
|
domain,
|
|
67635
|
-
tablePrefix: buildEnvironmentServerTablePrefix(domain),
|
|
67637
|
+
tablePrefix: configuredTablePrefix || buildEnvironmentServerTablePrefix(domain),
|
|
67636
67638
|
createdAt: ENVIRONMENT_SERVER_TIMESTAMP,
|
|
67637
67639
|
updatedAt: ENVIRONMENT_SERVER_TIMESTAMP,
|
|
67638
67640
|
}));
|