Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .github/plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "glean-plugins-vnext",
"metadata": {
"description": "Glean plugins for GitHub Copilot — search and act across enterprise apps without leaving your editor or terminal"
},
"owner": {
"name": "Glean"
},
"plugins": [
{
"name": "glean-vnext",
"source": "./plugins/glean",
"description": "Glean plugin for discovering skills and running tools."
}
]
}
45 changes: 39 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Glean plugin

Glean's plugin for [Claude Code](https://code.claude.com/docs/en/overview),
Codex, and Cursor. This repo is a single-plugin marketplace, shipping one
manifest per host.
Codex, Cursor, and [GitHub Copilot](https://docs.github.com/en/copilot) (CLI and
VS Code). This repo is a single-plugin marketplace, shipping one manifest per
host.

Today it ships one plugin:

Expand Down Expand Up @@ -32,6 +33,32 @@ host's plugin flow. The launcher, skills, and server bundle are shared across
all hosts. For Cursor, see
[Team marketplaces](https://cursor.com/docs/plugins#team-marketplaces).

### GitHub Copilot (CLI and VS Code)

GitHub Copilot uses the same agent-plugin format as Claude Code, so the shipped
Claude-format manifest (`.claude-plugin/plugin.json` + `.mcp.json` + `skills/`)
is what Copilot loads — there is no separate Copilot plugin manifest. The repo
exposes a Copilot-native marketplace at `.github/plugin/marketplace.json`.

**Copilot CLI:**

```
copilot plugin marketplace add gleanwork/glean-plugins-vnext
copilot plugin install glean-vnext@glean-plugins-vnext
```

**VS Code:** register the marketplace via the `chat.plugins.marketplaces`
setting (or run **Chat: Install Plugin From Source** with this repo's Git URL),
then install **glean-vnext** from the **Agent Plugins** view (`@agentPlugins` in
the Extensions search). VS Code also auto-discovers plugins you installed with
the Copilot CLI from `~/.copilot/installed-plugins/`.

The plugin stays in Claude format on purpose: its `.mcp.json` references
`${CLAUDE_PLUGIN_ROOT}` to locate `start.sh`, and that token is only substituted
for Claude-format plugins — the Copilot-native format defines no plugin-root
token. Adding a `.plugin/plugin.json` would make Copilot treat the plugin as
native format and break that path resolution, so we don't ship one.

## First run

Setup resolves your Glean instance automatically from your work email, then
Expand Down Expand Up @@ -127,7 +154,8 @@ every launch and setting them yourself has no effect:
`<PLUGIN_DATA_DIR>/glean-skills-cache`, or redirected under the launch
project's `.claude/tmp/` when `USE_CLAUDE_PROJECT_DIR=1`.
- `GLEAN_SESSION_ID` — the host's conversation id: `CLAUDE_CODE_SESSION_ID` for
Claude Code, `CODEX_THREAD_ID` for Codex, otherwise a generated UUID.
Claude Code, `CODEX_THREAD_ID` for Codex, `COPILOT_AGENT_SESSION_ID` for
GitHub Copilot, otherwise a generated UUID.

## Troubleshooting

Expand Down Expand Up @@ -180,15 +208,20 @@ runtime lives under `plugins/glean/`. See the Layout section below.
marketplace.json Marketplace manifest for Cursor.
.agents/plugins/
marketplace.json Marketplace manifest for Codex.
.github/plugin/
marketplace.json Marketplace manifest for GitHub Copilot
(CLI + VS Code).
plugins/glean/
.claude-plugin/
plugin.json Claude plugin manifest — name, version, description
plugin.json Claude plugin manifest — name, version, description.
Also the manifest GitHub Copilot loads (shared
Claude/Copilot agent-plugin format).
.codex-plugin/
plugin.json Codex plugin manifest (skills, mcpServers, interface)
.cursor-plugin/
plugin.json Cursor plugin manifest
.mcp.json MCP server invocation for Claude / Cursor. Source
of truth; sets ENABLE_HITL / HITL_TIMEOUT_MS.
.mcp.json MCP server invocation for Claude / Cursor / Copilot.
Source of truth; sets ENABLE_HITL / HITL_TIMEOUT_MS.
.mcp.codex.json MCP server invocation for Codex
assets/ Shared brand assets (logo) referenced by manifests
dist/index.js Built server bundle (every dep inlined; produced
Expand Down
2 changes: 1 addition & 1 deletion plugins/glean/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "glean-vnext",
"version": "0.2.33",
"version": "0.2.34",
"description": "Glean plugin for discovering skills and running tools.",
"author": {
"name": "Glean"
Expand Down
2 changes: 1 addition & 1 deletion plugins/glean/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "glean-vnext",
"version": "0.2.33",
"version": "0.2.34",
"description": "Glean Codex plugin for discovering skills and running tools.",
"author": {
"name": "Glean"
Expand Down
2 changes: 1 addition & 1 deletion plugins/glean/.cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "glean-vnext",
"displayName": "Glean vNext",
"version": "0.2.33",
"version": "0.2.34",
"description": "Search and act across your company's apps — Jira, Slack, Salesforce, Google Workspace, and more — without leaving Cursor.",
"author": {
"name": "Glean"
Expand Down
9 changes: 6 additions & 3 deletions plugins/glean/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ fi
# Resolve the chat session id host-side. Host-awareness lives here, not in the
# plugin: the launcher reads whatever variable this host exposes and exports the
# normalized GLEAN_SESSION_ID that the Node bundle reads. Claude Code exposes
# CLAUDE_CODE_SESSION_ID; Codex exposes the conversation id as CODEX_THREAD_ID.
# Hosts that expose no session id (Cursor) leave it unset, and the plugin falls
# back to a generated per-process id.
# CLAUDE_CODE_SESSION_ID; Codex exposes the conversation id as CODEX_THREAD_ID;
# GitHub Copilot (CLI and VS Code) exposes COPILOT_AGENT_SESSION_ID to MCP
# servers. Hosts that expose no session id (Cursor) leave it unset, and the
# plugin falls back to a generated per-process id.
if [ -n "${CLAUDE_CODE_SESSION_ID:-}" ]; then
export GLEAN_SESSION_ID="$CLAUDE_CODE_SESSION_ID"
elif [ -n "${CODEX_THREAD_ID:-}" ]; then
export GLEAN_SESSION_ID="$CODEX_THREAD_ID"
elif [ -n "${COPILOT_AGENT_SESSION_ID:-}" ]; then
export GLEAN_SESSION_ID="$COPILOT_AGENT_SESSION_ID"
Comment on lines +46 to +47

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a screenshot testing this being set and not being an issue as we found in cursor?

fi

exec node "$PLUGIN_DIR/dist/index.js"
Loading