YeonGyu-Kim
2428a46e6d
refactor(features/background-agent): remove dead code submodules
...
Delete 15 unused files in background-agent module:
- background-task-completer.ts
- format-duration.ts
- message-dir.ts
- parent-session-context-resolver.ts
- parent-session-notifier.ts (and its test file)
- result-handler-context.ts
- result-handler.ts
- session-output-validator.ts
- session-task-cleanup.ts
- session-todo-checker.ts
- spawner/background-session-creator.ts
- spawner/concurrency-key-from-launch-input.ts
- spawner/spawner-context.ts
- spawner/tmux-callback-invoker.ts
Update index.ts barrel and manager.ts/spawner.ts imports
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-02-23 02:43:01 +09:00
YeonGyu-Kim
e3924437ce
feat(compaction): wire TaskHistory into BackgroundManager and compaction pipeline
...
Records task history at 6 status transitions (pending, running×2, error,
cancelled, completed). Exports TaskHistory from background-agent barrel.
Passes backgroundManager and sessionID through compaction hook chain.
2026-02-13 17:40:44 +09:00
YeonGyu-Kim
f146aeff0f
refactor: major codebase cleanup - BDD comments, file splitting, bug fixes ( #1350 )
...
* style(tests): normalize BDD comments from '// #given' to '// given'
- Replace 4,668 Python-style BDD comments across 107 test files
- Patterns changed: // #given -> // given, // #when -> // when, // #then -> // then
- Also handles no-space variants: //#given -> // given
* fix(rules-injector): prefer output.metadata.filePath over output.title
- Extract file path resolution to dedicated output-path.ts module
- Prefer metadata.filePath which contains actual file path
- Fall back to output.title only when metadata unavailable
- Fixes issue where rules weren't injected when tool output title was a label
* feat(slashcommand): add optional user_message parameter
- Add user_message optional parameter for command arguments
- Model can now call: command='publish' user_message='patch'
- Improves error messages with clearer format guidance
- Helps LLMs understand correct parameter usage
* feat(hooks): restore compaction-context-injector hook
- Restore hook deleted in cbbc7bd0 for session compaction context
- Injects 7 mandatory sections: User Requests, Final Goal, Work Completed,
Remaining Tasks, Active Working Context, MUST NOT Do, Agent Verification State
- Re-register in hooks/index.ts and main plugin entry
* refactor(background-agent): split manager.ts into focused modules
- Extract constants.ts for TTL values and internal types (52 lines)
- Extract state.ts for TaskStateManager class (204 lines)
- Extract spawner.ts for task creation logic (244 lines)
- Extract result-handler.ts for completion handling (265 lines)
- Reduce manager.ts from 1377 to 755 lines (45% reduction)
- Maintain backward compatible exports
* refactor(agents): split prometheus-prompt.ts into subdirectory
- Move 1196-line prometheus-prompt.ts to prometheus/ subdirectory
- Organize prompt sections into separate files for maintainability
- Update agents/index.ts exports
* refactor(delegate-task): split tools.ts into focused modules
- Extract categories.ts for category definitions and routing
- Extract executor.ts for task execution logic
- Extract helpers.ts for utility functions
- Extract prompt-builder.ts for prompt construction
- Reduce tools.ts complexity with cleaner separation of concerns
* refactor(builtin-skills): split skills.ts into individual skill files
- Move each skill to dedicated file in skills/ subdirectory
- Create barrel export for backward compatibility
- Improve maintainability with focused skill modules
* chore: update import paths and lockfile
- Update prometheus import path after refactor
- Update bun.lock
* fix(tests): complete BDD comment normalization
- Fix remaining #when/#then patterns missed by initial sed
- Affected: state.test.ts, events.test.ts
---------
Co-authored-by: justsisyphus <justsisyphus@users.noreply.github.com >
2026-02-01 16:47:50 +09:00
YeonGyu-Kim
f25f7ed0f5
feat(background-agent): add model-based concurrency management ( #548 )
...
* feat(config): add BackgroundTaskConfigSchema for model concurrency
🤖 GENERATED WITH ASSISTANCE OF OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode )
* feat(background-agent): add ConcurrencyManager for model-based limits
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode )
* feat(background-agent): integrate ConcurrencyManager into BackgroundManager
🤖 GENERATED WITH ASSISTANCE OF OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode )
* test(background-agent): add ConcurrencyManager tests
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode )
* fix(background-agent): set default concurrency to 5
🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode )
* feat(background-agent): support 0 as unlimited concurrency
Setting concurrency to 0 means unlimited (Infinity).
Works for defaultConcurrency, providerConcurrency, and modelConcurrency.
🤖 Generated with [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode )
2026-01-07 01:24:47 +09:00
YeonGyu-Kim
245acdabad
fix(background-agent): address Oracle review feedback
...
- Remove unused storage.ts (dead code, runtime inconsistency)
- Change persist() to sync void (debounce semantics clarity)
- Add type guards in handleEvent() for event safety
- Remove unused 'pending' from BackgroundTaskStatus
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode )
2025-12-13 00:35:34 +09:00
YeonGyu-Kim
698cdb6744
feat(background-agent): add BackgroundManager with persistence layer
...
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode )
2025-12-13 00:35:34 +09:00