Commit Graph

2459 Commits

Author SHA1 Message Date
YeonGyu-Kim ba770dc9ec test: align load_skills error assertions in delegate-task 2026-02-16 22:59:52 +09:00
YeonGyu-Kim 41286affff fix: force include_thinking and include_tool_results for running background tasks 2026-02-16 22:47:51 +09:00
YeonGyu-Kim cabd1e9696 feat: auto-enable full_session, thinking, and tool_results for running background tasks 2026-02-16 22:37:27 +09:00
YeonGyu-Kim 9477d1e598 refactor: rewrite remove-deadcode command for parallel deep agent batching 2026-02-16 22:37:18 +09:00
YeonGyu-Kim 9cc941e0cf refactor: remove dead file task-id-validator.ts and unused isModelAvailable from model-name-matcher 2026-02-16 22:33:44 +09:00
YeonGyu-Kim d5212eb547 test: remove tests for dead pollSessions function 2026-02-16 22:13:55 +09:00
YeonGyu-Kim d4f469827f refactor: remove unused params/imports/types from lsp-tools, task-tools, delegate-task, skill-loader, context-window-monitor, plugin-config 2026-02-16 22:12:21 +09:00
YeonGyu-Kim 83e8fb9cae refactor: remove unused imports from auto-update-checker, claude-code-hooks, mcp 2026-02-16 22:11:38 +09:00
YeonGyu-Kim a4cf75feec refactor: remove unused imports from interactive-bash-session, session-recovery, start-work 2026-02-16 22:11:35 +09:00
YeonGyu-Kim 7c6da2b1f8 refactor: remove unused code from background-agent, background-task, call-omo-agent 2026-02-16 22:11:29 +09:00
YeonGyu-Kim 5fafa572a4 refactor: remove unused imports from injector, tool-result-storage-sdk, session-notification-utils, model-resolver 2026-02-16 22:11:05 +09:00
YeonGyu-Kim 2090742869 refactor: remove unused constants and dead pollSessions from tmux-subagent 2026-02-16 22:11:00 +09:00
YeonGyu-Kim 38b6a00d82 refactor: remove unused hasIgnoredParts variables from context-window-limit-recovery 2026-02-16 22:10:44 +09:00
YeonGyu-Kim 8a1d7ad8f6 refactor: remove dead file message-storage-locator.ts 2026-02-16 22:09:10 +09:00
YeonGyu-Kim e5be444c07 remove dead code: legacy unified task tool and its action handlers 2026-02-16 21:58:44 +09:00
YeonGyu-Kim d7b4ed7c2a clarify task tool: emphasize category/subagent_type is required, remove inline examples 2026-02-16 21:47:56 +09:00
YeonGyu-Kim 513e618bab fix: resolve category delegation and command routing with display name agent keys
Category-based delegation (task(category='quick')) was broken because
SISYPHUS_JUNIOR_AGENT sent 'sisyphus-junior' to session.prompt but
config.agent keys are now display names ('Sisyphus-Junior').

- Use getAgentDisplayName() for SISYPHUS_JUNIOR_AGENT constant
- Replace hardcoded 'sisyphus-junior' strings in tools.ts with constant
- Update background-output local constants to use display names
- Add remapCommandAgentFields() to translate command agent fields
- Add raw-key fallback in tool-config-handler agentByKey()
2026-02-16 21:32:33 +09:00
YeonGyu-Kim 0f5287e92e test: update assertions for display name agent keys
- config-handler.test: look up agents by display name keys
- agent-key-remapper.test: new tests for key remapping function
- Rebuild schema asset
2026-02-16 20:43:18 +09:00
YeonGyu-Kim 49b6c108e2 Normalize agent name comparisons to handle display name keys
Hooks and tools now use getAgentConfigKey() to resolve agent names (which may
be display names like 'Atlas (Plan Executor)') to lowercase config keys
before comparison.

- session-utils: orchestrator check uses getAgentConfigKey
- atlas event-handler: boulder agent matching uses config keys
- category-skill-reminder: target agent check uses config keys
- todo-continuation-enforcer: skipAgents comparison normalized
- subagent-resolver: resolves 'metis' -> 'Metis (Plan Consultant)' for lookup
2026-02-16 20:43:09 +09:00
YeonGyu-Kim dde858794a Remap config.agent keys to display names at output boundary
Use display names as config.agent keys so opencode shows proper names in UI
(Tab/@ menu). Key remapping happens after all agents are assembled but before
reordering, via remapAgentKeysToDisplayNames().

