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
8 changes: 4 additions & 4 deletions .github/workflows/publish-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
if [ "$FORCE_PUBLISH" = "true" ]; then
echo "⚠️ Version $PACKAGE_VERSION of $PACKAGE_NAME already exists on npm, but force_publish is enabled"
echo "🚀 Publishing $PACKAGE_NAME to npm..."
npm publish --access public
pnpm publish --access public --no-git-checks
echo "published=true" >> $GITHUB_OUTPUT
echo "✅ Successfully published $PACKAGE_NAME"
else
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
if [ "$FORCE_PUBLISH" = "true" ]; then
echo "⚠️ Version $PACKAGE_VERSION of $PACKAGE_NAME already exists on npm, but force_publish is enabled"
echo "🚀 Publishing $PACKAGE_NAME to npm..."
npm publish --access public
pnpm publish --access public --no-git-checks
echo "published=true" >> $GITHUB_OUTPUT
echo "✅ Successfully published $PACKAGE_NAME"
else
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
if [ "$FORCE_PUBLISH" = "true" ]; then
echo "⚠️ Version $PACKAGE_VERSION of $PACKAGE_NAME already exists on npm, but force_publish is enabled"
echo "🚀 Publishing $PACKAGE_NAME to npm..."
npm publish --access public
pnpm publish --access public --no-git-checks
echo "published=true" >> $GITHUB_OUTPUT
echo "✅ Successfully published $PACKAGE_NAME"
else
Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
if [ "$FORCE_PUBLISH" = "true" ]; then
echo "⚠️ Version $PACKAGE_VERSION of $PACKAGE_NAME already exists on npm, but force_publish is enabled"
echo "🚀 Publishing $PACKAGE_NAME to npm..."
npm publish --access public
pnpm publish --access public --no-git-checks
echo "published=true" >> $GITHUB_OUTPUT
echo "✅ Successfully published $PACKAGE_NAME"
else
Expand Down
20 changes: 7 additions & 13 deletions Dockerfile.railway
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ COPY pnpm-lock.yaml ./
COPY pnpm-workspace.yaml ./
COPY package.json ./
COPY tsconfig.base.json ./
COPY turbo.json ./

# Copy all project files first
COPY packages/app/control/ ./packages/app/control/
Expand All @@ -82,28 +83,21 @@ COPY packages/sdk/ts/ ./packages/sdk/ts/
COPY packages/sdk/next/ ./packages/sdk/next/
COPY packages/sdk/react/ ./packages/sdk/react/

# Install dependencies for both projects (including dev dependencies for build)
WORKDIR /app/packages/app/control
# Install all workspace dependencies
WORKDIR /app
RUN pnpm install

WORKDIR /app/packages/app/server
RUN pnpm install
# Build all packages in correct dependency order using Turbo
WORKDIR /app
RUN pnpm run build

# Step 1: Build echo-control and generate Prisma client
# Generate Prisma client and copy schema for server
WORKDIR /app/packages/app/control
RUN pnpm run prisma:generate
RUN pnpm run build

WORKDIR /app/packages/sdk/ts
RUN pnpm install
RUN pnpm run build

WORKDIR /app/packages/app/server
RUN pnpm run copy-prisma

# Step 3: Build echo-server
RUN pnpm run build

# Set NODE_OPTIONS to enable OpenTelemetry for echo-server

