GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Expose project provider skills in chat by jakeleventhal · Pull Request #3982 · pingdotgg/t3code

Expose project provider skills in chat #3982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jakeleventhal wants to merge 7 commits into pingdotgg:main from jakeleventhal:t3code/share-grok-skill-discovery

Uh oh!

There was an error while loading. Please reload this page.

Closed

Expose project provider skills in chat #3982

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit Hold shift + click to select a range
c757242
Expose project provider skills in chat
jakeleventhal Jul 15, 2026
da1045e
Clear stale composer skill metadata
jakeleventhal Jul 15, 2026
44240b7
Keep composer skill fallback cwd-safe
jakeleventhal Jul 15, 2026
75e7027
Synchronize Grok model state before skill lookup
jakeleventhal Jul 15, 2026
931a59f
Ignore environment variables during Grok skill discovery
jakeleventhal Jul 15, 2026
ed6ab15
Support provider skill discovery on mobile
jakeleventhal Jul 25, 2026
09b0e54
feat(server): expose Claude project skills
jakeleventhal Jul 29, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Next Next commit
Expose project provider skills in chat
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@jakeleventhal
jakeleventhal committed Jul 29, 2026
commit c757242464babba35294cbbb247ce3a5975cfb8b

There are no files selected for viewing

1 change: 1 addition & 0 deletions 1 apps/server/src/auth/RpcAuthorization.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const RPC_REQUIRED_SCOPES = {
[WS_METHODS.serverProbe]: AuthOrchestrationReadScope,
[WS_METHODS.serverGetConfig]: AuthOrchestrationReadScope,
[WS_METHODS.serverRefreshProviders]: AuthOrchestrationOperateScope,
[WS_METHODS.serverListProviderSkills]: AuthOrchestrationReadScope,
[WS_METHODS.serverUpdateProvider]: AuthOrchestrationOperateScope,
[WS_METHODS.serverUpdateServer]: AuthOrchestrationOperateScope,
[WS_METHODS.serverUpsertKeybinding]: AuthOrchestrationOperateScope,
Expand Down
45 changes: 43 additions & 2 deletions 45 apps/server/src/provider/Drivers/CodexDriver.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,15 @@ import { ServerConfig } from "../../config.ts";
import { ServerSettingsService } from "../../serverSettings.ts";
import { ProviderDriverError } from "../Errors.ts";
import { makeCodexAdapter } from "../Layers/CodexAdapter.ts";
import { checkCodexProviderStatus, makePendingCodexProvider } from "../Layers/CodexProvider.ts";
import {
checkCodexProviderStatus,
makePendingCodexProvider,
probeCodexAppServerProvider,
} from "../Layers/CodexProvider.ts";
import { ProviderEventLoggers } from "../Layers/ProviderEventLoggers.ts";
import { makeManagedServerProvider } from "../makeManagedServerProvider.ts";
import type { ProviderDriver, ProviderInstance } from "../ProviderDriver.ts";
import type { ServerProviderDraft } from "../providerSnapshot.ts";
import { AUTH_PROBE_TIMEOUT_MS, type ServerProviderDraft } from "../providerSnapshot.ts";
import { mergeProviderInstanceEnvironment } from "../ProviderInstanceEnvironment.ts";
import {
enrichProviderSnapshotWithVersionAdvisory,
Expand Down Expand Up @@ -161,6 +165,42 @@ export const CodexDriver: ProviderDriver<CodexSettings, CodexDriverEnv> = {
...(eventLoggers.native ? { nativeEventLogger: eventLoggers.native } : {}),
});
const textGeneration = yield* makeCodexTextGeneration(effectiveConfig, processEnv);
const listSkills = Effect.fn("CodexDriver.listSkills")(function* (cwd: string) {
if (!effectiveConfig.enabled) {
return [];
}

return yield* probeCodexAppServerProvider({
binaryPath: effectiveConfig.binaryPath,
homePath: effectiveConfig.homePath,
cwd,
customModels: [],
environment: processEnv,
includeModels: false,
Comment thread
Comment on lines +174 to +180

@chatgpt-codex-connector chatgpt-codex-connector Bot Jul 20, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Pass Codex launch args to skill probes

When a Codex instance is configured with launchArgs or T3CODE_CODEX_LAUNCH_ARGS (for example --strict-config, --config, or feature flags), status checks and real sessions resolve and pass those args, but this new server.listProviderSkills path starts a plain app-server without them. In that configuration the $ menu can discover a different skill set or fail even though the provider itself works with the configured app-server; pass the resolved launch args into probeCodexAppServerProvider here as the other Codex app-server callers do.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
}).pipe(
Comment thread
Comment on lines +174 to +181

@macroscopeapp macroscopeapp Bot Jul 20, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

🟡 Medium Drivers/CodexDriver.ts:173

listSkills calls probeCodexAppServerProvider without passing effectiveConfig.launchArgs, so instances that require custom Codex launch arguments (e.g. --config flags) are probed with a different app-server configuration than their normal snapshot and sessions. Skill discovery can return the wrong skill set or fail even though the provider itself works. Pass launchArgs: resolveCodexLaunchArgs(effectiveConfig.launchArgs, processEnv) as the status probe already does.

Suggested change
return yield* probeCodexAppServerProvider({
binaryPath: effectiveConfig.binaryPath,
homePath: effectiveConfig.homePath,
cwd,
customModels: [],
environment: processEnv,
includeModels: false,
}).pipe(
return yield* probeCodexAppServerProvider({
binaryPath: effectiveConfig.binaryPath,
homePath: effectiveConfig.homePath,
launchArgs: resolveCodexLaunchArgs(effectiveConfig.launchArgs, processEnv),
cwd,
customModels: [],
environment: processEnv,
includeModels: false,
}).pipe(
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/server/src/provider/Drivers/CodexDriver.ts around lines 173-180:

`listSkills` calls `probeCodexAppServerProvider` without passing `effectiveConfig.launchArgs`, so instances that require custom Codex launch arguments (e.g. `--config` flags) are probed with a different app-server configuration than their normal snapshot and sessions. Skill discovery can return the wrong skill set or fail even though the provider itself works. Pass `launchArgs: resolveCodexLaunchArgs(effectiveConfig.launchArgs, processEnv)` as the status probe already does.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved

Uh oh!

There was an error while loading. Please reload this page.

Effect.scoped,
Effect.map((result) => result.skills),
Effect.mapError(
(cause) =>
new ProviderDriverError({
driver: DRIVER_KIND,
instanceId,
detail: `Failed to list Codex skills: ${cause.message}`,
Comment thread

@macroscopeapp macroscopeapp Bot Jul 29, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Same issue as the Grok wrapper: detail interpolates cause.message, which then flows into ProviderDriverError.message. Interpolating an arbitrary defect message can also pull spawn command/output text into the caller-visible detail. Prefer structural context and keep the original error only as cause.

Suggested change
detail: `Failed to list Codex skills: ${cause.message}`,
detail: `Failed to list Codex skills for cwd '${cwd}'`,

Posted via Macroscope — Effect Service Conventions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread

@macroscopeapp macroscopeapp Bot Jul 29, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Same issue as the Grok wrapper: detail interpolates cause.message, which then flows into ProviderDriverError.message. Interpolating an arbitrary defect message can also pull spawn command/output text into the caller-visible detail. Prefer structural context and keep the original error only as cause.

Suggested change
detail: `Failed to list Codex skills: ${cause.message}`,
detail: `Failed to list Codex skills for cwd '${cwd}'`,

Posted via Macroscope — Effect Service Conventions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cause,
}),
),
Effect.timeoutOrElse({
duration: Duration.millis(AUTH_PROBE_TIMEOUT_MS),
orElse: () =>
new ProviderDriverError({
driver: DRIVER_KIND,
instanceId,
detail: `Timed out listing Codex skills after ${AUTH_PROBE_TIMEOUT_MS}ms`,
}),
}),
Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),
);
});

// Build a managed snapshot whose settings never change — mutations come
// in as instance rebuilds from the registry rather than in-place
Expand Down Expand Up @@ -208,6 +248,7 @@ export const CodexDriver: ProviderDriver<CodexSettings, CodexDriverEnv> = {
snapshot,
adapter,
textGeneration,
listSkills,
} satisfies ProviderInstance;
}),
};
26 changes: 26 additions & 0 deletions 26 apps/server/src/provider/Drivers/GrokDriver.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
checkGrokProviderStatus,
enrichGrokSnapshot,
} from "../Layers/GrokProvider.ts";
import { listGrokSkills } from "../Layers/GrokSkillDiscovery.ts";
import { ProviderEventLoggers } from "../Layers/ProviderEventLoggers.ts";
import { makeManagedServerProvider } from "../makeManagedServerProvider.ts";
import {
Expand Down Expand Up @@ -106,10 +107,34 @@ export const GrokDriver: ProviderDriver<GrokSettings, GrokDriverEnv> = {
env: processEnv,
});

