Skip to content

Commit 08c14db

Browse files
authored
Merge pull request #115 from friuns2/codex/skills-tab-npx-find
Add Composio and Skills search to Directory Hub
2 parents 28d03a5 + 9de2ec0 commit 08c14db

21 files changed

Lines changed: 1011 additions & 136 deletions

.agents/skills/codex-app-parity/SKILL.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ Ensure behavior is implemented with Codex.app as the source of truth, then verif
1414

1515
## Project Instructions
1616

17+
## Repo Knowledge Maintenance
18+
19+
For user-visible Directory, Skills, Apps, Plugins, MCP, or Composio changes in this repo:
20+
21+
- Update `tests.md` with manual verification steps, including light and dark theme checks.
22+
- If the change creates or changes durable behavior/architecture, add or update an `llm-wiki/raw/...` source and corresponding `llm-wiki/wiki/...` concept page.
23+
- Keep `whatToTest.md` as a short pending-only checklist; remove items that were actually executed successfully.
24+
- Prefer assertions plus screenshots for browser validation; screenshots alone are not enough.
25+
1726
## Codex.app-First Development Policy
1827

1928
For every **new feature** and every **behavior/UI change**, treat the installed desktop app as the source of truth:
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Directory Hub Composio and Skills Search Source
2+
3+
Date: 2026-05-02
4+
5+
## Scope
6+
7+
This source records the Directory Hub work that made `#/skills` a native Skills/Apps surface with:
8+
9+
- a default `Skills` tab,
10+
- MCPs shown immediately before installed skills,
11+
- registry search backed by `npx skills find`,
12+
- registry install backed by `npx skills add <source> --yes --global`,
13+
- Composio connector browsing/auth/detail flows,
14+
- stronger light/dark verification and edge-case tests.
15+
16+
## Skills Tab Behavior
17+
18+
- `#/skills` defaults to the `Skills` tab.
19+
- Other directory tabs are shareable through `?tab=plugins`, `?tab=apps`, `?tab=composio`, and `?tab=skills`.
20+
- The first-launch Plugins card still routes to `?tab=plugins`.
21+
- The top-level `Refresh` button only shows `Refreshing...` for explicit user-triggered refreshes.
22+
- Opening or switching to the Skills tab lists MCPs without forcing an MCP reload; explicit `Refresh` performs the reload behavior.
23+
- MCPs are shown above installed skills and use the same card/grid section style.
24+
25+
## Installed Skills and Registry Search
26+
27+
- The Find skills panel calls `/codex-api/skills-hub/search`, which runs `npx skills find`.
28+
- Installed detection uses the same installed skills source as the Skills Hub list, including RPC/plugin/shared skills.
29+
- Search result cards preserve registry identity while carrying installed local state.
30+
- Opening an installed search result switches to the local installed skill record/content/actions.
31+
- Find skills cards hide the local folder browse affordance to avoid mixing remote registry identity with local-only controls.
32+
- Installed skills cards hide redundant `Installed`, `Disabled`, and repeated `local` labels.
33+
- Installed skills cards show descriptions parsed from local `SKILL.md` files.
34+
- Installed entries are assembled concurrently when reading local descriptions.
35+
- Registry installs run `npx skills add <source> --yes --global`.
36+
- Install success requires a non-empty, validated local `SKILL.md` path; the UI treats missing path or missing post-refresh local skill as failure instead of showing a remote registry card as installed.
37+
38+
## Composio Directory Behavior
39+
40+
- The Composio tab prefers `npx --yes composio` and falls back to the installed CLI only when needed.
41+
- Login uses `composio login --no-browser -y`; the UI opens a browser tab from the click and navigates it to the returned auth URL.
42+
- The Composio workspace card shows current account/org/backend status.
43+
- Connector cards show connector details such as tool counts, auth/connection state, and concrete descriptions.
44+
- Connector details show overview chips, connection rows, useful tools, dashboard action, connect/login action, and `Try it!` where applicable.
45+
- Composio search sends the server query parameter as `query`.
46+
- Search ranking prioritizes exact connector slug/name matches above connectors that only mention the query in their descriptions; this keeps `Instagram` ahead of `Meta Ads` for `instagram`.
47+
48+
## Test Coverage and Artifacts
49+
50+
- Unit coverage was added for Composio connector sorting:
51+
- exact slug/name query matches outrank description-only matches,
52+
- connected connectors rank first when no query is active.
53+
- Gateway unit coverage verifies Composio connector search sends `query`, `cursor`, and `limit`.
54+
- Manual/browser verification captured light and dark screenshots for:
55+
- Skills tab,
56+
- installed skill modal,
57+
- Composio connector search/detail.
58+
- Remaining `whatToTest.md` items require environment states that are not always safe to force:
59+
- unavailable Composio CLI when neither `npx --yes composio` nor installed CLI can run,
60+
- final login URL navigation in a real unauthenticated browser flow.
61+
62+
## Important Commits
63+
64+
- `d18776b9` - optimized Skills tab default and query-tab routing.
65+
- `1f67ba71` - required local skill path after install.
66+
- `6fa62670` - showed local skill descriptions.
67+
- `21217108` - streamlined Skills tab loading and avoided implicit MCP reload.
68+
- `5cedb0c8` - clarified refresh state and Composio search ranking.
69+
- `3c8e3823` - added Directory edge-case tests.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Directory Hub, Composio, and Skills Search
2+
3+
This page documents the current Directory Hub behavior under `#/skills`, especially the native Skills tab, Composio connector browsing, and registry-backed Skills search.
4+
5+
## Route Model
6+
7+
- `#/skills` opens the Directory Hub with the `Skills` tab selected by default.
8+
- The active tab is URL-addressable with `?tab=plugins`, `?tab=apps`, `?tab=composio`, or `?tab=skills`.
9+
- The Directory route name remains `Skills`; the inner surface title remains `Skills & Apps`.
10+
- The first-launch Plugins card explicitly opens `?tab=plugins`.
11+
12+
## Skills Tab
13+
14+
The Skills tab is ordered for local use:
15+
16+
1. GitHub Skills Sync controls.
17+
2. Find skills registry search.
18+
3. MCP section.
19+
4. Installed skills section.
20+
21+
Important behavior:
22+
23+
- MCPs appear immediately before installed skills.
24+
- Normal tab navigation only lists MCPs; the top-level `Refresh` button is the explicit MCP reload path.
25+
- Installed skill cards are local-first: no repeated `local`, `Installed`, or `Disabled` labels on the card grid.
26+
- Installed card descriptions are parsed from local `SKILL.md` files.
27+
- Installed entries are built concurrently so description reads do not add one round trip per skill.
28+
29+
## Skills Registry Search
30+
31+
The Find skills panel is backed by the published skills CLI:
32+
33+
- Search runs `npx skills find`.
34+
- Install runs `npx skills add <source> --yes --global`.
35+
- Install success is only valid when a local installed `SKILL.md` path is returned and validates.
36+
- If install does not produce a local path or the post-refresh installed list does not include the skill, the UI treats it as failure.
37+
38+
Search result identity is intentionally hybrid:
39+
40+
- Cards keep registry owner/source details.
41+
- Installed matches get local path/enabled state.
42+
- Opening an installed result switches to the local installed skill detail and actions.
43+
- Search result cards hide the local folder browse icon; local browse remains available in installed skill details.
44+
45+
## Composio
46+
47+
The Composio tab is CLI-backed and should feel like a native Directory section.
48+
49+
- Prefer `npx --yes composio`; fall back to the installed CLI only when needed.
50+
- Login runs `composio login --no-browser -y`.
51+
- The UI opens a browser tab from the click, then navigates it to the CLI auth URL.
52+
- The workspace card shows account/org/backend status.
53+
- Connector cards show real details: tool counts, descriptions, connection status, and auth actions.
54+
- Connector detail shows overview, connections, useful tools, dashboard link, connect/login action, and `Try it!` when usable.
55+
56+
Search ranking has a specific edge-case rule:
57+
58+
- Exact slug/name matches outrank description-only matches.
59+
- Example: searching `instagram` should show the `Instagram` connector before `Meta Ads`, even though Meta Ads mentions Instagram and may have more tools.
60+
61+
## Testing Lessons
62+
63+
Use assertions, not screenshots alone.
64+
65+
Recommended checks:
66+
67+
- `#/skills` defaults to Skills.
68+
- `?tab=` routes to the selected tab.
69+
- Normal Skills navigation does not call MCP reload.
70+
- The refresh button only says `Refreshing...` during explicit manual refresh.
71+
- Installed search results open local detail actions.
72+
- Failed installs do not create installed UI state.
73+
- Composio search sends `query`, preserves pagination params, and ranks exact matches first.
74+
- Light and dark screenshots should include both the Skills page and long installed-skill modal content.
75+
76+
Unit tests now cover:
77+
78+
- Composio exact query ranking over description-only matches.
79+
- Connected Composio connector ordering without a query.
80+
- Gateway query/cursor/limit params for Composio connector search.
81+
82+
## Related Pages
83+
84+
- [Entity: codex-web-local](../entities/codex-web-local.md)
85+
- [Concept: Skills route UI](./skills-route-ui.md)
86+
- [Overview](../overview.md)
87+
- [Source: Directory Hub Composio and Skills Search](../../raw/features/directory-hub-composio-skills-search.md)

