resolved #68
This commit is contained in:
parent
7d856287f0
commit
9e2fb10502
20
.github/workflows/takt-action.yml
vendored
Normal file
20
.github/workflows/takt-action.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: TAKT Action
|
||||||
|
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
takt:
|
||||||
|
if: contains(github.event.comment.body, '@takt')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: nrslib/takt-action@main
|
||||||
|
with:
|
||||||
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@ -2,22 +2,12 @@
|
|||||||
|
|
||||||
Thank you for your interest in contributing to TAKT!
|
Thank you for your interest in contributing to TAKT!
|
||||||
|
|
||||||
## Important Notice
|
## About This Project
|
||||||
|
|
||||||
For now, This project is maintained at my own pace as a personal project. Please understand the following before contributing:
|
This project is developed using [TAKT](https://github.com/nrslib/takt). Please understand the following before contributing:
|
||||||
|
|
||||||
### Response Times
|
|
||||||
|
|
||||||
- **Issues**: I may not be able to respond immediately. Please be patient.
|
|
||||||
- **Pull Requests**: Review capacity is limited. Small, focused PRs are more likely to be reviewed.
|
|
||||||
|
|
||||||
### About This Project
|
|
||||||
|
|
||||||
This project is primarily developed using "vibe coding" (AI-assisted development). As such:
|
|
||||||
|
|
||||||
- **Use at your own risk** - The codebase may have unconventional patterns
|
|
||||||
- **Large PRs are difficult to review** - Especially AI-generated ones
|
|
||||||
- **Small, focused changes are preferred** - Bug fixes, typo corrections, documentation improvements
|
- **Small, focused changes are preferred** - Bug fixes, typo corrections, documentation improvements
|
||||||
|
- **Large PRs are difficult to review** - Especially AI-generated bulk changes without explanation
|
||||||
|
|
||||||
## How to Contribute
|
## How to Contribute
|
||||||
|
|
||||||
|
|||||||
14
README.md
14
README.md
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
**T**ask **A**gent **K**oordination **T**ool - Multi-agent orchestration system for Claude Code and OpenAI Codex.
|
**T**ask **A**gent **K**oordination **T**ool - Multi-agent orchestration system for Claude Code and OpenAI Codex.
|
||||||
|
|
||||||
> **Note**: This project is developed at my own pace. See [Disclaimer](#disclaimer) for details.
|
|
||||||
|
|
||||||
TAKT is built with TAKT (dogfooding).
|
TAKT is built with TAKT (dogfooding).
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
@ -603,17 +601,9 @@ engine.on('step:complete', (step, response) => {
|
|||||||
await engine.run();
|
await engine.run();
|
||||||
```
|
```
|
||||||
|
|
||||||
## Disclaimer
|
## Contributing
|
||||||
|
|
||||||
This project is a personal project developed at my own pace.
|
See [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
|
||||||
|
|
||||||
- **Response times**: I may not be able to respond to issues immediately
|
|
||||||
- **Development style**: This project is primarily developed using "vibe coding" (AI-assisted development) - **use at your own risk**
|
|
||||||
- **Pull requests**:
|
|
||||||
- Small, focused PRs (bug fixes, typos, docs) are welcome
|
|
||||||
- Large PRs, especially AI-generated bulk changes, are difficult to review
|
|
||||||
|
|
||||||
See [CONTRIBUTING.md](./CONTRIBUTING.md) for more details.
|
|
||||||
|
|
||||||
## Docker Support
|
## Docker Support
|
||||||
|
|
||||||
|
|||||||
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
**T**ask **A**gent **K**oordination **T**ool - Claude CodeとOpenAI Codex向けのマルチエージェントオーケストレーションシステム
|
**T**ask **A**gent **K**oordination **T**ool - Claude CodeとOpenAI Codex向けのマルチエージェントオーケストレーションシステム
|
||||||
|
|
||||||
> **Note**: このプロジェクトは個人のペースで開発されています。詳細は[免責事項](#免責事項)をご覧ください。
|
|
||||||
|
|
||||||
TAKTはTAKT自身で開発されています(ドッグフーディング)。
|
TAKTはTAKT自身で開発されています(ドッグフーディング)。
|
||||||
|
|
||||||
## 必要条件
|
## 必要条件
|
||||||
@ -600,17 +598,9 @@ engine.on('step:complete', (step, response) => {
|
|||||||
await engine.run();
|
await engine.run();
|
||||||
```
|
```
|
||||||
|
|
||||||
## 免責事項
|
## コントリビュート
|
||||||
|
|
||||||
このプロジェクトは個人プロジェクトであり、私自身のペースで開発されています。
|
詳細は[CONTRIBUTING.md](../CONTRIBUTING.md)を参照。
|
||||||
|
|
||||||
- **レスポンス時間**: イシューにすぐに対応できない場合があります
|
|
||||||
- **開発スタイル**: このプロジェクトは主に「バイブコーディング」(AI支援開発)で開発されています - **自己責任でお使いください**
|
|
||||||
- **プルリクエスト**:
|
|
||||||
- 小さく焦点を絞ったPR(バグ修正、タイポ、ドキュメント)は歓迎します
|
|
||||||
- 大きなPR、特にAI生成の一括変更はレビューが困難です
|
|
||||||
|
|
||||||
詳細は[CONTRIBUTING.md](../CONTRIBUTING.md)をご覧ください。
|
|
||||||
|
|
||||||
## Docker サポート
|
## Docker サポート
|
||||||
|
|
||||||
|
|||||||
@ -41,9 +41,38 @@ describe('debug logging', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should enable debug when enabled is true', () => {
|
it('should enable debug when enabled is true', () => {
|
||||||
initDebugLogger({ enabled: true }, '/tmp');
|
const projectDir = join(tmpdir(), 'takt-test-debug-enable-' + Date.now());
|
||||||
|
mkdirSync(projectDir, { recursive: true });
|
||||||
|
|
||||||
|
try {
|
||||||
|
initDebugLogger({ enabled: true }, projectDir);
|
||||||
|
expect(isDebugEnabled()).toBe(true);
|
||||||
|
expect(getDebugLogFile()).not.toBeNull();
|
||||||
|
} finally {
|
||||||
|
rmSync(projectDir, { recursive: true, force: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should write debug log to project .takt/logs/ directory', () => {
|
||||||
|
const projectDir = join(tmpdir(), 'takt-test-debug-project-' + Date.now());
|
||||||
|
mkdirSync(projectDir, { recursive: true });
|
||||||
|
|
||||||
|
try {
|
||||||
|
initDebugLogger({ enabled: true }, projectDir);
|
||||||
|
const logFile = getDebugLogFile();
|
||||||
|
expect(logFile).not.toBeNull();
|
||||||
|
expect(logFile!).toContain(join(projectDir, '.takt', 'logs'));
|
||||||
|
expect(logFile!).toMatch(/debug-.*\.log$/);
|
||||||
|
expect(existsSync(logFile!)).toBe(true);
|
||||||
|
} finally {
|
||||||
|
rmSync(projectDir, { recursive: true, force: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not create log file when projectDir is not provided', () => {
|
||||||
|
initDebugLogger({ enabled: true });
|
||||||
expect(isDebugEnabled()).toBe(true);
|
expect(isDebugEnabled()).toBe(true);
|
||||||
expect(getDebugLogFile()).not.toBeNull();
|
expect(getDebugLogFile()).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should use custom log file when provided', () => {
|
it('should use custom log file when provided', () => {
|
||||||
@ -64,12 +93,19 @@ describe('debug logging', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should only initialize once', () => {
|
it('should only initialize once', () => {
|
||||||
initDebugLogger({ enabled: true }, '/tmp');
|
const projectDir = join(tmpdir(), 'takt-test-debug-once-' + Date.now());
|
||||||
const firstFile = getDebugLogFile();
|
mkdirSync(projectDir, { recursive: true });
|
||||||
|
|
||||||
initDebugLogger({ enabled: false }, '/tmp');
|
try {
|
||||||
expect(isDebugEnabled()).toBe(true);
|
initDebugLogger({ enabled: true }, projectDir);
|
||||||
expect(getDebugLogFile()).toBe(firstFile);
|
const firstFile = getDebugLogFile();
|
||||||
|
|
||||||
|
initDebugLogger({ enabled: false }, projectDir);
|
||||||
|
expect(isDebugEnabled()).toBe(true);
|
||||||
|
expect(getDebugLogFile()).toBe(firstFile);
|
||||||
|
} finally {
|
||||||
|
rmSync(projectDir, { recursive: true, force: true });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import { selectOptionWithDefault } from '../prompt/index.js';
|
|||||||
import {
|
import {
|
||||||
getGlobalConfigDir,
|
getGlobalConfigDir,
|
||||||
getGlobalConfigPath,
|
getGlobalConfigPath,
|
||||||
getGlobalLogsDir,
|
|
||||||
getProjectConfigDir,
|
getProjectConfigDir,
|
||||||
ensureDir,
|
ensureDir,
|
||||||
} from './paths.js';
|
} from './paths.js';
|
||||||
@ -92,7 +91,6 @@ export interface InitGlobalDirsOptions {
|
|||||||
*/
|
*/
|
||||||
export async function initGlobalDirs(options?: InitGlobalDirsOptions): Promise<void> {
|
export async function initGlobalDirs(options?: InitGlobalDirsOptions): Promise<void> {
|
||||||
ensureDir(getGlobalConfigDir());
|
ensureDir(getGlobalConfigDir());
|
||||||
ensureDir(getGlobalLogsDir());
|
|
||||||
|
|
||||||
if (needsLanguageSetup()) {
|
if (needsLanguageSetup()) {
|
||||||
const isInteractive = !options?.nonInteractive && process.stdin.isTTY === true;
|
const isInteractive = !options?.nonInteractive && process.stdin.isTTY === true;
|
||||||
|
|||||||
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
import { existsSync, appendFileSync, mkdirSync, writeFileSync } from 'node:fs';
|
import { existsSync, appendFileSync, mkdirSync, writeFileSync } from 'node:fs';
|
||||||
import { dirname, join } from 'node:path';
|
import { dirname, join } from 'node:path';
|
||||||
import { homedir } from 'node:os';
|
|
||||||
import type { DebugConfig } from '../models/types.js';
|
import type { DebugConfig } from '../models/types.js';
|
||||||
|
|
||||||
/** Debug logger state */
|
/** Debug logger state */
|
||||||
@ -17,10 +16,10 @@ let initialized = false;
|
|||||||
/** Verbose console output state */
|
/** Verbose console output state */
|
||||||
let verboseConsoleEnabled = false;
|
let verboseConsoleEnabled = false;
|
||||||
|
|
||||||
/** Get default debug log file path */
|
/** Get default debug log file path (requires projectDir) */
|
||||||
function getDefaultLogFile(): string {
|
function getDefaultLogFile(projectDir: string): string {
|
||||||
const timestamp = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
|
const timestamp = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
|
||||||
return join(homedir(), '.takt', 'logs', `debug-${timestamp}.log`);
|
return join(projectDir, '.takt', 'logs', `debug-${timestamp}.log`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Initialize debug logger from config */
|
/** Initialize debug logger from config */
|
||||||
@ -34,27 +33,29 @@ export function initDebugLogger(config?: DebugConfig, projectDir?: string): void
|
|||||||
if (debugEnabled) {
|
if (debugEnabled) {
|
||||||
if (config?.logFile) {
|
if (config?.logFile) {
|
||||||
debugLogFile = config.logFile;
|
debugLogFile = config.logFile;
|
||||||
} else {
|
} else if (projectDir) {
|
||||||
debugLogFile = getDefaultLogFile();
|
debugLogFile = getDefaultLogFile(projectDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure log directory exists
|
if (debugLogFile) {
|
||||||
const logDir = dirname(debugLogFile);
|
// Ensure log directory exists
|
||||||
if (!existsSync(logDir)) {
|
const logDir = dirname(debugLogFile);
|
||||||
mkdirSync(logDir, { recursive: true });
|
if (!existsSync(logDir)) {
|
||||||
|
mkdirSync(logDir, { recursive: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
// Write initial log header
|
||||||
|
const header = [
|
||||||
|
'='.repeat(60),
|
||||||
|
`TAKT Debug Log`,
|
||||||
|
`Started: ${new Date().toISOString()}`,
|
||||||
|
`Project: ${projectDir || 'N/A'}`,
|
||||||
|
'='.repeat(60),
|
||||||
|
'',
|
||||||
|
].join('\n');
|
||||||
|
|
||||||
|
writeFileSync(debugLogFile, header, 'utf-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write initial log header
|
|
||||||
const header = [
|
|
||||||
'='.repeat(60),
|
|
||||||
`TAKT Debug Log`,
|
|
||||||
`Started: ${new Date().toISOString()}`,
|
|
||||||
`Project: ${projectDir || 'N/A'}`,
|
|
||||||
'='.repeat(60),
|
|
||||||
'',
|
|
||||||
].join('\n');
|
|
||||||
|
|
||||||
writeFileSync(debugLogFile, header, 'utf-8');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user