const listSkills = Effect.fn("GrokDriver.listSkills")(function* (cwd: string) {
if (!effectiveConfig.enabled) {
return [];
}

return yield* listGrokSkills({
settings: effectiveConfig,
cwd,
environment: processEnv,
}).pipe(
Effect.provideService(ChildProcessSpawner.ChildProcessSpawner, spawner),
Effect.mapError(
(cause) =>
new ProviderDriverError({
driver: DRIVER_KIND,
instanceId,
detail: cause.message,
Comment thread

@macroscopeapp macroscopeapp Bot Jul 29, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

detail only copies cause.message, and ProviderDriverError.message interpolates detail, so the wrapper message is derived from the cause rather than from its own stable attributes. Consider a fixed detail that keeps the context known here (cwd) and leave the underlying failure available solely as cause.

Suggested change
detail: cause.message,
detail: `Failed to list Grok skills for cwd '${cwd}'`,

Posted via Macroscope — Effect Service Conventions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread

@macroscopeapp macroscopeapp Bot Jul 29, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

detail only copies cause.message, and ProviderDriverError.message interpolates detail, so the wrapper message is derived from the cause rather than from its own stable attributes. Consider a fixed detail that keeps the context known here (cwd) and leave the underlying failure available solely as cause.

Suggested change
detail: cause.message,
detail: `Failed to list Grok skills for cwd '${cwd}'`,

Posted via Macroscope — Effect Service Conventions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cause,
}),
),
);
});

