@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.
- package/README.md +1 -1
- package/apps/agents-server/README.md +9 -0
- package/apps/agents-server/src/app/actions.ts +18 -7
- package/apps/agents-server/src/app/admin/login-methods/shibboleth/page.tsx +7 -17
- package/apps/agents-server/src/app/admin/metadata/MetadataClient.tsx +395 -30
- package/apps/agents-server/src/app/api/agents/export/route.ts +28 -2
- package/apps/agents-server/src/app/api/auth/change-password/route.ts +53 -6
- package/apps/agents-server/src/app/api/auth/login/route.ts +17 -8
- package/apps/agents-server/src/app/api/chat/export/pdf/route.ts +167 -2
- package/apps/agents-server/src/app/api/emails/incoming/sendgrid/route.ts +24 -2
- package/apps/agents-server/src/app/api/metadata/import/route.ts +2 -1
- package/apps/agents-server/src/app/api/users/[username]/route.ts +3 -2
- package/apps/agents-server/src/app/api/users/route.ts +5 -4
- package/apps/agents-server/src/components/Homepage/AgentsList.tsx +1 -13
- package/apps/agents-server/src/components/Homepage/AgentsListHeader.tsx +3 -19
- package/apps/agents-server/src/components/Homepage/AgentsListListView.tsx +6 -0
- package/apps/agents-server/src/components/Homepage/AgentsListViewContent.tsx +6 -0
- package/apps/agents-server/src/components/Homepage/SortableFolderCard.tsx +7 -1
- package/apps/agents-server/src/components/Homepage/useAgentsListImportExportState.ts +45 -43
- package/apps/agents-server/src/components/Homepage/useAgentsListState.ts +1 -3
- package/apps/agents-server/src/components/UsersList/useUsersAdmin.ts +2 -10
- package/apps/agents-server/src/database/seedCoreAgents.ts +8 -7
- package/apps/agents-server/src/message-providers/email/sendgrid/verifySendgridInboundParseWebhook.ts +345 -0
- package/apps/agents-server/src/utils/agentsTransfer/createAgentsExportZipStream.ts +15 -2
- package/apps/agents-server/src/utils/authenticateUser.ts +110 -3
- package/apps/agents-server/src/utils/authenticationAttemptRateLimit.ts +504 -0
- package/apps/agents-server/src/utils/backup/createBooksBackupZipStream.ts +76 -5
- package/apps/agents-server/src/utils/chatExport/renderHtmlToPdfOnServer.ts +32 -0
- package/apps/agents-server/src/utils/chatExport/sanitizeChatPdfExportHtml.ts +193 -0
- package/apps/agents-server/src/utils/currentUserIdentity.ts +22 -9
- package/apps/agents-server/src/utils/externalChatRunner/processExternalUserChatJob.ts +5 -0
- package/apps/agents-server/src/utils/getUserById.ts +19 -5
- package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +5 -0
- package/apps/agents-server/src/utils/metadataConfigurationTransfer.ts +32 -16
- package/apps/agents-server/src/utils/publicUser.ts +59 -0
- package/apps/agents-server/src/utils/shibbolethAuthentication.ts +17 -9
- package/apps/agents-server/src/utils/userChat/createRunUserChatJobPersistenceController.ts +17 -11
- package/apps/agents-server/src/utils/userChat/createUserChatHarnessProgressCard.ts +99 -0
- package/apps/agents-server/src/utils/userChat/createUserChatRunnerProgressCard.ts +63 -0
- package/apps/agents-server/src/utils/userChat/userChatMessageLifecycle.ts +0 -3
- package/apps/agents-server/src/utils/vpsConfiguration.ts +3 -0
- package/esm/index.es.js +14 -5
- package/esm/index.es.js.map +1 -1
- package/esm/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/book-components/Chat/Chat/createChatMessageToolCallRenderModel.ts +2 -9
- package/src/book-components/Chat/utils/isVisibleChatToolCall.ts +23 -0
- package/src/other/templates/getTemplatesPipelineCollection.ts +805 -736
- package/src/version.ts +2 -2
- package/src/versions.txt +2 -1
- package/umd/index.umd.js +14 -5
- package/umd/index.umd.js.map +1 -1
- package/umd/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
- package/umd/src/version.d.ts +1 -1
- package/apps/agents-server/src/app/api/long-streaming/route.ts +0 -23
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ToolCall } from '../../../types/ToolCall';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true when one tool call represents a user-facing action.
|
|
4
|
+
*
|
|
5
|
+
* @param toolCall - Tool call candidate.
|
|
6
|
+
* @returns Whether the tool call should be visible in chat progress and chips.
|
|
7
|
+
*
|
|
8
|
+
* @private internal utility of `<Chat/>`
|
|
9
|
+
*/
|
|
10
|
+
export declare function isVisibleChatToolCall(toolCall: Pick<ToolCall, 'name'>): boolean;
|
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-139`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ToolCall } from '../../../types/ToolCall';
|
|
2
|
-
import { ASSISTANT_PREPARATION_TOOL_CALL_NAME } from '../../../types/ToolCall';
|
|
3
2
|
import { resolveToolCallIdempotencyKey } from '../../../utils/toolCalls/resolveToolCallIdempotencyKey';
|
|
4
3
|
import type { AgentChipData } from '../AgentChip/AgentChip';
|
|
5
4
|
import type { ChatMessage } from '../types/ChatMessage';
|
|
@@ -8,6 +7,7 @@ import { collectTeamToolCallSummary } from '../utils/collectTeamToolCallSummary'
|
|
|
8
7
|
import { isTeamToolName } from '../utils/createTeamToolNameFromUrl';
|
|
9
8
|
import type { ToolCallChipletInfo } from '../utils/getToolCallChipletInfo';
|
|
10
9
|
import { buildToolCallChipText, getToolCallChipletInfo } from '../utils/getToolCallChipletInfo';
|
|
10
|
+
import { isVisibleChatToolCall } from '../utils/isVisibleChatToolCall';
|
|
11
11
|
import { resolveToolCallState } from '../utils/resolveToolCallState';
|
|
12
12
|
import { createDeduplicatedWalletCredentialToolCalls } from '../utils/walletCredentialToolCall';
|
|
13
13
|
import type { ChatProps } from './ChatProps';
|
|
@@ -121,13 +121,6 @@ export function createChatMessageToolCallRenderModel(
|
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
/**
|
|
125
|
-
* Tool calls that should stay available in message data but never render as chips under the message.
|
|
126
|
-
*
|
|
127
|
-
* @private internal helper of `<ChatMessageItem/>`
|
|
128
|
-
*/
|
|
129
|
-
const HIDDEN_TOOL_CALL_CHIP_NAMES = new Set([ASSISTANT_PREPARATION_TOOL_CALL_NAME, 'agent_progress']);
|
|
130
|
-
|
|
131
124
|
/**
|
|
132
125
|
* Ongoing tool call entry used for grouping.
|
|
133
126
|
*
|
|
@@ -141,7 +134,7 @@ type OngoingToolCall = NonNullable<ChatMessage['ongoingToolCalls']>[number];
|
|
|
141
134
|
* @private internal helper of `<ChatMessageItem/>`
|
|
142
135
|
*/
|
|
143
136
|
function shouldRenderToolCallChip(toolCall: ToolCall): boolean {
|
|
144
|
-
return
|
|
137
|
+
return isVisibleChatToolCall(toolCall);
|
|
145
138
|
}
|
|
146
139
|
|
|
147
140
|
/**
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ASSISTANT_PREPARATION_TOOL_CALL_NAME, type ToolCall } from '../../../types/ToolCall';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Tool calls that stay available in message data but should not be surfaced as user-facing chat progress.
|
|
5
|
+
*
|
|
6
|
+
* @private internal utility of `<Chat/>`
|
|
7
|
+
*/
|
|
8
|
+
const HIDDEN_CHAT_TOOL_CALL_NAMES: ReadonlySet<string> = new Set([
|
|
9
|
+
ASSISTANT_PREPARATION_TOOL_CALL_NAME,
|
|
10
|
+
'agent_progress',
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Returns true when one tool call represents a user-facing action.
|
|
15
|
+
*
|
|
16
|
+
* @param toolCall - Tool call candidate.
|
|
17
|
+
* @returns Whether the tool call should be visible in chat progress and chips.
|
|
18
|
+
*
|
|
19
|
+
* @private internal utility of `<Chat/>`
|
|
20
|
+
*/
|
|
21
|
+
export function isVisibleChatToolCall(toolCall: Pick<ToolCall, 'name'>): boolean {
|
|
22
|
+
return !HIDDEN_CHAT_TOOL_CALL_NAMES.has(toolCall.name);
|
|
23
|
+
}
|