Skip to content

Commit 8aed381

Browse files
authored
refactor: remove the ExploreAgent tool (#4176)
* refactor: remove the ExploreAgent tool Remove the bounded scanner, its production registration and prompt wiring, and its dedicated transcript presentation. Keep Deep Research on the standard read-only tools and preserve old persisted results by folding them to ordinary historical text. Generated-by: Codex * fix: preserve retired ExploreAgent history Select the first non-empty historical result text and fold retired ExploreAgent RuntimeEvent results before model replay. Rename the remaining Deep Research session-profile test to remove stale tool naming. Generated-by: Codex * fix: simplify retired ExploreAgent compatibility Generated-by: Codex * chore: finish ExploreAgent removal cleanup Generated-by: Codex * chore: remove retired story imports Generated-by: Codex * test: preserve generic long-intent containment Generated-by: Codex * chore: align protocol compatibility declaration Generated-by: Codex * chore: remove retired ExploreAgent examples Generated-by: Codex
1 parent d7efbb4 commit 8aed381

57 files changed

Lines changed: 409 additions & 3155 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/desktop/src/main/__tests__/create-session-input.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
import { strict as assert } from 'node:assert';
3232
import { describe, it } from 'node:test';
33-
import { DEEP_RESEARCH_SESSION_LABEL } from '@maka/core/explore-agent';
33+
import { DEEP_RESEARCH_SESSION_LABEL } from '@maka/core/deep-research';
3434

3535
import { DEFAULT_SESSION_NAME } from '@maka/core/session-name';
3636

apps/desktop/src/main/create-session-input.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import type { OrchestrationMode } from '@maka/core/orchestration';
4343

4444
import type { PermissionMode } from '@maka/core/permission';
4545

46-
import type { SessionStartMode } from '@maka/core/explore-agent';
46+
import type { SessionStartMode } from '@maka/core/deep-research';
4747
import { DEFAULT_SESSION_NAME } from '@maka/core/session-name';
4848

4949
import { isChatDefaultPermissionMode } from '@maka/core/settings';
@@ -52,7 +52,7 @@ import { isCollaborationMode } from '@maka/core/collaboration';
5252

5353
import { isOrchestrationMode } from '@maka/core/orchestration';
5454

55-
import { isSessionStartMode } from '@maka/core/explore-agent';
55+
import { isSessionStartMode } from '@maka/core/deep-research';
5656

5757
/**
5858
* `unknown`, because this is an IPC boundary and the renderer's type is a

apps/desktop/src/renderer/app-shell-command-actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import { useMemo, useRef } from "react";
2121
import type { LlmConnection } from '@maka/core/llm-connections';
2222
import type { PermissionMode } from '@maka/core/permission';
23-
import type { SessionStartMode } from '@maka/core/explore-agent';
23+
import type { SessionStartMode } from '@maka/core/deep-research';
2424
import type { SessionSummary, StoredMessage } from '@maka/core/session';
2525
import type { SettingsSection, ThemePreference } from '@maka/core/settings';
2626
import type { UiLocale } from '@maka/core/ui-locale';

apps/desktop/src/renderer/app-shell-session-start-actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
import type { SessionStartMode } from '@maka/core/explore-agent';
20+
import type { SessionStartMode } from '@maka/core/deep-research';
2121
import type { UiLocale } from '@maka/core/ui-locale';
2222
import type { NavSelection } from '@maka/ui';
2323
import type { DesktopNewTaskTarget } from '../preload/bridge-contract.js';

apps/desktop/src/renderer/chat-message-surface.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { useMemo, useState, type ComponentProps, type ReactNode } from 'react';
21-
import { isDeepResearchSession } from '@maka/core/explore-agent';
21+
import { isDeepResearchSession } from '@maka/core/deep-research';
2222
import { type LlmConnection, type ProviderType } from '@maka/core/llm-connections';
2323
import { type OnboardingState } from '@maka/core/onboarding';
2424
import { type SettingsSection } from '@maka/core/settings';

docs/archive/expert-team-implementation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ guards: isValidPluginFolderName(无 ../\/前导.); BLOCKED{员工管理,招
325325
2. **磁盘 artifact + JSON 指针 fan-in(两家都用)**:member 把重产物落盘,只回小 JSON 指针,orchestrator 上下文保持极小。maka 实现专家团时必须这样,否则 lead 上下文爆炸。
326326
327327
## C3. maka 落地要点(详见 [expert-team-plan.md](expert-team-plan.md))
328-
- **单专家** = `mode:expert:<id>` 标签 + 人格 fragment(照抄 Deep Research 的 `explore-agent.ts` 路径),人格经 `childInstruction` 边界注入(继承权限/隐私/工作区)。`defaultInitPrompt` 学 WorkBuddy 只 pre-fill composer(P0 简单)。
328+
- **单专家** = `mode:expert:<id>` 标签 + 人格 fragment(照抄 Deep Research 的 `deep-research.ts` 路径),人格经 `childInstruction` 边界注入(继承权限/隐私/工作区)。`defaultInitPrompt` 学 WorkBuddy 只 pre-fill composer(P0 简单)。
329329
- **专家团** = lead 用 `mode:expert:<teamId>` + orchestrator 人格,member 注册进 `agent-catalog.ts` 的 `BUILTIN_AGENT_DEFINITIONS`(各带窄 `tools`),lead 用现有 `agent_spawn`/`spawnChildAgent` 派生(星型,非隔离,单轮 fan-out + await fan-in,回指针)。**先不做 Teams mailbox**。
330330
- **专家中心** = 克隆 `skills-panel.tsx`(市场/内置/已安装)+ `managed-skill-sources.ts`(加 `sourceType:'remote'` 拉 COS 式 manifest,`contentSha256` 已就绪)。
331331
- **数字同事** = P2 持久化外壳(雇佣专家 + 昵称/头像/仓库/资料库/模型),IM 绑定/云端是最重的 P3+,需评估是否值得(WorkBuddy 靠云后端 + IM CLI 子进程,成本高)。

docs/archive/expert-team-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ QoderWork **没有**命名人格选择器。它的三层值得参考:
102102

103103
| 关注点 | 复用/扩展 | 位置 |
104104
|---|---|---|
105-
| 专家**人格注入** | `mode:` 标签 + prompt fragment(照抄 Deep Research) | `apps/desktop/src/main/system-prompt-main.ts`(已有 `childInstruction` seam);`packages/core/src/explore-agent.ts``mode:deep_research` 先例) |
105+
| 专家**人格注入** | `mode:` 标签 + prompt fragment(照抄 Deep Research) | `apps/desktop/src/main/system-prompt-main.ts`(已有 `childInstruction` seam);`packages/core/src/deep-research.ts``mode:deep_research` 先例) |
106106
| 专家=**带工具作用域的专业 agent** | 扩展 `BUILTIN_AGENT_DEFINITIONS`(每条已带 `systemPrompt`| `packages/runtime/src/agent-catalog.ts``subagent-tools.ts``agent_spawn`/`SessionManager.spawnChildAgent`|
107107
| 专家**目录 + 按需安装** | 克隆 managed/bundled 技能目录 | `apps/desktop/src/main/managed-skill-sources.ts``bundled-skill-catalog.generated.ts``skills.ts`(install→`skill.lock.json`→baseline→update diff,PR #842|
108108
| 专家**定义文件格式** | 复用 SKILL.md frontmatter 解析 | `packages/runtime/src/skills.ts``parseSkillFrontMatter`|

docs/astryx-surface-file-inventory.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Each row is one on-disk product surface file. Regenerated inventory must stay in
55

66
Wiki bar: Design Conventions · API Use-the-System · Theming · Container Padding.
77

8-
**Totals:** 224 files — blocker 0, polish 1, aligned 223.
8+
**Totals:** 223 files — blocker 0, polish 1, aligned 222.
99

1010
## Exclusions (explicit)
1111

@@ -242,7 +242,6 @@ Wiki bar: Design Conventions · API Use-the-System · Theming · Container Paddi
242242
| `packages/ui/src/titlebar-session-identity.tsx` | shell-chrome-or-panel | BreadcrumbItem, Breadcrumbs | aligned — uses Astryx (BreadcrumbItem, Breadcrumbs) | aligned |
243243
| `packages/ui/src/toast.tsx` | ui-composition | Button, HStack, Text, VStack | aligned — uses Astryx (Button, HStack, Text, VStack) | aligned |
244244
| `packages/ui/src/tool-activity.tsx` | ui-composition | Banner, Button, ChatToolCalls, List, ListItem, Text | aligned — uses Astryx (Banner, Button, ChatToolCalls, List, ListItem, Text) | aligned |
245-
| `packages/ui/src/tool-activity/agent-preview.tsx` | ui-composition | Button | aligned — uses Astryx (Button) | aligned |
246245
| `packages/ui/src/tool-activity/diff-code-preview.tsx` | ui-composition | none | aligned — no raw controls; no Astryx JSX usage | aligned |
247246
| `packages/ui/src/tool-activity/tool-code-block.tsx` | ui-composition | none | aligned — no raw controls; no Astryx JSX usage | aligned |
248247
| `packages/ui/src/tool-activity/tool-result-preview.tsx` | ui-composition | Button | aligned — uses Astryx (Button) | aligned |

docs/astryx-surface-file-inventory.paths

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ packages/ui/src/task-ledger-panel.tsx
214214
packages/ui/src/titlebar-session-identity.tsx
215215
packages/ui/src/toast.tsx
216216
packages/ui/src/tool-activity.tsx
217-
packages/ui/src/tool-activity/agent-preview.tsx
218217
packages/ui/src/tool-activity/diff-code-preview.tsx
219218
packages/ui/src/tool-activity/tool-code-block.tsx
220219
packages/ui/src/tool-activity/tool-result-preview.tsx

packages/cli/src/__tests__/pi-transcript.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4292,8 +4292,8 @@ describe('Maka Pi TUI transcript', () => {
42924292
state,
42934293
event({
42944294
type: 'tool_start',
4295-
toolUseId: 'explore-intent',
4296-
toolName: 'ExploreAgent',
4295+
toolUseId: 'grep-intent',
4296+
toolName: 'Grep',
42974297
args: undefined,
42984298
intent: ' inspect render entry with sk-1234567890abcdef ',
42994299
}),

0 commit comments

Comments
 (0)