@@ -910,19 +910,19 @@ describe("AcpRegistrySupport", () => {
910910 it . effect ( "searches compatible agents with deterministic ranking and bounded metadata" , ( ) => {
911911 const exact = {
912912 ...
makeAgent ( { npx :
{ package :
"@example/[email protected] " } } ) , 913- id : "codex-acp " ,
914- name : "Codex " ,
915- authors : [ "OpenAI " , "Zed Industries" ] ,
913+ id : "kimi " ,
914+ name : "Kimi " ,
915+ authors : [ "Moonshot AI " , "Zed Industries" ] ,
916916 license : "Apache-2.0" ,
917- website : "https://example.test/codex " ,
918- repository : "https://example.test/codex /source" ,
919- icon : "https://example.test/codex .svg" ,
917+ website : "https://example.test/kimi " ,
918+ repository : "https://example.test/kimi /source" ,
919+ icon : "https://example.test/kimi .svg" ,
920920 } satisfies AcpRegistrySupport . AcpRegistryAgent ;
921921 const descriptionMatch = {
922922 ...
makeAgent ( { npx :
{ package :
"[email protected] " } } ) , 923923 id : "other-agent" ,
924924 name : "Other Agent" ,
925- description : "An adapter for Codex workflows" ,
925+ description : "An adapter for Kimi workflows" ,
926926 } satisfies AcpRegistrySupport . AcpRegistryAgent ;
927927 const incompatible = {
928928 ...makeAgent ( {
@@ -931,7 +931,7 @@ describe("AcpRegistrySupport", () => {
931931 } ,
932932 } ) ,
933933 id : "darwin-only" ,
934- name : "Codex Darwin" ,
934+ name : "Kimi Darwin" ,
935935 } satisfies AcpRegistrySupport . AcpRegistryAgent ;
936936
937937 return Effect . gen ( function * ( ) {
@@ -944,11 +944,11 @@ describe("AcpRegistrySupport", () => {
944944 toolsDir : `${ cacheDir } /tools` ,
945945 registryUrl,
946946 } ) ;
947- const result = yield * resolver . search ( { query : "codex " } ) ;
947+ const result = yield * resolver . search ( { query : "kimi " } ) ;
948948
949- expect ( result . agents . map ( ( agent ) => agent . id ) ) . toEqual ( [ "codex-acp " , "other-agent" ] ) ;
949+ expect ( result . agents . map ( ( agent ) => agent . id ) ) . toEqual ( [ "kimi " , "other-agent" ] ) ;
950950 expect ( result . agents [ 0 ] ) . toMatchObject ( {
951- authors : [ "OpenAI " , "Zed Industries" ] ,
951+ authors : [ "Moonshot AI " , "Zed Industries" ] ,
952952 distribution : "npx" ,
953953 integrity : "registry" ,
954954 license : "Apache-2.0" ,
@@ -973,6 +973,84 @@ describe("AcpRegistrySupport", () => {
973973 ) ;
974974 } ) ;
975975
976+ it . effect (
977+ "hides first-party providers from registry searches without breaking existing configs" ,
978+ ( ) => {
979+ const firstPartyAgents = (
980+ [
981+ [ "antigravity-acp" , "Google Antigravity" ] ,
982+ [ "claude-acp" , "Claude Agent" ] ,
983+ [ "codex-acp" , "Codex" ] ,
984+ [ "cursor" , "Cursor" ] ,
985+ [ "grok-build" , "Grok Build" ] ,
986+ [ "opencode" , "OpenCode" ] ,
987+ [ "pi-acp" , "pi ACP" ] ,
988+ ] as const
989+ ) . map ( ( [ id , name ] ) => ( {
990+ ...makeAgent ( {
991+ binary : { "linux-x86_64" : { archive : archiveUrl , cmd : "agent" } } ,
992+ } ) ,
993+ id,
994+ name,
995+ } ) ) ;
996+ const otherAgent = {
997+ ...makeAgent ( {
998+ binary : { "linux-x86_64" : { archive : archiveUrl , cmd : "agent" } } ,
999+ } ) ,
1000+ description : "Supports Codex workflows" ,
1001+ } ;
1002+ return Effect . gen ( function * ( ) {
1003+ const fileSystem = yield * FileSystem . FileSystem ;
1004+ const cacheDir = yield * fileSystem . makeTempDirectoryScoped ( {
1005+ prefix : "t3-acp-registry-first-party-" ,
1006+ } ) ;
1007+ const resolver = yield * AcpRegistrySupport . makeAcpRegistryCatalog ( {
1008+ cacheDir,
1009+ toolsDir : `${ cacheDir } /tools` ,
1010+ registryUrl,
1011+ } ) ;
1012+
1013+ expect ( ( yield * resolver . search ( { query : "" } ) ) . agents . map ( ( agent ) => agent . id ) ) . toEqual ( [
1014+ otherAgent . id ,
1015+ ] ) ;
1016+ for ( const agent of firstPartyAgents ) {
1017+ for ( const query of [ agent . id , agent . name ] ) {
1018+ expect (
1019+ ( yield * resolver . search ( { query } ) ) . agents . map ( ( result ) => result . id ) ,
1020+ ) . not . toContain ( agent . id ) ;
1021+ }
1022+ }
1023+ expect (
1024+ ( yield * resolver . search ( { query : "Codex" } ) ) . agents . map ( ( agent ) => agent . id ) ,
1025+ ) . toEqual ( [ otherAgent . id ] ) ;
1026+
1027+ const commandPath = `${ cacheDir } /existing-agent` ;
1028+ yield * fileSystem . writeFileString ( commandPath , "#!/bin/sh\n" ) ;
1029+ yield * fileSystem . chmod ( commandPath , 0o755 ) ;
1030+ const resolved = yield * resolver . resolve (
1031+ settings ( { agentId : "codex-acp" , commandPath } ) ,
1032+ "/workspace" ,
1033+ ) ;
1034+ expect ( resolved . agent ?. id ) . toBe ( "codex-acp" ) ;
1035+ expect ( resolved . spawn . command ) . toBe ( commandPath ) ;
1036+ } ) . pipe (
1037+ Effect . scoped ,
1038+ Effect . provide (
1039+ layerResolver ( ( request ) =>
1040+ Effect . succeed (
1041+ HttpClientResponse . fromWeb (
1042+ request ,
1043+ new Response (
1044+ JSON . stringify ( { version : "1.0.0" , agents : [ ...firstPartyAgents , otherAgent ] } ) ,
1045+ ) ,
1046+ ) ,
1047+ ) ,
1048+ ) ,
1049+ ) ,
1050+ ) ;
1051+ } ,
1052+ ) ;
1053+
9761054 it . effect ( "refreshes explicit searches and coalesces concurrent refreshes" , ( ) => {
9771055 const agent = makeAgent ( { npx :
{ package :
"@example/[email protected] " } } ) ; 9781056 let requests = 0 ;
0 commit comments