-
Notifications
You must be signed in to change notification settings - Fork 1
[Phase 1.1] Complete Node.js + TypeScript project setup with comprehensive tooling #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
11
commits into
main
Choose a base branch
from
copilot/fix-3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7ae584e
Initial plan
Copilot 87e70a5
Complete Phase 1.1: Node.js + TypeScript project setup with tooling
Copilot f8c1208
fix: Address Copilot review feedback
Sofaknilch bb02b11
Addressing PR comments
Copilot 3e11d99
fix: convert ES module syntax to CommonJS in dev-test.js
Sofaknilch 1e6f5bb
feat: add NotImplementedError class for consistent stub handling
Sofaknilch f49a143
refactor: replace generic Error with NotImplementedError in stubs
Sofaknilch 150f10c
test: add comprehensive test coverage for placeholder stubs
Sofaknilch c05fd60
test: add ConfigLoader and ConfigValidator stub tests
Sofaknilch 58f40a5
test: add NotImplementedError test and fix flaky sleep test
Sofaknilch fbb773e
style: add trailing newline to package.json
Sofaknilch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Environment configuration for Agents CLI | ||
|
|
||
| # OpenAI API Configuration | ||
| OPENAI_API_KEY=your_openai_api_key_here | ||
|
|
||
| # Debug settings | ||
| DEBUG=agents-cli:* | ||
| NODE_ENV=development | ||
|
|
||
| # CLI Configuration | ||
| CLI_LOG_LEVEL=info | ||
| CLI_OUTPUT_FORMAT=text | ||
|
|
||
| # Development settings | ||
| DEV_WATCH_MODE=true | ||
| DEV_AUTO_RELOAD=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| module.exports = { | ||
| root: true, | ||
| parser: '@typescript-eslint/parser', | ||
| plugins: ['@typescript-eslint', 'prettier'], | ||
| extends: [ | ||
| 'eslint:recommended', | ||
| 'prettier' | ||
| ], | ||
| parserOptions: { | ||
| ecmaVersion: 2022, | ||
| sourceType: 'module', | ||
| project: './tsconfig.json', | ||
| tsconfigRootDir: __dirname | ||
| }, | ||
| env: { | ||
| node: true, | ||
| es2022: true | ||
| }, | ||
| rules: { | ||
| // Prettier integration | ||
| 'prettier/prettier': 'error', | ||
|
|
||
| // TypeScript specific rules | ||
| '@typescript-eslint/no-unused-vars': [ | ||
| 'error', | ||
| { argsIgnorePattern: '^_', varsIgnorePattern: '^_' } | ||
| ], | ||
|
|
||
| // General code quality | ||
| 'no-console': ['warn', { allow: ['log', 'warn', 'error'] }], | ||
| 'no-debugger': 'error', | ||
| 'prefer-const': 'error', | ||
| 'no-var': 'error', | ||
| 'eqeqeq': ['error', 'always'], | ||
| 'curly': ['error', 'all'] | ||
| }, | ||
| overrides: [ | ||
| { | ||
| files: ['tests/**/*.ts', '**/*.test.ts', '**/*.spec.ts'], | ||
| env: { | ||
| jest: true | ||
| }, | ||
| parserOptions: { | ||
| project: './tsconfig.test.json' | ||
| }, | ||
| rules: { | ||
| 'no-console': 'off' | ||
| } | ||
| }, | ||
| { | ||
| files: ['scripts/**/*.js', '*.config.js'], | ||
| env: { | ||
| node: true | ||
| }, | ||
| rules: { | ||
| '@typescript-eslint/no-var-requires': 'off' | ||
| } | ||
| } | ||
| ] | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| npx lint-staged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "semi": true, | ||
| "singleQuote": true, | ||
| "quoteProps": "as-needed", | ||
| "trailingComma": "es5", | ||
| "tabWidth": 2, | ||
| "useTabs": false, | ||
| "printWidth": 80, | ||
| "bracketSpacing": true, | ||
| "bracketSameLine": false, | ||
| "arrowParens": "always", | ||
| "endOfLine": "lf", | ||
| "overrides": [ | ||
| { | ||
| "files": "*.json", | ||
| "options": { | ||
| "printWidth": 120 | ||
| } | ||
| }, | ||
| { | ||
| "files": "*.md", | ||
| "options": { | ||
| "printWidth": 100, | ||
| "proseWrap": "always" | ||
| } | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "agents": { | ||
| "code_reviewer": { | ||
| "name": "Senior Code Reviewer", | ||
| "instructions": "Review code for bugs, performance issues, and best practices. Focus on code quality, maintainability, and security.", | ||
| "model": "gpt-4o", | ||
| "tools": ["file_operations", "git_tools"], | ||
| "guardrails": ["no_destructive_operations"], | ||
| "handoffs": ["security_reviewer"] | ||
| }, | ||
| "security_reviewer": { | ||
| "name": "Security Expert", | ||
| "instructions": "Focus specifically on security vulnerabilities, authentication issues, and security best practices.", | ||
| "model": "gpt-4o", | ||
| "tools": ["security_scanner", "file_operations"], | ||
| "guardrails": ["no_destructive_operations"], | ||
| "handoffs": ["code_reviewer"] | ||
| } | ||
| }, | ||
| "workflow": { | ||
| "entry_point": "code_reviewer", | ||
| "pattern": "handoff_chain", | ||
| "max_turns": 15, | ||
| "timeout": 300 | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "agents": { | ||
| "simple_assistant": { | ||
| "name": "Simple Assistant", | ||
| "instructions": "You are a helpful assistant. Answer questions directly and concisely.", | ||
| "model": "gpt-4o", | ||
| "tools": [], | ||
| "guardrails": [], | ||
| "handoffs": [] | ||
| } | ||
| }, | ||
| "workflow": { | ||
| "entry_point": "simple_assistant", | ||
| "pattern": "sequential", | ||
| "max_turns": 5, | ||
| "timeout": 60 | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| module.exports = { | ||
| preset: 'ts-jest', | ||
| testEnvironment: 'node', | ||
| roots: ['<rootDir>/src', '<rootDir>/tests'], | ||
| testMatch: [ | ||
| '**/__tests__/**/*.+(ts|tsx|js)', | ||
| '**/*.(test|spec).+(ts|tsx|js)' | ||
| ], | ||
| transform: { | ||
| '^.+\\.(ts|tsx)$': ['ts-jest', { | ||
| tsconfig: 'tsconfig.test.json' | ||
| }] | ||
| }, | ||
| collectCoverageFrom: [ | ||
| 'src/**/*.{ts,tsx}', | ||
| '!src/**/*.d.ts', | ||
| '!src/**/*.test.{ts,tsx}', | ||
| '!src/**/*.spec.{ts,tsx}', | ||
| '!src/index.ts' | ||
| ], | ||
| coverageDirectory: 'coverage', | ||
| coverageReporters: [ | ||
| 'text', | ||
| 'lcov', | ||
| 'html' | ||
| ], | ||
| coverageThreshold: { | ||
| global: { | ||
| branches: 50, | ||
| functions: 35, | ||
| lines: 35, | ||
| statements: 35 | ||
| } | ||
| }, | ||
| moduleNameMapper: { | ||
| '^@/(.*)$': '<rootDir>/src/$1', | ||
| '^chalk$': '<rootDir>/tests/mocks/chalk.js' | ||
| }, | ||
| setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'], | ||
| testTimeout: 10000, | ||
| verbose: true, | ||
| clearMocks: true, | ||
| restoreMocks: true | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] You define @typescript-eslint parser and plugin but do not extend a TypeScript ruleset (e.g., '@typescript-eslint/recommended'). Adding it would enforce common TypeScript best practices and catch additional issues early.