Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/pieces/community/ai/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-ai",
"version": "0.1.7",
"version": "0.1.8",
"type": "commonjs",
"main": "./src/index.js",
"types": "./src/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,18 @@ export const agentOutputBuilder = (prompt: string) => {
input,
agentTools,
}: StartToolCallParams) {
const baseTool: ToolCallBase = {
toolName,
toolCallId,
type: ContentBlockType.TOOL_CALL,
status: ToolCallStatus.IN_PROGRESS,
input,
output: undefined,
startTime: new Date().toISOString(),
};
const metadata = getToolMetadata({
toolName,
baseTool: {
toolName,
toolCallId,
type: ContentBlockType.TOOL_CALL,
status: ToolCallStatus.IN_PROGRESS,
input,
output: undefined,
startTime: new Date().toISOString(),
},
baseTool,
tools: agentTools,
});
steps.push(metadata);
Expand All @@ -78,8 +79,10 @@ export const agentOutputBuilder = (prompt: string) => {
block.type === ContentBlockType.TOOL_CALL &&
(block as ToolCallContentBlock).toolCallId === toolCallId
);
if (toolIdx === -1) {
return;
}
const tool = steps[toolIdx] as ToolCallContentBlock;
assertNotNullOrUndefined(tool, 'Last block must be a tool call');
steps[toolIdx] = {
...tool,
status: ToolCallStatus.COMPLETED,
Expand All @@ -93,8 +96,10 @@ export const agentOutputBuilder = (prompt: string) => {
block.type === ContentBlockType.TOOL_CALL &&
(block as ToolCallContentBlock).toolCallId === toolCallId
);
if (toolIdx === -1) {
return;
}
const tool = steps[toolIdx] as ToolCallContentBlock;
assertNotNullOrUndefined(tool, 'Last block must be a tool call');
steps[toolIdx] = {
...tool,
status: ToolCallStatus.COMPLETED,
Expand Down
31 changes: 27 additions & 4 deletions packages/pieces/community/ai/src/lib/actions/agents/run-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
AIProviderName,
AgentProviderModel,
ExecutionToolStatus,
normalizeToolOutputToExecuteResponse,
} from '@activepieces/shared';
import { hasToolCall, stepCountIs, streamText } from 'ai';
import { agentOutputBuilder } from './agent-output-builder';
Expand Down Expand Up @@ -168,7 +169,8 @@ export const runAgent = createAction({
if (agentUtils.isTaskCompletionToolCall(chunk.toolName)) {
continue;
}
const toolOutput = chunk.output as Record<string, unknown>;
const rawOutput = chunk.output;
const toolOutput = normalizeToolOutputToExecuteResponse(rawOutput);

if (toolOutput['status'] === ExecutionToolStatus.FAILED && toolOutput['errorMessage']) {
outputBuilder.addMarkdown(
Expand Down Expand Up @@ -201,19 +203,40 @@ export const runAgent = createAction({
});
break;
}
case 'start':
case 'start-step':
case 'tool-input-start':
case 'tool-input-delta':
case 'tool-input-end':
case 'finish-step':
case 'finish':
break;
default:
break;
}
await context.output.update({ data: outputBuilder.build() });
} catch (innerError) {
let detailsStr: string;
try {
detailsStr = typeof innerError === 'object' && innerError !== null && 'message' in innerError
? `${(innerError as Error).message}${(innerError as Error).stack ? `\n${(innerError as Error).stack}` : ''}`
: inspect(innerError);
} catch {
detailsStr = String(innerError);
}
errors.push({
type: 'chunk-processing-error',
message: 'Error processing chunk',
details: inspect(innerError),
message: `Error processing chunk (type=${chunk.type})`,
details: detailsStr,
});
}
}

if (errors.length > 0) {
const errorSummary = errors.map(e => `${e.type}: ${e.message}`).join('\n');
const errorSummary = errors.map(e => {
const detail = e.details != null ? `\n ${String(e.details)}` : '';
return `${e.type}: ${e.message}${detail}`;
}).join('\n');
outputBuilder.addMarkdown(`\n\n**Errors encountered:**\n${errorSummary}`);
outputBuilder.fail({ message: 'Agent completed with errors' });
await context.output.update({ data: outputBuilder.build() });
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/cyberark/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-cyberark",
"version": "0.1.3",
"version": "0.1.4",
"type": "commonjs",
"main": "./src/index.js",
"types": "./src/index.d.ts",
Expand Down
56 changes: 55 additions & 1 deletion packages/pieces/community/cyberark/src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
"Find User": "Benutzer finden",
"Add Member to Group": "Mitglied zur Gruppe hinzufügen",
"Remove Member from Group": "Mitglied aus Gruppe entfernen",
"Get Password Value": "Passwortwert erhalten",
"Retrieve Private SSH Key": "Privaten SSH-Schlüssel abrufen",
"Change Credentials in the Vault": "Zugangsdaten im Tresor ändern",
"Verify Credentials in Bulk": "Anmeldedaten in Bulk überprüfen",
"Change Credentials Immediately in Bulk": "Zugangsdaten sofort in Bulk ändern",
"Set Next Password in Bulk": "Nächstes Passwort in Bulk setzen",
"Change Credentials in the Vault in Bulk": "Zugangsdaten im Tresor in Bulk ändern",
"Reconcile Credentials in Bulk": "Anmeldeinformationen in Bulk abgleichen",
"Creates a new user in the CyberArk Vault": "Erstellt einen neuen Benutzer im CyberArk Tresor",
"Updates an existing Vault user (except Master and Batch built-in users)": "Aktualisiert einen bestehenden Tresorbenutzer (außer Master und Batch eingebaute Benutzer)",
"Deletes a specific user in the Vault (requires Add/Update Users authorization)": "Löscht einen bestimmten Benutzer im Tresor (erfordert Hinzufügen/Aktualisieren der Benutzerberechtigung)",
Expand All @@ -25,6 +33,14 @@
"Returns a list of existing users in the Vault based on filter criteria (requires Audit users permissions)": "Gibt eine Liste existierender Benutzer im Tresor basierend auf Filterkriterien zurück (benötigt Audit-Benutzerberechtigungen)",
"Adds a user as a member to an existing Vault group (requires Add/Update users permissions)": "Fügt einen Benutzer als Mitglied zu einer bestehenden Vault-Gruppe hinzu (erfordert Berechtigungen für Hinzufügen/Aktualisieren von Benutzern)",
"Removes a specific user from a user group in the Vault": "Entfernt einen bestimmten Benutzer aus einer Benutzergruppe im Tresor",
"Retrieves the password or SSH key of an existing account identified by its Account ID": "Ruft das Passwort oder den SSH-Schlüssel eines bestehenden Kontos ab, das durch seine Konto-ID identifiziert wurde",
"Retrieves a private SSH key file from an existing account identified by its Account ID": "Ruft eine private SSH-Schlüsseldatei von einem existierenden Konto ab, das durch seine Konto-ID identifiziert wurde",
"Sets account credentials and changes them in the Vault. This will not affect credentials on the target device.": "Legt Anmeldedaten fest und ändert diese im Tresor. Dies wirkt sich nicht auf die Anmeldedaten auf dem Zielgerät aus.",
"Marks multiple accounts for verification by the CPM": "Markiert mehrere Konten zur Überprüfung durch die CPM",
"Marks multiple accounts for an immediate credentials change by the CPM to a new random value": "Markiert mehrere Konten für eine sofortige Anmeldeinformationen, die durch die CPM geändert werden in einen neuen zufälligen Wert",
"Sets multiple accounts' credentials to use for the next CPM change": "Legt die Zugangsdaten mehrerer Konten für die nächste CPM-Änderung fest",
"Sets credentials for multiple accounts and changes them in the Vault. This does not affect credentials on the target device.": "Legt Anmeldedaten für mehrere Konten fest und ändert diese im Tresor. Dies wirkt sich nicht auf die Anmeldedaten auf dem Zielgerät aus.",
"Marks multiple accounts for automatic reconciliation by the CPM": "Markiert mehrere Konten für die automatische Versöhnung durch die CPM",
"User Type": "Benutzertyp",
"Initial Password": "Anfangspasswort",
"Authentication Method": "Authentifizierungsmethode",
Expand Down Expand Up @@ -85,6 +101,18 @@
"Member": "Mitglied",
"Member Type": "Mitgliedstyp",
"Domain Name": "Domain-Name",
"Account": "Konto",
"Reason": "Grund",
"Ticketing System Name": "Ticket-Systemname",
"Ticket ID": "Ticket-ID",
"Version": "Version",
"Action Type": "Aktionstyp",
"Is Use": "Ist verwendet",
"Machine": "Maschine",
"New Credentials": "Neue Zugangsdaten",
"Account IDs": "Konto-ID",
"Change Entire Group": "Gesamte Gruppe ändern",
"Bulk Items": "Massenartikel",
"The name of the user (max 128 characters)": "Der Name des Benutzers (max. 128 Zeichen)",
"The user type according to license": "Der Benutzertyp entsprechend der Lizenz",
"Password for first-time login (max 39 characters)": "Passwort für erstmalige Anmeldung (maximal 39 Zeichen)",
Expand Down Expand Up @@ -161,6 +189,28 @@
"Select a Vault user or enter LDAP group name to add to the group": "Wählen Sie einen Vault-Benutzer oder geben Sie den LDAP-Gruppennamen ein, um ihn zur Gruppe hinzuzufügen",
"The type of user being added to the Vault group": "Die Art des Benutzers, der zur Tresorgruppe hinzugefügt wird",
"The DNS address of the domain (required if memberType is domain)": "Die DNS-Adresse der Domäne (erforderlich, wenn MemberType Domäne ist)",
"Select an account from the Vault": "Wählen Sie ein Konto aus dem Tresor",
"The reason for retrieving the password/SSH key": "Der Grund für das Abrufen des Passwortes/SSH-Schlüssels",
"The name of the Ticketing System": "Der Name des Ticketing Systems",
"The ticket ID of the ticketing system": "Die Ticket-ID des Ticket-Systems",
"The version number of the required password. If there are no previous versions, the current password/key version is returned.": "Die Versionsnummer des benötigten Passworts. Wenn es keine früheren Versionen gibt, wird die aktuelle Version des Passworts zurückgegeben.",
"The action this password will be used for": "Die Aktion für die dieses Passwort verwendet wird",
"Internal parameter (for PSM for SSH only)": "Interner Parameter (für PSM nur für SSH)",
"The address of the remote machine to connect to": "Die Adresse des entfernten Rechners zu dem eine Verbindung hergestellt werden soll",
"The reason for retrieving the private SSH key": "Der Grund für das Abrufen des privaten SSH-Schlüssels",
"The name of the ticketing system": "Der Name des Ticket-Systems",
"The ticket ID defined in the ticketing system": "Die Ticket-ID im Ticketsystem definiert",
"The version number of the required SSH key. Must be a positive number. If left empty or the value does not exist, the current SSH key version is returned.": "Die Versionsnummer des benötigten SSH-Schlüssels. Muss eine positive Zahl sein. Wenn leer gelassen wird oder der Wert nicht vorhanden ist, wird die aktuelle SSH-Schlüsselversion zurückgegeben.",
"The action this SSH key is used for": "Die Aktion für die dieser SSH-Schlüssel verwendet wird",
"Internal parameter (for use of PSMP only)": "Interner Parameter (nur für Verwendung von PSMP)",
"The address of the remote machine to connect to using the SSH key": "Die Adresse des entfernten Rechners, mit dem sich eine Verbindung über den SSH-Schlüssel herstellen soll",
"The new account credentials that will be allocated to the account in the Vault. Leading and trailing white spaces will be automatically removed.": "Die neuen Zugangsdaten, die dem Konto im Tresor zugewiesen werden. Leer- und Leerzeichen werden automatisch entfernt.",
"List of unique account IDs to verify": "Liste der zu überprüfenden eindeutigen Konto-IDs",
"List of unique account IDs to change credentials for": "Liste der eindeutigen Account-IDs zum Ändern der Anmeldedaten für",
"Whether the CPM changes the credentials for all accounts in the same account group. Only applies to accounts that belong to an account group.": "Ob das CPM die Zugangsdaten für alle Konten in derselben Accountgruppe ändert. Dies gilt nur für Konten, die zu einer Accountgruppe gehören.",
"List of account items. Each item should be a JSON object with accountId (required), changeImmediately (optional), and newCredentials (optional).": "Liste der Account-Einträge. Jedes Element sollte ein JSON-Objekt mit AccounId sein (erforderlich), Änderungen sofort (optional) und NewCredentials (optional).",
"List of account items. Each item should be a JSON object with accountId (required) and newCredentials (optional).": "Liste der Account-Einträge. Jeder Eintrag sollte ein JSON-Objekt mit AccounId (erforderlich) und NewCredentials (optional) sein.",
"List of unique account IDs to reconcile": "Liste der zu versenden eindeutigen Konto-IDs",
"CyberArk": "CyberArk",
"Radius": "Radius",
"LDAP": "LDAP",
Expand Down Expand Up @@ -198,5 +248,9 @@
"App Provider": "App-Anbieter",
"Other (specify in Filter)": "Andere (im Filter spezifizieren)",
"Vault User": "Tresor Benutzer",
"Domain User": "Domänen-Benutzer"
"Domain User": "Domänen-Benutzer",
"Show": "Zeigen",
"Copy": "Kopieren",
"Connect": "Verbinden",
"Download": "Download"
}
Loading
Loading