@@ -506,6 +506,27 @@ it.layer(NodeServices.layer)("server settings", (it) => {
506506 const saved = yield * decodeServerSettingsJson ( yield * fs . readFileString ( config . settingsPath ) ) ;
507507 assert . equal ( saved . responseStreamingMode , "turn" ) ;
508508 assert . equal ( saved . observability . otlpTracesUrl , "http://localhost:4318/v1/traces" ) ;
509+
510+ yield * writeFileStringAtomically ( {
511+ filePath : config . settingsPath ,
512+ contents : `{ "responseStreamingMode": "paragraph" }` ,
513+ } ) ;
514+ const instanceId = ProviderInstanceId . make ( "acpRegistry_kilo" ) ;
515+ yield * serverSettings . updateProviderInstance ( {
516+ operation : "upsert" ,
517+ instanceId,
518+ instance : {
519+ driver : ProviderDriverKind . make ( "acpRegistry" ) ,
520+ displayName : "Kilo" ,
521+ config : { agentId : "kilo" , distribution : "auto" } ,
522+ } ,
523+ } ) ;
524+
525+ const afterProviderSave = yield * decodeServerSettingsJson (
526+ yield * fs . readFileString ( config . settingsPath ) ,
527+ ) ;
528+ assert . equal ( afterProviderSave . responseStreamingMode , "paragraph" ) ;
529+ assert . equal ( afterProviderSave . providerInstances [ instanceId ] ?. displayName , "Kilo" ) ;
509530 } ) . pipe ( Effect . provide ( layerServerSettings ( ) ) ) ,
510531 ) ;
511532
@@ -514,6 +535,7 @@ it.layer(NodeServices.layer)("server settings", (it) => {
514535 const config = yield * ServerConfig . ServerConfig ;
515536 const fs = yield * FileSystem . FileSystem ;
516537 const serverSettings = yield * ServerSettingsModule . ServerSettingsService ;
538+ yield * serverSettings . getSettings ;
517539 const raw = `{ "responseStreamingMode": "turn", ` ;
518540 yield * fs . writeFileString ( config . settingsPath , raw ) ;
519541
@@ -524,6 +546,8 @@ it.layer(NodeServices.layer)("server settings", (it) => {
524546 ) ;
525547
526548 assert . equal ( error . operation , "read-file" ) ;
549+ assert . equal ( error . settingsPath , config . settingsPath ) ;
550+ assert . instanceOf ( error . cause , Error ) ;
527551 assert . equal ( yield * fs . readFileString ( config . settingsPath ) , raw ) ;
528552 } ) . pipe ( Effect . provide ( layerServerSettings ( ) ) ) ,
529553 ) ;
0 commit comments