Skip to content

feat(gjc): add ACP provider catalog and lifecycle sessions - #3407

Open
suho-han wants to merge 17 commits into
getpaseo:mainfrom
suho-han:feat/gjc-acp-provider-catalog
Open

feat(gjc): add ACP provider catalog and lifecycle sessions#3407
suho-han wants to merge 17 commits into
getpaseo:mainfrom
suho-han:feat/gjc-acp-provider-catalog

Conversation

@suho-han

@suho-han suho-han commented Aug 15, 2026

Copy link
Copy Markdown

What

Adds Gajae Code as an ACP-backed provider and teaches the GJC adapter how to create/load sessions through GJC's lifecycle API before attaching over ACP.

This PR also:

  • wires GJC provider registration and catalog metadata, including the app icon mapping
  • adds generic ACP extension points for provider-specific probe/session creation and cleanup
  • filters GJC host lifecycle-only plan modes from Paseo mode state
  • lets provider search match model plus thinking option queries such as `openai-codex/gpt-5.5:xhigh`

Why

GJC's plain ACP `session/new` path can exceed the generic readiness window or start without the runtime lifecycle state Paseo needs. Creating the GJC session with `gjc sdk session raw global --op session.create` gives the provider a longer readiness budget, then Paseo attaches to the returned session via ACP `loadSession`.

Existing issue / PR check

Validation

Before publishing:

  • `npx vitest run packages/server/src/server/agent/providers/gjc-acp-agent.test.ts packages/server/src/server/agent/providers/acp-agent.test.ts packages/app/src/provider-selection/provider-selection.test.ts --bail=1` - 117 tests passed.
  • `npm run typecheck` - passed.
  • `npm run lint` - passed.
  • Pre-commit hook on commit `c8888ca28` passed selected-file `format:check`, selected-file `lint`, and full workspace `typecheck`.
  • Real GJC create smoke reached a loaded session with `hasSessionId: true`, model `openai-codex/gpt-5.5`, thinking `xhigh`, mode `default`.

After merging latest `origin/main` into the PR branch to resolve conflicts:

  • `npm ci` - passed in a clean temporary worktree.
  • `npm run lint -- packages/server/src/server/agent/providers/acp-agent.ts packages/server/src/server/agent/providers/acp-agent.test.ts packages/server/src/server/agent/providers/gjc-acp-agent.ts packages/server/src/server/agent/providers/gjc-acp-agent.test.ts packages/server/src/server/agent/providers/generic-acp-agent.ts packages/app/src/provider-selection/provider-selection.ts packages/app/src/provider-selection/provider-selection.test.ts` - passed.
  • `npx vitest run packages/server/src/server/agent/providers/gjc-acp-agent.test.ts packages/server/src/server/agent/providers/acp-agent.test.ts packages/app/src/provider-selection/provider-selection.test.ts --bail=1` - 125 tests passed.
  • `npm run build:client` - passed.
  • `npm run build:server` - passed.
  • `npm run typecheck` - passed.

Known limitation: real prompt send smoke still failed with `SDK request outcome is uncertain after the frame was sent`, so this PR should be reviewed as catalog/startup/readiness work, not full message-send completion.

@suho-han
suho-han marked this pull request as ready for review August 15, 2026 10:33
@greptile-apps

greptile-apps Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds Gajae Code as an ACP-backed provider and introduces lifecycle-aware session creation, loading, and cleanup hooks for ACP adapters.

  • Registers GJC catalog metadata, provider icons, and provider-specific server construction.
  • Creates GJC lifecycle sessions before attaching through ACP loadSession.
  • Adds tracked probe cleanup, provider-specific capability hooks, lifecycle cleanup, and GJC mode filtering.
  • Extends model search to include model-and-thinking-option queries.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
packages/server/src/server/agent/providers/acp-agent.ts Adds generic lifecycle session hooks and tracked probe cleanup; the previously reported blocking and late-registration cleanup paths are addressed.
packages/server/src/server/agent/providers/gjc-acp-agent.ts Implements GJC lifecycle creation, ACP loading, cleanup, capability configuration, and lifecycle-only mode filtering.
packages/server/src/server/agent/providers/gjc-acp-agent.test.ts Covers GJC lifecycle commands, cancellation, cleanup, mode transforms, and capability behavior.
packages/server/src/server/agent/provider-registry.ts Routes derived GJC providers to the provider-specific ACP client.
packages/app/src/provider-selection/provider-selection.ts Adds thinking-option-qualified fields to model search matching.
packages/app/src/data/acp-provider-catalog.ts Adds Gajae Code metadata and launch command to the ACP provider catalog.