llm-wiki/wiki/entities/codex-web-local.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@
1616
- Realtime chat rendering uses cached markdown/highlight output and bridge-side inline media sanitization to keep browser payloads bounded
1717
- User-visible UI work is expected to include dark-theme verification, not only light-theme checks
1818
- Worktree dev startup may reuse a shared `node_modules` tree; forcing reinstall is not always the right default
19+
- Directory Hub is the `#/skills` surface for Plugins, Apps, Composio, MCPs, Skills search, and installed local skills
1920

2021
## Source links
2122
- [Source snapshot](../../raw/projects/codex-web-local.md)
2223
- [Integrated terminal source](../../raw/features/integrated-terminal.md)
24+
- [Directory Hub Composio and Skills search source](../../raw/features/directory-hub-composio-skills-search.md)
2325
- [Realtime chat rendering source](../../raw/features/realtime-chat-rendering-inline-media.md)
2426
- [Skills route UI + first-launch card source](../../raw/features/skills-route-ui-and-first-launch-card.md)
2527
- [Integrated terminal concept](../concepts/integrated-terminal.md)
28+
- [Directory Hub, Composio, and Skills Search concept](../concepts/directory-hub-composio-skills.md)
2629
- [Realtime chat rendering concept](../concepts/realtime-chat-rendering.md)
2730
- [Merge-to-main workflow concept](../concepts/merge-to-main-workflow.md)
2831
- [Skills route UI concept](../concepts/skills-route-ui.md)

llm-wiki/wiki/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88

99
## Concepts
1010
- [concepts/integrated-terminal.md](./concepts/integrated-terminal.md): Codex.app-style integrated xterm/PTY terminal architecture, edge cases, and verification.
11+
- [concepts/directory-hub-composio-skills.md](./concepts/directory-hub-composio-skills.md): Directory Hub tab routing, Composio connector behavior, Skills search/install semantics, and edge-case testing.
1112
- [concepts/merge-to-main-workflow.md](./concepts/merge-to-main-workflow.md): branch integration and conflict-resolution workflow.
1213
- [concepts/opencode-zen-big-pickle.md](./concepts/opencode-zen-big-pickle.md): OpenCode Zen Big Pickle model configuration for Codex CLI and OpenCode CLI.
1314
- [concepts/realtime-chat-rendering.md](./concepts/realtime-chat-rendering.md): realtime chat rendering, sync-churn reduction, and inline media sanitization.
1415
- [concepts/skills-route-ui.md](./concepts/skills-route-ui.md): Skills route naming, first-launch Plugins card persistence, dark-theme fixes, and verification lessons.
1516

1617
## Sources
1718
- [../raw/features/integrated-terminal.md](../raw/features/integrated-terminal.md): source facts for the integrated terminal implementation and follow-up tests.
19+
- [../raw/features/directory-hub-composio-skills-search.md](../raw/features/directory-hub-composio-skills-search.md): source facts for Directory Hub, Composio connectors, Skills search/install, and edge-case tests.
1820
- [../raw/features/realtime-chat-rendering-inline-media.md](../raw/features/realtime-chat-rendering-inline-media.md): source facts for realtime chat rendering and inline media sanitization.
1921
- [../raw/features/skills-route-ui-and-first-launch-card.md](../raw/features/skills-route-ui-and-first-launch-card.md): source facts for the Skills route rename, first-launch Plugins card, dark-theme fix, and dev-server workflow adjustment.
2022
- [../raw/projects/codex-web-local.md](../raw/projects/codex-web-local.md): immutable source snapshot for project facts.

