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
43 changes: 43 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: PR Checks

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
workflow_dispatch:

jobs:
build-and-test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Build Packages
run: npm run build:packages

- name: Typecheck
run: npm run typecheck

- name: Build
run: npm run build

2 changes: 1 addition & 1 deletion apps/server/src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-console */
export const logger = {
info: (...args: unknown[]) => console.log('[INFO]', ...args),
warn: (...args: unknown[]) => console.warn('[WARN]', ...args),
Expand Down
5 changes: 3 additions & 2 deletions apps/server/src/routes/workflows.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { Request, Response, Router } from 'express';
import { Router as createRouter } from 'express';
import { WorkflowGraph, WorkflowRunRecord, WorkflowRunResult } from '@agentic/types';
import WorkflowEngine, { WorkflowLLM } from '@agentic/workflow-engine';
import type { WorkflowGraph, WorkflowRunRecord, WorkflowRunResult } from '@agentic/types';
import type { WorkflowLLM } from '@agentic/workflow-engine';
import WorkflowEngine from '@agentic/workflow-engine';
import { addWorkflow, getWorkflow, removeWorkflow } from '../store/active-workflows';
import { saveRunRecord } from '../services/persistence';
import { config } from '../config';
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/services/openai-llm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import OpenAI from 'openai';
import { AgentInvocation, WorkflowLLM } from '@agentic/workflow-engine';
import type OpenAI from 'openai';
import type { AgentInvocation, WorkflowLLM } from '@agentic/workflow-engine';

function formatInput(invocation: AgentInvocation) {
return [
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/services/persistence.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'node:fs/promises';
import path from 'node:path';
import { WorkflowRunRecord } from '@agentic/types';
import type { WorkflowRunRecord } from '@agentic/types';

export async function saveRunRecord(runsDir: string, record: WorkflowRunRecord): Promise<void> {
const filePath = path.join(runsDir, `run_${record.runId}.json`);
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/store/active-workflows.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import WorkflowEngine from '@agentic/workflow-engine';
import type WorkflowEngine from '@agentic/workflow-engine';

const workflows = new Map<string, WorkflowEngine>();

Expand Down
7 changes: 4 additions & 3 deletions eslint.config.js → eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import tsParser from '@typescript-eslint/parser';

export default [
{
files: ['**/*.ts', '**/*.tsx'],
ignores: [
'**/node_modules/**',
'**/dist/**',
'data/runs/**',
'apps/web/public/**'
],
]
},
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parser: tsParser,
parserOptions: {
Expand All @@ -30,4 +32,3 @@ export default [
}
}
];

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"test:engine": "npm --workspace packages/workflow-engine run test",
"test:server": "npm --workspace apps/server run test",
"clean": "npm run clean --workspaces",
"lint": "eslint . --ext .ts,.tsx",
"lint": "eslint .",
"typecheck": "npm run typecheck:server && npm run typecheck:web",
"typecheck:server": "npm --workspace apps/server run typecheck",
"typecheck:web": "npm --workspace apps/web run typecheck"
Expand Down
2 changes: 1 addition & 1 deletion packages/workflow-engine/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
ApprovalInput,
WorkflowConnection,
WorkflowGraph,
Expand Down
Loading