codingbuddy 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/agent/agent-summary.utils.d.ts +2 -1
- package/dist/src/analyzer/conventions.schemas.d.ts +0 -4
- package/dist/src/analyzer/conventions.schemas.js.map +1 -1
- package/dist/src/analyzer/conventions.types.d.ts +5 -7
- package/dist/src/analyzer/conventions.types.js.map +1 -1
- package/dist/src/analyzer/directory.analyzer.d.ts +1 -1
- package/dist/src/checklist/checklist.schema.d.ts +2 -1
- package/dist/src/cli/cli.d.ts +0 -1
- package/dist/src/cli/cli.js +0 -1
- package/dist/src/cli/cli.js.map +1 -1
- package/dist/src/cli/init/claude-settings.utils.d.ts +2 -1
- package/dist/src/cli/init/config.generator.d.ts +0 -2
- package/dist/src/cli/init/config.generator.js +0 -2
- package/dist/src/cli/init/config.generator.js.map +1 -1
- package/dist/src/cli/init/config.writer.d.ts +0 -1
- package/dist/src/cli/init/config.writer.js +0 -1
- package/dist/src/cli/init/config.writer.js.map +1 -1
- package/dist/src/cli/init/init.constants.js +1 -0
- package/dist/src/cli/init/init.constants.js.map +1 -1
- package/dist/src/cli/init/init.wizard.d.ts +2 -1
- package/dist/src/cli/run-tui.d.ts +0 -2
- package/dist/src/cli/run-tui.js +19 -57
- package/dist/src/cli/run-tui.js.map +1 -1
- package/dist/src/config/config.loader.d.ts +0 -2
- package/dist/src/config/config.loader.js +0 -2
- package/dist/src/config/config.loader.js.map +1 -1
- package/dist/src/config/config.schema.d.ts +0 -16
- package/dist/src/config/config.schema.js +7 -7
- package/dist/src/config/config.schema.js.map +1 -1
- package/dist/src/context/context-document.types.d.ts +0 -8
- package/dist/src/context/context-document.types.js +9 -9
- package/dist/src/context/context-document.types.js.map +1 -1
- package/dist/src/context/context-parser.utils.d.ts +1 -9
- package/dist/src/context/context-parser.utils.js +0 -36
- package/dist/src/context/context-parser.utils.js.map +1 -1
- package/dist/src/keyword/keyword.service.js +5 -1
- package/dist/src/keyword/keyword.service.js.map +1 -1
- package/dist/src/keyword/keyword.types.d.ts +0 -4
- package/dist/src/keyword/keyword.types.js.map +1 -1
- package/dist/src/keyword/srp-template.d.ts +0 -2
- package/dist/src/keyword/srp-template.js +0 -2
- package/dist/src/keyword/srp-template.js.map +1 -1
- package/dist/src/main.js +30 -9
- package/dist/src/main.js.map +1 -1
- package/dist/src/rules/rules.types.d.ts +3 -2
- package/dist/src/rules/skill.schema.d.ts +0 -5
- package/dist/src/rules/skill.schema.js +3 -3
- package/dist/src/rules/skill.schema.js.map +1 -1
- package/dist/src/shared/async.utils.d.ts +3 -2
- package/dist/src/shared/file.utils.d.ts +3 -2
- package/dist/src/shared/filesystem.interface.d.ts +0 -10
- package/dist/src/shared/filesystem.interface.js +1 -10
- package/dist/src/shared/filesystem.interface.js.map +1 -1
- package/dist/src/shared/keyword-core.d.ts +2 -1
- package/dist/src/shared/keyword-core.js +3 -1
- package/dist/src/shared/keyword-core.js.map +1 -1
- package/dist/src/shared/language.types.d.ts +2 -1
- package/dist/src/shared/lru-cache.d.ts +2 -6
- package/dist/src/shared/path.utils.d.ts +0 -1
- package/dist/src/shared/path.utils.js +0 -1
- package/dist/src/shared/path.utils.js.map +1 -1
- package/dist/src/shared/pattern-matcher.d.ts +2 -1
- package/dist/src/shared/rules-core.d.ts +3 -2
- package/dist/src/shared/security.utils.d.ts +4 -3
- package/dist/src/shared/validation.constants.d.ts +2 -3
- package/dist/src/shared/validation.constants.js +3 -3
- package/dist/src/shared/validation.constants.js.map +1 -1
- package/dist/src/shared/verbosity.types.d.ts +2 -1
- package/dist/src/skill/skill-content.utils.d.ts +0 -1
- package/dist/src/skill/skill-content.utils.js +4 -4
- package/dist/src/skill/skill-content.utils.js.map +1 -1
- package/dist/src/tui/__perf__/memory-stability.spec.js +8 -8
- package/dist/src/tui/__perf__/memory-stability.spec.js.map +1 -1
- package/dist/src/tui/__perf__/rendering-performance.spec.js +9 -9
- package/dist/src/tui/__perf__/rendering-performance.spec.js.map +1 -1
- package/dist/src/tui/components/ActivityVisualizer.d.ts +10 -0
- package/dist/src/tui/components/ActivityVisualizer.js +22 -0
- package/dist/src/tui/components/ActivityVisualizer.js.map +1 -0
- package/dist/src/tui/components/ActivityVisualizer.spec.js +45 -0
- package/dist/src/tui/components/ActivityVisualizer.spec.js.map +1 -0
- package/dist/src/tui/components/ContextSection.d.ts +7 -0
- package/dist/src/tui/components/ContextSection.js +24 -0
- package/dist/src/tui/components/ContextSection.js.map +1 -0
- package/dist/src/tui/components/FlowMap.d.ts +12 -0
- package/dist/src/tui/components/FlowMap.js +55 -0
- package/dist/src/tui/components/FlowMap.js.map +1 -0
- package/dist/src/tui/components/FlowMap.spec.js +59 -0
- package/dist/src/tui/components/FlowMap.spec.js.map +1 -0
- package/dist/src/tui/components/FocusedAgentPanel.d.ts +19 -0
- package/dist/src/tui/components/FocusedAgentPanel.js +74 -0
- package/dist/src/tui/components/FocusedAgentPanel.js.map +1 -0
- package/dist/src/tui/components/FocusedAgentPanel.spec.js +140 -0
- package/dist/src/tui/components/FocusedAgentPanel.spec.js.map +1 -0
- package/dist/src/tui/components/HeaderBar.d.ts +12 -0
- package/dist/src/tui/components/HeaderBar.js +55 -0
- package/dist/src/tui/components/HeaderBar.js.map +1 -0
- package/dist/src/tui/components/HeaderBar.spec.js +78 -0
- package/dist/src/tui/components/HeaderBar.spec.js.map +1 -0
- package/dist/src/tui/components/SessionTabBar.d.ts +9 -0
- package/dist/src/tui/components/SessionTabBar.js +15 -0
- package/dist/src/tui/components/SessionTabBar.js.map +1 -0
- package/dist/src/tui/components/SessionTabBar.spec.js +59 -0
- package/dist/src/tui/components/SessionTabBar.spec.js.map +1 -0
- package/dist/src/tui/components/StageHealthBar.d.ts +10 -0
- package/dist/src/tui/components/StageHealthBar.js +63 -0
- package/dist/src/tui/components/StageHealthBar.js.map +1 -0
- package/dist/src/tui/components/StageHealthBar.spec.js +63 -0
- package/dist/src/tui/components/StageHealthBar.spec.js.map +1 -0
- package/dist/src/tui/components/activity-visualizer.pure.d.ts +9 -0
- package/dist/src/tui/components/activity-visualizer.pure.js +70 -0
- package/dist/src/tui/components/activity-visualizer.pure.js.map +1 -0
- package/dist/src/tui/components/context-section.pure.d.ts +3 -0
- package/dist/src/tui/components/context-section.pure.js +38 -0
- package/dist/src/tui/components/context-section.pure.js.map +1 -0
- package/dist/src/tui/components/flow-map.pure.d.ts +26 -0
- package/dist/src/tui/components/flow-map.pure.js +263 -0
- package/dist/src/tui/components/flow-map.pure.js.map +1 -0
- package/dist/src/tui/components/focused-agent.pure.d.ts +23 -0
- package/dist/src/tui/components/focused-agent.pure.js +87 -0
- package/dist/src/tui/components/focused-agent.pure.js.map +1 -0
- package/dist/src/tui/components/grid-layout.pure.d.ts +2 -0
- package/dist/src/tui/components/grid-layout.pure.js +50 -0
- package/dist/src/tui/components/grid-layout.pure.js.map +1 -0
- package/dist/src/tui/components/header-bar.pure.d.ts +1 -0
- package/dist/src/tui/components/{header.pure.js → header-bar.pure.js} +1 -7
- package/dist/src/tui/components/header-bar.pure.js.map +1 -0
- package/dist/src/tui/components/index.d.ts +12 -15
- package/dist/src/tui/components/index.js +35 -49
- package/dist/src/tui/components/index.js.map +1 -1
- package/dist/src/tui/components/session-tab-bar.pure.d.ts +9 -0
- package/dist/src/tui/components/session-tab-bar.pure.js +45 -0
- package/dist/src/tui/components/session-tab-bar.pure.js.map +1 -0
- package/dist/src/tui/components/stage-health.pure.d.ts +4 -0
- package/dist/src/tui/components/stage-health.pure.js +59 -0
- package/dist/src/tui/components/stage-health.pure.js.map +1 -0
- package/dist/src/tui/dashboard-app.d.ts +8 -0
- package/dist/src/tui/dashboard-app.js +43 -0
- package/dist/src/tui/dashboard-app.js.map +1 -0
- package/dist/src/tui/dashboard-app.spec.js +136 -0
- package/dist/src/tui/dashboard-app.spec.js.map +1 -0
- package/dist/src/tui/dashboard-types.d.ts +88 -0
- package/dist/src/tui/dashboard-types.js +32 -0
- package/dist/src/tui/dashboard-types.js.map +1 -0
- package/dist/src/tui/eventbus-ui.integration.spec.js +132 -167
- package/dist/src/tui/eventbus-ui.integration.spec.js.map +1 -1
- package/dist/src/tui/events/event-bus.js +1 -1
- package/dist/src/tui/events/event-bus.js.map +1 -1
- package/dist/src/tui/events/index.d.ts +1 -1
- package/dist/src/tui/events/index.js.map +1 -1
- package/dist/src/tui/events/parse-agent.js +2 -1
- package/dist/src/tui/events/parse-agent.js.map +1 -1
- package/dist/src/tui/events/response-event-extractor.d.ts +16 -1
- package/dist/src/tui/events/response-event-extractor.js +154 -1
- package/dist/src/tui/events/response-event-extractor.js.map +1 -1
- package/dist/src/tui/events/tui-interceptor.d.ts +3 -0
- package/dist/src/tui/events/tui-interceptor.js +67 -7
- package/dist/src/tui/events/tui-interceptor.js.map +1 -1
- package/dist/src/tui/events/types.d.ts +46 -2
- package/dist/src/tui/events/types.js +6 -0
- package/dist/src/tui/events/types.js.map +1 -1
- package/dist/src/tui/hooks/index.d.ts +7 -4
- package/dist/src/tui/hooks/index.js +12 -7
- package/dist/src/tui/hooks/index.js.map +1 -1
- package/dist/src/tui/hooks/use-clock.js +3 -3
- package/dist/src/tui/hooks/use-clock.js.map +1 -1
- package/dist/src/tui/hooks/use-dashboard-state.d.ts +46 -0
- package/dist/src/tui/hooks/use-dashboard-state.js +249 -0
- package/dist/src/tui/hooks/use-dashboard-state.js.map +1 -0
- package/dist/src/tui/hooks/use-focus-agent.d.ts +2 -0
- package/dist/src/tui/hooks/use-focus-agent.js +26 -0
- package/dist/src/tui/hooks/use-focus-agent.js.map +1 -0
- package/dist/src/tui/hooks/use-multi-session-state.d.ts +16 -0
- package/dist/src/tui/hooks/use-multi-session-state.js +163 -0
- package/dist/src/tui/hooks/use-multi-session-state.js.map +1 -0
- package/dist/src/tui/hooks/use-terminal-size.d.ts +9 -0
- package/dist/src/tui/hooks/use-terminal-size.js +31 -0
- package/dist/src/tui/hooks/use-terminal-size.js.map +1 -0
- package/dist/src/tui/index.d.ts +12 -4
- package/dist/src/tui/index.js +18 -7
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/ipc/index.d.ts +5 -2
- package/dist/src/tui/ipc/index.js +5 -5
- package/dist/src/tui/ipc/index.js.map +1 -1
- package/dist/src/tui/ipc/ipc-state-cache.d.ts +1 -0
- package/dist/src/tui/ipc/ipc-state-cache.js +7 -0
- package/dist/src/tui/ipc/ipc-state-cache.js.map +1 -1
- package/dist/src/tui/ipc/multi-session-manager.d.ts +39 -0
- package/dist/src/tui/ipc/multi-session-manager.js +143 -0
- package/dist/src/tui/ipc/multi-session-manager.js.map +1 -0
- package/dist/src/tui/ipc/tui-auto-launcher.d.ts +22 -0
- package/dist/src/tui/ipc/tui-auto-launcher.js +113 -0
- package/dist/src/tui/ipc/tui-auto-launcher.js.map +1 -0
- package/dist/src/tui/multi-session-app.d.ts +6 -0
- package/dist/src/tui/multi-session-app.js +55 -0
- package/dist/src/tui/multi-session-app.js.map +1 -0
- package/dist/src/tui/multi-session-app.spec.js +95 -0
- package/dist/src/tui/multi-session-app.spec.js.map +1 -0
- package/dist/src/tui/transport-tui.integration.spec.js +15 -15
- package/dist/src/tui/transport-tui.integration.spec.js.map +1 -1
- package/dist/src/tui/tui-config.d.ts +3 -2
- package/dist/src/tui/types.d.ts +1 -1
- package/dist/src/tui/types.js +3 -0
- package/dist/src/tui/types.js.map +1 -1
- package/dist/src/tui/utils/color-buffer.d.ts +31 -0
- package/dist/src/tui/utils/color-buffer.js +86 -0
- package/dist/src/tui/utils/color-buffer.js.map +1 -0
- package/dist/src/tui/utils/colors.js.map +1 -1
- package/dist/src/tui/utils/edge-router.d.ts +9 -0
- package/dist/src/tui/utils/edge-router.js +65 -0
- package/dist/src/tui/utils/edge-router.js.map +1 -0
- package/dist/src/tui/utils/index.d.ts +3 -1
- package/dist/src/tui/utils/index.js +21 -4
- package/dist/src/tui/utils/index.js.map +1 -1
- package/dist/src/tui/utils/theme.d.ts +50 -0
- package/dist/src/tui/utils/theme.js +128 -0
- package/dist/src/tui/utils/theme.js.map +1 -0
- package/dist/src/tui-bundle.mjs +5755 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/dist/src/shared/token-counter.d.ts +0 -13
- package/dist/src/shared/token-counter.js +0 -41
- package/dist/src/shared/token-counter.js.map +0 -1
- package/dist/src/tui/app.d.ts +0 -6
- package/dist/src/tui/app.js +0 -20
- package/dist/src/tui/app.js.map +0 -1
- package/dist/src/tui/app.spec.js +0 -226
- package/dist/src/tui/app.spec.js.map +0 -1
- package/dist/src/tui/components/AgentCard.d.ts +0 -6
- package/dist/src/tui/components/AgentCard.js +0 -18
- package/dist/src/tui/components/AgentCard.js.map +0 -1
- package/dist/src/tui/components/AgentCard.spec.js +0 -118
- package/dist/src/tui/components/AgentCard.spec.js.map +0 -1
- package/dist/src/tui/components/AgentGrid.d.ts +0 -7
- package/dist/src/tui/components/AgentGrid.js +0 -20
- package/dist/src/tui/components/AgentGrid.js.map +0 -1
- package/dist/src/tui/components/AgentGrid.spec.js +0 -52
- package/dist/src/tui/components/AgentGrid.spec.js.map +0 -1
- package/dist/src/tui/components/AgentTree.d.ts +0 -7
- package/dist/src/tui/components/AgentTree.js +0 -24
- package/dist/src/tui/components/AgentTree.js.map +0 -1
- package/dist/src/tui/components/AgentTree.spec.js +0 -146
- package/dist/src/tui/components/AgentTree.spec.js.map +0 -1
- package/dist/src/tui/components/CategoryRow.d.ts +0 -9
- package/dist/src/tui/components/CategoryRow.js +0 -15
- package/dist/src/tui/components/CategoryRow.js.map +0 -1
- package/dist/src/tui/components/CategoryRow.spec.js +0 -58
- package/dist/src/tui/components/CategoryRow.spec.js.map +0 -1
- package/dist/src/tui/components/Header.d.ts +0 -6
- package/dist/src/tui/components/Header.js +0 -18
- package/dist/src/tui/components/Header.js.map +0 -1
- package/dist/src/tui/components/Header.spec.js +0 -38
- package/dist/src/tui/components/Header.spec.js.map +0 -1
- package/dist/src/tui/components/ProgressBar.d.ts +0 -7
- package/dist/src/tui/components/ProgressBar.js +0 -12
- package/dist/src/tui/components/ProgressBar.js.map +0 -1
- package/dist/src/tui/components/ProgressBar.spec.js +0 -37
- package/dist/src/tui/components/ProgressBar.spec.js.map +0 -1
- package/dist/src/tui/components/StatusBar.d.ts +0 -8
- package/dist/src/tui/components/StatusBar.js +0 -29
- package/dist/src/tui/components/StatusBar.js.map +0 -1
- package/dist/src/tui/components/StatusBar.spec.js +0 -93
- package/dist/src/tui/components/StatusBar.spec.js.map +0 -1
- package/dist/src/tui/components/agent-card.pure.d.ts +0 -7
- package/dist/src/tui/components/agent-card.pure.js +0 -65
- package/dist/src/tui/components/agent-card.pure.js.map +0 -1
- package/dist/src/tui/components/agent-grid.pure.d.ts +0 -3
- package/dist/src/tui/components/agent-grid.pure.js +0 -35
- package/dist/src/tui/components/agent-grid.pure.js.map +0 -1
- package/dist/src/tui/components/agent-mini-card.pure.d.ts +0 -2
- package/dist/src/tui/components/agent-mini-card.pure.js +0 -17
- package/dist/src/tui/components/agent-mini-card.pure.js.map +0 -1
- package/dist/src/tui/components/agent-tree.pure.d.ts +0 -18
- package/dist/src/tui/components/agent-tree.pure.js +0 -41
- package/dist/src/tui/components/agent-tree.pure.js.map +0 -1
- package/dist/src/tui/components/category-row.pure.d.ts +0 -3
- package/dist/src/tui/components/category-row.pure.js +0 -26
- package/dist/src/tui/components/category-row.pure.js.map +0 -1
- package/dist/src/tui/components/header.pure.d.ts +0 -4
- package/dist/src/tui/components/header.pure.js.map +0 -1
- package/dist/src/tui/components/progress-bar.pure.d.ts +0 -2
- package/dist/src/tui/components/progress-bar.pure.js +0 -21
- package/dist/src/tui/components/progress-bar.pure.js.map +0 -1
- package/dist/src/tui/components/status-bar.pure.d.ts +0 -15
- package/dist/src/tui/components/status-bar.pure.js +0 -83
- package/dist/src/tui/components/status-bar.pure.js.map +0 -1
- package/dist/src/tui/hooks/use-agent-state.d.ts +0 -7
- package/dist/src/tui/hooks/use-agent-state.js +0 -13
- package/dist/src/tui/hooks/use-agent-state.js.map +0 -1
- package/dist/src/tui/hooks/use-agent-state.spec.d.ts +0 -1
- package/dist/src/tui/hooks/use-agent-state.spec.js +0 -167
- package/dist/src/tui/hooks/use-agent-state.spec.js.map +0 -1
- package/dist/src/tui/hooks/use-event-bus.d.ts +0 -34
- package/dist/src/tui/hooks/use-event-bus.js +0 -91
- package/dist/src/tui/hooks/use-event-bus.js.map +0 -1
- package/dist/src/tui/hooks/use-event-bus.spec.d.ts +0 -1
- package/dist/src/tui/hooks/use-event-bus.spec.js +0 -362
- package/dist/src/tui/hooks/use-event-bus.spec.js.map +0 -1
- package/dist/src/tui/utils/constants.d.ts +0 -3
- package/dist/src/tui/utils/constants.js +0 -15
- package/dist/src/tui/utils/constants.js.map +0 -1
- /package/dist/src/tui/{app.spec.d.ts → components/ActivityVisualizer.spec.d.ts} +0 -0
- /package/dist/src/tui/components/{AgentCard.spec.d.ts → FlowMap.spec.d.ts} +0 -0
- /package/dist/src/tui/components/{AgentGrid.spec.d.ts → FocusedAgentPanel.spec.d.ts} +0 -0
- /package/dist/src/tui/components/{AgentTree.spec.d.ts → HeaderBar.spec.d.ts} +0 -0
- /package/dist/src/tui/components/{CategoryRow.spec.d.ts → SessionTabBar.spec.d.ts} +0 -0
- /package/dist/src/tui/components/{Header.spec.d.ts → StageHealthBar.spec.d.ts} +0 -0
- /package/dist/src/tui/{components/ProgressBar.spec.d.ts → dashboard-app.spec.d.ts} +0 -0
- /package/dist/src/tui/{components/StatusBar.spec.d.ts → multi-session-app.spec.d.ts} +0 -0
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const react_1 = require("react");
|
|
4
4
|
const vitest_1 = require("vitest");
|
|
5
5
|
const ink_testing_library_1 = require("ink-testing-library");
|
|
6
|
-
const
|
|
6
|
+
const dashboard_app_1 = require("./dashboard-app");
|
|
7
7
|
const events_1 = require("./events");
|
|
8
8
|
vitest_1.vi.mock('./utils/icons', async (importOriginal) => {
|
|
9
9
|
const actual = await importOriginal();
|
|
@@ -14,10 +14,10 @@ vitest_1.vi.mock('./utils/icons', async (importOriginal) => {
|
|
|
14
14
|
});
|
|
15
15
|
const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
16
16
|
(0, vitest_1.describe)('EventBus ↔ UI Integration', () => {
|
|
17
|
-
(0, vitest_1.describe)('Agent 활성화 →
|
|
18
|
-
(0, vitest_1.it)('should show primary agent name
|
|
17
|
+
(0, vitest_1.describe)('Agent 활성화 → Dashboard 상태 변화', () => {
|
|
18
|
+
(0, vitest_1.it)('should show primary agent name and RUNNING state when AGENT_ACTIVATED with isPrimary=true', async () => {
|
|
19
19
|
const eventBus = new events_1.TuiEventBus();
|
|
20
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
20
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
21
21
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
22
22
|
agentId: 'arch-1',
|
|
23
23
|
name: 'solution-architect',
|
|
@@ -26,12 +26,12 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
26
26
|
});
|
|
27
27
|
await tick();
|
|
28
28
|
const frame = lastFrame() ?? '';
|
|
29
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
30
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
29
|
+
(0, vitest_1.expect)(frame).toContain('solution-arch');
|
|
30
|
+
(0, vitest_1.expect)(frame).toContain('RUNNING');
|
|
31
31
|
});
|
|
32
|
-
(0, vitest_1.it)('should show multiple parallel agents in
|
|
32
|
+
(0, vitest_1.it)('should show multiple parallel agents in FlowMap when specialists activated', async () => {
|
|
33
33
|
const eventBus = new events_1.TuiEventBus();
|
|
34
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
34
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
35
35
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
36
36
|
agentId: 'p1',
|
|
37
37
|
name: 'solution-architect',
|
|
@@ -52,15 +52,15 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
52
52
|
});
|
|
53
53
|
await tick();
|
|
54
54
|
const frame = lastFrame() ?? '';
|
|
55
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
56
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
57
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
55
|
+
(0, vitest_1.expect)(frame).toContain('security-');
|
|
56
|
+
(0, vitest_1.expect)(frame).toContain('performan');
|
|
57
|
+
(0, vitest_1.expect)(frame).toContain('RUNNING');
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
|
-
(0, vitest_1.describe)('Agent 비활성화 →
|
|
61
|
-
(0, vitest_1.it)('should
|
|
60
|
+
(0, vitest_1.describe)('Agent 비활성화 → 상태 전환', () => {
|
|
61
|
+
(0, vitest_1.it)('should remain RUNNING when one of two agents deactivated', async () => {
|
|
62
62
|
const eventBus = new events_1.TuiEventBus();
|
|
63
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
63
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
64
64
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
65
65
|
agentId: 'a1',
|
|
66
66
|
name: 'security-specialist',
|
|
@@ -74,18 +74,37 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
74
74
|
isPrimary: false,
|
|
75
75
|
});
|
|
76
76
|
await tick();
|
|
77
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
77
|
+
(0, vitest_1.expect)(lastFrame()).toContain('RUNNING');
|
|
78
78
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_DEACTIVATED, {
|
|
79
79
|
agentId: 'a1',
|
|
80
80
|
reason: 'completed',
|
|
81
81
|
durationMs: 1200,
|
|
82
82
|
});
|
|
83
83
|
await tick();
|
|
84
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
84
|
+
(0, vitest_1.expect)(lastFrame()).toContain('RUNNING');
|
|
85
85
|
});
|
|
86
|
-
(0, vitest_1.it)('should
|
|
86
|
+
(0, vitest_1.it)('should switch to IDLE when all agents deactivated', async () => {
|
|
87
87
|
const eventBus = new events_1.TuiEventBus();
|
|
88
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
88
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
89
|
+
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
90
|
+
agentId: 'a1',
|
|
91
|
+
name: 'security-specialist',
|
|
92
|
+
role: 'specialist',
|
|
93
|
+
isPrimary: false,
|
|
94
|
+
});
|
|
95
|
+
await tick();
|
|
96
|
+
(0, vitest_1.expect)(lastFrame()).toContain('RUNNING');
|
|
97
|
+
eventBus.emit(events_1.TUI_EVENTS.AGENT_DEACTIVATED, {
|
|
98
|
+
agentId: 'a1',
|
|
99
|
+
reason: 'completed',
|
|
100
|
+
durationMs: 1200,
|
|
101
|
+
});
|
|
102
|
+
await tick();
|
|
103
|
+
(0, vitest_1.expect)(lastFrame()).toContain('IDLE');
|
|
104
|
+
});
|
|
105
|
+
(0, vitest_1.it)('should switch to IDLE when agent deactivated with reason=error', async () => {
|
|
106
|
+
const eventBus = new events_1.TuiEventBus();
|
|
107
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
89
108
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
90
109
|
agentId: 'a1',
|
|
91
110
|
name: 'security-specialist',
|
|
@@ -93,18 +112,18 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
93
112
|
isPrimary: true,
|
|
94
113
|
});
|
|
95
114
|
await tick();
|
|
96
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
115
|
+
(0, vitest_1.expect)(lastFrame()).toContain('RUNNING');
|
|
97
116
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_DEACTIVATED, {
|
|
98
117
|
agentId: 'a1',
|
|
99
118
|
reason: 'error',
|
|
100
119
|
durationMs: 500,
|
|
101
120
|
});
|
|
102
121
|
await tick();
|
|
103
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
122
|
+
(0, vitest_1.expect)(lastFrame()).toContain('ERROR');
|
|
104
123
|
});
|
|
105
|
-
(0, vitest_1.it)('should
|
|
124
|
+
(0, vitest_1.it)('should switch to IDLE when primary agent deactivated', async () => {
|
|
106
125
|
const eventBus = new events_1.TuiEventBus();
|
|
107
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
126
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
108
127
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
109
128
|
agentId: 'p1',
|
|
110
129
|
name: 'solution-architect',
|
|
@@ -112,49 +131,51 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
112
131
|
isPrimary: true,
|
|
113
132
|
});
|
|
114
133
|
await tick();
|
|
115
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
134
|
+
(0, vitest_1.expect)(lastFrame()).toContain('solution-arch');
|
|
116
135
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_DEACTIVATED, {
|
|
117
136
|
agentId: 'p1',
|
|
118
137
|
reason: 'completed',
|
|
119
138
|
durationMs: 2000,
|
|
120
139
|
});
|
|
121
140
|
await tick();
|
|
122
|
-
|
|
123
|
-
(0, vitest_1.expect)(frame).toContain('0 active');
|
|
141
|
+
(0, vitest_1.expect)(lastFrame()).toContain('IDLE');
|
|
124
142
|
});
|
|
125
143
|
});
|
|
126
144
|
(0, vitest_1.describe)('Mode 변경 → Header 업데이트', () => {
|
|
127
|
-
(0, vitest_1.it)('should
|
|
145
|
+
(0, vitest_1.it)('should handle mode change from PLAN to ACT without error', async () => {
|
|
128
146
|
const eventBus = new events_1.TuiEventBus();
|
|
129
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
147
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
130
148
|
eventBus.emit(events_1.TUI_EVENTS.MODE_CHANGED, { from: 'PLAN', to: 'ACT' });
|
|
131
149
|
await tick();
|
|
132
|
-
|
|
150
|
+
const frame = lastFrame() ?? '';
|
|
151
|
+
(0, vitest_1.expect)(frame).toBeTruthy();
|
|
152
|
+
(0, vitest_1.expect)(frame).toContain('CODINGBUDDY');
|
|
133
153
|
});
|
|
134
|
-
(0, vitest_1.it)('should
|
|
154
|
+
(0, vitest_1.it)('should handle sequential mode changes without error', async () => {
|
|
135
155
|
const eventBus = new events_1.TuiEventBus();
|
|
136
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
156
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
137
157
|
eventBus.emit(events_1.TUI_EVENTS.MODE_CHANGED, { from: null, to: 'ACT' });
|
|
138
158
|
await tick();
|
|
139
159
|
eventBus.emit(events_1.TUI_EVENTS.MODE_CHANGED, { from: 'ACT', to: 'EVAL' });
|
|
140
160
|
await tick();
|
|
141
161
|
const frame = lastFrame() ?? '';
|
|
142
|
-
(0, vitest_1.expect)(frame).
|
|
162
|
+
(0, vitest_1.expect)(frame).toBeTruthy();
|
|
143
163
|
});
|
|
144
|
-
(0, vitest_1.it)('should
|
|
164
|
+
(0, vitest_1.it)('should handle rapid consecutive mode changes without error', async () => {
|
|
145
165
|
const eventBus = new events_1.TuiEventBus();
|
|
146
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
166
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
147
167
|
eventBus.emit(events_1.TUI_EVENTS.MODE_CHANGED, { from: null, to: 'PLAN' });
|
|
148
168
|
eventBus.emit(events_1.TUI_EVENTS.MODE_CHANGED, { from: 'PLAN', to: 'ACT' });
|
|
149
169
|
eventBus.emit(events_1.TUI_EVENTS.MODE_CHANGED, { from: 'ACT', to: 'AUTO' });
|
|
150
170
|
await tick();
|
|
151
|
-
|
|
171
|
+
const frame = lastFrame() ?? '';
|
|
172
|
+
(0, vitest_1.expect)(frame).toBeTruthy();
|
|
152
173
|
});
|
|
153
174
|
});
|
|
154
|
-
(0, vitest_1.describe)('Parallel 시작/완료 →
|
|
155
|
-
(0, vitest_1.it)('should show specialists in
|
|
175
|
+
(0, vitest_1.describe)('Parallel 시작/완료 → FlowMap 업데이트', () => {
|
|
176
|
+
(0, vitest_1.it)('should show specialists in FlowMap after PARALLEL_STARTED + individual activations', async () => {
|
|
156
177
|
const eventBus = new events_1.TuiEventBus();
|
|
157
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
178
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
158
179
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
159
180
|
agentId: 'p1',
|
|
160
181
|
name: 'solution-architect',
|
|
@@ -166,26 +187,26 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
166
187
|
mode: 'PLAN',
|
|
167
188
|
});
|
|
168
189
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
169
|
-
agentId: '
|
|
190
|
+
agentId: 'specialist:security-specialist',
|
|
170
191
|
name: 'security-specialist',
|
|
171
192
|
role: 'specialist',
|
|
172
193
|
isPrimary: false,
|
|
173
194
|
});
|
|
174
195
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
175
|
-
agentId: 'test-
|
|
196
|
+
agentId: 'specialist:test-strategy-specialist',
|
|
176
197
|
name: 'test-strategy-specialist',
|
|
177
198
|
role: 'specialist',
|
|
178
199
|
isPrimary: false,
|
|
179
200
|
});
|
|
180
201
|
await tick();
|
|
181
202
|
const frame = lastFrame() ?? '';
|
|
182
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
183
|
-
(0, vitest_1.expect)(frame).toContain('test-
|
|
184
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
203
|
+
(0, vitest_1.expect)(frame).toContain('security-');
|
|
204
|
+
(0, vitest_1.expect)(frame).toContain('test-stra');
|
|
205
|
+
(0, vitest_1.expect)(frame).toContain('RUNNING');
|
|
185
206
|
});
|
|
186
|
-
(0, vitest_1.it)('should
|
|
207
|
+
(0, vitest_1.it)('should switch to IDLE after individual deactivations when only primary remains', async () => {
|
|
187
208
|
const eventBus = new events_1.TuiEventBus();
|
|
188
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
209
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
189
210
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
190
211
|
agentId: 'p1',
|
|
191
212
|
name: 'solution-architect',
|
|
@@ -197,26 +218,26 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
197
218
|
mode: 'PLAN',
|
|
198
219
|
});
|
|
199
220
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
200
|
-
agentId: '
|
|
221
|
+
agentId: 'specialist:security-specialist',
|
|
201
222
|
name: 'security-specialist',
|
|
202
223
|
role: 'specialist',
|
|
203
224
|
isPrimary: false,
|
|
204
225
|
});
|
|
205
226
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
206
|
-
agentId: 'test-
|
|
227
|
+
agentId: 'specialist:test-strategy-specialist',
|
|
207
228
|
name: 'test-strategy-specialist',
|
|
208
229
|
role: 'specialist',
|
|
209
230
|
isPrimary: false,
|
|
210
231
|
});
|
|
211
232
|
await tick();
|
|
212
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
233
|
+
(0, vitest_1.expect)(lastFrame()).toContain('RUNNING');
|
|
213
234
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_DEACTIVATED, {
|
|
214
|
-
agentId: '
|
|
235
|
+
agentId: 'specialist:security-specialist',
|
|
215
236
|
reason: 'completed',
|
|
216
237
|
durationMs: 800,
|
|
217
238
|
});
|
|
218
239
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_DEACTIVATED, {
|
|
219
|
-
agentId: 'test-
|
|
240
|
+
agentId: 'specialist:test-strategy-specialist',
|
|
220
241
|
reason: 'completed',
|
|
221
242
|
durationMs: 1200,
|
|
222
243
|
});
|
|
@@ -228,14 +249,13 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
228
249
|
},
|
|
229
250
|
});
|
|
230
251
|
await tick();
|
|
231
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
252
|
+
(0, vitest_1.expect)(lastFrame()).toContain('RUNNING');
|
|
232
253
|
});
|
|
233
|
-
(0, vitest_1.it)('should handle full parallel lifecycle:
|
|
254
|
+
(0, vitest_1.it)('should handle full parallel lifecycle: mode → agents → parallel → completion', async () => {
|
|
234
255
|
const eventBus = new events_1.TuiEventBus();
|
|
235
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
256
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
236
257
|
eventBus.emit(events_1.TUI_EVENTS.MODE_CHANGED, { from: null, to: 'PLAN' });
|
|
237
258
|
await tick();
|
|
238
|
-
(0, vitest_1.expect)(lastFrame()).toContain('PLAN');
|
|
239
259
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
240
260
|
agentId: 'p1',
|
|
241
261
|
name: 'solution-architect',
|
|
@@ -243,43 +263,43 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
243
263
|
isPrimary: true,
|
|
244
264
|
});
|
|
245
265
|
await tick();
|
|
246
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
266
|
+
(0, vitest_1.expect)(lastFrame()).toContain('RUNNING');
|
|
247
267
|
eventBus.emit(events_1.TUI_EVENTS.PARALLEL_STARTED, {
|
|
248
268
|
specialists: ['security-specialist', 'accessibility-specialist', 'performance-specialist'],
|
|
249
269
|
mode: 'PLAN',
|
|
250
270
|
});
|
|
251
271
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
252
|
-
agentId: '
|
|
272
|
+
agentId: 'specialist:security-specialist',
|
|
253
273
|
name: 'security-specialist',
|
|
254
274
|
role: 'specialist',
|
|
255
275
|
isPrimary: false,
|
|
256
276
|
});
|
|
257
277
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
258
|
-
agentId: '
|
|
278
|
+
agentId: 'specialist:accessibility-specialist',
|
|
259
279
|
name: 'accessibility-specialist',
|
|
260
280
|
role: 'specialist',
|
|
261
281
|
isPrimary: false,
|
|
262
282
|
});
|
|
263
283
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
264
|
-
agentId: '
|
|
284
|
+
agentId: 'specialist:performance-specialist',
|
|
265
285
|
name: 'performance-specialist',
|
|
266
286
|
role: 'specialist',
|
|
267
287
|
isPrimary: false,
|
|
268
288
|
});
|
|
269
289
|
await tick();
|
|
270
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
290
|
+
(0, vitest_1.expect)(lastFrame()).toContain('RUNNING');
|
|
271
291
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_DEACTIVATED, {
|
|
272
|
-
agentId: '
|
|
292
|
+
agentId: 'specialist:security-specialist',
|
|
273
293
|
reason: 'completed',
|
|
274
294
|
durationMs: 500,
|
|
275
295
|
});
|
|
276
296
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_DEACTIVATED, {
|
|
277
|
-
agentId: '
|
|
297
|
+
agentId: 'specialist:accessibility-specialist',
|
|
278
298
|
reason: 'completed',
|
|
279
299
|
durationMs: 700,
|
|
280
300
|
});
|
|
281
301
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_DEACTIVATED, {
|
|
282
|
-
agentId: '
|
|
302
|
+
agentId: 'specialist:performance-specialist',
|
|
283
303
|
reason: 'completed',
|
|
284
304
|
durationMs: 900,
|
|
285
305
|
});
|
|
@@ -292,15 +312,13 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
292
312
|
},
|
|
293
313
|
});
|
|
294
314
|
await tick();
|
|
295
|
-
|
|
296
|
-
(0, vitest_1.expect)(frame).toContain('1 active');
|
|
297
|
-
(0, vitest_1.expect)(frame).toContain('PLAN');
|
|
315
|
+
(0, vitest_1.expect)(lastFrame()).toContain('RUNNING');
|
|
298
316
|
});
|
|
299
317
|
});
|
|
300
|
-
(0, vitest_1.describe)('Skill 추천 →
|
|
301
|
-
(0, vitest_1.it)('should
|
|
318
|
+
(0, vitest_1.describe)('Skill 추천 → 이벤트 처리 (UI 표시 없음)', () => {
|
|
319
|
+
(0, vitest_1.it)('should handle skill recommendation events without error', async () => {
|
|
302
320
|
const eventBus = new events_1.TuiEventBus();
|
|
303
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
321
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
304
322
|
eventBus.emit(events_1.TUI_EVENTS.SKILL_RECOMMENDED, {
|
|
305
323
|
skillName: 'brainstorming',
|
|
306
324
|
reason: 'creative work',
|
|
@@ -311,12 +329,11 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
311
329
|
});
|
|
312
330
|
await tick();
|
|
313
331
|
const frame = lastFrame() ?? '';
|
|
314
|
-
(0, vitest_1.expect)(frame).
|
|
315
|
-
(0, vitest_1.expect)(frame).toContain('test-driven-development');
|
|
332
|
+
(0, vitest_1.expect)(frame).toBeTruthy();
|
|
316
333
|
});
|
|
317
334
|
(0, vitest_1.it)('should handle skill recommendation alongside agent activation', async () => {
|
|
318
335
|
const eventBus = new events_1.TuiEventBus();
|
|
319
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
336
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
320
337
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
321
338
|
agentId: 'a1',
|
|
322
339
|
name: 'security-specialist',
|
|
@@ -328,21 +345,14 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
328
345
|
reason: 'bug detected',
|
|
329
346
|
});
|
|
330
347
|
await tick();
|
|
348
|
+
await tick();
|
|
331
349
|
const frame = lastFrame() ?? '';
|
|
332
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
333
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
350
|
+
(0, vitest_1.expect)(frame).toContain('RUNNING');
|
|
351
|
+
(0, vitest_1.expect)(frame).toContain('security-spec');
|
|
334
352
|
});
|
|
335
353
|
});
|
|
336
354
|
(0, vitest_1.describe)('이벤트 버퍼링 (TUI 시작 전 이벤트)', () => {
|
|
337
|
-
(0, vitest_1.it)('should NOT reflect
|
|
338
|
-
const eventBus = new events_1.TuiEventBus();
|
|
339
|
-
eventBus.emit(events_1.TUI_EVENTS.MODE_CHANGED, { from: null, to: 'ACT' });
|
|
340
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(app_1.App, { eventBus: eventBus }));
|
|
341
|
-
await tick();
|
|
342
|
-
const frame = lastFrame() ?? '';
|
|
343
|
-
(0, vitest_1.expect)(frame).not.toContain('ACT');
|
|
344
|
-
});
|
|
345
|
-
(0, vitest_1.it)('should NOT reflect AGENT_ACTIVATED emitted before App mount', async () => {
|
|
355
|
+
(0, vitest_1.it)('should NOT reflect AGENT_ACTIVATED emitted before DashboardApp mount', async () => {
|
|
346
356
|
const eventBus = new events_1.TuiEventBus();
|
|
347
357
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
348
358
|
agentId: 'a1',
|
|
@@ -350,69 +360,35 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
350
360
|
role: 'specialist',
|
|
351
361
|
isPrimary: true,
|
|
352
362
|
});
|
|
353
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
363
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
354
364
|
await tick();
|
|
355
|
-
|
|
365
|
+
const frame = lastFrame() ?? '';
|
|
366
|
+
(0, vitest_1.expect)(frame).toContain('IDLE');
|
|
367
|
+
(0, vitest_1.expect)(frame).not.toContain('security-spec');
|
|
356
368
|
});
|
|
357
|
-
(0, vitest_1.it)('should sync state via re-emitting events after
|
|
369
|
+
(0, vitest_1.it)('should sync state via re-emitting events after DashboardApp mount', async () => {
|
|
358
370
|
const eventBus = new events_1.TuiEventBus();
|
|
359
371
|
eventBus.emit(events_1.TUI_EVENTS.MODE_CHANGED, { from: null, to: 'PLAN' });
|
|
360
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
372
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
361
373
|
await tick();
|
|
362
|
-
eventBus.emit(events_1.TUI_EVENTS.
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
name: 'security-specialist',
|
|
368
|
-
description: 'Security analysis',
|
|
369
|
-
category: 'Security',
|
|
370
|
-
icon: '🔒',
|
|
371
|
-
expertise: ['security'],
|
|
372
|
-
},
|
|
373
|
-
],
|
|
374
|
+
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
375
|
+
agentId: 'arch-1',
|
|
376
|
+
name: 'solution-architect',
|
|
377
|
+
role: 'primary',
|
|
378
|
+
isPrimary: true,
|
|
374
379
|
});
|
|
375
380
|
await tick();
|
|
376
381
|
const frame = lastFrame() ?? '';
|
|
377
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
378
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
382
|
+
(0, vitest_1.expect)(frame).toContain('RUNNING');
|
|
383
|
+
(0, vitest_1.expect)(frame).toContain('solution-arch');
|
|
379
384
|
});
|
|
380
385
|
});
|
|
381
386
|
(0, vitest_1.describe)('복합 시나리오 통합 테스트', () => {
|
|
382
|
-
(0, vitest_1.it)('should handle real workflow: mode → agents → parallel →
|
|
387
|
+
(0, vitest_1.it)('should handle real workflow: mode → agents → parallel → completion', async () => {
|
|
383
388
|
const eventBus = new events_1.TuiEventBus();
|
|
384
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
385
|
-
const agents = [
|
|
386
|
-
{
|
|
387
|
-
id: 'security-specialist',
|
|
388
|
-
name: 'security-specialist',
|
|
389
|
-
description: 'Security',
|
|
390
|
-
category: 'Security',
|
|
391
|
-
icon: '🔒',
|
|
392
|
-
expertise: ['security'],
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
id: 'test-strategy-specialist',
|
|
396
|
-
name: 'test-strategy-specialist',
|
|
397
|
-
description: 'Testing',
|
|
398
|
-
category: 'Testing',
|
|
399
|
-
icon: '🧪',
|
|
400
|
-
expertise: ['testing'],
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
id: 'architecture-specialist',
|
|
404
|
-
name: 'architecture-specialist',
|
|
405
|
-
description: 'Architecture',
|
|
406
|
-
category: 'Architecture',
|
|
407
|
-
icon: '🏛️',
|
|
408
|
-
expertise: ['architecture'],
|
|
409
|
-
},
|
|
410
|
-
];
|
|
411
|
-
eventBus.emit(events_1.TUI_EVENTS.AGENTS_LOADED, { agents });
|
|
412
|
-
await tick();
|
|
389
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
413
390
|
eventBus.emit(events_1.TUI_EVENTS.MODE_CHANGED, { from: null, to: 'PLAN' });
|
|
414
391
|
await tick();
|
|
415
|
-
(0, vitest_1.expect)(lastFrame()).toContain('PLAN');
|
|
416
392
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
417
393
|
agentId: 'arch-1',
|
|
418
394
|
name: 'architecture-specialist',
|
|
@@ -420,38 +396,32 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
420
396
|
isPrimary: true,
|
|
421
397
|
});
|
|
422
398
|
await tick();
|
|
423
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
424
|
-
eventBus.emit(events_1.TUI_EVENTS.SKILL_RECOMMENDED, {
|
|
425
|
-
skillName: 'brainstorming',
|
|
426
|
-
reason: 'planning phase',
|
|
427
|
-
});
|
|
428
|
-
await tick();
|
|
429
|
-
(0, vitest_1.expect)(lastFrame()).toContain('brainstorming');
|
|
399
|
+
(0, vitest_1.expect)(lastFrame()).toContain('RUNNING');
|
|
430
400
|
eventBus.emit(events_1.TUI_EVENTS.PARALLEL_STARTED, {
|
|
431
401
|
specialists: ['security-specialist', 'test-strategy-specialist'],
|
|
432
402
|
mode: 'PLAN',
|
|
433
403
|
});
|
|
434
404
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
435
|
-
agentId: '
|
|
405
|
+
agentId: 'specialist:security-specialist',
|
|
436
406
|
name: 'security-specialist',
|
|
437
407
|
role: 'specialist',
|
|
438
408
|
isPrimary: false,
|
|
439
409
|
});
|
|
440
410
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
441
|
-
agentId: 'test-
|
|
411
|
+
agentId: 'specialist:test-strategy-specialist',
|
|
442
412
|
name: 'test-strategy-specialist',
|
|
443
413
|
role: 'specialist',
|
|
444
414
|
isPrimary: false,
|
|
445
415
|
});
|
|
446
416
|
await tick();
|
|
447
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
417
|
+
(0, vitest_1.expect)(lastFrame()).toContain('RUNNING');
|
|
448
418
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_DEACTIVATED, {
|
|
449
|
-
agentId: '
|
|
419
|
+
agentId: 'specialist:security-specialist',
|
|
450
420
|
reason: 'completed',
|
|
451
421
|
durationMs: 600,
|
|
452
422
|
});
|
|
453
423
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_DEACTIVATED, {
|
|
454
|
-
agentId: 'test-
|
|
424
|
+
agentId: 'specialist:test-strategy-specialist',
|
|
455
425
|
reason: 'completed',
|
|
456
426
|
durationMs: 800,
|
|
457
427
|
});
|
|
@@ -464,15 +434,12 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
464
434
|
});
|
|
465
435
|
await tick();
|
|
466
436
|
const frame = lastFrame() ?? '';
|
|
467
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
468
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
469
|
-
(0, vitest_1.expect)(frame).toContain('brainstorming');
|
|
470
|
-
(0, vitest_1.expect)(frame).toContain('Security');
|
|
471
|
-
(0, vitest_1.expect)(frame).toContain('Testing');
|
|
437
|
+
(0, vitest_1.expect)(frame).toContain('RUNNING');
|
|
438
|
+
(0, vitest_1.expect)(frame).toContain('architect');
|
|
472
439
|
});
|
|
473
440
|
(0, vitest_1.it)('should handle error scenario: activate → error deactivation → re-activate', async () => {
|
|
474
441
|
const eventBus = new events_1.TuiEventBus();
|
|
475
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
442
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
476
443
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
477
444
|
agentId: 'a1',
|
|
478
445
|
name: 'security-specialist',
|
|
@@ -480,14 +447,14 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
480
447
|
isPrimary: true,
|
|
481
448
|
});
|
|
482
449
|
await tick();
|
|
483
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
450
|
+
(0, vitest_1.expect)(lastFrame()).toContain('RUNNING');
|
|
484
451
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_DEACTIVATED, {
|
|
485
452
|
agentId: 'a1',
|
|
486
453
|
reason: 'error',
|
|
487
454
|
durationMs: 300,
|
|
488
455
|
});
|
|
489
456
|
await tick();
|
|
490
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
457
|
+
(0, vitest_1.expect)(lastFrame()).toContain('ERROR');
|
|
491
458
|
eventBus.emit(events_1.TUI_EVENTS.AGENT_ACTIVATED, {
|
|
492
459
|
agentId: 'a1',
|
|
493
460
|
name: 'security-specialist',
|
|
@@ -495,15 +462,15 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
495
462
|
isPrimary: true,
|
|
496
463
|
});
|
|
497
464
|
await tick();
|
|
498
|
-
(0, vitest_1.expect)(lastFrame()).toContain('
|
|
465
|
+
(0, vitest_1.expect)(lastFrame()).toContain('RUNNING');
|
|
499
466
|
});
|
|
500
467
|
});
|
|
501
468
|
(0, vitest_1.describe)('Interceptor → EventBus → UI 통합 (semantic events)', () => {
|
|
502
|
-
(0, vitest_1.it)('should update
|
|
469
|
+
(0, vitest_1.it)('should update state when parse_mode tool is intercepted', async () => {
|
|
503
470
|
const eventBus = new events_1.TuiEventBus();
|
|
504
471
|
const interceptor = new events_1.TuiInterceptor(eventBus);
|
|
505
472
|
interceptor.enable();
|
|
506
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
473
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
507
474
|
await tick();
|
|
508
475
|
await interceptor.intercept('parse_mode', { prompt: 'PLAN design auth feature' }, async () => ({
|
|
509
476
|
content: [
|
|
@@ -518,13 +485,15 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
518
485
|
}));
|
|
519
486
|
await new Promise(resolve => setImmediate(resolve));
|
|
520
487
|
await tick();
|
|
521
|
-
|
|
488
|
+
const frame = lastFrame() ?? '';
|
|
489
|
+
(0, vitest_1.expect)(frame).toBeTruthy();
|
|
490
|
+
(0, vitest_1.expect)(frame).toContain('CODINGBUDDY');
|
|
522
491
|
});
|
|
523
|
-
(0, vitest_1.it)('should
|
|
492
|
+
(0, vitest_1.it)('should handle parse_mode with included_skills without error', async () => {
|
|
524
493
|
const eventBus = new events_1.TuiEventBus();
|
|
525
494
|
const interceptor = new events_1.TuiInterceptor(eventBus);
|
|
526
495
|
interceptor.enable();
|
|
527
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
496
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
528
497
|
await tick();
|
|
529
498
|
await interceptor.intercept('parse_mode', { prompt: 'PLAN something' }, async () => ({
|
|
530
499
|
content: [
|
|
@@ -543,15 +512,13 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
543
512
|
await new Promise(resolve => setImmediate(resolve));
|
|
544
513
|
await tick();
|
|
545
514
|
const frame = lastFrame() ?? '';
|
|
546
|
-
(0, vitest_1.expect)(frame).
|
|
547
|
-
(0, vitest_1.expect)(frame).toContain('brainstorming');
|
|
548
|
-
(0, vitest_1.expect)(frame).toContain('writing-plans');
|
|
515
|
+
(0, vitest_1.expect)(frame).toBeTruthy();
|
|
549
516
|
});
|
|
550
|
-
(0, vitest_1.it)('should
|
|
517
|
+
(0, vitest_1.it)('should handle tool interception and show correct state', async () => {
|
|
551
518
|
const eventBus = new events_1.TuiEventBus();
|
|
552
519
|
const interceptor = new events_1.TuiInterceptor(eventBus);
|
|
553
520
|
interceptor.enable();
|
|
554
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
521
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
555
522
|
await tick();
|
|
556
523
|
await interceptor.intercept('search_rules', { query: 'test' }, async () => ({
|
|
557
524
|
content: [{ type: 'text', text: '{"results":[]}' }],
|
|
@@ -559,13 +526,13 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
559
526
|
await new Promise(resolve => setImmediate(resolve));
|
|
560
527
|
await tick();
|
|
561
528
|
const frame = lastFrame() ?? '';
|
|
562
|
-
(0, vitest_1.expect)(frame).toContain('
|
|
529
|
+
(0, vitest_1.expect)(frame).toContain('IDLE');
|
|
563
530
|
});
|
|
564
531
|
(0, vitest_1.it)('should handle full interceptor workflow: parse_mode + parallel agents', async () => {
|
|
565
532
|
const eventBus = new events_1.TuiEventBus();
|
|
566
533
|
const interceptor = new events_1.TuiInterceptor(eventBus);
|
|
567
534
|
interceptor.enable();
|
|
568
|
-
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(
|
|
535
|
+
const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(dashboard_app_1.DashboardApp, { eventBus: eventBus }));
|
|
569
536
|
await tick();
|
|
570
537
|
await interceptor.intercept('parse_mode', { prompt: 'EVAL review code' }, async () => ({
|
|
571
538
|
content: [
|
|
@@ -581,8 +548,7 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
581
548
|
await new Promise(resolve => setImmediate(resolve));
|
|
582
549
|
await tick();
|
|
583
550
|
let frame = lastFrame() ?? '';
|
|
584
|
-
(0, vitest_1.expect)(frame).
|
|
585
|
-
(0, vitest_1.expect)(frame).toContain('systematic-debugging');
|
|
551
|
+
(0, vitest_1.expect)(frame).toBeTruthy();
|
|
586
552
|
await interceptor.intercept('prepare_parallel_agents', { specialists: ['security', 'perf'], mode: 'EVAL' }, async () => ({
|
|
587
553
|
content: [
|
|
588
554
|
{
|
|
@@ -600,8 +566,7 @@ const tick = () => new Promise(resolve => setTimeout(resolve, 0));
|
|
|
600
566
|
await new Promise(resolve => setImmediate(resolve));
|
|
601
567
|
await tick();
|
|
602
568
|
frame = lastFrame() ?? '';
|
|
603
|
-
(0, vitest_1.expect)(frame).
|
|
604
|
-
(0, vitest_1.expect)(frame).toContain('systematic-debugging');
|
|
569
|
+
(0, vitest_1.expect)(frame).toBeTruthy();
|
|
605
570
|
});
|
|
606
571
|
});
|
|
607
572
|
});
|