llm-wiki/wiki/log.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Log
22

3+
## [2026-05-02] ingest | Directory Hub Composio and Skills search
4+
- Added source: `raw/features/directory-hub-composio-skills-search.md`.
5+
- Created wiki page: `concepts/directory-hub-composio-skills.md`.
6+
- Documents: Skills tab default/query routing, MCP placement/reload behavior, `npx skills find/add` semantics, Composio CLI-backed connector behavior, search-ranking edge cases, and verification coverage.
7+
- Updated `overview.md`, `entities/codex-web-local.md`, and `index.md`.
8+
39
## [2026-04-26] ingest | skills route UI and first-launch plugins card
410
- Added source: `raw/features/skills-route-ui-and-first-launch-card.md`.
511
- Created wiki page: `concepts/skills-route-ui.md`.

llm-wiki/wiki/overview.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@ This wiki tracks knowledge about the `codex-web-local` project and related workf
99
- Codex.app-style integrated terminal implementation and tests
1010
- Realtime chat rendering performance and inline media sanitization
1111
- Skills route UI, first-launch Plugins card behavior, and dark-theme verification lessons
12+
- Directory Hub tab routing, Composio connector behavior, and Skills registry search/install semantics
1213

1314
## Primary source
1415
- [codex-web-local project snapshot](../raw/projects/codex-web-local.md)
1516
- [integrated terminal implementation source](../raw/features/integrated-terminal.md)
17+
- [directory hub Composio and Skills search source](../raw/features/directory-hub-composio-skills-search.md)
1618
- [realtime chat rendering and inline media source](../raw/features/realtime-chat-rendering-inline-media.md)
1719
- [skills route UI and first-launch card source](../raw/features/skills-route-ui-and-first-launch-card.md)
1820

1921
## Linked pages
2022
- [Entity: codex-web-local](./entities/codex-web-local.md)
2123
- [Concept: Integrated terminal](./concepts/integrated-terminal.md)
24+
- [Concept: Directory Hub, Composio, and Skills Search](./concepts/directory-hub-composio-skills.md)
2225
- [Concept: Realtime chat rendering](./concepts/realtime-chat-rendering.md)
2326
- [Concept: Merge-to-main workflow](./concepts/merge-to-main-workflow.md)
2427
- [Concept: Skills route UI](./concepts/skills-route-ui.md)

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,7 +1479,7 @@ function dismissFirstLaunchPluginsCard(): void {
14791479
14801480
function onOpenPluginsHomeCard(): void {
14811481
dismissFirstLaunchPluginsCard()
1482-
void router.push({ name: 'skills' })
1482+
void router.push({ name: 'skills', query: { tab: 'plugins' } })
14831483
}
14841484
14851485
const threadContextBadgeState = computed(() => {

src/api/codexGateway.test.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { afterEach, describe, expect, it, vi } from 'vitest'
2-
import { startThreadTurn } from './codexGateway'
2+
import { listDirectoryComposioConnectors, startThreadTurn } from './codexGateway'
33

44
function mockRpcFetch(): { requests: Array<{ method: string, params: Record<string, unknown> }> } {
55
const requests: Array<{ method: string, params: Record<string, unknown> }> = []
@@ -60,3 +60,30 @@ describe('startThreadTurn collaboration mode payloads', () => {
6060
})
6161
})
6262
})
63+
64+
describe('listDirectoryComposioConnectors', () => {
65+
afterEach(() => {
66+
vi.unstubAllGlobals()
67+
})
68+
69+
it('sends search queries as query params expected by the server', async () => {
70+
const requests: string[] = []
71+
vi.stubGlobal('fetch', vi.fn(async (input: RequestInfo | URL) => {
72+
requests.push(String(input))
73+
return new Response(JSON.stringify({
74+
data: [],
75+
nextCursor: null,
76+
total: 0,
77+
}), {
78+
status: 200,
79+
headers: {
80+
'Content-Type': 'application/json',
81+
},
82+
})
83+
}))
84+
85+
await listDirectoryComposioConnectors('instagram', '50', 25)
86+
87+
expect(requests).toEqual(['/codex-api/composio/connectors?query=instagram&cursor=50&limit=25'])
88+
})
89+
})

0 commit comments

Comments
 (0)