- agent-config-handler: set default_agent to display name, add key remapping
- agent-key-remapper: new module to transform lowercase keys to display names
- agent-priority-order: CORE_AGENT_ORDER uses display names
- tool-config-handler: look up agents by config key via agentByKey() helper
2026-02-16 20:42:58 +09:00
YeonGyu-Kim 2c9e6638f6 Revert name fields from agent configs, add getAgentConfigKey reverse lookup
Remove crash-causing name fields from 6 agent configs (sisyphus, hephaestus,
atlas, metis, momus, prometheus). The name field approach breaks opencode
because Agent.get(agent.name) uses name as lookup key.

Add getAgentConfigKey() to agent-display-names.ts for resolving display names
back to lowercase config keys (e.g. 'Atlas (Plan Executor)' -> 'atlas').
2026-02-16 20:42:45 +09:00
YeonGyu-Kim c596b475d2 Add display names to all core agents via name field
Sisyphus (Ultraworker), Hephaestus (Deep Agent), Prometheus (Plan Builder),
Atlas (Plan Executor), Metis (Plan Consultant), Momus (Plan Critic).

Requires opencode fix: Agent.get() fallback to name-based lookup when key
lookup fails, since opencode stores agent.name in messages and reuses it
for subsequent Agent.get() calls.
2026-02-16 20:15:58 +09:00
YeonGyu-Kim 0a06b82ec2 Update agent display names: add Hephaestus (Deep Agent), rename Atlas to (Plan Executor), rename Momus to (Plan Critic) 2026-02-16 20:12:24 +09:00
YeonGyu-Kim 02a1953155 Revert "Add display names to core agents: Sisyphus (Ultraworker), Hephaestus (Deep Agent), Prometheus (Plan Builder), Atlas (Plan Executor)"
This reverts commit 655899a264.
2026-02-16 20:12:24 +09:00
YeonGyu-Kim 47601964ee Revert "Add display names to Metis (Plan Consultant) and Momus (Plan Critic)"
This reverts commit 301847011c.
2026-02-16 20:12:24 +09:00
YeonGyu-Kim 4d3f56cbe4 Merge pull request #1886 from code-yeongyu/fix/oracle-review-findings
fix: address Oracle safety review findings for v3.6.0 minor publish
2026-02-16 18:43:17 +09:00
YeonGyu-Kim 234d331496 Add display names to Metis (Plan Consultant) and Momus (Plan Critic) 2026-02-16 18:36:58 +09:00
YeonGyu-Kim 16058a6513 Add display names to core agents: Sisyphus (Ultraworker), Hephaestus (Deep Agent), Prometheus (Plan Builder), Atlas (Plan Executor) 2026-02-16 18:36:11 +09:00
YeonGyu-Kim 8582fe267b fix: resolve session-manager storage test mock pollution (pre-existing CI failure) 2026-02-16 18:29:30 +09:00
YeonGyu-Kim 9edb9d1f15 test: add tests for SDK recovery modules (empty-content-recovery, recover-empty-content-message) 2026-02-16 18:20:32 +09:00
YeonGyu-Kim 63e983269d refactor: consolidate duplicated Promise.all dual reads into resolveMessageContext utility 2026-02-16 18:20:27 +09:00
YeonGyu-Kim 0b10245c34 refactor: create normalizeSDKResponse helper and replace scattered patterns across 37 files 2026-02-16 18:20:19 +09:00
YeonGyu-Kim 90555f3d5e fix: propagate sessionExists SDK errors instead of swallowing them 2026-02-16 16:52:27 +09:00
YeonGyu-Kim 700c310205 fix: add retry-once logic to isSqliteBackend for startup race condition 2026-02-16 16:52:25 +09:00
YeonGyu-Kim de9a77e1af fix: reduce HTTP API timeout from 30s to 10s 2026-02-16 16:52:23 +09:00
YeonGyu-Kim 70f96d4e24 fix: rename prompt_async to promptAsync for SDK compatibility 2026-02-16 16:52:06 +09:00
YeonGyu-Kim d1e78a2e46 Merge pull request #1837 from code-yeongyu/fuck-v1.2
feat: OpenCode beta SQLite migration compatibility
2026-02-16 16:25:49 +09:00
github-actions[bot] 7ff8e74c46 release: v3.5.6 2026-02-16 07:24:09 +00:00
YeonGyu-Kim c9dd399bca fix: update prometheus prompt test to match compressed plan template wording 2026-02-16 16:21:14 +09:00
YeonGyu-Kim b69fa7bda8 fix: normalize SDK response shape in readMessagesFromSDK
Use response.data ?? response to handle both object and array-shaped
SDK responses, consistent with all other SDK readers.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim 64000785c7 fix: handle array-shaped SDK responses in getSdkMessages & dedup getMessageDir
- getSdkMessages now handles both response.data and direct array
  responses from SDK
