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 .github/workflows/release-pieces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
run: free -h

- name: update pieces metadata
run: npx ts-node -r tsconfig-paths/register -P packages/engine/tsconfig.lib.json tools/scripts/pieces/update-pieces-metadata.ts packages/pieces/community/framework
run: npx ts-node -r tsconfig-paths/register -r ./tools/scripts/fix-dts-require.js -P packages/engine/tsconfig.lib.json tools/scripts/pieces/update-pieces-metadata.ts packages/pieces/community/framework
env:
AP_CLOUD_API_KEY: ${{ secrets.AP_CLOUD_API_KEY }}
NODE_OPTIONS: "--max-old-space-size=8192"
Expand Down
1,095 changes: 548 additions & 547 deletions bun.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
activepieces:
image: ghcr.io/activepieces/activepieces:0.78.1
image: ghcr.io/activepieces/activepieces:0.78.2
container_name: activepieces
restart: unless-stopped
## Enable the following line if you already use AP_EXECUTION_MODE with SANDBOX_PROCESS or old activepieces, checking the breaking change documentation for more info.
Expand Down
1 change: 1 addition & 0 deletions docs/install/configuration/environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ it will produce these values. </Tip>
| `AP_REDIS_FAILED_JOB_RETENTION_DAYS` | The number of days to retain failed jobs in Redis. | `30` | |
| `AP_REDIS_FAILED_JOB_RETENTION_MAX_COUNT` | The maximum number of failed jobs to retain in Redis. | `2000` | |
| `AP_TRIGGER_DEFAULT_POLL_INTERVAL` | How many minutes before the system checks for new data updates for pieces with scheduled triggers, such as new Google Contacts. | `5` | |
| `AP_PIECES_CACHE_MAX_ENTRIES` | Maximum number of entries in the in-memory LRU cache for piece metadata. The cache stores piece lists and individual piece metadata to reduce database load; when the limit is reached, least recently used entries are evicted. | `1000` | |
| `AP_PIECES_SOURCE` | `AP_PIECES_SOURCE`: `FILE` for local development, `DB` for database. You can find more information about it in [Setting Piece Source](#setting-piece-source) section. | `CLOUD_AND_DB` | |
| `AP_PIECES_SYNC_MODE` | `AP_PIECES_SYNC_MODE`: None for no metadata syncing / 'OFFICIAL_AUTO' for automatic syncing for pieces metadata from cloud | `OFFICIAL_AUTO` |
| `AP_POSTGRES_DATABASE` | ❗️ The name of the PostgreSQL database | None | |
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "activepieces",
"version": "0.78.1",
"version": "0.78.2",
"rcVersion": "0.78.0-rc.0",
"scripts": {
"prepare": "husky install",
Expand Down Expand Up @@ -222,7 +222,6 @@
"jszip": "3.10.1",
"jwks-rsa": "3.1.0",
"jwt-decode": "4.0.0",
"keyv": "^4.5.4",
"lottie-web": "5.12.2",
"lucide-react": "0.407.0",
"mime": "4.0.1",
Expand Down Expand Up @@ -284,6 +283,7 @@
"stripe": "18.2.1",
"tailwind-merge": "2.4.0",
"tailwind-scrollbar": "4.0.2",
"tiny-lru": "11.4.7",
"tinycolor2": "1.6.0",
"tiptap-markdown": "0.8.10",
"tree-kill": "1.2.2",
Expand Down
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.8",
"version": "0.1.9",
"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 @@ -109,6 +109,13 @@ export const agentOutputBuilder = (prompt: string) => {
},
};
},
hasTextContent(): boolean {
return steps.some(
(step) =>
step.type === ContentBlockType.MARKDOWN &&
step.markdown.trim().length > 0
);
},
build(): AgentResult {
return {
status,
Expand Down
16 changes: 16 additions & 0 deletions packages/pieces/community/ai/src/lib/actions/agents/run-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ export const runAgent = createAction({
outputBuilder.addMarkdown(chunk.text);
break;
}
case 'reasoning-delta': {
if ('text' in chunk && typeof chunk.text === 'string') {
outputBuilder.addMarkdown(chunk.text);
} else if ('delta' in chunk && typeof chunk.delta === 'string') {
outputBuilder.addMarkdown(chunk.delta);
}
break;
}
case 'tool-call': {
if (agentUtils.isTaskCompletionToolCall(chunk.toolName)) {
continue;
Expand Down Expand Up @@ -232,6 +240,14 @@ export const runAgent = createAction({
}
}

if (!outputBuilder.hasTextContent()) {
const accumulatedText = await stream.text;
if (accumulatedText?.trim()) {
outputBuilder.addMarkdown(accumulatedText);
await context.output.update({ data: outputBuilder.build() });
}
}

if (errors.length > 0) {
const errorSummary = errors.map(e => {
const detail = e.details != null ? `\n ${String(e.details)}` : '';
Expand Down
14 changes: 6 additions & 8 deletions packages/pieces/community/ai/src/lib/actions/agents/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { dynamicTool, LanguageModel, Tool } from "ai";
import z from "zod";
import { agentUtils } from "./utils";
import { agentOutputBuilder } from "./agent-output-builder";
import { AgentMcpTool, AgentOutputField, AgentTaskStatus, AgentTool, AgentToolType, buildAuthHeaders, isNil, McpProtocol, TASK_COMPLETION_TOOL_NAME } from "@activepieces/shared";
import { AgentMcpTool, AgentOutputField, AgentTaskStatus, AgentTool, AgentToolType, buildAuthHeaders, isNil, isString, McpProtocol, TASK_COMPLETION_TOOL_NAME } from "@activepieces/shared";
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'
import { ActionContext } from "@activepieces/pieces-framework";
import { experimental_createMCPClient as createMCPClient, MCPClient, MCPTransport } from '@ai-sdk/mcp';
Expand Down Expand Up @@ -147,25 +147,23 @@ export async function constructAgentTools(
: {
output: z
.string()
.nullable()
.describe(
'The message to the user with the result of your task. This is optional and can be omitted if you have not achieved the goal.'
'Your complete response to the user. Always populate this with the full answer, result, or explanation — even if you already wrote text above. This is the final message that will be shown to the user.'
),
}),
}),
execute: async (params) => {
const { success, output } = params as {
success: boolean;
output?: Record<string, unknown>;
output?: Record<string, unknown> | string;
};
outputBuilder.setStatus(
success ? AgentTaskStatus.COMPLETED : AgentTaskStatus.FAILED
);
if (!isNil(structuredOutput) && !isNil(output)) {
if (!isNil(structuredOutput) && !isNil(output) && !isString(output)) {
outputBuilder.setStructuredOutput(output);
}
if (!isNil(structuredOutput) && !isNil(output)) {
outputBuilder.addMarkdown(output as unknown as string);
} else if (isNil(structuredOutput) && !isNil(output) && !outputBuilder.hasTextContent()) {
outputBuilder.addMarkdown(output as string);
}
return {};
},
Expand Down
1 change: 1 addition & 0 deletions packages/pieces/community/amazon-ses/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"strict": true,
"importHelpers": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/pieces/community/framework/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@activepieces/pieces-framework",
"version": "0.25.3",
"version": "0.25.4",
"type": "commonjs"
}
2 changes: 1 addition & 1 deletion packages/pieces/community/framework/src/lib/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const pieceTranslation = {
if (!target) {
return piece
}
const translatedPiece: T = mutate ? piece : structuredClone(piece)
const translatedPiece: T = mutate ? piece : JSON.parse(JSON.stringify(piece))
pieceTranslation.pathsToValuesToTranslate.forEach(key => {
translateProperty(translatedPiece, key, target)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ const FlowVersionDetailsCard = React.memo(
<CardListItem interactive={false} className="px-4">
{showAvatar && flowVersion.updatedByUser && (
<UserAvatar
size={28}
size={45}
withoutBorder={true}
name={
flowVersion.updatedByUser.firstName +
' ' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function ConnectionSelect(params: ConnectionSelectProps) {
!field.disabled &&
selectedConnection &&
(!isGlobalConnection || isPLatformAdmin) && (
<div className="z-50 absolute right-8 top-2 ">
<div className="z-50 absolute right-8 top-1 ">
<PermissionNeededTooltip
hasPermission={hasPermissionToCreateConnection}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
TooltipTrigger,
} from '@/components/ui/tooltip';
import { UserAvatar } from '@/components/ui/user-avatar';
import { RoleDropdown } from '@/features/members/component/role-selector';
import { RoleSelector } from '@/features/members/component/role-selector';
import { projectMembersApi } from '@/features/members/lib/project-members-api';
import { userInvitationApi } from '@/features/members/lib/user-invitation';
import { projectRoleApi } from '@/features/platform-admin/lib/project-role-api';
Expand Down Expand Up @@ -138,12 +138,15 @@ const RoleCell = ({

return (
<PermissionNeededTooltip hasPermission={userHasPermissionToUpdateRole}>
<RoleDropdown
value={roleName}
onValueChange={handleValueChange}
disabled={!userHasPermissionToUpdateRole}
roles={roles}
/>
<div className="w-[150px]">
<RoleSelector
type="project"
value={roleName}
onValueChange={handleValueChange}
disabled={!userHasPermissionToUpdateRole}
roles={roles}
/>
</div>
</PermissionNeededTooltip>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export const UpdateUserDialog = ({
type="platform"
value={field.value}
onValueChange={field.onChange}
showDescriptionInTrigger={true}
/>
<FormMessage />
</FormItem>
Expand Down
2 changes: 0 additions & 2 deletions packages/react-ui/src/app/routes/sign-in/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { FullLogo } from '@/components/ui/full-logo';
import { AuthFormTemplate } from '@/features/authentication/components/auth-form-template';

const SignInPage: React.FC = () => {
return (
<div className="mx-auto flex h-screen flex-col items-center justify-center gap-2">
<FullLogo />
<AuthFormTemplate form={'signin'} />
</div>
);
Expand Down
2 changes: 0 additions & 2 deletions packages/react-ui/src/app/routes/sign-up/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { FullLogo } from '@/components/ui/full-logo';
import { AuthFormTemplate } from '@/features/authentication/components/auth-form-template';

const SignUpPage: React.FC = () => {
return (
<div className="mx-auto flex h-screen flex-col items-center justify-center gap-2">
<FullLogo />
<AuthFormTemplate form={'signup'} />
</div>
);
Expand Down
4 changes: 3 additions & 1 deletion packages/react-ui/src/components/ui/user-avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type UserAvatarProps = {
disableTooltip?: boolean;
imageUrl?: string | null;
className?: string;
withoutBorder?: boolean;
};

export function UserAvatar({
Expand All @@ -21,6 +22,7 @@ export function UserAvatar({
disableTooltip = false,
imageUrl,
className,
withoutBorder = false,
}: UserAvatarProps) {
const tooltip = `${name} (${email})`;

Expand Down Expand Up @@ -51,7 +53,7 @@ export function UserAvatar({
return (
<Tooltip>
<TooltipTrigger asChild>
<div className="size-12 border">
<div className={cn('size-12 border', { 'border-none': withoutBorder })}>
{avatarElement} {disableTooltip}
</div>
</TooltipTrigger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
CardHeader,
CardTitle,
} from '@/components/ui/card';
import { FullLogo } from '@/components/ui/full-logo';
import { authenticationSession } from '@/lib/authentication-session';
import { useRedirectAfterLogin } from '@/lib/navigation-utils';
import {
Expand Down Expand Up @@ -77,6 +78,7 @@ const AuthFormTemplate = React.memo(
const { data: isEmailAuthEnabled } = flagsHooks.useFlag<boolean>(
ApFlagId.EMAIL_AUTH_ENABLED,
);
const isCloud = window.location.hostname === 'cloud.activepieces.com';
const data = {
signin: {
title: t('Welcome Back!'),
Expand All @@ -101,35 +103,43 @@ const AuthFormTemplate = React.memo(
}

return (
<Card className="w-md rounded-sm drop-shadow-xl">
{!showCheckYourEmailNote && (
<CardHeader className="text-center">
<CardTitle className="text-2xl">{data.title}</CardTitle>
<CardDescription>{data.description}</CardDescription>
</CardHeader>
<>
{isCloud && (
<Link to="https://activepieces.com" target="_blank" rel="noreferrer">
<FullLogo />
</Link>
)}
{!isCloud && <FullLogo />}
<Card className="w-md rounded-sm drop-shadow-xl">
{!showCheckYourEmailNote && (
<CardHeader className="text-center">
<CardTitle className="text-2xl">{data.title}</CardTitle>
<CardDescription>{data.description}</CardDescription>
</CardHeader>
)}

<CardContent>
{!showCheckYourEmailNote && <ThirdPartyLogin isSignUp={isSignUp} />}
<AuthSeparator
isEmailAuthEnabled={
(isEmailAuthEnabled ?? true) && !showCheckYourEmailNote
}
></AuthSeparator>
{isEmailAuthEnabled ? (
isSignUp ? (
<SignUpForm
setShowCheckYourEmailNote={setShowCheckYourEmailNote}
showCheckYourEmailNote={showCheckYourEmailNote}
/>
) : (
<SignInForm />
)
) : null}
</CardContent>
<CardContent>
{!showCheckYourEmailNote && <ThirdPartyLogin isSignUp={isSignUp} />}
<AuthSeparator
isEmailAuthEnabled={
(isEmailAuthEnabled ?? true) && !showCheckYourEmailNote
}
></AuthSeparator>
{isEmailAuthEnabled ? (
isSignUp ? (
<SignUpForm
setShowCheckYourEmailNote={setShowCheckYourEmailNote}
showCheckYourEmailNote={showCheckYourEmailNote}
/>
) : (
<SignInForm />
)
) : null}
</CardContent>

<BottomNote isSignup={isSignUp}></BottomNote>
</Card>
<BottomNote isSignup={isSignUp}></BottomNote>
</Card>
</>
);
},
);
Expand Down
Loading
Loading