const adapter = yield* makeGrokAdapter(effectiveConfig, {
environment: processEnv,
...(eventLoggers.native ? { nativeEventLogger: eventLoggers.native } : {}),
instanceId,
listSkills,
});
const textGeneration = yield* makeGrokTextGeneration(effectiveConfig, processEnv);

Expand Down Expand Up @@ -158,6 +183,7 @@ export const GrokDriver: ProviderDriver<GrokSettings, GrokDriverEnv> = {
snapshot,
adapter,
textGeneration,
listSkills,
} satisfies ProviderInstance;
}),
};
175 changes: 90 additions & 85 deletions 175 apps/server/src/provider/Layers/CodexProvider.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -313,101 +313,106 @@ export function buildCodexInitializeParams(): CodexSchema.V1InitializeParams {
};
}

const probeCodexAppServerProvider = Effect.fn("probeCodexAppServerProvider")(function* (input: {
readonly binaryPath: string;
readonly homePath?: string;
readonly launchArgs?: string;
readonly cwd: string;
readonly customModels?: ReadonlyArray<string>;
readonly environment?: NodeJS.ProcessEnv;
}) {
// `~` is not shell-expanded when env vars are set via `child_process.spawn`,
// so `CODEX_HOME=~/.codex_work` would reach codex verbatim and trip
// "CODEX_HOME points to '~/.codex_work', but that path does not exist".
// Expand here for parity with `CodexTextGeneration`/`CodexSessionRuntime`.
const resolvedHomePath = input.homePath ? expandHomePath(input.homePath) : undefined;
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
const environment = {
...input.environment,
...(resolvedHomePath ? { CODEX_HOME: resolvedHomePath } : {}),
};
const spawnCommand = yield* resolveSpawnCommand(
input.binaryPath,
codexAppServerArgs(input.launchArgs),
{
env: environment,
extendEnv: true,
},
);
const child = yield* spawner
.spawn(
ChildProcess.make(spawnCommand.command, spawnCommand.args, {
cwd: input.cwd,
export const probeCodexAppServerProvider = Effect.fn("probeCodexAppServerProvider")(
function* (input: {
readonly binaryPath: string;
readonly homePath?: string;
readonly launchArgs?: string;
readonly cwd: string;
readonly customModels?: ReadonlyArray<string>;
readonly environment?: NodeJS.ProcessEnv;
readonly includeModels?: boolean;
}) {
// `~` is not shell-expanded when env vars are set via `child_process.spawn`,
// so `CODEX_HOME=~/.codex_work` would reach codex verbatim and trip
// "CODEX_HOME points to '~/.codex_work', but that path does not exist".
// Expand here for parity with `CodexTextGeneration`/`CodexSessionRuntime`.
const resolvedHomePath = input.homePath ? expandHomePath(input.homePath) : undefined;
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
const environment = {
...input.environment,
...(resolvedHomePath ? { CODEX_HOME: resolvedHomePath } : {}),
};
const spawnCommand = yield* resolveSpawnCommand(
input.binaryPath,
codexAppServerArgs(input.launchArgs),
{
env: environment,
extendEnv: true,
forceKillAfter: CODEX_APP_SERVER_PROBE_FORCE_KILL_AFTER,
shell: spawnCommand.shell,
}),
)
.pipe(
Effect.mapError(
(cause) =>
new CodexErrors.CodexAppServerSpawnError({
command: `${input.binaryPath} app-server`,
cause,
}),
),
},
);
const child = yield* spawner
.spawn(
ChildProcess.make(spawnCommand.command, spawnCommand.args, {
cwd: input.cwd,
env: environment,
extendEnv: true,
forceKillAfter: CODEX_APP_SERVER_PROBE_FORCE_KILL_AFTER,
shell: spawnCommand.shell,
}),
)
.pipe(
Effect.mapError(
(cause) =>
new CodexErrors.CodexAppServerSpawnError({
command: `${input.binaryPath} app-server`,
cause,
}),
),
);
const clientContext = yield* Layer.build(CodexClient.layerChildProcess(child));
const client = yield* Effect.service(CodexClient.CodexAppServerClient).pipe(
Effect.provide(clientContext),
);
const clientContext = yield* Layer.build(CodexClient.layerChildProcess(child));
const client = yield* Effect.service(CodexClient.CodexAppServerClient).pipe(
Effect.provide(clientContext),
);

const initialize = yield* client.request("initialize", {
clientInfo: {
name: "t3code_desktop",
title: "T3 Code Desktop",
version: "0.1.0",
},
capabilities: {
experimentalApi: true,
},
});
yield* client.notify("initialized", undefined);
const initialize = yield* client.request("initialize", {
clientInfo: {
name: "t3code_desktop",
title: "T3 Code Desktop",
version: "0.1.0",
},
capabilities: {
experimentalApi: true,
},
});
yield* client.notify("initialized", undefined);

// Extract the version string after the first '/' in userAgent, up to the next space or the end
const versionMatch = initialize.userAgent.match(/\/([^\s]+)/);
const version = versionMatch ? versionMatch[1] : undefined;

const accountResponse = yield* client.request("account/read", {});
if (!accountResponse.account && accountResponse.requiresOpenaiAuth) {
return {
account: accountResponse,
version,
models: appendCustomCodexModels([], input.customModels ?? []),
skills: [],
} satisfies CodexAppServerProviderSnapshot;
}

// Extract the version string after the first '/' in userAgent, up to the next space or the end
const versionMatch = initialize.userAgent.match(/\/([^\s]+)/);
const version = versionMatch ? versionMatch[1] : undefined;
let skillsResponse: CodexSchema.V2SkillsListResponse;
let models: ReadonlyArray<ServerProviderModel>;
if (input.includeModels === false) {
skillsResponse = yield* client.request("skills/list", { cwds: [input.cwd] });
models = [];
} else {
[skillsResponse, models] = yield* Effect.all(
[client.request("skills/list", { cwds: [input.cwd] }), requestAllCodexModels(client)],
{ concurrency: "unbounded" },
);
}

const accountResponse = yield* client.request("account/read", {});
if (!accountResponse.account && accountResponse.requiresOpenaiAuth) {
return {
account: accountResponse,
version,
models: appendCustomCodexModels([], input.customModels ?? []),
skills: [],
models: applyPreferredCodexDefaultModel(
appendCustomCodexModels(models, input.customModels ?? []),
),
skills: parseCodexSkillsListResponse(skillsResponse, input.cwd),
} satisfies CodexAppServerProviderSnapshot;
}

const [skillsResponse, models] = yield* Effect.all(
[
client.request("skills/list", {
cwds: [input.cwd],
}),
requestAllCodexModels(client),
],
{ concurrency: "unbounded" },
);

return {
account: accountResponse,
version,
models: applyPreferredCodexDefaultModel(
appendCustomCodexModels(models, input.customModels ?? []),
),
skills: parseCodexSkillsListResponse(skillsResponse, input.cwd),
} satisfies CodexAppServerProviderSnapshot;
});
},
);

const emptyCodexModelsFromSettings = (codexSettings: CodexSettings): ServerProvider["models"] => {
const models = new Set<string>();
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.