# Step 4: Install production dependencies only
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@
"packageManager": "pnpm@10.11.0",
"scripts": {
"dev": "turbo run dev --filter=echo-control --filter=echo-server",
"build": "pnpm run --recursive build",
"build": "turbo run build",
"prepare": "turbo run build",
"test:unit": "pnpm -C packages/sdk/ts run build && pnpm -r --filter=!packages/app/server run test:unit",
"test:integration": "pnpm -C packages/tests/integration test",
"test:all": "pnpm run test:unit && pnpm run test:integration",
"lint": "pnpm run --recursive lint",
"lint:fix": "pnpm run --recursive lint:fix",
"type-check": "pnpm run --recursive type-check",
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\""
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"",
"publish:test": "pnpm -r publish --dry-run --no-git-checks",
"publish:sdks": "pnpm --filter @merit-systems/echo-typescript-sdk publish --no-git-checks && pnpm --filter @merit-systems/echo-react-sdk publish --no-git-checks && pnpm --filter @merit-systems/echo-next-sdk publish --no-git-checks && pnpm --filter echo-start publish --no-git-checks",
"publish:sdks:test": "pnpm --filter @merit-systems/echo-typescript-sdk publish --dry-run --no-git-checks && pnpm --filter @merit-systems/echo-react-sdk publish --dry-run --no-git-checks && pnpm --filter @merit-systems/echo-next-sdk publish --dry-run --no-git-checks && pnpm --filter echo-start publish --dry-run --no-git-checks"
},
"devDependencies": {
"@eslint/js": "^9.13.0",
Expand Down
20 changes: 9 additions & 11 deletions packages/app/server/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export default [
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: '.',
project: true,
tsconfigRootDir: __dirname,
},
globals: {
console: 'readonly',
Expand Down Expand Up @@ -43,7 +43,11 @@ export default [
},
{
name: 'echo-server/tests',
files: ['**/__tests__/**/*.{ts,tsx}', '**/*.test.{ts,tsx}', '**/*.spec.{ts,tsx}'],
files: [
'**/__tests__/**/*.{ts,tsx}',
'**/*.test.{ts,tsx}',
'**/*.spec.{ts,tsx}',
],
languageOptions: {
globals: {
jest: 'readonly',
Expand All @@ -67,12 +71,6 @@ export default [
},
{
name: 'echo-server/ignores',
ignores: [
'node_modules/',
'dist/',
'build/',
'coverage/',
'**/*.d.ts',
],
ignores: ['node_modules/', 'dist/', 'build/', 'coverage/', '**/*.d.ts'],
},
];
];
5 changes: 4 additions & 1 deletion packages/app/server/src/services/HandleStreamService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ export class HandleStreamService {

// Promise for processing data and creating transaction
const reader2 = accountingStream.getReader();
const transactionPromise = this.processStreamData(reader2, provider);
const transactionPromise = this.processStreamData(
reader2 as ReadableStreamDefaultReader<Uint8Array>,
provider
);

// Wait for both streams to complete before ending response
try {
Expand Down
4 changes: 3 additions & 1 deletion packages/app/server/src/services/ModelRequestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ export class ModelRequestService {
// Add files from req.files
if (req.files && Array.isArray(req.files)) {
req.files.forEach(file => {
const blob = new Blob([file.buffer], { type: file.mimetype });
const blob = new Blob([new Uint8Array(file.buffer)], {
type: file.mimetype,
});
formData.append(file.fieldname, blob, file.originalname);
});
}
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/component-registry/.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_ECHO_APP_ID="6f0226b3-9d95-4d5a-96de-d178bd4dc9f7"
2 changes: 1 addition & 1 deletion packages/sdk/component-registry/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*
.env

# vercel
.vercel
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/component-registry/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { NextConfig } from "next";
import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
/* config options here */
Expand Down
16 changes: 5 additions & 11 deletions packages/sdk/component-registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"lint": "next lint"
},
"dependencies": {
"@merit-systems/echo-next-sdk": "^0.0.20",
"@merit-systems/echo-react-sdk": "^1.0.29",
"@merit-systems/echo-typescript-sdk": "^1.0.14",
"@merit-systems/echo-next-sdk": "workspace:*",
"@merit-systems/echo-react-sdk": "workspace:*",
"@merit-systems/echo-typescript-sdk": "workspace:*",
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-label": "^2.1.7",
Expand All @@ -24,7 +24,7 @@
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.487.0",
"next": "15.5.2",
"next": "15.1.4",
"next-themes": "^0.4.6",
"react": "19.1.0",
"react-dom": "19.1.0",
Expand All @@ -40,14 +40,8 @@
"@types/react": "19.1.2",
"@types/react-dom": "19.1.2",
"eslint": "^9.32.0",
"eslint-config-next": "15.3.1",
"eslint-config-next": "^15.1.4",
"tailwindcss": "^4.1.11",
"typescript": "^5.9.2"
},
"pnpm": {
"overrides": {
"@types/react": "19.1.2",
"@types/react-dom": "19.1.2"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
"type": "registry:component",
"title": "Echo Account (Next)",
"description": "Next.js variant of Echo Account",
"registryDependencies": [
"popover",
"skeleton",
"avatar"
],
"registryDependencies": ["popover", "skeleton", "avatar"],
"files": [
{
"path": "registry/echo/blocks/echo-account-button/echo-account-next.tsx",
Expand Down Expand Up @@ -68,4 +64,4 @@
"target": "~/public/logo/dark.svg"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
"type": "registry:component",
"title": "Echo Account (React)",
"description": "React variant of Echo Account",
"registryDependencies": [
"popover",
"skeleton",
"avatar"
],
"registryDependencies": ["popover", "skeleton", "avatar"],
"files": [
{
"path": "registry/echo/blocks/echo-account-button/echo-account-react.tsx",
Expand Down Expand Up @@ -68,4 +64,4 @@
"target": "~/public/logo/dark.svg"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEcho } from '@merit-systems/echo-react-sdk';
import { EchoAccountButton } from './echo-account';
import { EchoAccountButton } from './echo-account';

export function EchoAccount() {
const echo = useEcho();
Expand Down
8 changes: 5 additions & 3 deletions packages/sdk/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"test:unit": "echo 'no tests'",
"test:watch": "echo 'no tests'",
"prepublishOnly": "pnpm run build",
"prepare": "tsup src/index.ts src/client.ts --dts --format esm --out-dir dist"
"prepare": "tsup src/index.ts src/client.ts --dts --format esm --out-dir dist",
"publish:test": "pnpm publish --access public --dry-run",
"publish:real": "pnpm publish --access public"
},
"keywords": [
"echo",
Expand All @@ -37,8 +39,8 @@
"author": "Merit Systems",
"license": "MIT",
"dependencies": {
"@merit-systems/echo-typescript-sdk": "1.0.14",
"@merit-systems/echo-react-sdk": "1.0.29",
"@merit-systems/echo-typescript-sdk": "workspace:*",
"@merit-systems/echo-react-sdk": "workspace:*",
"ai": "^5.0.17",
"jwt-decode": "^4.0.0",
"swr": "^2.3.1"
Expand Down
6 changes: 3 additions & 3 deletions packages/sdk/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"test:coverage": "vitest run --coverage",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"publish:test": "npm publish --access public --dry-run",
"publish:real": "npm publish --access public",
"publish:test": "pnpm publish --access public --dry-run",
"publish:real": "pnpm publish --access public",
"prepare": "sh -c 'if [ \"$CI\" = true ]; then echo \"Skipping prepare in CI\"; else tsup src/index.ts --dts --format esm,cjs --out-dir dist; fi'",
"prepublishOnly": "pnpm run build"
},
Expand Down Expand Up @@ -59,7 +59,7 @@
}
},
"dependencies": {
"@merit-systems/echo-typescript-sdk": "1.0.14",
"@merit-systems/echo-typescript-sdk": "workspace:*",
"@ai-sdk/react": "^2.0.17",
"ai": "^5.0.19",
"dompurify": "^3.2.6",
Expand Down
4 changes: 3 additions & 1 deletion packages/sdk/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"update-models:gemini": "tsx scripts/update-gemini-models.ts",
"update-models:openrouter": "tsx scripts/update-openrouter-models.ts",
"update-all-models": "pnpm run update-models:openai && pnpm run update-models:anthropic && pnpm run update-models:gemini && pnpm run update-models:openrouter",
"prepublishOnly": "pnpm run build"
"prepublishOnly": "pnpm run build",
"publish:test": "pnpm publish --access public --dry-run",
"publish:real": "pnpm publish --access public"
},
"keywords": [
"echo",
Expand Down
Loading
Loading