@promptbook/cli 0.112.0-96 → 0.112.0-98

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.
Files changed (79) hide show
  1. package/apps/agents-server/playwright.config.ts +2 -1
  2. package/apps/agents-server/src/app/admin/cli-access/CliAccessClient.tsx +99 -0
  3. package/apps/agents-server/src/app/admin/cli-access/page.tsx +14 -0
  4. package/apps/agents-server/src/app/admin/code-runners/CodeRunnersClient.tsx +124 -34
  5. package/apps/agents-server/src/app/admin/servers/CreateServerDialog.tsx +46 -505
  6. package/apps/agents-server/src/app/admin/servers/ServersClient.tsx +23 -11
  7. package/apps/agents-server/src/app/admin/servers/ServersRegistryApi.ts +5 -0
  8. package/apps/agents-server/src/app/admin/servers/ServersRegistryDnsTypes.ts +87 -0
  9. package/apps/agents-server/src/app/admin/servers/ServersRegistryTable.tsx +258 -128
  10. package/apps/agents-server/src/app/admin/servers/useCreateServerWizard.ts +46 -334
  11. package/apps/agents-server/src/app/admin/servers/useServersRegistryState.ts +26 -2
  12. package/apps/agents-server/src/app/admin/update/UpdateClient.tsx +435 -0
  13. package/apps/agents-server/src/app/admin/update/page.tsx +14 -0
  14. package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatSurface.tsx +24 -0
  15. package/apps/agents-server/src/app/api/admin/cli-access/route.ts +137 -0
  16. package/apps/agents-server/src/app/api/admin/code-runners/authentication/route.ts +140 -0
  17. package/apps/agents-server/src/app/api/admin/code-runners/route.ts +4 -35
  18. package/apps/agents-server/src/app/api/admin/servers/[serverId]/route.ts +7 -2
  19. package/apps/agents-server/src/app/api/admin/servers/route.ts +95 -4
  20. package/apps/agents-server/src/app/api/admin/update/route.ts +52 -0
  21. package/apps/agents-server/src/app/api/auth/login/route.ts +8 -0
  22. package/apps/agents-server/src/app/api/auth/logout/route.ts +10 -2
  23. package/apps/agents-server/src/app/api/chat/export/pdf/route.ts +63 -0
  24. package/apps/agents-server/src/app/page.tsx +10 -0
  25. package/apps/agents-server/src/components/AdminTerminal/AdminTerminalCard.tsx +279 -0
  26. package/apps/agents-server/src/components/AdminTerminal/useAdminTerminalSession.ts +336 -0
  27. package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +10 -0
  28. package/apps/agents-server/src/languages/ServerTranslationKeys.ts +2 -0
  29. package/apps/agents-server/src/languages/translations/czech.yaml +2 -0
  30. package/apps/agents-server/src/languages/translations/english.yaml +2 -0
  31. package/apps/agents-server/src/middleware.ts +32 -0
  32. package/apps/agents-server/src/tools/BrowserConnectionProvider.ts +1 -1
  33. package/apps/agents-server/src/utils/chatExport/downloadChatPdfFromServer.ts +59 -0
  34. package/apps/agents-server/src/utils/chatExport/renderHtmlToPdfOnServer.ts +37 -0
  35. package/apps/agents-server/src/utils/codeRunnerAuthentication.ts +234 -0
  36. package/apps/agents-server/src/utils/codeRunnerConfiguration.ts +67 -0
  37. package/apps/agents-server/src/utils/createInteractiveTerminalEventStream.ts +84 -0
  38. package/apps/agents-server/src/utils/interactiveTerminalSession.ts +442 -0
  39. package/apps/agents-server/src/utils/serverCliAccess.ts +221 -0
  40. package/apps/agents-server/src/utils/serverManagement/standaloneVpsServerMetadata.ts +145 -0
  41. package/apps/agents-server/src/utils/serverRegistry.ts +3 -2
  42. package/apps/agents-server/src/utils/session.ts +37 -9
  43. package/apps/agents-server/src/utils/shibboleth/createShibbolethAuthenticationLogPayload.ts +173 -0
  44. package/apps/agents-server/src/utils/shibboleth/writeShibbolethAuthenticationLog.ts +27 -0
  45. package/apps/agents-server/src/utils/standaloneVpsDnsDiagnostics.ts +258 -0
  46. package/apps/agents-server/src/utils/standaloneVpsRawIpBootstrap.ts +87 -0
  47. package/apps/agents-server/src/utils/vpsConfiguration.ts +87 -13
  48. package/apps/agents-server/src/utils/vpsSelfUpdate.ts +664 -0
  49. package/esm/apps/agents-server/src/utils/serverRegistry.d.ts +1 -1
  50. package/esm/index.es.js +7 -5
  51. package/esm/index.es.js.map +1 -1
  52. package/esm/src/book-components/Chat/Chat/ChatActionsBar.d.ts +2 -0
  53. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +6 -0
  54. package/esm/src/book-components/Chat/save/_common/ChatSaveFormatHandler.d.ts +35 -0
  55. package/esm/src/book-components/Chat/save/_common/createChatExportFilename.d.ts +11 -0
  56. package/esm/src/version.d.ts +1 -1
  57. package/package.json +1 -1
  58. package/src/book-components/Chat/Chat/Chat.tsx +2 -0
  59. package/src/book-components/Chat/Chat/ChatActionsBar.tsx +17 -9
  60. package/src/book-components/Chat/Chat/ChatProps.tsx +7 -0
  61. package/src/book-components/Chat/save/_common/ChatSaveFormatHandler.ts +40 -0
  62. package/src/book-components/Chat/save/_common/createChatExportFilename.ts +20 -0
  63. package/src/book-components/Chat/utils/renderMarkdown.ts +1 -3
  64. package/src/other/templates/getTemplatesPipelineCollection.ts +718 -790
  65. package/src/scrapers/document/DocumentScraper.ts +1 -1
  66. package/src/scrapers/document-legacy/LegacyDocumentScraper.ts +1 -1
  67. package/src/version.ts +2 -2
  68. package/src/versions.txt +2 -0
  69. package/umd/apps/agents-server/src/utils/serverRegistry.d.ts +1 -1
  70. package/umd/index.umd.js +7 -5
  71. package/umd/index.umd.js.map +1 -1
  72. package/umd/src/book-components/Chat/Chat/ChatActionsBar.d.ts +2 -0
  73. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +6 -0
  74. package/umd/src/book-components/Chat/save/_common/ChatSaveFormatHandler.d.ts +35 -0
  75. package/umd/src/book-components/Chat/save/_common/createChatExportFilename.d.ts +11 -0
  76. package/umd/src/version.d.ts +1 -1
  77. package/src/conversion/validation/_importPipeline.ts +0 -88
  78. /package/esm/src/conversion/validation/{_importPipeline.d.ts → _importPipeline.test.d.ts} +0 -0
  79. /package/umd/src/conversion/validation/{_importPipeline.d.ts → _importPipeline.test.d.ts} +0 -0
@@ -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-96';
19
+ export const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version = '0.112.0-98';
20
20
 
21
21
  /**
22
22
  * Represents the version string of the Promptbook engine.
23
- * It follows semantic versioning (e.g., `0.112.0-94`).
23
+ * It follows semantic versioning (e.g., `0.112.0-97`).
24
24
  *
25
25
  * @generated
26
26
  */
package/src/versions.txt CHANGED
@@ -1131,3 +1131,5 @@
1131
1131
  0.112.0-93
1132
1132
  0.112.0-94
1133
1133
  0.112.0-96
1134
+ 0.112.0-97
1135
+ 0.112.0-98
@@ -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 derived from normalized domains.
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-96';
63
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-98';
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
@@ -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 derived from normalized domains.
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
  }));