- Consolidated getMessageDir: storage.ts now re-exports from shared
  opencode-message-dir.ts (with path traversal guards)
2026-02-16 16:13:40 +09:00
YeonGyu-Kim 2f6990890f fix: defensive SDK response handling & parts-reader normalization
- Replace all response.data ?? [] with (response.data ?? response)
  pattern across 14 files to handle SDK array-shaped responses
- Normalize SDK parts in parts-reader.ts by injecting sessionID/
  messageID before validation (P1: SDK parts lack these fields)
- Treat unknown part types as having content in
  recover-empty-content-message-sdk.ts to prevent false placeholder
  injection on image/file parts
- Replace local isRecord with shared import in parts-reader.ts
2026-02-16 16:13:40 +09:00
YeonGyu-Kim 99272cddc0 fix: address 5 SDK compatibility issues from Cubic round 8
- P1: Use compacted timestamp check instead of nonexistent truncated
  field in target-token-truncation.ts
- P1: Use defensive (response.data ?? response) pattern in
  hook-message-injector/injector.ts to match codebase convention
- P2: Filter by tool type in countTruncatedResultsFromSDK to avoid
  counting non-tool compacted parts
- P2: Treat thinking/meta-only messages as empty in both
  empty-content-recovery-sdk.ts and message-builder.ts to align
  SDK path with file-based logic
2026-02-16 16:13:40 +09:00
YeonGyu-Kim 9c2a92c235 docs: regenerate all 13 AGENTS.md files from deep codebase exploration 2026-02-16 16:13:40 +09:00
YeonGyu-Kim 052f52822c fix: address 8-domain Oracle review findings (C1, C2, M1-M4)
- C1: thinking-prepend unique part IDs per message (global PK collision)
- C2: recover-thinking-disabled-violation try/catch guard on SDK call
- M1: remove non-schema truncated/originalSize fields from SDK interfaces
- M2: messageHasContentFromSDK treats thinking-only messages as non-empty
- M3: syncAllTasksToTodos persists finalTodos + no-id rename dedup guard
- M4: AbortSignal.timeout(30s) on HTTP fetch calls in opencode-http-api

All 2739 tests pass, typecheck clean.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim e21c784cc5 fix: re-read fresh messages before empty scan & dedup isRecord import
- Re-read messages from SDK after injectTextPartAsync to prevent stale
  snapshot from causing duplicate placeholder injection (P2)
- Replace local isRecord with shared import from record-type-guard (P3)
2026-02-16 16:13:40 +09:00
YeonGyu-Kim 39813842de fix: address Cubic round-6 P2/P3 issues
- P2: treat unknown part types as non-content in message-builder messageHasContentFromSDK
- P3: reuse shared isRecord from record-type-guard.ts in opencode-http-api
2026-02-16 16:13:40 +09:00
YeonGyu-Kim dc5e51598e fix: address Cubic round-5 P1/P2 issues
- P1: add path traversal guard to getMessageDir (reject .., /, \)
- P2: treat unknown part types as non-content in messageHasContentFromSDK
2026-02-16 16:13:40 +09:00
YeonGyu-Kim 2cefc8818c fix: revert messageHasContentFromSDK unknown type handling
Unknown part types should be treated as content (return true)
to match parity with the existing message-builder implementation.
Using continue would incorrectly mark messages with unknown part
types as empty, triggering false recovery.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim 6f18113e99 fix: address Cubic round-4 P2 issues
- isTodo: allow optional id to match Todo interface, preventing
  todos without ids from being silently dropped
- messageHasContentFromSDK: treat unknown part types as empty
  (continue) instead of content (return true) for parity with
  existing storage logic
- readMessagesFromSDK in recover-empty-content-message-sdk: wrap
  SDK call in try/catch to prevent recovery from throwing
2026-02-16 16:13:40 +09:00