116 Commits

Author SHA1 Message Date
nrs
4a92ba2012
[#366] implement-exceeded-requeue (#374)
* takt: implement-exceeded-requeue

* takt: implement-exceeded-requeue

* takt: implement-exceeded-requeue

* ci: trigger CI

* fix: 未使用インポート削除と --create-worktree e2e テスト修正

InteractiveModeAction の不要な import を削除して lint エラーを解消する。
--create-worktree オプション削除に合わせ e2e の期待メッセージを更新する。

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-02 23:30:53 +09:00
nrslib
47612d9dcc refactor: agent-usecases / schema-loader の移動と pieceExecution の責務分割
- agent-usecases.ts を core/piece/ → agents/ へ移動
- schema-loader.ts を core/piece/ → infra/resources/ へ移動
- interactive-summary-types.ts を分離、shared/types/ ディレクトリを追加
- pieceExecution.ts を abortHandler / analyticsEmitter / iterationLimitHandler / outputFns / runMeta / sessionLogger に分割
- buildMergeFn を async → sync に変更(custom merge の file 戦略を削除)
- cleanupOrphanedClone にパストラバーサル保護を追加
- review-fix / frontend-review-fix ピースの IT テストを追加
2026-03-02 21:20:50 +09:00
nrslib
769bd98724 fix: avoid leading-boundary flush before complete boundary 2026-03-02 15:14:01 +09:00
nrslib
872ff5fa36 feat: decomposeTask / requestMoreParts / judgeStatus にプロバイダーイベントロギングを追加
onStream を各オプション型に追加し、runAgent 呼び出しに伝播させる。
これにより team_leader の分解フェーズや Phase 3 判定のイベントが
provider-events.jsonl に記録されるようになる。

変更ファイル:
- agent-usecases.ts: JudgeStatusOptions / DecomposeTaskOptions に onStream 追加
- phase-runner.ts: PhaseRunnerContext に onStream 追加
- status-judgment-phase.ts: judgeStatus に ctx.onStream を渡す
- OptionsBuilder.ts: buildPhaseRunnerContext の戻り値に onStream を含める
- TeamLeaderRunner.ts: decomposeTask / requestMoreParts に engineOptions.onStream を渡す
2026-03-02 14:24:57 +09:00
nrslib
b999ae4a4b fix: decomposeTask / requestMoreParts の maxTurns を 2 → 4 に増加
structured output の再試行余裕を確保するため。
maxTurns: 2 だと長いタスク分解で詰まる可能性があった。
2026-03-02 14:20:06 +09:00
nrslib
bddb66f85d fix: avoid leading-boundary timed flush fragmentation 2026-03-02 14:18:28 +09:00
nrslib
52968ac873 fix: team leader エラーメッセージが空になるバグを修正
error と content が共に空の場合、status をフォールバックとして使用する。
?? 演算子は空文字をフォールバックしないため || に変更。
2026-03-02 14:18:28 +09:00
Tomohisa Takaoka
17232f9940
feat: add GitHub Copilot CLI as a new provider (#425)
* feat: add GitHub Copilot CLI as a new provider

Add support for GitHub Copilot CLI (@github/copilot) as a takt provider,
enabling the 'copilot' command to be used for AI-driven task execution.

New files:
- src/infra/copilot/client.ts: CLI client with streaming, session ID
  extraction via --share, and permission mode mapping
- src/infra/copilot/types.ts: CopilotCallOptions type definitions
- src/infra/copilot/index.ts: barrel exports
- src/infra/providers/copilot.ts: CopilotProvider implementing Provider
- src/__tests__/copilot-client.test.ts: 20 unit tests for client
- src/__tests__/copilot-provider.test.ts: 8 unit tests for provider

Key features:
- Spawns 'copilot -p' in non-interactive mode with --silent --no-color
- Permission modes: full (--yolo), edit (--allow-all-tools --no-ask-user),
  readonly (no permission flags)
- Session ID extraction from --share transcript files
- Real-time stdout streaming via onStream callbacks
- Configurable via COPILOT_CLI_PATH and COPILOT_GITHUB_TOKEN env vars

* fix: remove unused COPILOT_DEFAULT_MAX_AUTOPILOT_CONTINUES constant

* fix: address review feedback for copilot provider

- Remove excess maxAutopilotContinues property from test (#1 High)
- Extract cleanupTmpDir() helper to eliminate DRY violation (#2 Medium)
- Deduplicate chunk string conversion in stdout handler (#3 Medium)
- Remove 5 what/how comments that restate code (#4 Medium)
- Log readFile failure instead of silently swallowing (#5 Medium)
- Add credential scrubbing (ghp_/ghs_/gho_/github_pat_) for stderr (#6 Medium)
- Add buffer overflow tests for stdout and stderr (#7 Medium)
- Add pre-aborted AbortSignal test (#8 Low)
- Add mkdtemp failure fallback test (#9 Low)
- Add rm cleanup verification to fallback test (#10 Low)
- Log mkdtemp failure with debug level (#11 Persist)
- Add createLogger('copilot-client') for structured logging
2026-02-28 20:28:56 +09:00
nrs
ae74c0d595
takt: #391 resolveConfigValue の無意味な defaultValue を撲滅する (#392) 2026-02-28 12:29:24 +09:00
Junichi Kato
b8b64f858b
feat: プロジェクト単位のCLIパス設定(Claude/Cursor/Codex) (#413)
* feat: プロジェクト単位のCLIパス設定を支援するconfig層を追加

validateCliPath汎用関数、Global/Project設定スキーマ拡張、
env override、3プロバイダ向けresolve関数(env→project→global→undefined)を追加。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: Claude/Cursor/CodexプロバイダにCLIパス解決を統合

各プロバイダのtoXxxOptions()でproject configを読み込み、
resolveXxxCliPath()経由でCLIパスを解決してSDKに渡す。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test: per-project CLIパス機能のテストを追加

validateCliPath, resolveClaudeCliPath, resolveCursorCliPath,
resolveCodexCliPath(project config層)のユニットテスト、
および既存プロバイダテストのモック更新。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 09:44:16 +09:00
nrslib
7507c45314 fix: disable Gradle daemon in runtime prepare for Codex compatibility 2026-02-27 14:23:01 +09:00
Junichi Kato
204843f498
Merge pull request #403 from j5ik2o/feature/cursor-agent-cli-provider-spec
feat: cursor-agent対応
2026-02-27 01:12:17 +09:00
nrslib
644c318295 fix: unify agent provider/model resolution and remove custom agent overrides 2026-02-27 00:27:52 +09:00
nrs
551299dbf8
takt: github-issue-390-to-no-provide (#393) 2026-02-26 23:45:03 +09:00
nrslib
798e89605d feat: TeamLeader に refill threshold と動的パート追加を導入
TeamLeaderRunner を4モジュールに分割(execution, aggregation, common, streaming)し、
パート完了時にキュー残数が refill_threshold 以下になると追加タスクを動的に生成する
worker pool 型の実行モデルを実装。ParallelLogger に LineTimeSliceBuffer を追加し
ストリーミング出力を改善。deep-research ピースに team_leader 設定を追加。
2026-02-26 22:33:22 +09:00
nrslib
f6d8c353d3 refactor: provider のデフォルト値 'claude' を廃止し明示設定を必須化
暗黙の claude フォールバックを削除し、未設定時は明確なエラーを返すように変更。
permission は未設定時 readonly にフォールバック。テスト・E2E を新挙動に適合。
2026-02-26 02:11:49 +09:00
Junichi Kato
f6334b8e75
feat: add submodule acquisition support in project config (#387) 2026-02-26 01:06:14 +09:00
nrs
dfc9263ef0
Merge pull request #369 from KentarouTakeda/support-ask-user-question
feat: AskUserQuestion 対応 (#161)
2026-02-23 22:01:13 +09:00
nrslib
f2ca01ffe0 refactor: provider/model resolution precedenceを一元化 2026-02-23 15:28:38 +09:00
武田 憲太郎
61959f66a9 feat: AskUserQuestion 対応 (#161) 2026-02-23 15:24:10 +09:00
nrslib
95cd36037a feat: ProjectLocalConfig に concurrency を追加 2026-02-23 14:59:40 +09:00
nrs
077d19a6b0
Merge pull request #355 from s-kikuchi/takt/20260222T0402-tasuku-purojekuto-takt-config
fix: Project-level model config ignored — getLocalLayerValue missing model case
2026-02-22 17:35:33 +09:00
kikuchi
753deb6539 fix: Project-level model config ignored — getLocalLayerValue missing model case 2026-02-22 13:49:32 +09:00
Tomohisa Takaoka
1d7336950e feat: opt-in auto_fetch and base_branch config for clone
Replace the always-on syncDefaultBranch with opt-in resolveBaseBranch:

- Add auto_fetch config (default: false) — only fetch when enabled
- Add base_branch config (project and global) — fallback to current branch
- Fetch-only mode: git fetch origin without modifying local branches
- Use fetched commit hash (origin/<base_branch>) to reset clone to latest
- No more git merge --ff-only or git fetch origin main:main

Config example:
  # ~/.takt/config.yaml or .takt/config.yaml
  auto_fetch: true
  base_branch: develop

Addresses review feedback: opt-in behavior, no local branch changes,
configurable base branch with current-branch fallback.
2026-02-21 12:30:26 -08:00
nrs
dec77e069e
add-model-to-persona-providers (#324)
* takt: add-model-to-persona-providers

* refactor: loadConfigを廃止しresolveConfigValueにキー単位解決を一元化

loadConfig()による一括マージを廃止し、resolveConfigValue()でキーごとに
global/project/piece/envの優先順位を宣言的に解決する方式に移行。
providerOptionsの優先順位をglobal < piece < project < envに修正し、
sourceトラッキングでOptionsBuilderのマージ方向を制御する。
2026-02-20 11:12:46 +09:00
nrs
4f8255d509
takt: add-draft-pr-option (#323) 2026-02-20 00:35:41 +09:00
nrs
99aa22d250
takt: github-issue-259-debug-takt (#312) 2026-02-19 16:57:24 +09:00
nrslib
6518faf72e refactor: 設定の不要要素削除とconfigテンプレート刷新 2026-02-19 11:53:02 +09:00
nrslib
cbde7ac654 refactor: 設定参照をresolveConfigValueへ統一 2026-02-19 10:55:03 +09:00
nrslib
5dc79946f2 refactor: 設定解決をloadConfigへ統一し不要設定を削除 2026-02-19 10:32:59 +09:00
nrs
0d1da61d14
[draft] takt/284/implement-using-only-the-files (#296)
* feat: track project-level .takt/pieces in version control

* feat: track project-level takt facets for customizable resources

* chore: include project .takt/config.yaml in git-tracked subset

* takt: github-issue-284-faceted-prompting
2026-02-18 23:21:09 +09:00
nrslib
16d7f9f979 リトライモード新設と instruct/retry の直接再実行対応
失敗タスク専用のリトライモード(retryMode.ts)を追加し、失敗情報・実行ログ・
レポートをシステムプロンプトに注入する方式に変更。instruct モードもタスク情報を
プロンプトに含める専用テンプレートへ移行。requeue のみだった再実行を
startReExecution による即時実行に対応し、既存ワークツリーの再利用も実装。
不要になった DebugConfig を削除。
2026-02-18 22:35:31 +09:00
Junichi Kato
dcfe2b0dc2
Merge pull request #292 from j5ik2o/feat/codex-cli-path-override
codex cli path override
2026-02-18 11:25:36 +09:00
nrslib
d04bc24591 feat: add expert-mini/expert-cqrs-mini pieces and fix permission fallback
- Add expert-mini and expert-cqrs-mini pieces (ja/en)
- Add new pieces to Mini and Expert categories
- Fall back to readonly when permission mode is unresolved instead of throwing
2026-02-15 12:45:34 +09:00
nrslib
2460dbdf61 refactor(output-contracts): unify OutputContractEntry to item format with use_judge and move runtime dir under .takt
- Remove OutputContractLabelPath (label:path format), unify to OutputContractItem only
- Add required format field and use_judge flag to output contracts
- Add getJudgmentReportFiles() to filter reports eligible for Phase 3 status judgment
- Add supervisor-validation output contract, remove review-summary
- Enhance output contracts with finding_id tracking (new/persists/resolved sections)
- Move runtime environment directory from .runtime to .takt/.runtime
- Update all builtin pieces, e2e fixtures, and tests
2026-02-15 11:17:55 +09:00
nrslib
f065ee510f feat: resolve movement permissions via provider profiles with required floor 2026-02-15 07:00:03 +09:00
nrslib
6e14cd3c38 feat(runtime): add configurable prepare presets and provider e2e 2026-02-15 05:28:39 +09:00
nrs
e52e1da6bf
takt-list (#271)
* refactor: provider/modelの解決ロジックをAgentRunnerに集約

OptionsBuilderでCLIレベルとstepレベルを事前マージしていたのをやめ、
stepProvider/stepModelとして分離して渡す形に変更。
AgentRunnerが全レイヤーの優先度を一括で解決する。

* takt: takt-list
2026-02-14 11:44:01 +09:00
nrslib
6fe8fece91 interactive の選択肢が非同期実行時に出てしまうバグのfix 2026-02-13 23:28:20 +09:00
nrslib
c85f23cb6e claude code がsandboxで実行されるため、テストが実行できない問題を対処できるオプションを追加 2026-02-13 21:46:11 +09:00
nrslib
479ee7ec25 providerごとに通信を許可する 2026-02-13 16:37:07 +09:00
nrslib
608f4ba73e Merge branch 'takt/257/add-agent-usecase-structured-o' into develop 2026-02-13 07:24:25 +09:00
nrslib
4919bc759f 判定処理の修正 2026-02-13 06:11:06 +09:00
nrslib
bcf38a5530 takt: 257/add-agent-usecase-structured-o 2026-02-12 15:03:28 +09:00
nrslib
bf4196d3b3 takt: github-issue-257 2026-02-12 13:32:28 +09:00
nrs
c7f2670562
takt: github-issue-246-opencode-report-permission-deprecated-tools (#252) 2026-02-12 11:55:47 +09:00
nrs
39c587d67b
github-issue-245-report (#251)
* dist-tag 検証をリトライ付きに変更(npm レジストリの結果整合性対策)

* takt run 実行時に蓋閉じスリープを抑制

* takt: github-issue-245-report
2026-02-12 11:51:55 +09:00
nrs
a82d6d9d8a
github-issue-244 (#250)
* dist-tag 検証をリトライ付きに変更(npm レジストリの結果整合性対策)

* takt run 実行時に蓋閉じスリープを抑制

* takt: github-issue-244

* takt: #244/implement-parallel-subtasks
2026-02-12 11:51:34 +09:00
nrslib
1705a33a88 provider event log default false 2026-02-11 16:32:11 +09:00
nrs
a3555ebeb4
takt: github-issue-236-feat-claude-codex-opencode (#239) 2026-02-11 15:01:52 +09:00