@@ -2651,7 +2651,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te
26512651 Effect . gen ( function * ( ) {
26522652 const status = yield * checkClaudeProviderStatus (
26532653 defaultClaudeSettings ,
2654- claudeCapabilities ( ) ,
2654+ claudeCapabilities ( { tokenSource : "oauth" } ) ,
26552655 ) ;
26562656 assert . strictEqual ( status . status , "ready" ) ;
26572657 assert . strictEqual ( status . installed , true ) ;
@@ -2768,6 +2768,25 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te
27682768 ) ,
27692769 ) ;
27702770
2771+ it . effect ( "reports unknown auth when the initialization result has no account metadata" , ( ) =>
2772+ Effect . gen ( function * ( ) {
2773+ const status = yield * checkClaudeProviderStatus (
2774+ defaultClaudeSettings ,
2775+ claudeCapabilities ( ) ,
2776+ ) ;
2777+ assert . strictEqual ( status . status , "warning" ) ;
2778+ assert . strictEqual ( status . auth . status , "unknown" ) ;
2779+ } ) . pipe (
2780+ Effect . provide (
2781+ mockSpawnerLayer ( ( args ) => {
2782+ const joined = args . join ( " " ) ;
2783+ if ( joined === "--version" ) return { stdout : "1.0.0\n" , stderr : "" , code : 0 } ;
2784+ throw new Error ( `Unexpected args: ${ joined } ` ) ;
2785+ } ) ,
2786+ ) ,
2787+ ) ,
2788+ ) ;
2789+
27712790 it . effect ( "reports unauthenticated when the first-party CLI is logged out" , ( ) =>
27722791 Effect . gen ( function * ( ) {
27732792 const status = yield * checkClaudeProviderStatus (
@@ -2858,7 +2877,7 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te
28582877 ...defaultClaudeSettings ,
28592878 homePath : claudeConfigDir ,
28602879 } ,
2861- claudeCapabilities ( ) ,
2880+ claudeCapabilities ( { tokenSource : "oauth" } ) ,
28622881 ) ;
28632882 assert . strictEqual ( status . status , "ready" ) ;
28642883 // The home is resolved through the host Path before it reaches the env.
0 commit comments