@promptbook/cli 0.112.0-138 → 0.112.0-140

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 (56) hide show
  1. package/README.md +1 -1
  2. package/apps/agents-server/README.md +9 -0
  3. package/apps/agents-server/src/app/actions.ts +18 -7
  4. package/apps/agents-server/src/app/admin/login-methods/shibboleth/page.tsx +7 -17
  5. package/apps/agents-server/src/app/admin/metadata/MetadataClient.tsx +395 -30
  6. package/apps/agents-server/src/app/api/agents/export/route.ts +28 -2
  7. package/apps/agents-server/src/app/api/auth/change-password/route.ts +53 -6
  8. package/apps/agents-server/src/app/api/auth/login/route.ts +17 -8
  9. package/apps/agents-server/src/app/api/chat/export/pdf/route.ts +167 -2
  10. package/apps/agents-server/src/app/api/emails/incoming/sendgrid/route.ts +24 -2
  11. package/apps/agents-server/src/app/api/metadata/import/route.ts +2 -1
  12. package/apps/agents-server/src/app/api/users/[username]/route.ts +3 -2
  13. package/apps/agents-server/src/app/api/users/route.ts +5 -4
  14. package/apps/agents-server/src/components/Homepage/AgentsList.tsx +1 -13
  15. package/apps/agents-server/src/components/Homepage/AgentsListHeader.tsx +3 -19
  16. package/apps/agents-server/src/components/Homepage/AgentsListListView.tsx +6 -0
  17. package/apps/agents-server/src/components/Homepage/AgentsListViewContent.tsx +6 -0
  18. package/apps/agents-server/src/components/Homepage/SortableFolderCard.tsx +7 -1
  19. package/apps/agents-server/src/components/Homepage/useAgentsListImportExportState.ts +45 -43
  20. package/apps/agents-server/src/components/Homepage/useAgentsListState.ts +1 -3
  21. package/apps/agents-server/src/components/UsersList/useUsersAdmin.ts +2 -10
  22. package/apps/agents-server/src/database/seedCoreAgents.ts +8 -7
  23. package/apps/agents-server/src/message-providers/email/sendgrid/verifySendgridInboundParseWebhook.ts +345 -0
  24. package/apps/agents-server/src/utils/agentsTransfer/createAgentsExportZipStream.ts +15 -2
  25. package/apps/agents-server/src/utils/authenticateUser.ts +110 -3
  26. package/apps/agents-server/src/utils/authenticationAttemptRateLimit.ts +504 -0
  27. package/apps/agents-server/src/utils/backup/createBooksBackupZipStream.ts +76 -5
  28. package/apps/agents-server/src/utils/chatExport/renderHtmlToPdfOnServer.ts +32 -0
  29. package/apps/agents-server/src/utils/chatExport/sanitizeChatPdfExportHtml.ts +193 -0
  30. package/apps/agents-server/src/utils/currentUserIdentity.ts +22 -9
  31. package/apps/agents-server/src/utils/externalChatRunner/processExternalUserChatJob.ts +5 -0
  32. package/apps/agents-server/src/utils/getUserById.ts +19 -5
  33. package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +5 -0
  34. package/apps/agents-server/src/utils/metadataConfigurationTransfer.ts +32 -16
  35. package/apps/agents-server/src/utils/publicUser.ts +59 -0
  36. package/apps/agents-server/src/utils/shibbolethAuthentication.ts +17 -9
  37. package/apps/agents-server/src/utils/userChat/createRunUserChatJobPersistenceController.ts +17 -11
  38. package/apps/agents-server/src/utils/userChat/createUserChatHarnessProgressCard.ts +99 -0
  39. package/apps/agents-server/src/utils/userChat/createUserChatRunnerProgressCard.ts +63 -0
  40. package/apps/agents-server/src/utils/userChat/userChatMessageLifecycle.ts +0 -3
  41. package/apps/agents-server/src/utils/vpsConfiguration.ts +3 -0
  42. package/esm/index.es.js +14 -5
  43. package/esm/index.es.js.map +1 -1
  44. package/esm/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
  45. package/esm/src/version.d.ts +1 -1
  46. package/package.json +1 -1
  47. package/src/book-components/Chat/Chat/createChatMessageToolCallRenderModel.ts +2 -9
  48. package/src/book-components/Chat/utils/isVisibleChatToolCall.ts +23 -0
  49. package/src/other/templates/getTemplatesPipelineCollection.ts +805 -736
  50. package/src/version.ts +2 -2
  51. package/src/versions.txt +2 -1
  52. package/umd/index.umd.js +14 -5
  53. package/umd/index.umd.js.map +1 -1
  54. package/umd/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
  55. package/umd/src/version.d.ts +1 -1
  56. package/apps/agents-server/src/app/api/long-streaming/route.ts +0 -23
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-138';
19
+ export const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version = '0.112.0-140';
20
20
 
21
21
  /**
22
22
  * Represents the version string of the Promptbook engine.
23
- * It follows semantic versioning (e.g., `0.112.0-137`).
23
+ * It follows semantic versioning (e.g., `0.112.0-139`).
24
24
  *
25
25
  * @generated
26
26
  */
package/src/versions.txt CHANGED
@@ -1163,4 +1163,5 @@
1163
1163
  0.112.0-135
1164
1164
  0.112.0-136
1165
1165
  0.112.0-137
1166
- 0.112.0-138
1166
+ 0.112.0-139
1167
+ 0.112.0-140
package/umd/index.umd.js CHANGED
@@ -63,7 +63,7 @@
63
63
  * @generated
64
64
  * @see https://github.com/webgptorg/promptbook
65
65
  */
66
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-138';
66
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-140';
67
67
  /**
68
68
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
69
69
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -28829,6 +28829,18 @@
28829
28829
  settleOnce(handler);
28830
28830
  });
28831
28831
  };
28832
+ /**
28833
+ * Finishes a marker-completed run and then asks bash to stop.
28834
+ */
28835
+ const finishAfterIdleTimeout = () => {
28836
+ settleWithLog('completed after idle timeout', () => resolve(fullOutput));
28837
+ try {
28838
+ commandProcess.kill();
28839
+ }
28840
+ catch (_a) {
28841
+ // Windows can report EPERM when bash exits before the idle timer fires.
28842
+ }
28843
+ };
28832
28844
  /**
28833
28845
  * Resets the idle timer that triggers termination after inactivity.
28834
28846
  */
@@ -28836,10 +28848,7 @@
28836
28848
  if (idleTimer) {
28837
28849
  clearTimeout(idleTimer);
28838
28850
  }
28839
- idleTimer = setTimeout(() => {
28840
- commandProcess.kill();
28841
- settleWithLog('completed after idle timeout', () => resolve(fullOutput));
28842
- }, idleTimeoutMs);
28851
+ idleTimer = setTimeout(finishAfterIdleTimeout, idleTimeoutMs);
28843
28852
  };
28844
28853
  /**
28845
28854
  * Processes completed output lines to detect completion markers.