Sequence Diagram

sequenceDiagram
  participant Paseo
  participant GJC as GJC lifecycle CLI
  participant ACP as GJC ACP process
  Paseo->>GJC: session.create
  GJC-->>Paseo: lifecycle sessionId
  Paseo->>ACP: loadSession(sessionId)
  ACP-->>Paseo: session state
  alt probe or session cleanup
    Paseo->>GJC: session.close(sessionId)
  end
Loading

Reviews (14): Last reviewed commit: "Merge branch 'main' into feat/gjc-acp-pr..." | Re-trigger Greptile

Comment thread packages/server/src/server/agent/providers/acp-agent.ts
Comment thread packages/server/src/server/agent/providers/gjc-acp-agent.test.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f89f2bc90c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/server/src/server/agent/providers/gjc-acp-agent.ts Outdated
Comment thread packages/server/src/server/agent/providers/acp-agent.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 047caa96d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/server/src/server/agent/providers/acp-agent.ts
@suho-han
suho-han force-pushed the feat/gjc-acp-provider-catalog branch from 047caa9 to 89359ee Compare August 15, 2026 10:59
@suho-han
suho-han force-pushed the feat/gjc-acp-provider-catalog branch from 89359ee to 47ad860 Compare August 15, 2026 11:02
Comment thread packages/server/src/server/agent/providers/acp-agent.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 47ad860fc5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/server/src/server/agent/providers/gjc-acp-agent.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8e630a77d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/server/src/server/agent/providers/gjc-acp-agent.ts Outdated
Comment thread packages/server/src/server/agent/providers/acp-agent.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd3dbb098a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/server/src/server/agent/providers/acp-agent.ts
Comment thread packages/server/src/server/agent/providers/gjc-acp-agent.ts
Comment thread packages/server/src/server/agent/providers/acp-agent.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6524452d78

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/server/src/server/agent/providers/gjc-acp-agent.ts Outdated
Comment thread packages/server/src/server/agent/providers/gjc-acp-agent.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa7a879c28

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/server/src/server/agent/providers/gjc-acp-agent.ts
Comment thread packages/server/src/server/agent/providers/acp-agent.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 66f375d5ec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/server/src/server/agent/providers/gjc-acp-agent.ts
Comment thread packages/server/src/server/agent/providers/gjc-acp-agent.ts Outdated
@greptile-apps

greptile-apps Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 574d815382

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/server/src/server/agent/providers/acp-agent.ts
Comment thread packages/server/src/server/agent/providers/gjc-acp-agent.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

this.currentMode = this.transformModeId(update.currentModeId);

P2 Badge Preserve the public mode when filtering lifecycle updates

When GJC emits a current_mode_update for either filtered plan identifier, transformGjcModeId() returns null, and this assignment immediately clears currentMode and emits a mode_changed event with null. This contradicts initial-session handling, which maps the same lifecycle mode to default, and causes AgentManager to clear the agent's displayed and subsequently persisted mode. Ignore filtered updates or map them to the same default used by transformGjcSessionResponse().

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/server/src/server/agent/providers/gjc-acp-agent.ts
Comment thread packages/server/src/server/agent/providers/gjc-acp-agent.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e0d5c1da2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

terminal: false,
},
clientCapabilityMeta: GJC_CLIENT_CAPABILITY_META,
diagnosticPhaseTimeoutMs: GJC_ACP_READINESS_TIMEOUT_MS,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Leave headroom above the GJC readiness timeout

When a cold GJC worker becomes ready near the end of its 60-second readiness window, this outer diagnostic phase also expires at exactly 60 seconds even though it additionally includes temporary-file setup, lifecycle CLI startup and output parsing, and ACP loadSession. The fresh code in this revision adds an override, but matching the inner timeout exactly still makes a healthy near-deadline startup appear as a failed ACP session/new probe; give the diagnostic phase a larger budget than GJC_ACP_READINESS_TIMEOUT_MS.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant