Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
3d9fbd3
Add Qoder session history and search with real CLI coverage
nwparker Oct 2, 2026
4c8e68f
Allow the real Qoder marker file to end with a newline
nwparker Oct 2, 2026
12b7570
Keep Qoder tool output out of history previews and search
nwparker Oct 2, 2026
8b7accb
Keep Qoder search pages readable by older clients
nwparker Oct 2, 2026
3130e31
Verify persisted Qoder history after a real generated and resumed task
nwparker Oct 2, 2026
62202b3
Negotiate Qoder filters before searching an older execution host
nwparker Oct 2, 2026
7173a5a
Combine search client imports for the CI plugin gate
nwparker Oct 2, 2026
15d1954
Keep the relay search oracle aligned with legacy agent filtering
nwparker Oct 2, 2026
e12c4a3
Register supervised Qoder China and Qwen lifecycle integration
nwparker Oct 2, 2026
6609843
Cover Qoder China mobile assets and mixed-host resume gates
nwparker Oct 2, 2026
f5c352f
Verify Qoder provider tags against the older released wire parser
nwparker Oct 2, 2026
a3e2d70
Verify China and Qwen keep independent Windows hook scripts
nwparker Oct 2, 2026
47ac8b6
Verify Qoder registrations against the installed older Windows release
nwparker Oct 2, 2026
00077d9
test(qoder): align search capability contracts and pin old-host fencing
nwparker Oct 2, 2026
13ba7ca
fix(qoder): rank exact picker identities and command aliases first
nwparker Oct 2, 2026
b621552
merge: inherit Qoder history CI contract correction
nwparker Oct 2, 2026
9ef5bd3
test(qoder): preserve the regional CLI shared icon expectation
nwparker Oct 2, 2026
02cabc1
fix(qoder): align China catalog entry with fallback order
nwparker Oct 3, 2026
30c2eef
Merge main 3793c58 into Qoder China integration
nwparker Oct 3, 2026
4f1481f
Merge pinned main ac46d9e into Qoder China integration
Oct 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/tsconfig.cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"../src/main/claude/claude-hook-event-versions.ts",
"../src/main/claude/claude-managed-hook-events.ts",
"../src/main/qoder/hook-service.ts",
"../src/main/qwen-code/hook-service.ts",
"../src/main/codebuddy/hook-service.ts",
"../src/main/agent-hooks/hook-stdin-contract.ts",
"../src/main/agent-hooks/hook-post-command.ts",
Expand Down
1 change: 1 addition & 0 deletions mobile/src/components/mobile-agent-icon-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const MOBILE_AGENT_ICON_ASSETS: Partial<Record<TuiAgent, ImageSourcePropT
'prime-agent': require('../../../src/shared/agent-icons/prime-agent.png'),
codebuddy: require('../../../src/shared/agent-icons/codebuddy.png'),
qoder: require('../../../src/shared/agent-icons/qoder.png'),
'qoder-cn': require('../../../src/shared/agent-icons/qoder-cn.png'),
gemini: require('../../../src/shared/agent-icons/gemini.png'),
antigravity: require('../../../src/shared/agent-icons/antigravity.png'),
goose: require('../../../src/shared/agent-icons/goose.png'),
Expand Down
1 change: 1 addition & 0 deletions mobile/src/tasks/mobile-tui-agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const MOBILE_TUI_AGENT_FAVICON_DOMAINS: Partial<Record<TuiAgent, string>>
omp: 'omp.sh',
'prime-agent': 'primeintellect.ai',
qoder: 'qoder.com',
'qoder-cn': 'qoder.cn',
gemini: 'gemini.google.com',
antigravity: 'antigravity.google',
goose: 'goose-docs.ai',
Expand Down
5 changes: 4 additions & 1 deletion src/cli/agent-session-search-format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,14 @@ function formatDebug(debug: SessionSearchResults['debug']): string[] {
}

function formatUnavailable(
reason: 'disabled' | 'not-ready' | 'no-service' | 'scope-unknown'
reason: 'disabled' | 'not-ready' | 'no-service' | 'scope-unknown' | 'unsupported-agent'
): string {
if (reason === 'disabled') {
return 'Session search is off on this host.'
}
if (reason === 'unsupported-agent') {
return 'This host does not support history search for the selected agent. Update Orca on that host or select another agent.'
}
// The CLI scopes with --path, never with an identity, so this only reaches a
// caller that built a request by hand.
if (reason === 'scope-unknown') {
Expand Down
11 changes: 9 additions & 2 deletions src/cli/handlers/search.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ describe('orca search over the runtime RPC', () => {
const { call } = await runSearch([['query', 'resize race']])

expect(call).toHaveBeenCalledTimes(1)
expect(call).toHaveBeenCalledWith('aiVault.searchSessions', { query: 'resize race', limit: 20 })
expect(call).toHaveBeenCalledWith('aiVault.searchSessions', {
query: 'resize race',
limit: 20,
supportsQoderHistory: true
})
})

const flagCases: [string, CliFlags, Record<string, unknown>][] = [
Expand Down Expand Up @@ -157,7 +161,10 @@ describe('orca search over the runtime RPC', () => {
it.each(flagCases)('sends %s', async (_name, flags, params) => {
const { call } = await runSearch(flags)

expect(call).toHaveBeenCalledWith('aiVault.searchSessions', params)
expect(call).toHaveBeenCalledWith('aiVault.searchSessions', {
...params,
supportsQoderHistory: true
})
})

it('calls the status RPC for --index-status', async () => {
Expand Down
8 changes: 7 additions & 1 deletion src/cli/search-command-arguments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,16 @@ describe('orca search argument parsing', () => {

it('rejects an unknown --agent and names the known ones', () => {
expect(() => parseSearch(['search', 'q', '--agent', 'claude', '--agent', 'bogus'])).toThrow(
/Unknown --agent "bogus"\. Known agents: claude, codebuddy, codex, /
/Unknown --agent "bogus"\. Known agents: claude, codebuddy, qoder, codex, /
)
})

it('accepts Qoder without changing another agent filter', () => {
expect(
request(['search', 'q', '--agent', 'qoder', '--agent', 'codex']).filters?.agents
).toEqual(['qoder', 'codex'])
})

it('rejects more --path values than the contract accepts', () => {
const paths = Array.from({ length: 65 }, (_, index) => ['--path', `/p${index}`]).flat()
expect(() => parseSearch(['search', 'q', ...paths])).toThrow('Too many --path values (65)')
Expand Down
11 changes: 10 additions & 1 deletion src/main/agent-hooks/managed-agent-hook-registry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { codebuddyHookService } from '../codebuddy/hook-service'
import { qoderHookService } from '../qoder/hook-service'
import { qwenCodeHookService } from '../qwen-code/hook-service'
import { qoderCnHookService, qoderHookService } from '../qoder/hook-service'
import type { AgentHookInstallStatus } from '../../shared/agent-hook-types'
import type { HookInstallAgent } from '../../shared/telemetry-events'
import { ampHookService } from '../amp/hook-service'
Expand Down Expand Up @@ -47,6 +48,8 @@ export const MANAGED_AGENT_HOOK_INSTALLERS: readonly ManagedAgentHookInstaller[]
['codex', () => codexHookService.install()],
['gemini', () => geminiHookService.install()],
['qoder', () => qoderHookService.install()],
['qoder-cn', () => qoderCnHookService.install()],
['qwen-code', () => qwenCodeHookService.install()],
['codebuddy', () => codebuddyHookService.install()],
['antigravity', () => antigravityHookService.install()],
['amp', () => ampHookService.install()],
Expand Down Expand Up @@ -75,6 +78,8 @@ export const MANAGED_AGENT_HOOK_SCRIPT_REFRESHERS: readonly ManagedAgentHookScri
['codex', () => codexHookService.refreshManagedScripts()],
['gemini', () => geminiHookService.refreshManagedScripts()],
['qoder', () => qoderHookService.refreshManagedScripts()],
['qoder-cn', () => qoderCnHookService.refreshManagedScripts()],
['qwen-code', () => qwenCodeHookService.refreshManagedScripts()],
['codebuddy', () => codebuddyHookService.refreshManagedScripts()],
['antigravity', () => antigravityHookService.refreshManagedScripts()],
['cursor', () => cursorHookService.refreshManagedScripts()],
Expand All @@ -95,6 +100,8 @@ export const MANAGED_AGENT_HOOK_REMOVERS: readonly ManagedAgentHookRemover[] = [
['codex', () => codexHookService.remove()],
['gemini', () => geminiHookService.remove()],
['qoder', () => qoderHookService.remove()],
['qoder-cn', () => qoderCnHookService.remove()],
['qwen-code', () => qwenCodeHookService.remove()],
['codebuddy', () => codebuddyHookService.remove()],
['antigravity', () => antigravityHookService.remove()],
['amp', () => ampHookService.remove()],
Expand All @@ -121,6 +128,8 @@ export const MANAGED_AGENT_HOOK_STATUS_READERS: readonly ManagedAgentHookStatusR
['codex', () => codexHookService.getStatus()],
['gemini', () => geminiHookService.getStatus()],
['qoder', () => qoderHookService.getStatus()],
['qoder-cn', () => qoderCnHookService.getStatus()],
['qwen-code', () => qwenCodeHookService.getStatus()],
['codebuddy', () => codebuddyHookService.getStatus()],
['antigravity', () => antigravityHookService.getStatus()],
['amp', () => ampHookService.getStatus()],
Expand Down
33 changes: 32 additions & 1 deletion src/main/agent-hooks/managed-hook-command-contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,34 @@ const buildersByAgent = new Map<string, CommandBuilders>([
remote: (path) => [getClaudeRemoteCommand(path)]
}
],
[
'qoder-cn',
{
local: (path) => [
getManagedLifecycleHook(path, {
configDirName: '.qoder-cn',
scriptBaseName: 'qoder-cn-hook',
usesWindowsCompatLauncher: true,
windowsHookShell: 'powershell'
}).command
],
remote: (path) => [getClaudeRemoteCommand(path)]
}
],
[
'qwen-code',
{
local: (path) => [
getManagedLifecycleHook(path, {
configDirName: '.qwen',
scriptBaseName: 'qwen-code-hook',
usesWindowsCompatLauncher: true,
windowsHookShell: 'powershell'
}).command
],
remote: (path) => [getClaudeRemoteCommand(path)]
}
],
[
'codebuddy',
{
Expand Down Expand Up @@ -233,7 +261,10 @@ describe('managed hook command contract', () => {
// Native PowerShell hooks evaluate these variables without Grok's dollar-byte scanner.
const scannedCommand =
platform === 'win32' &&
(agent === 'qoder' || agent === 'codebuddy') &&
(agent === 'qoder' ||
agent === 'qoder-cn' ||
agent === 'qwen-code' ||
agent === 'codebuddy') &&
command.startsWith('$scriptPath = Join-Path')
? command
.replaceAll('$LASTEXITCODE', '')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import { kimiHookService } from '../kimi/hook-service'
import { dshHookService } from '../dsh/hook-service'
import { museHookService } from '../muse/hook-service'
import { openClaudeHookService } from '../openclaude/hook-service'
import { qoderHookService } from '../qoder/hook-service'
import { qwenCodeHookService } from '../qwen-code/hook-service'
import { qoderCnHookService, qoderHookService } from '../qoder/hook-service'
import { zcodeHookService } from '../zcode/hook-service'
import { MANAGED_AGENT_HOOK_INSTALLERS } from './managed-agent-hook-controls'
import { REMOTE_MANAGED_HOOK_INSTALLER_AGENTS } from './remote-managed-hook-installers'
Expand Down Expand Up @@ -54,6 +55,8 @@ describe('remote hook service registry coverage', () => {
['kimi', kimiHookService],
['muse', museHookService],
['qoder', qoderHookService],
['qoder-cn', qoderCnHookService],
['qwen-code', qwenCodeHookService],
['codebuddy', codebuddyHookService],
['zcode', zcodeHookService],
['dsh', dshHookService]
Expand Down
5 changes: 4 additions & 1 deletion src/main/agent-hooks/remote-managed-hook-installers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { codebuddyHookService } from '../codebuddy/hook-service'
import { qoderHookService } from '../qoder/hook-service'
import { qwenCodeHookService } from '../qwen-code/hook-service'
import { qoderCnHookService, qoderHookService } from '../qoder/hook-service'
import type { SFTPWrapper } from 'ssh2'
import type { AgentHookInstallStatus, AgentHookTarget } from '../../shared/agent-hook-types'
import { ampHookService } from '../amp/hook-service'
Expand Down Expand Up @@ -65,6 +66,8 @@ const REMOTE_MANAGED_HOOK_INSTALLERS: readonly RemoteManagedHookInstaller[] = [
],
['gemini', (sftp, remoteHome) => geminiHookService.installRemote(sftp, remoteHome)],
['qoder', (sftp, remoteHome) => qoderHookService.installRemote(sftp, remoteHome)],
['qoder-cn', (sftp, remoteHome) => qoderCnHookService.installRemote(sftp, remoteHome)],
['qwen-code', (sftp, remoteHome) => qwenCodeHookService.installRemote(sftp, remoteHome)],
['codebuddy', (sftp, remoteHome) => codebuddyHookService.installRemote(sftp, remoteHome)],
['antigravity', (sftp, remoteHome) => antigravityHookService.installRemote(sftp, remoteHome)],
['amp', (sftp, remoteHome) => ampHookService.installRemote(sftp, remoteHome)],
Expand Down
2 changes: 2 additions & 0 deletions src/main/agent-hooks/server-retired-pane-new-turn.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ afterEach(() => vi.restoreAllMocks())
* mimo-code's boundary is an explicit-prompt MessagePart, which the gate handles separately. */
const NEW_TURN_EVENT: Record<AgentHookSource, string | null> = {
qoder: 'SessionStart',
'qoder-cn': 'SessionStart',
'qwen-code': 'SessionStart',
claude: 'SessionStart',
kimi: 'UserPromptSubmit',
codebuddy: 'UserPromptSubmit',
Expand Down
1 change: 1 addition & 0 deletions src/main/agent-workspace-trust-spawn.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ describe('applyAgentWorkspaceTrustToSpawn', () => {
'cursor',
'copilot',
'qoder',
'qoder-cn',
'antigravity'
])
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('every search entry point carries the scope identity through', () => {
const service = fakeSearchService()
setSessionSearchService(service)
installSessionSearchScopeCatalogSource(() => CATALOG)
await relayHandler()({ query: 'needle', within: WITHIN })
await relayHandler()({ query: 'needle', supportsQoderHistory: true, within: WITHIN })
expect(service.search).toHaveBeenCalledWith(expect.anything(), {
kind: 'resolved',
paths: ['/work/app']
Expand All @@ -88,7 +88,7 @@ describe('every search entry point carries the scope identity through', () => {
it('hands the relay’s own verdict down, that host carrying no repo catalog', async () => {
const service = fakeSearchService()
setSessionSearchService(service)
await relayHandler()({ query: 'needle', within: WITHIN })
await relayHandler()({ query: 'needle', supportsQoderHistory: true, within: WITHIN })
expect(service.search).toHaveBeenCalledWith(
{ query: 'needle', limit: 20 },
{
Expand Down
37 changes: 30 additions & 7 deletions src/main/ai-vault-search/session-search-scope-service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ describe('scope identity at the search choke point', () => {
setSessionSearchService(service)
installSessionSearchScopeCatalogSource(() => CATALOG)
await searchSessionService(
{ query: 'needle', within: { kind: 'workspace', worktreeId: 'repo-1::/work/app' } },
{
query: 'needle',
supportsQoderHistory: true,
within: { kind: 'workspace', worktreeId: 'repo-1::/work/app' }
},
'ipc'
)
// Beside the request, not inside `filters.scopePaths`, which carries a wire cap.
Expand All @@ -41,7 +45,11 @@ describe('scope identity at the search choke point', () => {
setSessionSearchService(service)
installSessionSearchScopeCatalogSource(() => CATALOG)
await searchSessionService(
{ query: 'needle', within: { kind: 'project', projectKey: 'repo:repo-1' } },
{
query: 'needle',
supportsQoderHistory: true,
within: { kind: 'project', projectKey: 'repo:repo-1' }
},
'ipc'
)
// An exact match, so a leaked `within` would fail here as an extra key.
Expand All @@ -56,7 +64,11 @@ describe('scope identity at the search choke point', () => {
setSessionSearchService(service)
installSessionSearchScopeCatalogSource(() => CATALOG)
await searchSessionService(
{ query: 'needle', within: { kind: 'project', projectKey: 'repo:elsewhere' } },
{
query: 'needle',
supportsQoderHistory: true,
within: { kind: 'project', projectKey: 'repo:elsewhere' }
},
'ipc'
)
// The service owns the answer, because it owns the consent and readiness
Expand All @@ -74,7 +86,11 @@ describe('scope identity at the search choke point', () => {
const service = fakeSearchService()
setSessionSearchService(service)
await searchSessionService(
{ query: 'needle', within: { kind: 'workspace', worktreeId: 'repo-1::/work/app' } },
{
query: 'needle',
supportsQoderHistory: true,
within: { kind: 'workspace', worktreeId: 'repo-1::/work/app' }
},
'ipc'
)
expect(service.search).toHaveBeenCalledWith(
Expand All @@ -98,7 +114,11 @@ describe('scope identity at the search choke point', () => {
settings: { workspaceDir: '/home/me/ws', nestWorkspaces: false }
}))
await searchSessionService(
{ query: 'needle', within: { kind: 'project', projectKey: 'repo:repo-1' } },
{
query: 'needle',
supportsQoderHistory: true,
within: { kind: 'project', projectKey: 'repo:repo-1' }
},
'ipc'
)
const call = service.search.mock.lastCall
Expand All @@ -113,15 +133,18 @@ describe('scope identity at the search choke point', () => {
const service = fakeSearchService()
setSessionSearchService(service)
installSessionSearchScopeCatalogSource(() => CATALOG)
await searchSessionService({ query: 'needle' }, 'ipc')
await searchSessionService({ query: 'needle', supportsQoderHistory: true }, 'ipc')
expect(service.search).toHaveBeenCalledWith({ query: 'needle', limit: 20 }, undefined)
})

it('still honours an explicit path filter, which is what the CLI’s --path sends', async () => {
const service = fakeSearchService()
setSessionSearchService(service)
installSessionSearchScopeCatalogSource(() => CATALOG)
await searchSessionService({ query: 'needle', filters: { scopePaths: ['/other'] } }, 'ipc')
await searchSessionService(
{ query: 'needle', supportsQoderHistory: true, filters: { scopePaths: ['/other'] } },
'ipc'
)
expect(service.search).toHaveBeenCalledWith(
{ query: 'needle', limit: 20, filters: { scopePaths: ['/other'] } },
undefined
Expand Down
45 changes: 43 additions & 2 deletions src/main/ai-vault-search/session-search-service-registry.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { afterEach, describe, expect, it, vi } from 'vitest'
import { fakeSearchService } from '../../shared/ai-vault-search-test-fixture'
import { unavailableSessionSearchStatus } from '../../shared/ai-vault-search-client'
import {
unavailableSessionSearchStatus,
createSessionSearchClient
} from '../../shared/ai-vault-search-client'
import { AI_VAULT_AGENTS } from '../../shared/ai-vault-types'
import {
setSessionSearchService,
searchSessionService,
Expand Down Expand Up @@ -51,12 +55,49 @@ describe('session search service registry', () => {
'ipc'
)
expect(service.reconcile).not.toHaveBeenCalled()
expect(service.search).toHaveBeenCalledWith({ query: 'needle', limit: 20 }, undefined)
expect(service.search).toHaveBeenCalledWith(
{
query: 'needle',
limit: 20,
filters: { agents: AI_VAULT_AGENTS.filter((a) => a !== 'qoder') }
},
undefined
)
expect(result).not.toHaveProperty('debug')
expect(await searchSessionService({ query: 'needle', debug: true }, 'ipc')).toHaveProperty(
'debug'
)
})
it.each(['ipc', 'runtime', 'relay'] as const)(
'negotiates Qoder hits before retrieval on %s, without widening explicit filters',
async (transport) => {
const service = fakeSearchService()
setSessionSearchService(service)
await searchSessionService(
{ query: 'proof', filters: { agents: ['claude', 'qoder'] } },
transport
)
expect(service.search).toHaveBeenLastCalledWith(
{ query: 'proof', limit: 20, filters: { agents: ['claude'] } },
undefined
)
expect(
await searchSessionService({ query: 'proof', filters: { agents: ['qoder'] } }, transport)
).toMatchObject({ kind: 'results', hits: [], page: { cursor: null, hasMore: false } })
const client = createSessionSearchClient(
(method, request) =>
method === 'aiVault.searchStatus'
? sessionSearchServiceStatus(request, transport)
: searchSessionService(request, transport),
transport
)
await client.searchSessions({ query: 'proof', filters: { agents: ['qoder'] } })
expect(service.search).toHaveBeenLastCalledWith(
{ query: 'proof', limit: 20, filters: { agents: ['qoder'] } },
undefined
)
}
)
it('waits for reconcile before search, and clears its timeout', async () => {
vi.useFakeTimers()
const service = fakeSearchService()
Expand Down
Loading